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

来源:互联网 发布:java 技术支持面试问题 编辑:程序博客网 时间:2024/06/08 07:08

1、安装一些依赖包

yum install curl vim gcc-c++ make

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

yum install mariadb-server

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

4、为Etherpad创建一个数据库和用户
# mysql -u root -pMariaDB [(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
原创粉丝点击