#!/bin/bash
#Date:2017-05-05 By Allen_Jol
#--------- YUm Install related components------
sleep 3
創(chuàng)新互聯(lián)公司自2013年創(chuàng)立以來(lái),先為平山等服務(wù)建站,平山等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢(xún)服務(wù)。為平山企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問(wèn)題。
yum install -y gcc gcc-c++ autoconf automake libtool make cmake libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl openssl-devel gdbm-devel db4-devel libXpm-devel libX11-devel gd-devel gmp-devel readline-devel libxslt-devel expat-devel xmlrpc-c xmlrpc-c-devel libmcrypt libmcrypt-devel bison-devel openssl openssl-devel zlib zlib-devel pcre pcre-devel
mkdir /lnmpsoftware
#-----------Download PHP server-----------------
sleep 3
cd /lnmpsoftware
tar -zxvf libmcrypt-2.5.8.tar.gz
tar -zxvf mhash-0.9.9.9.tar.gz
cd /lnmpsoftware/libmcrypt-2.5.8
./configure
make && make install
sleep 3
#cd .. 我單獨(dú)把php腳本拿出來(lái),做php的時(shí)候測(cè)試這里需要切換到/usr/local/src下
cd /lnmpsoftware
cd mhash-0.9.9.9
./configure
make && make install
sleep 3
cd /lnmpsoftware
if [ ! -f php-7.0.6.tar.gz ]
then
wget -O php-7.0.6.tar.gz http://cn2.php.net/get/php-7.0.6.tar.gz/from/this/mirror
fi
#--------------Install PHP server-----------------
tar -zxvf php-7.0.6.tar.gz
cd php-7.0.6
if [ ! -f /usr/local/php/etc/php.ini ]
then
./buildconf --force
./configure \
--prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
--with-config-file-scan-dir=/usr/local/php/etc/conf.d \
--enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--enable-soap \
--with-openssl \
--with-openssl-dir \
--with-mcrypt \
--with-pcre-regex \
--with-zlib \
--with-iconv \
--with-bz2 \
--enable-calendar \
--with-curl \
--with-cdb \
--enable-dom \
--enable-exif \
--with-pcre-dir \
--enable-ftp \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-freetype-dir \
--with-gettext \
--with-gmp \
--with-mhash \
--enable-mbstring \
--with-libmbfl \
--with-onig \
--enable-pdo \
--with-pdo-MySQL \
--with-zlib-dir \
--with-readline \
--enable-session \
--enable-shmop \
--enable-simplexml \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--with-libxml-dir \
--with-xsl \
--enable-zip \
--enable-mysqlnd \
--with-mysqli \
--without-pear
sleep 3
make -j 4 && make install
fi
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf
cp php.ini-production /usr/local/php/etc/php.ini
cp 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
groupadd www
useradd -s /sbin/nologin -g www -M www
sed -ri -e 's#;date.timezone =#date.timezone = PRC#g' -e 's#;cgi.fix_pathinfo=1#cgi.fix_pathinfo=0#g' /usr/local/php/etc/php.ini
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
service iptables save
文章題目:php編譯安裝腳本
本文網(wǎng)址:http://aaarwkj.com/article40/jegsho.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供做網(wǎng)站、域名注冊(cè)、營(yíng)銷(xiāo)型網(wǎng)站建設(shè)、網(wǎng)站維護(hù)、微信小程序、網(wǎng)站營(yíng)銷(xiāo)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)