国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

Centos 7 x86_64 Nginx + PHP 安裝步驟

weakish / 2744人閱讀

摘要:安裝步驟下的安裝步驟。跟上一篇安裝步驟的區(qū)別是,這次是編譯的位的,所有的庫均編譯到目錄中,網(wǎng)上那些教程一般沒有指定編譯路徑,實際上是錯的,全部編譯到默認(rèn)路徑是在下然后在軟連接到里簡直是有病。另外已經(jīng)升級了庫,故本篇不在多帶帶安裝新版的。

Centos 7 Nginx + PHP 安裝步驟

Centos 7 下的 PHP7/Nginx/Memcached 安裝步驟。跟上一篇 Centos 7 Nginx + PHP 安裝步驟 的區(qū)別是,這次是編譯的64位的,所有的庫均編譯到 /usr/local/lib64 目錄中,網(wǎng)上那些教程一般沒有指定編譯路徑,實際上是錯的,全部編譯到默認(rèn)路徑是在
/usr/local/lib 下然后在軟連接到 lib64 里簡直是有病。另外 Centos 7.4 已經(jīng)升級了openssl 庫,故本篇不在多帶帶安裝新版的 Openssl 。特別說明,對于大批量部署的機(jī)器,在編譯完成后,除了 yum 安裝得部分,/usr/local 可以直接打包,在其他的Centos 同版本機(jī)器上直接運行,省去了編譯的時間,云環(huán)境請直接克隆!

一、獲取相關(guān)開源程序 1、安裝環(huán)境所需的程序庫
yum -y update
yum remove mariadb*
yum -y install patch make cmake gcc gcc-c++ bison flex file libtool libtool-libs autoconf kernel-devel libjpeg libjpeg-devel libpng libpng-devel gd gd-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel libidn libidn-devel gmp-devel gettext gettext-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers vim-minimal nano  gmp-devel unzip libcap diffutils readline-devel libxslt libxslt-devel ntp wget ctags libedit libedit-devel libaio git mailx jwhois bind-utils systemd systemd-devel libtidy libtidy-devel openssl openssl-devel
yum -y install supervisor
yum -y install memcached
2、準(zhǔn)備環(huán)境變量
echo -e "/lib64
/usr/lib64
/usr/local/lib64
/lib
/usr/lib
/usr/local/lib
`cat /etc/ld.so.conf`" > /etc/ld.so.conf
/sbin/ldconfig
3、下載程序源碼包
cd /usr/local/src
wget http://7xk96f.com1.z0.glb.clouddn.com/software/libiconv/libiconv-1.15.tar.gz
wget -O php-7.1.10.tar.gz http://cn2.php.net/get/php-7.1.10.tar.gz/from/this/mirror
wget http://7xk96f.com1.z0.glb.clouddn.com/software/mcrypt/libmcrypt-2.5.8.tar.gz
wget http://7xk96f.com1.z0.glb.clouddn.com/software/mcrypt/mcrypt-2.6.8.tar.gz
wget http://7xk96f.com1.z0.glb.clouddn.com/software/mhash/mhash-0.9.9.9.tar.gz
wget http://7xk96f.com1.z0.glb.clouddn.com/software/icu/icu4c-58_2-src.tgz
wget http://7xk96f.com1.z0.glb.clouddn.com/software/libmemcached/libmemcached-1.0.18.tar.gz
wget http://7xk96f.com1.z0.glb.clouddn.com/software/pcre/pcre-8.41.tar.gz
wget http://7xk96f.com1.z0.glb.clouddn.com/software/openssl/openssl-1.1.0e.tar.gz
wget http://7xk96f.com1.z0.glb.clouddn.com/software/nginx/nginx-1.13.5.tar.gz
wget http://pecl.php.net/get/msgpack-2.0.2.tgz
wget http://pecl.php.net/get/igbinary-2.0.4.tgz
wget http://pecl.php.net/get/memcached-3.0.3.tgz
wget http://pecl.php.net/get/redis-3.1.4.tgz
wget http://pecl.php.net/get/yaml-2.0.2.tgz
wget http://pecl.php.net/get/mongodb-1.3.0.tgz
二、安裝PHP 7(FastCGI模式) 1、編譯安裝PHP 7 所需的支持庫:
tar zxf libiconv-1.15.tar.gz && cd libiconv-1.15/
./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-static
make && make install
cd ../

tar zxf libmcrypt-2.5.8.tar.gz && cd libmcrypt-2.5.8/
./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-static
make && make install
ldconfig
cd libltdl/
./configure --prefix=/usr/local  --libdir=/usr/local/lib64 --enable-ltdl-install
make && make install
cd ../../

tar zxf mhash-0.9.9.9.tar.gz && cd mhash-0.9.9.9/
./configure --prefix=/usr/local --libdir=/usr/local/lib64
make && make install
cd ../

tar zxf mcrypt-2.6.8.tar.gz && cd mcrypt-2.6.8/
/sbin/ldconfig
./configure --prefix=/usr/local --libdir=/usr/local/lib64
make && make install
cd ../

tar zxf icu4c-58_2-src.tgz && cd icu/source/
./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-static 
make && make install
cd ../../

tar -zxvf libmemcached-1.0.18.tar.gz && cd libmemcached-1.0.18
./configure --prefix=/usr/local --libdir=/usr/local/lib64
make && make install
cd ../

tar zxf pcre-8.41.tar.gz && cd pcre-8.41/
./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-utf
make && make install
cd ../
2、編譯安裝PHP(FastCGI模式)
tar zxf php-7.1.10.tar.gz
cd php-7.1.10/
/sbin/ldconfig
./configure --prefix=/usr/local --libdir=/usr/local/lib64 --with-config-file-path=/usr/local/etc --with-config-file-scan-dir=/usr/local/etc/php 
--with-libxml-dir --with-openssl --with-kerberos --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl 
--enable-exif --enable-fpm --enable-ftp --with-png-dir --with-gd --with-jpeg-dir --enable-gd-native-ttf 
--with-icu-dir=/usr/local --enable-mbstring --enable-mbregex --enable-shmop --enable-soap --enable-sockets 
--enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-xmlrpc --with-libedit --with-iconv-dir=/usr/local 
--with-xsl --enable-zip --with-pcre-regex --with-pcre-jit --with-freetype-dir --enable-xml  --with-mysqli=mysqlnd 
--with-pdo-mysql=mysqlnd --with-pdo-sqlite --with-sqlite3 --disable-rpath --enable-inline-optimization --with-mcrypt 
--with-mhash --enable-pcntl --without-pear --with-gettext --enable-fileinfo --enable-intl --enable-opcache --enable-cli 
--with-gmp --with-tidy --with-pcre-dir=/usr/local --with-readline --with-fpm-systemd --with-zlib-dir --with-libdir=lib64
make ZEND_EXTRA_LIBS="-liconv"
make install

cp php.ini-production /usr/local/etc/php.ini
cp /usr/local/etc/php-fpm.conf.default /usr/local/etc/php-fpm.conf
cp sapi/fpm/php-fpm.service /usr/lib/systemd/system/php-fpm.service
systemctl enable php-fpm.service
cd ../
3、編譯安裝PHP擴(kuò)展模塊
tar zxf msgpack-2.0.2.tgz
cd msgpack-2.0.2
phpize
./configure
make && make install
cd ../

tar zxf igbinary-2.0.4.tgz
cd igbinary-2.0.4
phpize
./configure
make && make install
cd ../

tar zxf memcached-3.0.3.tgz
cd memcached-3.0.3
phpize
./configure --with-libdir=lib64 --enable-memcached --enable-memcached-igbinary --enable-memcached-json --enable-memcached-msgpack 
make && make install
cd ../

tar zxf redis-3.1.3.tgz
cd  redis-3.1.3
phpize
./configure
make && make install
cd ../

