码迷,mamicode.com
首页 > Web开发 > 详细

php安装脚本

时间:2018-10-26 17:48:50      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:scan   安装   main   permanent   list   php安装   mct   mysqli   freetype   

PHP脚本
yum -y install libxml2-devel lzip2-devel libcurl-devel libmcrypt-devel openssl-devel bzip2-devel
tar xf /usr/local/src/libmcrypt-2.5.7.tar.gz
tar xf /usr/local/src/php-5.6.27.tar.gz
cd /usr/local/src/libmcrypt-2.5.7/
./configure --prefix=/usr/local/libmcrypt && make && make install
cd /usr/local/src/php-5.6.27/
./configure --prefix=/usr/local/php --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-openssl --enable-fpm --enable-sockets --enable-sysvshm --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --with-mhash --with-mcrypt=/usr/local/libmcrypt --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2 --enable-maintainer-zts
make && make install
cp /usr/local/src/php-5.6.27/php.ini-production /etc/php.ini
cp /usr/local/src/php-5.6.27/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
chkconfig --add php-fpm && chkconfig php-fpm on
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
sed -i ‘25c pid = run/php-fpm.pid‘ /usr/local/php/etc/php-fpm.conf
sed -i ‘164c listen = 192.168.1.129:9000‘ /usr/local/php/etc/php-fpm.conf
sed -i ‘235c pm.max_children = 50‘ /usr/local/php/etc/php-fpm.conf
sed -i ‘240c pm.start_servers = 5‘ /usr/local/php/etc/php-fpm.conf
sed -i ‘245c pm.min_spare_servers = 5‘ usr/local/php/etc/php-fpm.conf
sed -i ‘250c pm.max_spare_servers = 35‘ usr/local/php/etc/php-fpm.conf
systemctl dameon-reload
systemctl start php-fpm
firewall-cmd --permanent --add-port=9000/tcp
firewall-cmd --reload
netstat -anpt | grep php-fpm

php安装脚本

标签:scan   安装   main   permanent   list   php安装   mct   mysqli   freetype   

原文地址:http://blog.51cto.com/13214087/2309493

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!