centos8一键安装nexdloud和onlyoffice脚本
时间: 2024-06-08 17:12:51 浏览: 192
以下是一键安装Nextcloud和Onlyoffice的脚本:
```bash
#!/bin/bash
# 安装Nextcloud
echo "开始安装Nextcloud..."
sudo yum -y update
sudo yum -y install epel-release
sudo rpm -Uvh https://download.nextcloud.com/server/releases/nextcloud-21.0.1-1.el8.noarch.rpm
sudo yum -y install httpd php php-mysqlnd php-gd php-mbstring php-intl php-pecl-zip php-json php-xml php-bcmath php-gmp
sudo systemctl enable httpd
sudo systemctl start httpd
sudo setsebool -P httpd_can_network_connect on
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
# 安装Onlyoffice
echo "开始安装Onlyoffice..."
sudo yum -y install https://download.onlyoffice.com/repo/centos/main/noarch/onlyoffice-repo.noarch.rpm
sudo yum -y install onlyoffice-documentserver
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
sudo firewall-cmd --reload
echo "安装完成!"
```
请注意,此脚本假设您使用的是CentOS 8操作系统,且已启用EPEL存储库。在运行此脚本之前,请确保您已经备份了所有重要数据,并且您已经了解了每个命令的含义。
阅读全文