tar zxf yaml-2.0.2.tgz
cd yaml-2.0.2
phpize
./configure
make && make install
cd ../

tar zxf mongodb-1.2.9.tgz
cd mongodb-1.2.9
phpize
./configure
make && make install
cd ../
三、安裝Nginx
tar zxf nginx-1.13.5.tar.gz
cd nginx-1.13.5/
./configure --prefix=/usr/local --libdir=/usr/local/lib64 --conf-path=/usr/local/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --lock-path=/run/lock/nginx.lock --pid-path=/run/nginx.pid 
--with-http_ssl_module --with-http_v2_module --with-http_image_filter_module --with-http_xslt_module --with-http_realip_module --with-http_stub_status_module 
--with-pcre-jit --with-http_flv_module --with-http_mp4_module --with-http_addition_module 
--with-threads --with-http_ssl_module --with-http_gzip_static_module --without-mail_imap_module --without-mail_pop3_module --without-mail_smtp_module 
--without-http_uwsgi_module --without-http_scgi_module --without-select_module 
--with-cc-opt="-O2"

make && make install
cd ../
mkdir /var/log/nginx
mkdir /var/lib/nginx
四、收尾 1、添加www用戶
/usr/sbin/groupadd www
/usr/sbin/useradd -M -g www www
2、優(yōu)化內(nèi)核
#for aliyun
cat >>/etc/security/limits.conf<>/etc/security/limits.conf<> /etc/sysctl.conf
3、設(shè)置開機(jī)啟動
systemctl enable nginx.service
systemctl enable php-fpm.service
systemctl enable memcached.service
systemctl enable supervisord.service

文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請注明本文地址:http://specialneedsforspecialkids.com/yun/39669.html

相關(guān)文章

  • Centos 7 x86_64 Nginx + PHP 安裝步驟

    摘要:安裝步驟下的安裝步驟。跟上一篇安裝步驟的區(qū)別是,這次是編譯的位的,所有的庫均編譯到目錄中,網(wǎng)上那些教程一般沒有指定編譯路徑,實際上是錯的,全部編譯到默認(rèn)路徑是在下然后在軟連接到里簡直是有病。另外已經(jīng)升級了庫,故本篇不在單獨安裝新版的。 Centos 7 Nginx + PHP 安裝步驟 Centos 7 下的 PHP7/Nginx/Memcached 安裝步驟。跟上一篇 Centos ...

    Ryan_Li 評論0 收藏0
  • php7.0 + mysql5.7.10 + nginx7.0 web開發(fā)環(huán)境搭建(CentOS7)

    摘要:一搭建開發(fā)環(huán)境參考官方文檔設(shè)置官當(dāng)提供了利用來安裝升級的方法在目錄下創(chuàng)建文件,輸入以下代碼將替換為,或者,根據(jù)當(dāng)前的系統(tǒng)版本替換即可。設(shè)置好文件之后,開始用安裝安裝提示安裝完成,則表明安裝成功到此安裝完成了。關(guān)閉停止禁止開機(jī)啟動 一、搭建nginx開發(fā)環(huán)境 參考官方文檔:http://nginx.org/en/linux_pac... 1、設(shè)置yum 官當(dāng)提供了利用yum來安裝、升級n...

    CollinPeng 評論0 收藏0
  • CentOS 7 安裝 LNMP 環(huán)境(PHP7 + MySQL5.7 + Nginx1.10)

    摘要:如果顯示,則需要調(diào)整防火墻規(guī)則的配置。設(shè)置開機(jī)啟動設(shè)置開機(jī)啟動啟動四測試在文件下創(chuàng)建文件,輸出信息瀏覽器訪問內(nèi)網(wǎng)地址,如果看到信息,說明安裝成功 工具 VMware版本號 : 12.0.0 CentOS版本 : 7.0 一、修改 yum 源 [root@localhost ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/ep...

    XGBCCC 評論0 收藏0

發(fā)表評論

0條評論

最新活動
閱讀需要支付1元查看
<