centos下安装etherpad
来源:互联网 发布:南风知我意2七微 编辑:程序博客网 时间:2024/06/05 07:52
..
声明:
本博客欢迎转发,但请保留原作者信息!
博客地址:http://blog.csdn.net/liujiong63
新浪微博:@Jeremy____Liu
内容系本人学习、研究和总结,如有雷同,实属荣幸!
环境:CentOS Linux release 7.2.1511 (Core)
安装工具包
yum install curl vim gcc-c++ make git
安装数据库
yum install mariadb-server
启动数据库服务
systemctl start mariadb.servicesystemctl enable mariadb.service
数据库初始化
mysql_secure_installation
注意:为数据库root用户设置合适的密码
初始化etherpad数据库及配置
mysql -uroot -p<your-password>MariaDB [(none)]> CREATE DATABASE etherpad;MariaDB [(none)]> GRANT ALL PRIVILEGES ON etherpad.* TO 'etherpad'@'localhost' IDENTIFIED BY 'etherpad';MariaDB [(none)]> FLUSH PRIVILEGES;MariaDB [(none)]> \q
创建出数据库etherpad,用户名etherpad,密码etherpad
安装Node.js
# curl -sL https://rpm.nodesource.com/setup | sudo bash -# yum install nodejs查看nodejs版本:# node --version
创建系统用户
etherpad可以以root用户运行,但建议创建一个普通用户。
# adduser --home /opt/etherpad --shell /bin/bash etherpad# install -d -m 755 -o etherpad -g etherpad /opt/etherpadsu - etherpad
安装并配置etherpad
git clone https://github.com/ether/etherpad-litecp ~/etherpad-lite/settings.json.template ~/etherpad-lite/settings.json
编辑settings.json文件,vim ~/etherpad-lite/settings.json,配置以下内容
"dbType" : "mysql", "dbSettings" : { "user" : "etherpad", "host" : "localhost", "password": "etherpad", "database": "etherpad" }, "users": { "admin": { "password": "admin", "is_admin": true }, },
如果使用nginx作为反向代理,需要对该配置文件额外设置:
"ip": "127.0.0.1""trustProxy" : true
安装依赖
~/etherpad-lite/bin/installDeps.sh
启动etherpad
~/etherpad-lite/bin/run.sh
如果以root用户运行该脚本,需添加一个参数:–root
将etherpad作为系统服务进行启动
如果想将etherpad以服务方式运行,需手动编写对应的服务启动文件。
新建etherpad服务启动文件etherpad.service
,内容如下
[Unit]Description=etherpad[Service]ExecStart=/opt/etherpad/etherpad-lite/bin/run.sh --rootExecReload=/bin/kill -HUP $MAINPID# supress to log debug and error output also to /var/log/messagesStandardOutput=nullStandardError=null
将该文件拷贝到/usr/lib/systemd/system
目录下,并执行
systemctl daemon-reloadsystemctl start etherpad.service
配置nginx反向代理
vim /etc/nginx/conf.d/default.conf 添加如下配置:
# etherpad location ^~ /etherpad/ { proxy_pass http://127.0.0.1:9001/; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host;}
配置网络访问
防火墙中开放9001端口
如果发现浏览器中无法访问etherpad,可能需要关掉selinux
访问etherpad
浏览器访问http://<your-ip>:9001
或设置的nginx反向代理地址(http://<your-ip>/etherpad
)即可访问etherpad
阅读全文
0 0
- centos下安装etherpad
- CentOS 7安装Etherpad(在线协作编辑)
- CentOS 7安装Etherpad(在线协作编辑)
- CentOS 7安装Etherpad(在线协作编辑)
- CentOS 7安装Etherpad(在线协作编辑)
- CentOS 安装 Etherpad (多人一起写)
- 在Ubuntu下搭建局域网的etherpad
- CentOS下安装MRTG
- centos下安装memcached
- CentOS下安装mplayer
- Centos 下安装 json
- CentOS下安装Thunderbird
- CentOS下安装Thunderbird
- Centos 下安装 JDK
- Centos 下安装 JDK
- CENTOS 下安装 QT
- CentOS下安装AMP
- centos 下安装JDK
- PS中色相饱合度/可选颜色/色彩平衡/曲线的区别和运用方法详解
- java分页之页面分页—@易小川
- Caused by: android.view.InflateException:Binary XML file line #:Error inflating class <unknown>问题
- btye[] b = new byte[1024]
- 如何将python脚本生成exe
- centos下安装etherpad
- Redis可视化工具Redis Desktop Manager使用
- EXtjs的可删除,可添加,可移动排序的图片DataView
- poj dfs相关之1011 Sticks
- 字符串替换各语言版本
- C++boost之assign使用(二)
- OC中的一些编程写法--({"添加代码"})
- EXTJS. Grid总计+oracle小计合计
- 补6月20日