centos8 安装nextcloud和onlyoffice
时间: 2024-01-07 17:05:57 浏览: 104
安装 Nextcloud:
1. 首先,安装 Apache 和 MariaDB:
```
sudo dnf install httpd mariadb-server
```
2. 启动 MariaDB 服务并设置 root 密码:
```
sudo systemctl start mariadb
sudo mysql_secure_installation
```
3. 添加 Nextcloud 的官方 Yum 仓库并安装 Nextcloud:
```
sudo dnf install https://download.nextcloud.com/server/releases/nextcloud-22.1.1-1.el8.noarch.rpm
```
4. 创建一个新的 Apache 配置文件 `/etc/httpd/conf.d/nextcloud.conf`,并将以下内容复制进去:
```
Alias /nextcloud "/usr/share/nextcloud/"
<Directory /usr/share/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /usr/share/nextcloud
SetEnv HTTP_HOME /usr/share/nextcloud
</Directory>
```
5. 重启 Apache 服务:
```
sudo systemctl restart httpd
```
6. 访问 `http://your_server_ip/nextcloud`,按照提示完成 Nextcloud 的安装。
安装 OnlyOffice:
1. 添加 OnlyOffice 的官方 Yum 仓库:
```
sudo curl https://download.onlyoffice.com/repo/onlyoffice.key | sudo apt-key add -
sudo echo "deb https://download.onlyoffice.com/repo/centos/main/ /" | sudo tee /etc/yum.repos.d/onlyoffice.repo
```
2. 安装 OnlyOffice 的文档服务:
```
sudo dnf install onlyoffice-documentserver
```
3. 创建一个新的 Apache 配置文件 `/etc/httpd/conf.d/onlyoffice.conf`,并将以下内容复制进去:
```
ProxyPreserveHost On
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location /onlyoffice>
ProxyPass http://localhost:8000/
ProxyPassReverse http://localhost:8000/
</Location>
```
4. 重启 Apache 服务:
```
sudo systemctl restart httpd
```
5. 运行 OnlyOffice 的文档服务:
```
sudo systemctl start onlyoffice-documentserver
```
6. 验证 OnlyOffice 是否成功安装,访问 `http://your_server_ip/onlyoffice/healthcheck`,如果返回 `{"services":{"DocumentServer":{"status":"OK"}}}`,说明安装成功。
7. 在 Nextcloud 中启用 OnlyOffice 插件并配置。
阅读全文