CentOS8部署nextcloud网盘
Nextcloud是一款开源的存储软件,功能丰富,支持多人协同工作,目前完全免费。
官网:https://www.nextcloud.com
架构:LAMP或LNMP
本文以LAMP为基础
注意:php最低版本为7.2
关闭selinux:
1.临时关闭:setenforce 0 :临时关闭,无需重启系统
2.永久关闭:sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config:永久关关闭,需要重启系统
关闭防火墙:
systemctl stop firewalld
也可以放行相应端口:
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=3306/tcp --permanent
安装Apache2 服务器:
yum install -y httpd
启动httpd
systemctl start httpd
安装mariadb数据库:
yum install -y mariadb mariadb-server
启动mariadb:
systemctl start mariadb
mariadb操作:
登录mariadb:
mysql -u root -p (默认密码为空)
创建数据库nextcloud:
create database if not exists `nextcloud` default character set utf8 collate utf8_general_ci;
创建账户nextcloud:
create user nextcloud@'localhost' identified by "nextcloud";
授权nextcloud的权限:
grant all privileges on nextcloud.* to nextcloud@'localhost' identified by 'nextcloud';
刷新mariadb权限表:
flush privileges;
CentOS7安装php7.2:
php
高版本的yum
源地址,有两部分,其中一部分是epel-release
,另外一部分来自webtatic
。如果跳过epel-release
的话,安装webtatic
的时候,会报错。
添加企业扩展源:
yum install epel-release -y
添加webtatic源
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
php要安装的内容:
yum -y install httpd php php-cli php-mysqlnd php-zip php-devel php-gd php-mbstring php-curl php-xml php-pear php-bcmath php-json php-pdo php-pecl-apcu php-pecl-apcu-devel
如果觉得麻烦可以直接使用:
yum install -y php*
遇到错误则执行:
yum install php* --skip-broken 即可
如果是centos8/rhel8则非常方便直接执行:
yum install -y php*
下载nextcloud:
yum install -y wget
wget -c https://download.nextcloud.com/server/releases/nextcloud-19.0.1.zip
解压nextcloud至/var/www/html
yum install -y unzip
unzip -q nextcloud-19.0.1.zip
设置网盘根目录的属主,属组
chown -R apache:apache /var/www/html
输入ip即可进入安装向导
安装完成后登陆后台的界面:
nextcloud各平台客户端下载:
nextcloud windows客户端:https://download.nextcloud.com/desktop/releases/Windows/latest
nextcloud MacOS客户端:https://download.nextcloud.com/desktop/releases/Mac/Installer/latest
nextcloud Linux客户端:https://download.nextcloud.com/desktop/releases/Linux/latest
nextcloud Android客户端:https://apps.nextcloud.com/categories/integration?search=android
nextcloud IOS客户端:https://apps.nextcloud.com/categories/integration?search=ios
本文来自博客园,作者:田园诗人,转载请注明原文链接:https://www.cnblogs.com/iterx/p/13572788.html