背景:
阅读新闻
CentOS 6.4 下的LNMP 生产环境搭建及安装脚本
[日期:2013-11-07] 来源:Linux社区 作者:renzhenxing [字体:]
12 修改php.ini增加memcache,ea等软件信息
添加memcache库的位置:
vim /usr/local/php/php.ini
extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525"
extension = "memcache.so"
extension = "pdo_MySQL.so"
extension = "imagick.so"
添加eaccelerator库的位置信息:
;eaccelerator
[eaccelerator]
zend_extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/eaccelerator.so"
eaccelerator.shm_size="1"
eaccelerator.cache_dir="/usr/local/eaccelerator_cache"
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"
eaccelerator.keys = "disk_only"
eaccelerator.sessions = "disk_only"
eaccelerator.content = "disk_only"
mkdir -p /usr/local/eaccelerator_cache
chmod 0777 /usr/local/eaccelerator_cache
13 :安装php扩展库:PDO_MYSQL
tar zxvf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql
ln -s /usr/local/mysql/include/* /usr/local/include/
make && make install
14 :安装php扩展库: ImageMagick
123 tar zxvf ImageMagick.tar.gz
cd ImageMagick-6.5.1-2/
./configure && make && make install
15:安装php扩展库:imagick
tar zxvf imagick-3.1.2.tgz
cd imagick-3.1.2/
/usr/local/php/bin/phpize
ln -s /usr/local/include/ImageMagick-6 /usr/local/include/ImageMagick
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
16:添加WWW用户,为系统运行nginx专用用户:
/usr/sbin/groupadd www
/usr/sbin/useradd -g www www
mkdir -p /var/log/nginx
chmod +w /var/log/nginx
chown -R www:www /var/log/nginx
mkdir -p /data0/www
chmod +w /data0/www
chown -R www:www /data0/www
17:修改php-fpm.conf的配置:
vim /usr/local/php/etc/php-fpm.conf
#去掉/更改 配置文件中的;
pm.max_children = 64
pm.start_servers = 20
pm.min_spare_servers = 5
pm.max_spare_servers = 35
pm.max_requests = 1024
user = www
group = www
#检查语法是否正确
/usr/local/php/sbin/php-fpm -t
NOTICE: configuration file /usr/local/php/etc/php-fpm.conf test is successful
看到上面的信息 证明php配置文件正常,可以启动了。
相关资讯 LNMP
本文评论 查看全部评论 (1)
尊重网上道德,遵守中华人民共和国的各项有关法律法规 承担一切因您的行为而直接或间接导致的民事或刑事法律责任 本站管理人员有权保留或删除其管辖留言中的任意内容 本站有权在网站内转载或引用您的评论 参与本评论即表明您已经阅读并接受上述条款
评论声明
第 1 楼
chenshigai 发表于 2015/11/15 15:09:11这篇文章写得好
(0) (0)
最新资讯