您好,登錄后才能下訂單哦!
LNMP平臺就是Linux、Ngnix、 MySQL、 PHP的組合架構(gòu),需要Linux服務(wù)器、MySQL數(shù)據(jù)庫、PHP解析環(huán)境
為了與Nginx、PHP環(huán)境保持一致,此處選擇采用源代碼編譯的方式安裝MySQL組件
單服務(wù)器的LNMP架構(gòu)通常使用FPM的方式來解析PHP,本次也使用FPM模塊處理動態(tài)請求。
[root@localhost html]# mysql -u root -p
Enter password: //進(jìn)入數(shù)據(jù)庫,密碼為之前設(shè)定的
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.20 Source distribution
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database bbs; //創(chuàng)建bbs數(shù)據(jù)庫
Query OK, 1 row affected (0.01 sec)
mysql> grant all on bbs.* to 'bbsuser'@'%' identified by 'admin123';
//給bbs數(shù)據(jù)庫中的所有表格提升權(quán)限,同時創(chuàng)建管理數(shù)據(jù)庫的用戶"bbsuser",設(shè)置密碼。
"%"表示可以從所有終端訪問
Query OK, 0 rows affected, 1 warning (0.02 sec)
mysql> grant all on bbs.* to 'bbsuser'@'localhost' identified by 'admin123';
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> flush privileges; //刷新數(shù)據(jù)庫
Query OK, 0 rows affected (0.01 sec)
mysql> quit //退出
Bye
[root@localhost html]#
[root@localhost html]# cd /mnt/tools/LNMP/
[root@localhost LNMP]# ls
Discuz_X3.4_SC_UTF8.zip mysql-boost-5.7.20.tar.gz nginx-1.12.2.tar.gz php-7.1.10.tar.bz2 php-7.1.20.tar.gz
[root@localhost LNMP]# unzip Discuz_X3.4_SC_UTF8.zip -d /opt/ //解壓
............//省略過程
[root@localhost LNMP]#
[root@localhost LNMP]# cd /opt/dir_SC_UTF8/
[root@localhost dir_SC_UTF8]# ls
readme upload utility
[root@localhost dir_SC_UTF8]# cp -r upload/ /usr/local/nginx/html/bbs
[root@localhost dir_SC_UTF8]#
[root@localhost dir_SC_UTF8]# cd /usr/local/nginx/html/bbs/
[root@localhost bbs]# chown -R root:nginx ./config/
[root@localhost bbs]# chown -R root:nginx ./data/
[root@localhost bbs]# chown -R root:nginx ./uc_client/
[root@localhost bbs]# chown -R root:nginx ./uc_server/
[root@localhost bbs]# chmod -R 777 ./config/
[root@localhost bbs]# chmod -R 777 ./data/
[root@localhost bbs]# chmod -R 777 ./uc_client/
[root@localhost bbs]# chmod -R 777 ./uc_server/
向AI問一下細(xì)節(jié)
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。