zotonic的搭建網站(blog)記錄:
zotonic:用Erlang做的一個web 框架:
和wordpress 類似,但是官網稱比PHP CMS要快10倍以上
先看看我的成果:
正弦波 localhost:本地回環地址 443:安全服務端口,好記!

搭建后基本不需要了解Erlang知識也能管理blog[最后截圖是管理界面,完全web控制]:
0.推建環境:
ubuntu12.04 騰訊雲300元(一年)+域名110(兩年)
1.安裝要求:
1.1 Erlang: R15B03或更高版本 1.2 imageMagick 6.5或更高版本 1.3 PostgreSQL 8.4或更高版本 1.4 make 1.5 git
上面這些都可以通過:
在home目錄下:
git clone https://github.com/zotonic/zotonic.git ~/zotonic/zotonic_install
如果遇到問題:就參照這位大神的手動安裝一下:
2.先自定義一個blog網站:
~/zotonic/bin/zotonic addsite -s blog yoursite
3.把你的公網IP和你的域名綁定好 [能ping通]
確保你的80端口是沒有被占用且打開的
4.使用authbind
zotonic:~$sudo apt-get install authbind zotonic:~$ sudo touch /etc/authbind/byport/80 zotonic:~$ sudo chown zotonic /etc/authbind/byport/80
zotonic:~$ sudo chmod 500 /etc/authbind/byport/8
增加環境變量:在~/.zotonic文件夾里面
新加文件:~/.zotonic/.profile
export ZOTONIC_PORT=80 export ZOTONIC_PORT_SSL=443 public_interface=eth0 export ZOTONIC_IP=`/sbin/ifconfig $public_interface | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'` export ERL="authbind --deep erl"
使文件生效:
source ~/.zotonic/.profile
5.改yoursite的默認hostname:
~/zotonic/priv/sites/yoursite/config
{hostname, "yoursite:80"}
6.重啟zotonic:
zotonic:~$ ~/zotonic/bin/zotonic stop
zotonic:~$ ~/zotonic/bin/zotonic start
管理界面如上:超極好用。:)
光波劇手舞:
