Install Memcached1.4.5 in Ubuntu10.10

Source: Internet
Author: User
In Ubuntu10.10, Memcached is a high-performance distributed memory cache server. Generally, the database query results are cached to reduce the number of database accesses, so as to speed up dynamic Web applications and improve scalability. Memcached is often used to store the result set and session information for database operations. So we need equipment. Installing libevent2.0.10 is a prerequisite for installing Memcached1.4.5. Ubuntu 10 already has libevent1.4, but the version

In Ubuntu 10.10, Memcached is a high-performance distributed memory cache server. Generally, the database query results are cached to reduce the number of database accesses, so as to speed up dynamic Web applications and improve scalability. Memcached is often used to store the result set and session information for database operations. So we need equipment.

Install libevent2.0.10
This is a prerequisite for installing Memcached1.4.5. Ubuntu 10 already has libevent1.4, but the version is too low.

Rename-decompress-compile and install

Music libevent-2.0.10-stable.tar.gz libevent2010.tar.gz

Tar-zxvf libevent2010.tar.gz

Cd libevent-2.0.10-stable

./Configure-prefix =/usr/local

Make

Make install

After installation, check whether libevent and other files exist in/usr/local/lib.

Ls-al/usr/local/lib | grep libevent

Install memcache1.4.5
Tar-zxvf memcached-1.4.5.tar.gz

Cd memcached-1.4.5

./Configure

Make

Sudo make install

View installation results
Ls-al/usr/local/bin/memcached

Start memcached
/Usr/local/bin/memcached-d-m 128-u root-p 11211-P/tmp/memcached. pid

Parameter:-d. Start the daemon (running in the background)
-M: Memory allocated to memcache. The unit is MB.
-U users running memcached
-L Server IP address of the listener
-P listens to the server port. The default value is 11211.
-P (uppercase) stores the Memcache pid file, followed by the path

Memcached startup Error
Www.linuxidc.com @ linuxidc-laptop:/usr/local/bin $/usr/local/bin/memcached-d-m 128-u root-p 11211-P/tmp/memcached. pid

/Usr/local/bin/memcached: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory

The libevent2.0 package is installed in/usr/local/lib.

Solution: Establish a soft connection

Sudo ln-s/usr/local/lib/libevent-2.0.so.5/usr/lib/libevent-2.0.so.5

Check whether the creation is successful

Www.linuxidc.com @ linuxidc-laptop:/usr/local/lib $ ls-al/usr/lib | grep libevent

Telnet test memcached
Telnet to 192.168.1.2 11211

Trying 192.168.1.2...
Connected to 192.168.1.2.
Escape character is '^]'

View version

Version

VERSION 1.4.5

Stats View Details of memcached

Stats

STAT pid 9192

Statuptime 352

STAT time 1300907990

STAT version 1.4.5

STAT pointer_size 32

...

OK. memcached1.4.5 is successfully installed.

Related Article

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.