柚子快報(bào)邀請(qǐng)碼778899分享:LNMP架構(gòu)搭建
柚子快報(bào)邀請(qǐng)碼778899分享:LNMP架構(gòu)搭建
LNMP架構(gòu)搭建
Mysql
環(huán)境準(zhǔn)備
創(chuàng)建MySQL程序用戶
解壓包
編譯
變更目錄權(quán)限給程序用戶mysql
修改配置文件
更改配置文件屬主和屬組
環(huán)境變量配置
生效profile文件
初始化數(shù)據(jù)庫
cd /usr/local/mysql
bin/mysqld \
--initialize-insecure \
--user=mysql \
--basedir=/usr/local/mysql \
--datadir=/usr/local/mysql/data
啟動(dòng)服務(wù)
設(shè)置數(shù)據(jù)庫管理員登錄
??
?注意:第一次輸入密碼直接回車
??登錄
Php
環(huán)境準(zhǔn)備
擴(kuò)展yum源
yum install epel-release -y
yum install libmcrypt libmcrypt-devel -y
解壓軟件包
tar jxvf php-7.1.10.tar.bz2
配置./configure \
--prefix=/usr/local/php \
--with-mysql-sock=/usr/local/mysql/mysql.sock \
--with-config-file-path=/etc \
--enable-fpm \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--enable-shared \
--enable-soap \
--with-libxml-dir \
--with-xmlrpc \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-pcre-regex \
--with-sqlite3 \
--with-zlib \
--enable-bcmath \
--with-iconv \
--with-bz2 \
--enable-calendar \
--with-curl \
--with-cdb \
--enable-dom \
--enable-exif \
--enable-fileinfo \
--enable-filter \
--with-pcre-dir \
--enable-ftp \
--with-gd \
--with-openssl-dir \
--with-jpeg-dir \
--with-png-dir \
--with-zlib-dir \
--with-freetype-dir \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-gettext \
--with-gmp \
--with-mhash \
--enable-json \
--enable-mbstring \
--enable-mbregex \
--enable-mbregex-backtrack \
--with-libmbfl \
--with-onig \
--enable-pdo \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-zlib-dir \
--with-pdo-sqlite \
--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-compression-support \
--with-pear \
--enable-opcache
核心配置文件
設(shè)置時(shí)區(qū)
檢查php模塊
Php-fpm模塊
啟動(dòng)fpm
php命令優(yōu)化
nginx支持php-fpm
網(wǎng)站站點(diǎn)創(chuàng)建php首頁
成果
柚子快報(bào)邀請(qǐng)碼778899分享:LNMP架構(gòu)搭建
好文閱讀
本文內(nèi)容根據(jù)網(wǎng)絡(luò)資料整理,出于傳遞更多信息之目的,不代表金鑰匙跨境贊同其觀點(diǎn)和立場。
轉(zhuǎn)載請(qǐng)注明,如有侵權(quán),聯(lián)系刪除。