标签:url family rhel ble nod ast public table 文件
参考官方文档:https://helpcenter.onlyoffice.com/server/linux/document/linux-installation-centos.aspx
PostgreSQL: version 9.1 or later
NGINX: version 1.3.13 or later
Redis
RabbitMQ
添加包含最新Node.js包版本的存储库
curl -sL https://rpm.nodesource.com/setup_6.x | sudo bash -
要为RHEL / CentOS设置yum存储库,请创建/etc/yum.repos.d/nginx.repo
包含以下内容的文件:
[nginx-stable] name=nginx stable repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=1 enabled=1 gpgkey=https://nginx.org/keys/nginx_signing.key [nginx-mainline] name=nginx mainline repo baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/ gpgcheck=1 enabled=0 gpgkey=https://nginx.org/keys/nginx_signing.key
安装NGINX:
sudo yum install nginx // 安装完,不用修改配置
安装EPEL存储库
sudo yum install epel-release
安装和配置PostgreSQL
sudo yum install postgresql postgresql-server
初始化PostgreSQL数据库
service postgresql initdb chkconfig postgresql on
打开 IPv4和IPv6 localhost 的“信任”身份验证方法:
/var/lib/pgsql/data/pg_hba.conf
在文本编辑器中打开文件。添加一下,保存修改;
//找到该host all all 127.0.0.1/32 ident字符串并将其替换为以下字符串: host all all 127.0.0.1/32 trust //然后找到该host all all ::1/128 ident字符串并将其替换为以下字符串: host all all ::1/128 trust
重启PostgreSQL服务:
sudo service postgresql restart
创建PostgreSQL数据库和用户:
cd /tmp // 以防止could not change directory to "/root"从根目录运行时发出警告。然后必须创建数据库和用户: sudo -u postgres psql -c "CREATE DATABASE onlyoffice;" sudo -u postgres psql -c "CREATE USER onlyoffice WITH password ‘onlyoffice‘;" sudo -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;"
安装并启动Redis
sudo yum install redis // 启动redis服务并启用启动启动: sudo service redis start sudo systemctl enable redis
安装并启动RabbitMQ
sudo yum install rabbitmq-server // 启动rabbitmq服务并启用启动启动: sudo service rabbitmq-server start sudo systemctl enable rabbitmq-server
添加文件服务器存储库
sudo yum install http://download.onlyoffice.com/repo/centos/main/noarch/onlyoffice-repo.noarch.rpm
安装文件服务器
sudo yum install onlyoffice-documentserver
运行相关服务并在启动时启用它们:
sudo service supervisord start sudo systemctl enable supervisord sudo service nginx start sudo systemctl enable nginx
运行配置脚本
cd /usr/bin/ sh documentserver-configure.sh
执行完脚本一直回车就行了,我就试了好多遍
注:要是找不到documentserver-configure.sh文件的路径:find / -name documentserver-configure.sh
系统将要求您指定PostgreSQL,Redis和RabbitMQ连接参数。使用以下数据:
配置PostgreSQL:
Host: localhost
Database: onlyoffice
User: onlyoffice
Password: onlyoffice
配置Redis:
Host: localhost
配置RabbitMQ:
Host: localhost
User: guest
Password: guest
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent sudo firewall-cmd --reload
安装完成!
Centos7.4部署onlyoffice文档在线编辑服务器
标签:url family rhel ble nod ast public table 文件
原文地址:https://www.cnblogs.com/Alexr/p/12822050.html