《SaltStack技术入门与实践》—— 实践案例 <中小型Web架构>3 Memcached配置管理
实践案例 <中小型Web架构>3 Memcached配置管理
本章节参考《SaltStack技术入门与实践》,感谢该书作者: 刘继伟、沈灿、赵舜东
Memcached介绍
Memcached是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载。它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态数据库驱动网站的访问速度。Memcached基于一个存储键/值对的hashmap。其守护进程(daemon )是用C写的,但是客户端可以用任何语言来编写,并通过memcached协议与守护进程通信。我们这个架构案例使用Memcached来存储用户的session。
我们经常会在负载均衡的环境下遇到Session问题,一般的解决办法有三种:
- Session保持。
- Session复制。
- Session共享。
PHP可以很容易在php.ini配置中将Session存储在Memcached中,来实现Session共享,这样后端服务器有节点down机,用户的访问请求被调度到集群中的其他节点时,用户的会话也不会丢失。
Memcached的安装比较简单。首先Memcached依赖于libevent,所以需要先编译安装libevent,然后编译安装Memcached。后面我们在PHP配置管理中编写php-memcached的模块。同时还需要创建一个管理用户的配置,Memcached包括后面要配置的Nginx和PHP,都要使用www用户进行管理。
首先创建目录结构如下:
- [root@SaltMaster1(10.182.88.136)]$~:>mkdir -pv /srv/salt/prod/libevent/files
- [root@SaltMaster1(10.182.88.136)]$~:>mkdir -pv /srv/salt/prod/memcached/files
- [root@SaltMaster1(10.182.88.136)]$~:>mkdir -pv /srv/salt/prod/user
www用户配置
启动Memcached需要使用www用户,包括后面我们不熟Nginx和PHP都需要使用到www用户。所以我们把www用户的配置单独放置在user目录下:
- [root@SaltMaster1(10.182.88.136)]$~:>more /srv/salt/prod/user/www.sls
- www-user-group:
- group.present:
- - name: www
- - gid:
- user.present:
- - name: www
- - fullname: www
- - shell: /sbin/nologin
- - uid:
- - gid:
后期在需要使用到www用户的地方,将www.sls包含进去即可。
libevent配置
下载源码包:
- [root@SaltMaster1(10.182.88.136)]$~:>cd /srv/salt/prod/libevent/files/
- [root@SaltMaster1(10.182.88.136)]$files:>wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
- ---- ::-- https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
- Resolving github.com... 13.250.177.223, 13.229.188.59, 52.74.223.119
- Connecting to github.com|13.250.177.223|:... connected.
- HTTP request sent, awaiting response... Found
- Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/1856976/f9ea6922-e66b-11e6-9f5c-722c00daa657?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180703%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180703T085111Z&X-Amz-Expires=300&X-Amz-Signature=a7bd7bb09111081bf8a092e48f296a39493cc7f95809c0a259711e060aa44aed&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dlibevent-2.1.8-stable.tar.gz&response-content-type=application%2Foctet-stream [following]
- ---- ::-- https://github-production-release-asset-2e65be.s3.amazonaws.com/1856976/f9ea6922-e66b-11e6-9f5c-722c00daa657?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180703%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180703T085111Z&X-Amz-Expires=300&X-Amz-Signature=a7bd7bb09111081bf8a092e48f296a39493cc7f95809c0a259711e060aa44aed&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dlibevent-2.1.8-stable.tar.gz&response-content-type=application%2Foctet-stream
- Resolving github-production-release-asset-2e65be.s3.amazonaws.com... 52.216.128.35
- Connecting to github-production-release-asset-2e65be.s3.amazonaws.com|52.216.128.35|:... connected.
- HTTP request sent, awaiting response... OK
- Length: (1002K) [application/octet-stream]
- Saving to: `libevent-2.1.-stable.tar.gz'
- %[==================================================================================================================================================================================================>] ,, 357K/s in .8s
- -- :: ( KB/s) - `libevent-2.1.-stable.tar.gz' saved [1026485/1026485]
编写libevent部署SLS如下:
- [root@SaltMaster1(10.182.88.136)]$libevent:>more install.sls
- libevent-source-install:
- file.managed:
- - name: /tmp/libevent-2.1.-stable.tar.gz
- - source: salt://libevent/files/libevent-2.1.8-stable.tar.gz
- - user: root
- - group: root
- - mode:
- cmd.run:
- - name: cd /tmp/ && tar -zxf libevent-2.1.-stable.tar.gz && cd libevent-2.1.-stable && ./configure --prefix/export/servers/libevent-2.1. && make && make install
- - unless: test -d /usr/local/libevent
- - require:
- - file: libevent-source-install
执行状态模块
- [root@SaltMaster1(10.182.88.136)]$prod:>salt '10.182.76.78' state.highstate
- 10.182.76.78:
- ----------
- ID: /etc/resolv.conf
- Function: file.managed
- Result: True
- Comment: File /etc/resolv.conf is in the correct state
- Started: ::10.713289
- Duration: 43.146 ms
- Changes:
- ----------
- ID: /etc/profile
- Function: file.append
- Result: True
- Comment: File /etc/profile is in correct state
- Started: ::10.756701
- Duration: 4.649 ms
- Changes:
- ----------
- ID: /etc/bashrc
- Function: file.append
- Result: True
- Comment: File /etc/bashrc is in correct state
- Started: ::10.761555
- Duration: 4.932 ms
- Changes:
- ----------
- ID: net.ipv4.ip_forward
- Function: sysctl.present
- Result: True
- Comment: Sysctl value net.ipv4.ip_forward = is already set
- Started: ::10.768589
- Duration: 168.841 ms
- Changes:
- ----------
- ID: net.ipv4.conf.default.rp_filter
- Function: sysctl.present
- Result: True
- Comment: Sysctl value net.ipv4.conf.default.rp_filter = is already set
- Started: ::10.937904
- Duration: 164.89 ms
- Changes:
- ----------
- ID: net.ipv4.conf.default.accept_source_route
- Function: sysctl.present
- Result: True
- Comment: Sysctl value net.ipv4.conf.default.accept_source_route = is already set
- Started: ::11.103150
- Duration: 165.103 ms
- Changes:
- ----------
- ID: kernel.sysrq
- Function: sysctl.present
- Result: True
- Comment: Sysctl value kernel.sysrq = is already set
- Started: ::11.268613
- Duration: 164.378 ms
- Changes:
- ----------
- ID: kernel.core_uses_pid
- Function: sysctl.present
- Result: True
- Comment: Sysctl value kernel.core_uses_pid = is already set
- Started: ::11.433337
- Duration: 164.071 ms
- Changes:
- ----------
- ID: kernel.msgmnb
- Function: sysctl.present
- Result: True
- Comment: Sysctl value kernel.msgmnb = is already set
- Started: ::11.597731
- Duration: 164.621 ms
- Changes:
- ----------
- ID: kernel.msgmax
- Function: sysctl.present
- Result: True
- Comment: Sysctl value kernel.msgmax = is already set
- Started: ::11.762714
- Duration: 163.28 ms
- Changes:
- ----------
- ID: kernel.shmmax
- Function: sysctl.present
- Result: True
- Comment: Sysctl value kernel.shmmax = is already set
- Started: ::11.926318
- Duration: 163.713 ms
- Changes:
- ----------
- ID: kernel.shmall
- Function: sysctl.present
- Result: True
- Comment: Sysctl value kernel.shmall = is already set
- Started: ::12.090393
- Duration: 163.292 ms
- Changes:
- ----------
- ID: yum_repo_release
- Function: pkg.installed
- Result: True
- Comment: All specified packages are already installed
- Started: ::13.307564
- Duration: 2438.915 ms
- Changes:
- ----------
- ID: zabbix_repo_release
- Function: pkg.installed
- Result: True
- Comment: All specified packages are already installed
- Started: ::15.746854
- Duration: 816.17 ms
- Changes:
- ----------
- ID: libevent-source-install
- Function: file.managed
- Name: /tmp/libevent-2.1.-stable.tar.gz
- Result: True
- Comment: File /tmp/libevent-2.1.-stable.tar.gz is in the correct state
- Started: ::16.563350
- Duration: 56.331 ms
- Changes:
- ----------
- ID: libevent-source-install
- Function: cmd.run
- Name: cd /tmp/ && tar -zxf libevent-2.1.-stable.tar.gz && cd libevent-2.1.-stable && ./configure --prefix=/export/servers/libevent-2.1. && make && make install
- Result: True
- Comment: Command "cd /tmp/ && tar -zxf libevent-2.1.8-stable.tar.gz && cd libevent-2.1.8-stable && ./configure --prefix=/export/servers/libevent-2.1.8 && make && make install" run
- Started: ::16.620610
- Duration: 55072.186 ms
- Changes:
- ----------
- pid:
- retcode:
- stderr:
- File "./test/../event_rpcgen.py", line
- print s
- ^
- SyntaxError: Missing parentheses in call to 'print'. Did you mean print(s)?
- event_rpcgen.py failed, ./test/regress.gen.\[ch\] will be reused.
- stdout:
- checking for a BSD-compatible install... /usr/bin/install -c
- checking whether build environment is sane... yes
- checking for a thread-safe mkdir -p... /bin/mkdir -p
- checking for gawk... gawk
- checking whether make sets $(MAKE)... yes
- checking whether make supports nested variables... yes
- checking whether make supports nested variables... (cached) yes
- checking for style of include used by make... GNU
- checking for gcc... gcc
- checking whether the C compiler works... yes
- checking for C compiler default output file name... a.out
- checking for suffix of executables...
- checking whether we are cross compiling... no
- checking for suffix of object files... o
- checking whether we are using the GNU C compiler... yes
- checking whether gcc accepts -g... yes
- checking for gcc option to accept ISO C89... none needed
- checking whether gcc understands -c and -o together... yes
- checking dependency style of gcc... gcc3
- checking how to run the C preprocessor... gcc -E
- checking for grep that handles long lines and -e... /bin/grep
- checking for egrep... /bin/grep -E
- checking for ANSI C header files... yes
- checking for sys/types.h... yes
- checking for sys/stat.h... yes
- checking for stdlib.h... yes
- checking for string.h... yes
- checking for memory.h... yes
- checking for strings.h... yes
- checking for inttypes.h... yes
- checking for stdint.h... yes
- checking for unistd.h... yes
- checking minix/config.h usability... no
- checking minix/config.h presence... no
- checking for minix/config.h... no
- checking whether it is safe to define __EXTENSIONS__... yes
- checking build system type... x86_64-unknown-linux-gnu
- checking host system type... x86_64-unknown-linux-gnu
- checking whether ln -s works... yes
- checking for a sed that does not truncate output... /bin/sed
- checking whether gcc needs -traditional... no
- checking how to print strings... printf
- checking for a sed that does not truncate output... (cached) /bin/sed
- checking for fgrep... /bin/grep -F
- checking for ld used by gcc... /usr/bin/ld
- checking if the linker (/usr/bin/ld) is GNU ld... yes
- checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
- checking the name lister (/usr/bin/nm -B) interface... BSD nm
- checking the maximum length of command line arguments...
- checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
- checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
- checking for /usr/bin/ld option to reload object files... -r
- checking for objdump... objdump
- checking how to recognize dependent libraries... pass_all
- checking for dlltool... no
- checking how to associate runtime and link libraries... printf %s\n
- checking for ar... ar
- checking for archiver @FILE support... @
- checking for strip... strip
- checking for ranlib... ranlib
- checking command to parse /usr/bin/nm -B output from gcc object... ok
- checking for sysroot... no
- checking for a working dd... /bin/dd
- checking how to truncate binary pipes... /bin/dd bs= count=
- checking for mt... no
- checking if : is a manifest tool... no
- checking for dlfcn.h... yes
- checking for objdir... .libs
- checking if gcc supports -fno-rtti -fno-exceptions... no
- checking for gcc option to produce PIC... -fPIC -DPIC
- checking if gcc PIC flag -fPIC -DPIC works... yes
- checking if gcc static flag -static works... no
- checking if gcc supports -c -o file.o... yes
- checking if gcc supports -c -o file.o... (cached) yes
- checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
- checking whether -lc should be explicitly linked in... no
- checking dynamic linker characteristics... GNU/Linux ld.so
- checking how to hardcode library paths into programs... immediate
- checking whether stripping libraries is possible... yes
- checking if libtool supports shared libraries... yes
- checking whether to build shared libraries... yes
- checking whether to build static libraries... yes
- checking for library containing inet_ntoa... none required
- checking for library containing socket... none required
- checking for library containing inet_aton... none required
- checking for library containing clock_gettime... -lrt
- checking for clock_gettime... yes
- checking for library containing sendfile... none required
- checking for WIN32... no
- checking for CYGWIN... no
- checking zlib.h usability... yes
- checking zlib.h presence... yes
- checking for zlib.h... yes
- checking for library containing inflateEnd... -lz
- checking for special C compiler options needed for large files... no
- checking for _FILE_OFFSET_BITS value needed for large files... no
- checking for pkg-config... /usr/bin/pkg-config
- checking if pkg-config is at least version 0.15.... yes
- checking arpa/inet.h usability... yes
- checking arpa/inet.h presence... yes
- checking for arpa/inet.h... yes
- checking fcntl.h usability... yes
- checking fcntl.h presence... yes
- checking for fcntl.h... yes
- checking ifaddrs.h usability... yes
- checking ifaddrs.h presence... yes
- checking for ifaddrs.h... yes
- checking mach/mach_time.h usability... no
- checking mach/mach_time.h presence... no
- checking for mach/mach_time.h... no
- checking netdb.h usability... yes
- checking netdb.h presence... yes
- checking for netdb.h... yes
- checking netinet/in.h usability... yes
- checking netinet/in.h presence... yes
- checking for netinet/in.h... yes
- checking netinet/in6.h usability... no
- checking netinet/in6.h presence... no
- checking for netinet/in6.h... no
- checking netinet/tcp.h usability... yes
- checking netinet/tcp.h presence... yes
- checking for netinet/tcp.h... yes
- checking poll.h usability... yes
- checking poll.h presence... yes
- checking for poll.h... yes
- checking port.h usability... no
- checking port.h presence... no
- checking for port.h... no
- checking stdarg.h usability... yes
- checking stdarg.h presence... yes
- checking for stdarg.h... yes
- checking stddef.h usability... yes
- checking stddef.h presence... yes
- checking for stddef.h... yes
- checking sys/devpoll.h usability... no
- checking sys/devpoll.h presence... no
- checking for sys/devpoll.h... no
- checking sys/epoll.h usability... yes
- checking sys/epoll.h presence... yes
- checking for sys/epoll.h... yes
- checking sys/event.h usability... no
- checking sys/event.h presence... no
- checking for sys/event.h... no
- checking sys/eventfd.h usability... yes
- checking sys/eventfd.h presence... yes
- checking for sys/eventfd.h... yes
- checking sys/ioctl.h usability... yes
- checking sys/ioctl.h presence... yes
- checking for sys/ioctl.h... yes
- checking sys/mman.h usability... yes
- checking sys/mman.h presence... yes
- checking for sys/mman.h... yes
- checking sys/param.h usability... yes
- checking sys/param.h presence... yes
- checking for sys/param.h... yes
- checking sys/queue.h usability... yes
- checking sys/queue.h presence... yes
- checking for sys/queue.h... yes
- checking sys/resource.h usability... yes
- checking sys/resource.h presence... yes
- checking for sys/resource.h... yes
- checking sys/select.h usability... yes
- checking sys/select.h presence... yes
- checking for sys/select.h... yes
- checking sys/sendfile.h usability... yes
- checking sys/sendfile.h presence... yes
- checking for sys/sendfile.h... yes
- checking sys/socket.h usability... yes
- checking sys/socket.h presence... yes
- checking for sys/socket.h... yes
- checking for sys/stat.h... (cached) yes
- checking sys/time.h usability... yes
- checking sys/time.h presence... yes
- checking for sys/time.h... yes
- checking sys/timerfd.h usability... yes
- checking sys/timerfd.h presence... yes
- checking for sys/timerfd.h... yes
- checking sys/uio.h usability... yes
- checking sys/uio.h presence... yes
- checking for sys/uio.h... yes
- checking sys/wait.h usability... yes
- checking sys/wait.h presence... yes
- checking for sys/wait.h... yes
- checking errno.h usability... yes
- checking errno.h presence... yes
- checking for errno.h... yes
- checking for sys/sysctl.h... yes
- checking for TAILQ_FOREACH in sys/queue.h... yes
- checking for timeradd in sys/time.h... yes
- checking for timercmp in sys/time.h... yes
- checking for timerclear in sys/time.h... yes
- checking for timerisset in sys/time.h... yes
- checking whether CTL_KERN is declared... yes
- checking whether KERN_RANDOM is declared... yes
- checking whether RANDOM_UUID is declared... yes
- checking whether KERN_ARND is declared... no
- checking for an ANSI C-conforming const... yes
- checking for inline... inline
- checking whether time.h and sys/time.h may both be included... yes
- checking for accept4... yes
- checking for arc4random... no
- checking for arc4random_buf... no
- checking for eventfd... yes
- checking for epoll_create1... yes
- checking for fcntl... yes
- checking for getegid... yes
- checking for geteuid... yes
- checking for getifaddrs... yes
- checking for getnameinfo... yes
- checking for getprotobynumber... yes
- checking for gettimeofday... yes
- checking for inet_ntop... yes
- checking for inet_pton... yes
- checking for issetugid... no
- checking for mach_absolute_time... no
- checking for mmap... yes
- checking for nanosleep... yes
- checking for pipe... yes
- checking for pipe2... yes
- checking for putenv... yes
- checking for sendfile... yes
- checking for setenv... yes
- checking for setrlimit... yes
- checking for sigaction... yes
- checking for signal... yes
- checking for splice... yes
- checking for strlcpy... no
- checking for strsep... yes
- checking for strtok_r... yes
- checking for strtoll... yes
- checking for sysctl... yes
- checking for timerfd_create... yes
- checking for umask... yes
- checking for unsetenv... yes
- checking for usleep... yes
- checking for vasprintf... yes
- checking for getservbyname... yes
- checking for getaddrinfo... yes
- checking for F_SETFD in fcntl.h... yes
- checking for select... yes
- checking for poll... yes
- checking for epoll_ctl... yes
- checking waitpid support WNOWAIT... no
- checking for port_create... no
- checking for pid_t... yes
- checking for size_t... yes
- checking for ssize_t... yes
- checking for uint64_t... yes
- checking for uint32_t... yes
- checking for uint16_t... yes
- checking for uint8_t... yes
- checking for uintptr_t... yes
- checking for fd_mask... yes
- checking size of long long...
- checking size of long...
- checking size of int...
- checking size of short...
- checking size of size_t...
- checking size of void *...
- checking size of off_t...
- checking for struct in6_addr... yes
- checking for struct sockaddr_in6... yes
- checking for sa_family_t... yes
- checking for struct addrinfo... yes
- checking for struct sockaddr_storage... yes
- checking for struct in6_addr.s6_addr32... yes
- checking for struct in6_addr.s6_addr16... yes
- checking for struct sockaddr_in.sin_len... no
- checking for struct sockaddr_in6.sin6_len... no
- checking for struct sockaddr_storage.ss_family... yes
- checking for struct sockaddr_storage.__ss_family... no
- checking for struct so_linger... no
- checking for socklen_t... yes
- checking whether our compiler supports __func__... yes
- checking for the pthreads library -lpthreads... no
- checking whether pthreads work without any flags... yes
- checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
- checking if more special flags are required for pthreads... no
- checking size of pthread_t...
- checking for library containing ERR_remove_thread_state... -lcrypto
- checking that generated files are newer than configure... done
- configure: creating ./config.status
- config.status: creating libevent.pc
- config.status: creating libevent_openssl.pc
- config.status: creating libevent_pthreads.pc
- config.status: creating libevent_core.pc
- config.status: creating libevent_extra.pc
- config.status: creating Makefile
- config.status: creating config.h
- config.status: creating evconfig-private.h
- config.status: evconfig-private.h is unchanged
- config.status: executing depfiles commands
- config.status: executing libtool commands
- GEN test/rpcgen-attempted
- GEN include/event2/event-config.h
- make all-am
- make[]: Entering directory `/tmp/libevent-2.1.-stable'
- CC buffer.lo
- CC bufferevent.lo
- CC bufferevent_filter.lo
- CC bufferevent_pair.lo
- CC bufferevent_ratelim.lo
- CC bufferevent_sock.lo
- CC event.lo
- CC evmap.lo
- CC evthread.lo
- CC evutil.lo
- CC evutil_rand.lo
- CC evutil_time.lo
- CC listener.lo
- CC log.lo
- CC strlcpy.lo
- CC select.lo
- CC poll.lo
- CC epoll.lo
- CC signal.lo
- CC evdns.lo
- CC event_tagging.lo
- CC evrpc.lo
- CC http.lo
- CCLD libevent.la
- CCLD libevent_core.la
- CCLD libevent_extra.la
- CC evthread_pthread.lo
- CCLD libevent_pthreads.la
- CC libevent_openssl_la-bufferevent_openssl.lo
- CCLD libevent_openssl.la
- CC sample/dns-example.o
- CCLD sample/dns-example
- CC sample/event-read-fifo.o
- CCLD sample/event-read-fifo
- CC sample/hello-world.o
- CCLD sample/hello-world
- CC sample/http-server.o
- CCLD sample/http-server
- CC sample/http-connect.o
- CCLD sample/http-connect
- CC sample/signal-test.o
- CCLD sample/signal-test
- CC sample/time-test.o
- CCLD sample/time-test
- CC sample/le-proxy.o
- CCLD sample/le-proxy
- CC sample/https-client.o
- CC sample/hostcheck.o
- CC sample/openssl_hostname_validation.o
- CCLD sample/https-client
- CC test/bench.o
- CCLD test/bench
- CC test/bench_cascade.o
- CCLD test/bench_cascade
- CC test/bench_http.o
- CCLD test/bench_http
- CC test/bench_httpclient.o
- CCLD test/bench_httpclient
- CC test/test-changelist.o
- CCLD test/test-changelist
- CC test/test-dumpevents.o
- CCLD test/test-dumpevents
- CC test/test-eof.o
- CCLD test/test-eof
- CC test/test-closed.o
- CCLD test/test-closed
- CC test/test-fdleak.o
- CCLD test/test-fdleak
- CC test/test-init.o
- CCLD test/test-init
- CC test/test-ratelim.o
- CCLD test/test-ratelim
- CC test/test-time.o
- CCLD test/test-time
- CC test/test-weof.o
- CCLD test/test-weof
- CC test/test_regress-regress.o
- CC test/test_regress-regress.gen.o
- CC test/test_regress-regress_buffer.o
- CC test/test_regress-regress_bufferevent.o
- CC test/test_regress-regress_dns.o
- CC test/test_regress-regress_et.o
- CC test/test_regress-regress_finalize.o
- CC test/test_regress-regress_http.o
- CC test/test_regress-regress_listener.o
- CC test/test_regress-regress_main.o
- CC test/test_regress-regress_minheap.o
- CC test/test_regress-regress_rpc.o
- CC test/test_regress-regress_testutils.o
- CC test/test_regress-regress_util.o
- CC test/test_regress-tinytest.o
- CC test/test_regress-regress_thread.o
- CC test/test_regress-regress_zlib.o
- CC test/test_regress-regress_ssl.o
- CCLD test/regress
- make[]: Leaving directory `/tmp/libevent-2.1.-stable'
- make install-am
- make[]: Entering directory `/tmp/libevent-2.1.-stable'
- make[]: Entering directory `/tmp/libevent-2.1.-stable'
- /bin/mkdir -p '/export/servers/libevent-2.1.8/bin'
- /usr/bin/install -c event_rpcgen.py '/export/servers/libevent-2.1.8/bin'
- /bin/mkdir -p '/export/servers/libevent-2.1.8/lib'
- /bin/sh ./libtool --mode=install /usr/bin/install -c libevent.la libevent_core.la libevent_extra.la libevent_pthreads.la libevent_openssl.la '/export/servers/libevent-2.1.8/lib'
- libtool: install: /usr/bin/install -c .libs/libevent-2.1.so.6.0. /export/servers/libevent-2.1./lib/libevent-2.1.so.6.0.
- libtool: install: (cd /export/servers/libevent-2.1./lib && { ln -s -f libevent-2.1.so.6.0. libevent-2.1.so. || { rm -f libevent-2.1.so. && ln -s libevent-2.1.so.6.0. libevent-2.1.so.; }; })
- libtool: install: (cd /export/servers/libevent-2.1./lib && { ln -s -f libevent-2.1.so.6.0. libevent.so || { rm -f libevent.so && ln -s libevent-2.1.so.6.0. libevent.so; }; })
- libtool: install: /usr/bin/install -c .libs/libevent.lai /export/servers/libevent-2.1./lib/libevent.la
- libtool: install: /usr/bin/install -c .libs/libevent_core-2.1.so.6.0. /export/servers/libevent-2.1./lib/libevent_core-2.1.so.6.0.
- libtool: install: (cd /export/servers/libevent-2.1./lib && { ln -s -f libevent_core-2.1.so.6.0. libevent_core-2.1.so. || { rm -f libevent_core-2.1.so. && ln -s libevent_core-2.1.so.6.0. libevent_core-2.1.so.; }; })
- libtool: install: (cd /export/servers/libevent-2.1./lib && { ln -s -f libevent_core-2.1.so.6.0. libevent_core.so || { rm -f libevent_core.so && ln -s libevent_core-2.1.so.6.0. libevent_core.so; }; })
- libtool: install: /usr/bin/install -c .libs/libevent_core.lai /export/servers/libevent-2.1./lib/libevent_core.la
- libtool: install: /usr/bin/install -c .libs/libevent_extra-2.1.so.6.0. /export/servers/libevent-2.1./lib/libevent_extra-2.1.so.6.0.
- libtool: install: (cd /export/servers/libevent-2.1./lib && { ln -s -f libevent_extra-2.1.so.6.0. libevent_extra-2.1.so. || { rm -f libevent_extra-2.1.so. && ln -s libevent_extra-2.1.so.6.0. libevent_extra-2.1.so.; }; })
- libtool: install: (cd /export/servers/libevent-2.1./lib && { ln -s -f libevent_extra-2.1.so.6.0. libevent_extra.so || { rm -f libevent_extra.so && ln -s libevent_extra-2.1.so.6.0. libevent_extra.so; }; })
- libtool: install: /usr/bin/install -c .libs/libevent_extra.lai /export/servers/libevent-2.1./lib/libevent_extra.la
- libtool: install: /usr/bin/install -c .libs/libevent_pthreads-2.1.so.6.0. /export/servers/libevent-2.1./lib/libevent_pthreads-2.1.so.6.0.
- libtool: install: (cd /export/servers/libevent-2.1./lib && { ln -s -f libevent_pthreads-2.1.so.6.0. libevent_pthreads-2.1.so. || { rm -f libevent_pthreads-2.1.so. && ln -s libevent_pthreads-2.1.so.6.0. libevent_pthreads-2.1.so.; }; })
- libtool: install: (cd /export/servers/libevent-2.1./lib && { ln -s -f libevent_pthreads-2.1.so.6.0. libevent_pthreads.so || { rm -f libevent_pthreads.so && ln -s libevent_pthreads-2.1.so.6.0. libevent_pthreads.so; }; })
- libtool: install: /usr/bin/install -c .libs/libevent_pthreads.lai /export/servers/libevent-2.1./lib/libevent_pthreads.la
- libtool: install: /usr/bin/install -c .libs/libevent_openssl-2.1.so.6.0. /export/servers/libevent-2.1./lib/libevent_openssl-2.1.so.6.0.
- libtool: install: (cd /export/servers/libevent-2.1./lib && { ln -s -f libevent_openssl-2.1.so.6.0. libevent_openssl-2.1.so. || { rm -f libevent_openssl-2.1.so. && ln -s libevent_openssl-2.1.so.6.0. libevent_openssl-2.1.so.; }; })
- libtool: install: (cd /export/servers/libevent-2.1./lib && { ln -s -f libevent_openssl-2.1.so.6.0. libevent_openssl.so || { rm -f libevent_openssl.so && ln -s libevent_openssl-2.1.so.6.0. libevent_openssl.so; }; })
- libtool: install: /usr/bin/install -c .libs/libevent_openssl.lai /export/servers/libevent-2.1./lib/libevent_openssl.la
- libtool: install: /usr/bin/install -c .libs/libevent.a /export/servers/libevent-2.1./lib/libevent.a
- libtool: install: chmod /export/servers/libevent-2.1./lib/libevent.a
- libtool: install: ranlib /export/servers/libevent-2.1./lib/libevent.a
- libtool: install: /usr/bin/install -c .libs/libevent_core.a /export/servers/libevent-2.1./lib/libevent_core.a
- libtool: install: chmod /export/servers/libevent-2.1./lib/libevent_core.a
- libtool: install: ranlib /export/servers/libevent-2.1./lib/libevent_core.a
- libtool: install: /usr/bin/install -c .libs/libevent_extra.a /export/servers/libevent-2.1./lib/libevent_extra.a
- libtool: install: chmod /export/servers/libevent-2.1./lib/libevent_extra.a
- libtool: install: ranlib /export/servers/libevent-2.1./lib/libevent_extra.a
- libtool: install: /usr/bin/install -c .libs/libevent_pthreads.a /export/servers/libevent-2.1./lib/libevent_pthreads.a
- libtool: install: chmod /export/servers/libevent-2.1./lib/libevent_pthreads.a
- libtool: install: ranlib /export/servers/libevent-2.1./lib/libevent_pthreads.a
- libtool: install: /usr/bin/install -c .libs/libevent_openssl.a /export/servers/libevent-2.1./lib/libevent_openssl.a
- libtool: install: chmod /export/servers/libevent-2.1./lib/libevent_openssl.a
- libtool: install: ranlib /export/servers/libevent-2.1./lib/libevent_openssl.a
- libtool: finish: PATH="/export/servers/jdk1.8.0_20/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/sbin" ldconfig -n /export/servers/libevent-2.1./lib
- ----------------------------------------------------------------------
- Libraries have been installed in:
- /export/servers/libevent-2.1./lib
- If you ever happen to want to link against installed libraries
- in a given directory, LIBDIR, you must either use libtool, and
- specify the full pathname of the library, or use the '-LLIBDIR'
- flag during linking and do at least one of the following:
- - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
- during execution
- - add LIBDIR to the 'LD_RUN_PATH' environment variable
- during linking
- - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- - have your system administrator add LIBDIR to '/etc/ld.so.conf'
- See any operating system documentation about shared libraries for
- more information, such as the ld() and ld.so() manual pages.
- ----------------------------------------------------------------------
- /bin/mkdir -p '/export/servers/libevent-2.1.8/include'
- /usr/bin/install -c -m include/evdns.h include/event.h include/evhttp.h include/evrpc.h include/evutil.h '/export/servers/libevent-2.1.8/include'
- /bin/mkdir -p '/export/servers/libevent-2.1.8/include/event2'
- /usr/bin/install -c -m include/event2/buffer.h include/event2/buffer_compat.h include/event2/bufferevent.h include/event2/bufferevent_compat.h include/event2/bufferevent_ssl.h include/event2/bufferevent_struct.h include/event2/dns.h include/event2/dns_compat.h include/event2/dns_struct.h include/event2/event.h include/event2/event_compat.h include/event2/event_struct.h include/event2/http.h include/event2/http_compat.h include/event2/http_struct.h include/event2/keyvalq_struct.h include/event2/listener.h include/event2/rpc.h include/event2/rpc_compat.h include/event2/rpc_struct.h include/event2/tag.h include/event2/tag_compat.h include/event2/thread.h include/event2/util.h include/event2/visibility.h '/export/servers/libevent-2.1.8/include/event2'
- /bin/mkdir -p '/export/servers/libevent-2.1.8/include/event2'
- /usr/bin/install -c -m include/event2/event-config.h '/export/servers/libevent-2.1.8/include/event2'
- /bin/mkdir -p '/export/servers/libevent-2.1.8/lib/pkgconfig'
- /usr/bin/install -c -m libevent.pc libevent_core.pc libevent_extra.pc libevent_pthreads.pc libevent_openssl.pc '/export/servers/libevent-2.1.8/lib/pkgconfig'
- make[]: Leaving directory `/tmp/libevent-2.1.-stable'
- make[]: Leaving directory `/tmp/libevent-2.1.-stable'
- ----------
- ID: /export/servers/libevent-2.1.
- Function: file.directory
- Result: True
- Comment: The directory /export/servers/libevent-2.1. is in the correct state
- Started: ::11.693267
- Duration: 1.892 ms
- Changes:
- Summary for 10.182.76.78
- -------------
- Succeeded: (changed=)
- Failed:
- -------------
- Total states run:
- Total run time: 59.920 s
Memcached配置
《SaltStack技术入门与实践》—— 实践案例 <中小型Web架构>3 Memcached配置管理的更多相关文章
- 《SaltStack技术入门与实践》—— Grains
Grains 本章节参考<SaltStack技术入门与实践>,感谢该书作者: 刘继伟.沈灿.赵舜东 前几章我们已经了解SaltStack各个组件以及通过一个案例去熟悉它的各种应用,从这章开 ...
- 《SaltStack技术入门与实践》—— Peer
Peer 本章节参考<SaltStack技术入门与实践>,感谢该书作者: 刘继伟.沈灿.赵舜东 Peer组件是SaltStack中Minion向Master发布任务的一个组件,使用Peer ...
- 《SaltStack技术入门与实践》—— Mine
Mine 本章节参考<SaltStack技术入门与实践>,感谢该书作者: 刘继伟.沈灿.赵舜东 Mine是SaltStack收集Minion数据存储到Master的一个组件,它的功能与Gr ...
- 《SaltStack技术入门与实践》—— Renderer组件
Renderer组件 本章节参考<SaltStack技术入门与实践>,感谢该书作者: 刘继伟.沈灿.赵舜东 前面我们已经提过使用Python语言编写state.sls文件.在SaltSta ...
- 《SaltStack技术入门与实践》—— Event和Reactor系统
Event和Reactor系统 本章节参考<SaltStack技术入门与实践>,感谢该书作者: 刘继伟.沈灿.赵舜东 Event是SaltStack里面的对每个事件的一个记录,它相比job ...
- 《SaltStack技术入门与实践》—— Job管理
Job管理 本章节参考<SaltStack技术入门与实践>,感谢该书作者: 刘继伟.沈灿.赵舜东 在SaltStack里面执行任何一个操作都会在Master上产生一个jid号.Minion ...
- 《SaltStack技术入门与实践》——执行结果处理
执行结果处理 本章节参考<SaltStack技术入门与实践>,感谢该书作者: 刘继伟.沈灿.赵舜东 Return组件可以理解为SaltStack系统对执行Minion返回后的数据进行存储或 ...
- saltstack技术入门与实践
基本原理 SaltStack 采用`C/S`模式,server端就是salt的master,client端就是minion,minion与master之间通过`ZeroMQ`消息队列通信. minio ...
- 读《淘宝技术这十年》 总结下web架构的发展
关键词就两 分布式 缓存 分布式 数据库,应用服务器等的多节点部署,数据库的读写分离,剥离文件系统 缓存 数据缓存 静态页面缓存 php时代 最初LAMP起步 并将数据库做读写分离,拆分为主库+从库 ...
随机推荐
- NFA转换为等价的DFA
在编译系统中,词法分析阶段是整个编译系统的基础.对于单词的识别,有限自动机FA是一种十分有效的工具.有限自动机由其映射f是否为单值而分为确定的有限自动机DFA和非确定的有限自动机NFA.在非确定的有限 ...
- 在Linux命令行模式安装VMware Tools
在Linux命令行模式安装VMware Tools 方法/步骤1: 首先启动CentOS 7,在VMware中点击上方“VM”,点击“Install VMware Tools...”(如已安装则显示“ ...
- Pytorch笔记 (1) 初始神经网络
一.人工神经元 上方人工神经元中: 输入 * 权重 ——> 相当于 人神经元中 树突的功能 各输入 相加 ,再做非线性变化f ——> 相当于胞体的功能 将非线性变化的结果输出 ——& ...
- 【BW系列】SAP 讲讲BW/4 HANA和BW on HANA的区别
公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[BW系列]SAP 讲讲BW/4 HANA和BW ...
- LeetCode.1018-可被5整除的二进制数(Binary Prefix Divisible By 5)
这是小川的第379次更新,第407篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第241题(顺位题号是1018).给定0和1的数组A,考虑N_i:从A[0]到A[i]的第 ...
- Akka系列(九):Akka分布式之Akka Remote
前言.... Akka作为一个天生用于构建分布式应用的工具,当然提供了用于分布式组件即Akka Remote,那么我们就来看看如何用Akka Remote以及Akka Serialization来构建 ...
- 使用graphics.h来绘制图形
| 版权声明:本文为博主原创文章,未经博主允许不得转载. graphics.h是TC里面的图形库,如果要用的话应该用TC来编译.分为:像素函数.直线和线型函数.多边形函数.填充函数等.然而在我们使 ...
- Spring MVC 中使用AOP 进行统一日志管理--XML配置实现
1.介绍 上一篇博客写了使用AOP进行统一日志管理的注解版实现,今天写一下使用XML配置实现版本,与上篇不同的是上次我们记录的Controller层日志,这次我们记录的是Service层的日志.使用的 ...
- 28、周末看电影(每周五自动从top250中随机选取三部电影,并将下载链接发到邮箱里)
练习介绍 在第3关的一个课后练习里,我们爬取了指定电影的下载链接:在第6关的一个课后练习里,我们存储了豆瓣TOP250的榜单信息. 现在,我们完善这个程序,每周五在存储的榜单中,随机抽三部 ...
- c# 模拟post登录
使用模拟登录大致可以分为两步 一.post登录获取cookis public CookieContainer GetCookie(string url,string account,string pa ...