# Zotonic 安装测试

Zotonic是一个基于erlang语言开发的开源的具高性能的网站内容管理系统(CMS),zotonic还包括了实时框架(real-time framework),a web server。zotonic具有弹性、可扩展性,并且从一开始就是提供了对动态交互网站以及移动端系决方案的支持。

# 测试环境:Win10 Ubuntu20.04子系统+Erlang 22.0

# 一、环境搭建

# 1. 安装Erlang

可参考  Ubuntu 用Kerl安装及管理Erlang (opens new window) 进行安装

# 2. 安装 PostgreSQL 数据库

可参考 Win10 postgresql 免安装版本 (opens new window) 进行安装

# 二、安装zotonic

# 1. 下载源码

git clone https://github.com/zotonic/zotonic.git
1

# 2. 编译

make
1

# 3. 运行

在debug状态启动zotonic

bin/zotonic debug ​​​​​​​
1

# 4.  web访问

本地浏览器打开 https://localhost:8443 (opens new window), 页面如下

点击下方Manage this server按钮会进入如下登录页面:

# 5.  查找用户名密码

方式一:

(zotonic@SummerGao)2> z_config:get(password).
"OcPXZFRflZpLJeUw"
1
2

方式二:

 cat /$HOME/.zotonic/1/zotonic.config
1

用户名:wwwadmin

密码:OcPXZFRflZpLJeUw

# 6. 登录后页面如下

# 7. 创建一个站点

点击右侧 Add Site 按钮可进入如下页面

# 8. 管理员页面如下:

admin 管理员密码可在 zotonic>apps_user>test>priv>zotonic_site.config 文件下找到

#

# 小结

到这一步,zotonic环境算是已部署成功 ​​​​​​​。

常用命令:

1. 查看配置文件所在位置

bin/zotonic configfiles
1

2. 获取zotonic.config 配置信息

bin/zotonic config
1

3. 获取 erlang.config 配置信息

bin/zotonic config erlang
1

参考: http://docs.zotonic.com/en/latest/ref/configuration/zotonic-configuration.html#config-file-locations (opens new window)

Last Updated: 3/18/2021, 1:20:30 PM