Last update at :2024-06-16,Edit by888u
Due to the needs of website applications, Memcache and Memcached extension components need to be installed and started in an environment where the AMH management panel is installed. Snail has also shared before that "WDCP panel enables Memcached distributed caching solution". Starting in the WDCP environment is relatively simple, but there are relatively few documents to solve problems when applying in the AMH environment, and the free version basically does not provide official technical support (since the AMH5.0 version has been charged, few people have mentioned about AMH (information), since we still have people using the AMH panel, in fact the current version 4.2 is still available. If you need to install Memcache and Memcached extension components, then continue reading below.
At the time of writing this article, the system tested by Snail was CENTOS 5 32-bit, and the AMH4.2 version was installed first.
Article Directory Hide
First, install Memcache
Second, install memcached
First, install Memcache
wgethttps://soft.laozuo.org/systems/memcache-2.2.7.tgztar zxvf memcache-2.2.7.tgzcd memcache-2.2.7/usr/local/php/bin/phpize./configure –with -php-config=/usr/local/php/bin/php-configmakemake install
Run the above script in SSH to install memcache2.2.7 version. If no problem occurs\\"Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts- 20090626/\\" results like this.
Then we edit the PHP.INI file (vi/etc/php.ini)
Add the following script to the last line of the document:
extension_dir = \\”/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/\\”extension = \\”memcache.so\\”
Then execute startup:
killall php-fpm/usr/local/php/sbin/php-fpm
If there is no prompt, it means it is OK. If you don't believe it, you can go to the PHPINFO file to see if there are more memcache parameters. If there is this item, it means it is OK.
Second, install memcached
A – Install livevent first
yum install libevent-devel
Before installing memcached, libevent must be installed
wgethttps://soft.laozuo.org/systems/memcached-1.4.15.tar.gztar -zxvf memcached-1.4.15.tar.gzcd memcached-1.4.15./configure –prefix=/usr/local /memcached –with-libevent=/usr/makemake install
Start the service and assign the port
/usr/local/memcached/bin/memcached -d -m 32 -l 127.0.0.1 -p 11211 -u root -P /tmp/memcached.pid
If there is no prompt, it means OK.
In this way, we have completed the installation of Memcache and Memcached extension components. If there are errors such as 502 errors during operation, we can restart the PHP environment in the background of the AMH panel.
PS: Finally, let me explain the difference between Memcache and Memcached. It seems that there is only one letter difference, but there is still a difference.
memcached has the same name as memcached, the daemon process of memcache. memcache is completely developed within the PHP framework, and memecached uses libmemcached.
Recommended site searches: domain name registration, domain name query, free mainland China space, China domain name trading center, foreign vps server rental, asp host space, Hong Kong cloud host, Hong Kong server, com domain name, Domain name space proxy,
发表评论