一键安装lamp之php插件
#!/bin/sh
创新互联主要为客户提供服务项目涵盖了网页视觉设计、VI标志设计、成都全网营销推广、网站程序开发、HTML5响应式网站建设公司、移动网站建设、微商城、网站托管及网站维护、WEB系统开发、域名注册、国内外服务器租用、视频、平面设计、SEO优化排名。设计、前端、后端三个建站步骤的完善服务体系。一人跟踪测试的建站服务标准。已经为雨棚定制行业客户提供了网站推广服务。
##一键优化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
文章标题:一键安装lamp之php插件
当前地址:http://pwwzsj.com/article/goicpc.html