<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>

新聞中心

EEPW首頁(yè) > 嵌入式系統 > 設計應用 > nginx環(huán)境建好后搭建虛擬站點(diǎn)基本流程

nginx環(huán)境建好后搭建虛擬站點(diǎn)基本流程

作者: 時(shí)間:2016-09-12 來(lái)源:網(wǎng)絡(luò ) 收藏

因為把一塊空的磁盤(pán)掛在 home 上了 ... 建議不要掛在 home 目錄 ...

本文引用地址:http://dyxdggzs.com/article/201609/303768.htm

cd /home/wwwroot/ (進(jìn)到站點(diǎn)目錄)

mkdir xxx.xxx (創(chuàng )建文件夾,一般以域名命名文件夾)

cd xxx.xxx (進(jìn)入剛才自己創(chuàng )建的文件夾)

1、下載形式:

wget xxx.xxx/xxx.xxx

可以直接的,直接下載到目錄下面,然后解壓 。。。

2、上傳形式:

必須先建個(gè) ftp

puredb 這種形式:

pure-pw useradd xxx.xxxftp -u ftpgroup -d /home/wwwroot/xxx.xxx -m # xxx.xxxftp 是用戶(hù)名 ftpgroup 是 ftp 用戶(hù)(非虛擬用戶(hù)) -d 后跟 xxx.xxxftp 用戶(hù)目錄 -m 直接生成 puredb 不用 mkdb

傳好后同樣解壓。

創(chuàng )建mysql賬戶(hù)

mysql -u root -p # 回車(chē)輸入密碼

create database xxx.xxx; # 創(chuàng )建數據庫 (xxx.xxx 為數據庫名)。

create user 'xxx.xxx'@'localhost' identified by 'password'; # 創(chuàng )建數據庫用戶(hù)名 xxx.xxx 為用戶(hù)名 password 為用戶(hù)名對應的密碼;

grant all privileges on xxx.xxx.* to 'xxx.xxx'@'localhost; # 為 xxx.xxx 這個(gè)數據庫指定 xxx.xxx 這個(gè)數據庫用戶(hù)名,并指定所有權限;

OK 退出;

測試 新建賬戶(hù)是否可用

mysql -u xxx.xxx -p # 輸入剛才的password ;

show databases; # 查看是否有xxx.xxx 這個(gè)數據庫;

解壓到剛才新建的那個(gè)站點(diǎn)文件根目錄后:

導入數據庫:

用剛才新建的數據庫賬戶(hù)登錄,并導入;

source /home/wwwroot/xxx.xxx/xxx.xxx.sql;

OK

創(chuàng )建配置文件

cd /usr/local//conf # 這路徑有環(huán)境決定

不知道路徑可以 whereis

cp default.conf xxx.xxx.conf

vi xxx.xxx.conf

修改 server_name 后的站點(diǎn)名為 www.xxx.xxx; 或者 xxx.xxx 由要求決定 ;

修改 root 后的根目錄為 /home/wwwroot/xxx.xxx 完整路徑

OK

修改 data/com.inc.php 文件

對應數據庫、賬戶(hù)、密碼。

最后一步,解析



關(guān)鍵詞: nginx 虛擬站點(diǎn) linux

評論


相關(guān)推薦

技術(shù)專(zhuān)區

關(guān)閉
国产精品自在自线亚洲|国产精品无圣光一区二区|国产日产欧洲无码视频|久久久一本精品99久久K精品66|欧美人与动牲交片免费播放
<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>