歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> 學習Linux >> CentOS 7安裝Etherpad(在線協作編輯)

CentOS 7安裝Etherpad(在線協作編輯)

日期:2017/3/3 17:34:14   编辑:學習Linux

CentOS 7安裝Etherpad(在線協作編輯)


熱度5 評論 272 www.BkJia.Com 網友分享於: 2017-02-10 07:02:19 浏覽數49411次

CentOS 7安裝Etherpad(在線協作編輯)


CentOS 7安裝Etherpad(在線協作編輯)

Etherpad 是一個線上共制平台,是基於網絡的實時合作文檔編輯器,三、四個人可以坐在自己電腦前,同時對一份文檔修改,也同時能看到其他人的修改。

CentOS 7 安裝 Etherpad

1、先安裝一些工具

# yum install curl vim gcc-c++ make

2、安裝MariaDB

# yum install mariadb-server

啟動MariaDB服務:

# systemctl start mariadb.service# systemctl enable mariadb.service

運行MariaDB初始化腳本:

# mysql_secure_installation

Mariadb初始密碼為空;

3、為Etherpad創建一個數據庫和用戶

# mysql -u root -pMariaDB [(none)]> CREATE DATABASE etherpad;MariaDB [(none)]> GRANT ALL PRIVILEGES ON etherpad.* TO 'etherpad'@'localhost' IDENTIFIED BY 'test1234';MariaDB [(none)]> FLUSH PRIVILEGES;MariaDB [(none)]> \q

創建數據庫etherpad;用戶etherpad,密碼test1234。

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。注釋掉”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

使用浏覽器訪問:your_server_ip:9001 創建新文檔(New Pad),(鏈接:http://your_ip:9001/p/r5Lc37e42P): 把鏈接發送給合作伙伴,協作編寫同一個文檔。每個人編輯的文本會使用不用的顏色,非常方便區分。

7、後續配置 把etherpad注冊為系統服務 使用Nginx做反向代理(域名->127.0.0.1:9001)

本文永久更新地址:http://www.linuxdiyf.com/linux/22391.html 軟件官網:http://etherpad.org/

http://www.bkjia.com/Linuxjc/1192008.html TechArticle

Copyright © Linux教程網 All Rights Reserved