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

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

创建配置文件:
$ 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,运行成功,在外网访问到





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值