Linux

How to upgrade the version of the Memcached?

xmg · 5月13日 · 2020年

Step 1: verify the present version of memcached as below(e.g. in Xshell):

telnet 1.2.3.4  11211
stats

Note: please replace the 1.2.3.4 with your own host’s ip address

Step 2: visit the www.memcached.org and download the latest stable version(e.g. memcached-1.6.5.tar.gz).

Step 3: upload the downloaded file to the “/root/lnmp1.5/src” (lnmp1.5 for example,)

Step 4: modify the version you want in the file “/root/lnmp1.5/include/version.sh”, such as replace the “Memcached_Ver 1.5.14” with “Memcached_Ver 1.6.5”.

Step 5: delete the following information in the file “/root/lnmp/1.5/memcached.sh” as below:

5.1: find the ” if [ -s /usr/local/memcached/bin/memcached ]; then
        echo “Memcached already exists.”
    else”

delete it.

5.2: find the “useradd -s /sbin/nologin nobody” and delete the “fi” after it.

Step 6: carry out the installation as below(e.g. in Xshell ):

cd /root/lnmp1.5/
./addons.sh install memcached

enter 2 to choose installing the php-memcached and the installation will be finished in a few minutes.

Ok, all steps are done and you can verify your memcached version by step 1 or by visit your phpinfo.php like this article

0 条回应