Nextcloud网盘

关闭防火墙

systemctl stop firewalld && systemctl disable firewalld

安装软件

yum install -y  unzip curl wget bash-completion bzip2

设置Selinux

[root@cctv html]# cat /etc/selinux/config 

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=permissive  ##设置为permissive 
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 

安装httpd并设置

1、yum install httpd.x86_64 httpd-devel.x86_64 -y
2、vim /etc/httpd/conf.d/nextcloud.conf
    <VirtualHost *:80>
    DocumentRoot /var/www/html/
    ServerName  127.0.0.1
    <Directory "/var/www/html/">
    Require all granted
    AllowOverride All
    Options FollowSymLinks MultiViews
    </Directory>
    </VirtualHost>
3、systemctl start httpd.service
4、systemctl enable httpd.service

安装软件并创建链接

1、yum install -y centos-release-scl
2、yum install -y rh-php72 rh-php72-php rh-php72-php-gd rh-php72-php-mbstring rh-php72-php-intl rh-php72-php-pecl-apcu rh-php72-php-mysqlnd rh-php72-php-pecl-redis rh-php72-php-opcache rh-php72-php-imagick
3、ln -s /opt/rh/httpd24/root/etc/httpd/conf.d/rh-php72-php.conf /etc/httpd/conf.d/
4、ln -s /opt/rh/httpd24/root/etc/httpd/conf.modules.d/15-rh-php72-php.conf /etc/httpd/conf.modules.d/
5、ln -s /opt/rh/httpd24/root/etc/httpd/modules/librh-php72-php7.so /etc/httpd/modules/
6、ln -s /opt/rh/rh-php72/root/bin/php /usr/bin/php

安装mariadb并设置

yum install -y mariadb mariadb-server
systemctl start mariadb.service
systemctl enable mariadb.service
mysql
  CREATE DATABASE chenrui; 创建数据库
  create user chenrui@localhost identified by '设置密码'; 
  grant all on *.* to 'nextcloud'@'localhost' identified by '上面设置的密码' with grant option;
  FLUSH PRIVILEGES;
  EXIT
systemctl restart mariadb.service ##重启

下载nextcloud并设置

yum install wget -y ##没有wget需要下载
wget https://download.nextcloud.com/server/releases/nextcloud-20.0.2.zip  ##下载
yum install unzip.x86_64 -y ##没有unzip需要下载
unzip nextcloud-20.0.2.zip  ##解压缩
cp -r  nextcloud /var/www/html/
mkdir /var/www/html/data
chown -R apache:apache /var/www/html/ ##修改属主和属组
systemctl restart httpd.service ##重启httpd服务

WEB网页

1、打开web页面.http://安装这台电脑的IP地址
2、设置自己的用户名,密码;设置数据库需要点开,选择MySQL/MariaDB.
3、数据库:chenrui
4、用户名:chenrui
5、密码:上面设置的密码
6、安装推荐的应用的勾去掉,国内的网可能安装不上.
7、点击安装
posted @ 2021-08-06 16:20  发进  阅读(100)  评论(0)    收藏  举报