【网站部署】解析二级域名并部署网站
?
?
?
?
?
?
?
一. 域名準(zhǔn)備
?
?
?
?
?
1. 解析二級(jí)域名
?
?
?
解析二級(jí)域名 : 我是在 阿里云上申請(qǐng)的 阿里云的服務(wù)器, 響應(yīng)的域名也托管到了 阿里云旗下的萬(wàn)網(wǎng)上, 因此在萬(wàn)網(wǎng)上解析了二級(jí)域名;
-- 進(jìn)入管理控制臺(tái) :?
-- 選擇域名選項(xiàng) :?
-- 進(jìn)入域名界面 :?
-- 點(diǎn)擊添加解析 : 彈出下面的對(duì)話框;
-- 保存解析 : 點(diǎn)擊后面的保存按鈕, 即可完成二級(jí)域名的解析;
?
?
?
?
?
二. 網(wǎng)站準(zhǔn)備
?
?
?
?
?
1. 解壓 emlog 博客程序到指定目錄
?
?
?
將 emlog 程序解壓到一個(gè)目錄 : 記錄emlog目錄的路徑 ;
?
[root@ip28 fitness-emlog]# pwd /alidata/www/fitness-emlog [root@ip28 fitness-emlog]# cd emlog/ [root@ip28 emlog]# ls license.txt readme.html src [root@ip28 emlog]# cd src/ [root@ip28 src]# ls admin config.php content favicon.ico include index.php init.php m robots.txt rss.php t wlwmanifest.xml xmlrpc.php [root@ip28 src]#?
?
?
?
?
?
?
?
2. 配置 nginx 服務(wù)器配置文件
?
?
?
配置nginx 服務(wù)器 : 進(jìn)入 *nginx/conf/vhosts/ 創(chuàng)建一個(gè) .conf 后綴文件, 這個(gè)就是配置文件;
?
server {listen 80;server_name www.fitness.hanshuliang.com;index index.html index.htm index.php;root /alidata/www/fitness-emlog/emlog/src;location ~ .*\.(php|php5)?${#fastcgi_pass unix:/tmp/php-cgi.sock;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;include fastcgi.conf;}location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)${expires 30d;}location ~ .*\.(js|css)?${expires 1h;}include /alidata/server/nginx/conf/rewrite/default.conf;access_log /alidata/log/nginx/access/fitness-emlog.log; }?
?
?
?
?
?
?
?
3. 創(chuàng)建數(shù)據(jù)庫(kù)
?
?
?
?
創(chuàng)建數(shù)據(jù)庫(kù)命令 :?
-- 進(jìn)入數(shù)據(jù)庫(kù) :?mysql -uroot -p******** , -u 后跟著用戶名, -p 后跟著密碼;
-- 查看數(shù)據(jù)庫(kù)命令 :?show databases;
-- 創(chuàng)建數(shù)據(jù)庫(kù)命令 :?create database fitness_emlog;
?
[root@ip28 vhosts]# mysql -uroot -p******** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 642218 Server version: 5.1.63-log Source distributionCopyright (c) 2000, 2011, 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> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | han_emlog | | han_phpwind | | han_wordpress | | mysql | | test | | weixin_tiger | | xia_emlog | +--------------------+ 9 rows in set (0.00 sec)mysql> mysql> create database fitness_emlog; Query OK, 1 row affected (0.00 sec)mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | emlog_test | | fitness_emlog | | han_emlog | | han_phpwind | | han_wordpress | | mysql | | test | | weixin_tiger | | xia_emlog | +--------------------+ 10 rows in set (0.00 sec)mysql> quit Bye?
?
?
?
?
?
?
4. 設(shè)置網(wǎng)站
?
?
?
?
設(shè)置網(wǎng)站流程 :?
-- 創(chuàng)建成功 :?
-- 進(jìn)入網(wǎng)站 : 網(wǎng)址 http://fitness.hanshuliang.com ;
?
?
?
?
.
?
?
總結(jié)
以上是生活随笔為你收集整理的【网站部署】解析二级域名并部署网站的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 【Android应用开发】Android
- 下一篇: 【设计模式】 面向对象六大设计原则