開設原因 : 近期在學健身, 上一份工作辭掉后, 在北京找了家私人教練培訓學校, 進行為期四個月的健身培訓, 這個比在健身房找私教專業多了, 被健身房私人教練坑慘了, 說多了都是淚, 已經培訓了將近一個半月, 學習了基礎私教, 普拉提, 這在學習康復課程, 之后還有功能性 和 綜合格斗, 健美備賽 課程, 準備將學到的東西整理到博客上, 我本人也會將學到的東西分享給大家, 學習完之后繼續做 Android 碼農;
一. 域名準備
1. 解析二級域名
解析二級域名 : 我是在 阿里云上申請的 阿里云的服務器, 響應的域名也托管到了 阿里云旗下的萬網上, 因此在萬網上解析了二級域名;
-- 進入管理控制臺 :?
-- 選擇域名選項 :?
-- 進入域名界面 :?
-- 點擊加入解析 : 彈出以下的對話框;
-- 保存解析 : 點擊后面的保存button, 就可以完畢二級域名的解析;
二. 站點準備
1. 解壓 emlog 博客程序到指定文件夾
將 emlog 程序解壓到一個文件夾 : 記錄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 服務器配置文件
配置nginx 服務器 : 進入 *nginx/conf/vhosts/ 創建一個 .conf 后綴文件, 這個就是配置文件;
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. 創建數據庫
創建數據庫命令 :?
-- 進入數據庫 :?mysql -uroot -p******** , -u 后跟著username, -p 后跟著password;
-- 查看數據庫命令 :?show databases;
-- 創建數據庫命令 :?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. 設置站點
設置站點流程 :?
-- 創建成功 :?
-- 進入站點 : 網址 http://fitness.hanshuliang.com ;
.