初次尝试利用脚本自动编译搭建LAMP-----php
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了初次尝试利用脚本自动编译搭建LAMP-----php相关的知识,希望对你有一定的参考价值。
#!/bin/bash # echo "php Installing..." yum -y groupinstall ‘X Software Development‘ yum -y install libxml2-devel bzip2-devel rpm -ivh libmcrypt-2.5.8-9.el6.i686.rpm libmcrypt-devel-2.5.8-9.el6.i686.rpm mhash-0.9.9.9-3.el6.i686.rpm mhash-devel-0.9.9.9-3.el6.i686.rpm read -p "Please input compress type[bz2|gz]: "COMPRESS read -p "Please input a php VERSION[php-VERSION.tar.$COMPRESS]:" PHPVER while ! echo $PHPVER | grep "[![:alpha:]]*" &> /dev/null ; do read -p "Please input a PHP version[php-"VERSION".tar.$COMPRESS]: " PHPVER done tar xf php-$PHPVER.tar.$COMPRESS cd /root/php-$PHPVER #cd /root/php-5.5.30 ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-openssl --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --enable-sockets --enable-fpm --with-mcrypt --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2 make && make test && make install cp php.ini-production /etc/php.ini #配置pfm cp sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpm chmod +x /etc/rc.d/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 ‘[email protected]^\(pm.max_children = \).*@\[email protected]‘ /usr/local/php/etc/php-fpm.conf sed -i ‘[email protected]^\(pm.start_servers = \).*@\[email protected]‘ /usr/local/php/etc/php-fpm.conf sed -i ‘[email protected]^\(pm.min_spare_servers = \).*@\[email protected]‘ /usr/local/php/etc/php-fpm.conf sed -i ‘[email protected]^\(pm.max_spare_servers = \).*@\[email protected]‘ /usr/local/php/etc/php-fpm.conf sed -i ‘[email protected]^;pid = .*@pid = /usr/local/php/var/run/[email protected]‘ /usr/local/php/etc/php-fpm.conf
以上是关于初次尝试利用脚本自动编译搭建LAMP-----php的主要内容,如果未能解决你的问题,请参考以下文章
Python 004- 利用图灵小机器人来搭建微信聊天自动回复机器人