一键安装lamp之php插件-创新互联
#!/bin/sh
创新互联是一家专业提供道外企业网站建设,专注与成都网站设计、成都做网站、H5页面制作、小程序制作等业务。10年已为道外众多企业、政府机构等服务。创新互联专业网站建设公司优惠进行中。##一键优化lamp之php
#安装eaccelerator缓存加速器
cd /home/lvnian/tools
tar jxf eaccelerator-0.9.6.tar.bz2
cd eaccelerator-0.9.6
/application/php/bin/phpize
./configure --enable-eaccelerato=shared --with-php-config=/application/php/bin/php-config
echo $?
make && make install
ls -l /application/php5.3.27/lib/php/extensions/no-debug-zts-20090626/
######编译安装xcache,xcache和eaccelerator都是加速模块,在生产中选择一个安装就可以了
cd /home/lvnian/tools
tar jxf xcache-1.3.2.tar.bz2
cd xcache-1.3.2
/application/php/bin/phpize
./configure --enable-xcache --with-php-config=/application/php/bin/php-config
echo $?
make && make install
ls -l /application/php5.3.27/lib/php/extensions/no-debug-zts-20090626/
###安装PDO_MYSQL扩展插件(可选择的)
cd /home/lvnian/tools
tar zxf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2
/application/php/bin/phpize
./configure --with-php-config=/application/php/bin/php-config \
--with-pdo-mysql=/application/mysql
echo $?
make && make install
ls -l /application/php5.3.27/lib/php/extensions/no-debug-zts-20090626/
###安装数据量Memcache缓存客户端软件(客户端软件)
cd /home/lvnian/tools
tar zxf memcache-2.2.5.tgz
cd memcache-2.2.5
/application/php/bin/phpize
./configure --with-php-config=/application/php/bin/php-config
make && make install
ls -l /application/php5.3.27/lib/php/extensions/no-debug-zts-20090626/
###安装图像软件
yum -y instals -l perl-CPAN
cd /home/lvnian/tools
tar zxf ImageMagick.tar.gz
cd ImageMagick-6.5.1-2/
./configure
make && make install
##安装扩展插件
cd /home/lvnian/tools
tar zxf imagick-2.3.0.tgz
cd imagick-2.3.0
/application/php/bin/phpize
./configure --with-php-config=/application/php/bin/php-config
make && make install
ls -l /application/php5.3.27/lib/php/extensions/no-debug-zts-20090626/
##配置php加速和缓存模块扩展
cp /application/php/lib/php.ini /application/php/lib/php.ini.ori
grep ' extension_dir = "./"' /application/php/lib/php.ini
sed -i 's#; extension_dir = "./"#extension_dir = "/application/php/lib/php/extensions/no-debug-zts-20090626/"#g' /application/php/lib/php.ini
grep 'extension_dir = ' /application/php/lib/php.ini
cat >> /application/php/lib/php.ini < extension = memcache.so extension = pdo_mysql.so extension = imagick.so eof ##配置eaccelerator 缓存目录 grep User /application/apache/conf/httpd.conf mkdir -p /tmp/eaccelerator chown lvnian.lvnian /tmp/eaccelerator -R ##配置eaccelerator参数 cat >>/application/php/lib/php.ini< [eaccelerator] extension=eaccelerator.so eaccelerator.shm_size="128" eaccelerator.cache_dir="/tmp/eaccelerator" eaccelerator.enable="1" eaccelerator.optimizer="1" eaccelerator.check_mtime="1" eaccelerator.debug="0" eaccelerator.filter="" eaccelerator.shm_max="0" eaccelerator.shm_ttl="3600" eaccelerator.shm_prune_period="3600" eaccelerator.shm_only="0" eaccelerator.compress="1" eaccelerator.compress_level="9" eof echo "------------php eaccelerator-------------" /application/php/bin/php -v 另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
网站标题:一键安装lamp之php插件-创新互联
URL标题:http://pwwzsj.com/article/dogsii.html