【站点部署】解析二级域名并部署站点
開設(shè)原因 : 近期在學(xué)健身, 上一份工作辭掉后, 在北京找了家私人教練培訓(xùn)學(xué)校, 進(jìn)行為期四個(gè)月的健身培訓(xùn), 這個(gè)比在健身房找私教專業(yè)多了, 被健身房私人教練坑慘了, 說(shuō)多了都是淚, 已經(jīng)培訓(xùn)了將近一個(gè)半月, 學(xué)習(xí)了基礎(chǔ)私教, 普拉提, 這在學(xué)習(xí)康復(fù)課程, 之后還有功能性 和 綜合格斗, 健美備賽 課程, 準(zhǔn)備將學(xué)到的東西整理到博客上, 我本人也會(huì)將學(xué)到的東西分享給大家, 學(xué)習(xí)完之后繼續(xù)做 Android 碼農(nóng);
一. 域名準(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)擊后面的保存button, 就可以完畢二級(jí)域名的解析;
二. 站點(diǎn)準(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 后跟著username, -p 后跟著password;
-- 查看數(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è)置站點(diǎn)
設(shè)置站點(diǎn)流程 :?
-- 創(chuàng)建成功 :?
-- 進(jìn)入站點(diǎn) : 網(wǎng)址 http://fitness.hanshuliang.com ;
.
總結(jié)
以上是生活随笔為你收集整理的【站点部署】解析二级域名并部署站点的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 梦到出国打工什么意思
- 下一篇: CentOS 安装MySQL(rpm)提