您的位置:首页 > 运维架构 > Linux

CentOS 7安装Etherpad(在线协作编辑)

2017-02-07 16:40 204 查看


1、安装一些依赖包

yum install curl vim gcc-c++ make

2、安装MariaDB(安过的不用安了)

yum install mariadb-server


3、启动Mariadb
systemctl start mariadb.service
systemctl enable mariadb.service


4、为Etherpad创建一个数据库和用户
# mysql -u root -p
MariaDB [(none)]> CREATE DATABASE etherpad;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON etherpad.* TO 'etherpad'@'localhost' IDENTIFIED BY '123456';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q
创建数据库etherpad;用户etherpad,密码123456。


5、安装Node.js

yum install -y nodejs     (yum安装)
或者   http://blog.csdn.net/qq_36030412/article/details/53992195

查看nodejs版本:

# node --v




6、创建一个Linux用户

# adduser --home /opt/etherpad --shell /bin/bash etherpad
# install -d -m 755 -o etherpad -g etherpad /opt/etherpad


使用git clone
$ git clone https://github.com/ether/etherpad-lite[/code] 
创建配置文件:
$ cp ~/etherpad-lite/settings.json.template ~/etherpad-lite/settings.json

编辑settings.json文件:
$ sudo vim ~/etherpad-lite/settings.json


如果你要使用Nginx做反向代理,把“ip”: “0.0.0.0” 改为 “ip”: “127.0.0.1”或者改为“192.168.1.166”,trustProxy设置为true。

注释掉”dbType” : “dirty”。

数据库配置:

"dbType" : "mysql",
"dbSettings" : {
"user"    : "etherpad",
"host"    : "localhost",
"password": "test1234",
"database": "etherpad"
},


添加管理员用户:

"users": {
"admin": {
"password": "admin123",
"is_admin": true
}
},
最后退出保存!

安装依赖:
$ ~/etherpad-lite/bin/installDeps.sh


启动Etherpad:
$ ~/etherpad-lite/bin/run.sh







完了访问你的ip:9001






如果外网访问不到的话:

/sbin/iptables -I INPUT -p tcp --dport 端口号 -j ACCEPT #开启端口


我是centos 7 所以运行service network restart,运行成功,在外网访问到
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: