4

阿里云(centos7.3)安装 Etherpad (多人一起在线编写)

 2 years ago
source link: https://blog.51cto.com/u_13794952/5558280
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

阿里云(centos7.3)安装 Etherpad (多人一起在线编写)

原创

知识浅谈 2022-08-09 11:22:48 博主文章分类:LINUX ©著作权

文章标签 json mysql 服务器 文章分类 虚拟化 云计算 阅读数153

Etherpad 多人共同书写平台(类似于一起写),可同时能看到其他人的书写也可修改他人书写。

使用浏览器访问:(ip或者你的域名:9001 例:192.168.1.1:9001)

阿里云(centos7.3)安装 Etherpad (多人一起在线编写)_json
阿里云(centos7.3)安装 Etherpad (多人一起在线编写)_json_02

1、先yum安装一些工具
# yum install curl vim gcc-c++ make

2、安装MariaDB(如果你本身已有mysql就不需安装了)
# yum install mariadb-server

启动MariaDB服务:
# systemctl start mariadb.service
# systemctl enable mariadb.service
运行MariaDB初始化脚本:
# mysql_secure_installation
Mariadb初始密码为空;

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

4、安装Node.js
# curl -sL ​​ ​https://rpm.nodesource.com/setup​​​ | sudo bash -
# yum install nodejs
查看nodejs版本:
# node –version

5、创建一个Linux用户
# adduser –home /opt/etherpad –shell /bin/bash etherpad
# install -d -m 755 -o etherpad -g etherpad /opt/etherpad

6、安装Etherpad
切换到新用户:
# su - etherpad
使用git clone源码:
$ cd
$ 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”,(如果你的是外网服务器就不需更改了)
trustProxy =‘true’
<span style="color:#FF0000;">注释掉</span>dbType:dirty
数据库配置:
"dbType" : "mysql",
"dbSettings" : {
"user" : "etherpad",
"host" : "localhost",
"password": "1234",
"database": "etherpad"
},

添加管理员用户:
"users": {
"admin": {
"password": "admin123",
"is_admin": true

保存退出。

安装依赖(需要等待较长时间。。。):
$ ~/etherpad-lite/bin/installDeps.sh

启动Etherpad(如下则已开启可以去访问网址了):

su - etherpad

$/opt/etherpad/etherpad-lite/bin/run.sh

阿里云(centos7.3)安装 Etherpad (多人一起在线编写)_服务器_03

如果出现这一句话的解决方法
[2018-06-09 00:37:20.087] [WARN] console - Etherpad is running in Development mode. This mode is slower for users and less secure than production mode. You should set the NODE_ENV environment variable to production by using: export NODE_ENV=production

在命令行中输入export NODE_ENV=production

再 /opt/etherpad/etherpad-lite/bin/run.sh

7、后续配置

把etherpad注册为系统服务

访问方式(域名:9001)

如果你启动成功之后就是访问不了 可能是你的端口号出现问题

先采用这个方案 如果是阿里云的轻服务器

先去添加9001端口,在centos服务器上的firewalld开的9001并不管用去这里就可以

阿里云(centos7.3)安装 Etherpad (多人一起在线编写)_mysql_04

实在不行这是别人的推荐,暂时不知道行不行

阿里云(centos7.3)安装 Etherpad (多人一起在线编写)_json_05

从这里分享网址

阿里云(centos7.3)安装 Etherpad (多人一起在线编写)_服务器_06

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK