zoukankan      html  css  js  c++  java
  • [Erlang24]使用zotonic搭建网站记录

    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


    
    
    
    
    管理界面如上:超极好用。:)

    光波剧手舞:
     
     
     
     
     
  • 相关阅读:
    深度学习模型参数计算
    keras多输出多输出示例(keras教程一)
    keras可视化报错:OSError: `pydot` failed to call GraphViz.Please install GraphViz问题解决
    git版本管理,git tag
    python封装自己的模块,pip install安装到python环境
    如何理解Virtual DOM
    使用 Hbuilder 连接手机调试移动端项目
    js 常用排序
    博客漂浮的小人
    开发者必备Linux命令
  • 原文地址:https://www.cnblogs.com/zhongwencool/p/erlang_zotonic_install.html
Copyright © 2011-2022 走看看