溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

linux php添加擴(kuò)展庫(kù)

發(fā)布時(shí)間:2020-09-20 08:48:34 來(lái)源:網(wǎng)絡(luò) 閱讀:1108 作者:yzy121403725 欄目:web開(kāi)發(fā)

CentOS_7.2編譯安裝PHP_5.6.20添加擴(kuò)展模塊

添加ZendGuardLoader擴(kuò)展:

# 解壓ZendGuardLoader.so到"/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/"目錄內(nèi)

chmod a+x /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/ZendGuardLoader.so
vim /etc/php.ini


# 添加
[ZendGuardLoader]
extension = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/ZendGuardLoader.so"zend_loader.enable = 1zend_loader.disable_licensing = 0zend_loader.obfuscation_level_support = 3


service php-fpm restart

 

 

添加Redis擴(kuò)展:


tar zxvf phpredis-2.2.7.tgz
rm -rvf package.xml
mv redis-2.2.7/ /usr/local/php/include/php/ext/redis/cd /usr/local/php/include/php/ext/redis/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install


vim /etc/php.ini
=
service php-fpm restart

 

 

添加MemCache擴(kuò)展:


tar zxvf phpmemcache-3.0.8.tgz
rm -rvf package.xml
mv memcache-3.0.8/ /usr/local/php/include/php/ext/memcache/cd /usr/local/php/include/php/ext/memcache/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install


vim /etc/php.ini
=
service php-fpm restart

 

 

添加MemCached擴(kuò)展:


tar zxvf phpmemcached-2.2.0.tgz
rm -rvf package.xml
mv memcached-2.2.0/ /usr/local/php/include/php/ext/memcached/cd /usr/local/php/include/php/ext/memcached/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached/ --enable-memcached
make
make install


vim /etc/php.ini
# 添加
[MemCached]
extension = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/memcached.so"
service php-fpm restart

 

 

添加Imagick擴(kuò)展:


tar zxvf phpimagick-3.4.0.tgz
rm -rvf package.xml
mv imagick-3.4.0/ /usr/local/php/include/php/ext/imagick/cd /usr/local/php/include/php/ext/imagick/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-imagick=/usr/local/p_w_picpathmagick
make
make install


vim /etc/php.ini
# 添加
[Imagick]
extension = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/imagick.so"
service php-fpm restart

 

 

添加X(jué)cache擴(kuò)展:


tar zxvf phpxcache-3.2.0.tar.gz
mv xcache-3.2.0/ /usr/local/php/include/php/ext/xcache
cd /usr/local/php/include/php/ext/xcache/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --enable-xcache --enable-xcache-coverager --enable-xcache-optimizer
make
make install



mkdir -p /home/xcache
touch /home/xcache/xcache
chmod 777 /home/xcache/xcache
echo -n "xcache-Passw0rd!" | md5sum
cp -r /usr/local/php/include/php/ext/xcache/htdocs/ /home/www/html/xcache
chown www:www -R /home/www/html/xcache/


vim /etc/php.ini


# 添加
[Xcache]
extension = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/xcache.so"xcache.shm_scheme = "mmap"xcache.size = 26M
xcache.count = 5 xcache.slots = 8K
xcache.ttl = 3600xcache.gc_interval = 300xcache.var_size = 4M
xcache.var_count = 5 xcache.var_slots = 8K
xcache.var_ttl = 0xcache.var_maxttl = 0xcache.var_gc_interval = 300xcache.test = Off
xcache.readonly_protection = Off
xcache.mmap_path = "/home/xcache/xcache"xcache.coredump_directory = ""xcache.cacher = On
xcache.stat = On
xcache.optimizer = Off
[xcache.admin]
xcache.admin.enable_auth = On
xcache.admin.user = "admin"xcache.admin.pass = "42ddb5e3f0dc3c4807a2b0c62b8d4d87"[xcache.coverager]
xcache.coverager = Off
xcache.coverager_autostart = On
xcache.coveragedump_directory = ""



向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI