fter I was done with install Memcached on CentOS a while ago, I just know today that there are 2 different PECL modules. One is “Memcache PECL” while another is “Memcached PECL”. The one I did before is “Memcache PECL”, so, now, I try to install “Memcached PECL” which is newer and require libmemcached library.
The content below is almost exactly to my previous Memcache PECL installed. Only a few changes to install Memcached PECL instead.
Get Libevent which is require to install Memcached. Their homepage is here -> http://www.monkey.org/~provos/libevent/
1
2
3
4
wget http://cloud.github.com/downloads/libevent/libevent/libevent-2.0.16-stable.tar.gz
tar -xvf libevent-2.0.16-stable.tar.gz
cd libevent-2.0.16-stable
./configure;make;make install;
Then, get Memcached from http://memcached.org
1
2
3
4
5
wget http://memcached.googlecode.com/files/memcached-1.4.10.tar.gz
gunzip memcached-1.4.10.tar.gz
tar -xvf memcached-1.4.10.tar
cd memcached-1.4.10
./configure;make;make install;
For me, I got an error below :
error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
So, I did steps below :
1
nano /etc/ld.so.conf.d/libevent-i386.conf
Then, enter into the textbox
1
/usr/local/lib/
Then, CTRL+O to save, CTRL+X to exit.
Then, run
1
ldconfig
Once you’re done with that, try run
1
memcached -d -u nobody -m 1024 127.0.0.1 -p 11211
This is not done yet, you need to let PHP knows to be able to use memcached.
1
2
3
4
wget http://launchpad.net/libmemcached/1.0/1.0.2/+download/libmemcached-1.0.2.tar.gz
tar -zxvf libmemcached-0.40.tar.gz
cd libmemcached-0.40
./configure
You will see screen below :
Then, run
make && make install
Then install Memcached PECL with below command :
1
pecl install memcached
Once it’s done, you will see the screen below:
With above picture, you may notice that the extension path is different to what we normally see. The path in the picture say :
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613
But what most module for PHP 5.2 installed will compile into
/usr/local/lib/php/extensions/no-debug-non-zts-20060613
Therefore, make sure you get the right path for extension_dirEdit php.ini to have lines below : (Make sure the line “extension_dir” is there or you need a full path to memcached.so )
1
2
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613"
extension=memcached.so
Then, restart HTTP and check PHP Status.. You will see Memcached info as below:
In case you need to use Memcached as a session handler. (Not require) Then, you need to edit php.ini and set variable below :
1
2
session.save_handler=memcached
session.save_path="127.0.0.1:11211"
Now, you’re done install Memcached on the server. However, you need to modify some code in your website script to make use of Memcached.
Server Information – Software
- CentOS 5.4
- DirectAdmin 1.351
- Apache 2.2.15
- PHP 5.2.13
- MySQL 5.1.45
آموزش نصب و کانفیگ مجازی ساز kvm
آموزش نصب VNC در Centos
آشنایی با 5 پلاگین کاربردی Nginx در وردپرس
آموزش نصب و فعالسازی SSL در سرورهای Cpanel
آموزش دانلود یک پوشه از یک سرور Remote
آموزش افزایش و بالا بردن امنیت WHMCS
آموزش ساخت صفحات اضافی در WHMCS
آشنایی با 15 دستور کاربردی در آنتی شل maldet
آموزش نصب و کانفیگ ftp سرور در CentOS 7
آموزش نصب phpmyadmin در nginx
آموزش نصب کلود لینوکس CloudLinux
آموزش تغییر IP و Hostname در Centos
آموزش شناسایی و حذف CryptoPHP PHP malware
آموزش افزایش امنیت سایت های جوملا Joomla
آموزش نصب Virtualizor روی centos 6.5
آشنایی با انواع Raid در سرور
آموزش نصب و کانفیگ php-fpm در دایرکت ادمین directadmin
آموزش نصب Spamassassin در دایرکت ادمین
آموزش خاموش کردن brute force notification
آموزش تنظیم mysql remote در دایرکت ادمین
سرویس کانفیگ ویژه امنیتی سرور
دستورالعمل جديد فعاليت سايت هاي چت روم
درباره پی سی سرور
تعطیلی 4 روزه بخش پشتیبانی
فروش ویژه سرورهای مجازی قدرتمند مختص چت روم های پربازدید
فروش ویژه سرور مجازی VPS بصورت مدیریت شده
خدمات مانیتورینگ و نگهداری و رفع اشکال سرور
کانفیگ سرورهای دایرکت ادمین
کانفیگ سرورهای سی پنل
اطلاعیه مهم: مدیران سایت های چت روم بخوانند
سیستم مدیریت محتوای سایت های عکس
راه اندازی سامانه پشتیبانی آنلاین پی سی سرور
سوء استفاده افراد کالاه بردار سود جو از نام پی سی پارسی
شروع بکار مجدد بخش پشتیبانی
تعطیلی 1 هفته ای بخش پشتیبانی بدلیل تغییر مکان شرکت
سیستم مدیریت محتوای سایت های تفریحی
سوء استفاده گروه سود جو "TopazVPS" گول نخورید
قوانین سرویس دهی پی سی سرور
طراحی چت روم
حفره امنیتی خطرناک در wordpress