<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

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

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

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

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

          本文引用地址:http://www.ex-cimer.com/article/201609/303768.htm

          cd /home/wwwroot/ (進到站點目錄)

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

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

          1、下載形式:

          wget xxx.xxx/xxx.xxx

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

          2、上傳形式:

          必須先建個 ftp

          puredb 這種形式:

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

          傳好后同樣解壓。

          創(chuàng)建mysql賬戶

          mysql -u root -p # 回車輸入密碼

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

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

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

          OK 退出;

          測試 新建賬戶是否可用

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

          show databases; # 查看是否有xxx.xxx 這個數(shù)據(jù)庫;

          解壓到剛才新建的那個站點文件根目錄后:

          導(dǎo)入數(shù)據(jù)庫:

          用剛才新建的數(shù)據(jù)庫賬戶登錄,并導(dǎo)入;

          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 后的站點名為 www.xxx.xxx; 或者 xxx.xxx 由要求決定 ;

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

          OK

          修改 data/com.inc.php 文件

          對應(yīng)數(shù)據(jù)庫、賬戶、密碼。

          最后一步,解析



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

          評論


          相關(guān)推薦

          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();