天天看點

LNMP 網站平台

#####################

(1)安裝Nginx 端口:80

nginx軟體包不在CD光牒内,需源碼包編譯安裝

安裝依賴軟體包

yum -y install gcc openssl-devel(支援https) pcre-devel(支援正規表達式)

tar xf nginx-1.8.0....

cd nginx-1.8.0

./configure \

--prefix=/usr/local/nginx \ //指定安裝目錄 --with-http_ssl_module //增加安全子產品 make //編譯 make install //安裝

ln -s /usr/local/nginx/sbin/nginx /usr/sbin //制作快捷方式

ls /usr/local/nginx

logs :日至檔案

sbin :程式檔案

conf :配置檔案

html :網頁檔案

nginx //啟動服務

nginx -s stop //停止服務

nginx -s reload //重新加載配置檔案

nginx -V //檢視nginx資訊

#####################################

安裝php軟體包 端口:9000

yum -y install php php-mysql(實作php與資料庫連接配接)

rpm -ivh php-fpm....

/etc/php-fpm/www

####################################

安裝mariadb軟體包 端口:3306

yum -y install mariadb mariadb-server mariadb-devel

###################################

啟動LNMP 環境

nginx

systemctl restart mariadb

systemctl restart php-fpm

##################################

繼續閱讀