真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

centos7編譯安裝PHP7,并配置nginx

本教程安裝的PHP版本為php-7.1.5,centos版本為CentOS Linux release 7.3.1611 (Core)

nginx為yum安裝

步驟:

1.下載源碼
2.更新所需組件
3.解壓
4.編譯
5.配置
6.啟動(dòng)
7.應(yīng)用

邵東網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián),邵東網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為邵東近1000家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\成都外貿(mào)網(wǎng)站建設(shè)公司要多少錢(qián),請(qǐng)找那個(gè)售后服務(wù)好的邵東做網(wǎng)站的公司定做!

一.下載源碼

wget http://download.niexin.me/php/linux/php-7.1.5.tar.gz

二.更新所需組件

yum -y install libxml2-devel libxml2 gcc libcurl libcurl-devel openssl openssl-devel libpng libpng-devel freetype freetype-devel libxslt libxslt-devel libjpeg libjpeg-devel libxml2 libxml2-devel pcre-devel

三.解壓

tar -zxvf php-7.1.5.tar.gz

四.編譯

cd php-7.1.5/

./configure \--prefix=/usr/local/php \--with-curl \--with-freetype-dir \--with-gd \--with-gettext \--with-iconv-dir \--with-kerberos \--with-libdir=lib64 \--with-libxml-dir \--with-mysqli \--with-openssl \--with-pcre-regex \--with-pdo-mysql \--with-pdo-sqlite \--with-pear \--with-png-dir \--with-xmlrpc \--with-xsl \--with-zlib \--enable-fpm \--enable-bcmath \--enable-libxml \--enable-inline-optimization \--enable-gd-native-ttf \--enable-mbregex \--enable-mbstring \--enable-opcache \--enable-pcntl \--enable-shmop \--enable-soap \--enable-sockets \--enable-sysvsem \--enable-xml \--enable-zip

make && make install

五.配置

還是在php-7.1.5/目錄下
#?cp php.ini-development /usr/local/php/lib/php.ini
# 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 -R ./sapi/fpm/php-fpm /etc/init.d/php-fpm

六.啟動(dòng)

/etc/init.d/php-fpm
開(kāi)機(jī)啟動(dòng):
vim /etc/rc.local
新增一行,寫(xiě)入/etc/init.d/php-fpm>dev/null 2>&1

七.應(yīng)用:

nginx:

# vim /etc/nginx/nginx.conf
在server節(jié)點(diǎn)中添加以下內(nèi)容

location ~ \.php$ {        root           /usr/share/nginx/html;        fastcgi_pass   127.0.0.1:9000;        fastcgi_index  index.php;        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;        include        fastcgi_params;    }


最后重啟nginx:systemctl restart nginx


當(dāng)前題目:centos7編譯安裝PHP7,并配置nginx
本文路徑:http://weahome.cn/article/spoc.html

其他資訊

在線(xiàn)咨詢(xún)

微信咨詢(xún)

電話(huà)咨詢(xún)

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部