Memcached: Precautions for installing memcached

Source: Internet
Author: User

1. Install libevent
Wget http://monkey.org /~ Provos/libevent-1.3b.tar.gz
Tar-zxf libevent-1.3b.tar.gz
CD libevent-1.3b
./Configure-Prefix =/data/libevent
Make
Make install

2. Install memcached
Wget http://www.danga.com/memcached/dist/memcached-1.2.2.tar.gz
Tar-zxf memcached-1.2.2.tar.gz
CD memcached-1.2.2
./Configure-Prefix =/data/memcached-with-libevent =/data/libevent/
Make
Make install

3. Install memcache extension for PHP
CD/data/PHP/bin/
./PECL install memcache
After the installation is complete, the system prompts you shoshould Add "Extension = memcache. So" to PhP. ini.
Modify PHP. ini
Add extension = no-debug-non-zts-20060613/memcache. So
Test/data/PHP/bin/PHP-l

4. Start memcached
#/Data/memcached/bin/memcached-D-M 1024-P 11211-u Root
/Data/memcached/bin/memcached-D-M 1024-P 11211-l 10.0.0.40-u Root
Parameter description-M specifies the number of megabytes of cache space used-l host name-P specifies the port to be listened to-u specifies the user to run

If you encounter problems when running memcached, the error prompt is as follows:
/Data/memcached/bin/memcached: Error while loading shared libraries: libevent-1.3b.so.1: cannot open shared object file: no such file or directory
Run ld_dubug = libs to know the library loading path when memcached is started. The details are as follows:
Ld_debug = libs/data/memcached/bin/memcached-V
21404: Find library = libpthread. so.0 [0]; Searching
21404: search cache =/etc/lD. So. Cache
21404: Trying file =/lib/tls/libpthread. so.0
21404:
21404: Find library = libevent-1.3b.so.1 [0]; Searching
21404: search cache =/etc/lD. So. Cache
21404: Search Path =/lib/tls/i686/sse2:/lib/tls/i686:/lib/tls/sse2:/lib/TLS:/lib/i686/sse2: /lib/i686:/lib/sse2:/lib:/usr/lib/tls/i686/sse2:/usr/lib/tls/i686: /usr/lib/tls/sse2:/usr/lib/TLS:/usr/lib/i686/sse2:/usr/lib/i686:/usr/lib/sse2: /usr/lib (system search path)
21404: Trying file =/lib/tls/i686/sse2/libevent-1.3b.so.1
21404: Trying file =/lib/tls/i686/libevent-1.3b.so.1
21404: Trying file =/lib/tls/sse2/libevent-1.3b.so.1
21404: Trying file =/lib/tls/libevent-1.3b.so.1
21404: Trying file =/lib/i686/sse2/libevent-1.3b.so.1
21404: Trying file =/lib/i686/libevent-1.3b.so.1
21404: Trying file =/lib/sse2/libevent-1.3b.so.1
21404: Trying file =/lib/libevent-1.3b.so.1
21404: Trying file =/usr/lib/tls/i686/sse2/libevent-1.3b.so.1
21404: Trying file =/usr/lib/tls/i686/libevent-1.3b.so.1
21404: Trying file =/usr/lib/tls/sse2/libevent-1.3b.so.1
21404: Trying file =/usr/lib/tls/libevent-1.3b.so.1
21404: Trying file =/usr/lib/i686/sse2/libevent-1.3b.so.1
21404: Trying file =/usr/lib/i686/libevent-1.3b.so.1
21404: Trying file =/usr/lib/sse2/libevent-1.3b.so.1
21404: Trying file =/usr/lib/libevent-1.3b.so.1
21404:

Then create a link for the libevent-1.3b.so.1:
Ln-S/data/libevent/lib/libevent-1.3b.so.1/lib/libevent-1.3b.so.1

Restart, OK.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.