Lluna's Pure land.

What is life like when singing to wine?

0%

Centos7搭建own私有网盘

1.安装apache

1
2
3
yum install httpd -y
systemctl start httpd
systemctl enable httpd

2.安装配置PHP

1
2
3
4
5
6
7
8
yum install epel-release -y

yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm yum-utils

yum-config-manager --enable remi-php72

yum install -y php php-mbstring php-gd php-mcrypt php-pear php-pspell php-pdo php-xml php-mysqlnd php-process php-pecl-zip php-xml php-intl php-zip php-zlib

3.安装并配置Mariadb

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
vim /etc/yum.repos.d/MariaDB.10x.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

yum install -y MariaDB-server MariaDB-client

systemctl start mariadb
systemctl enable mariadb

mysql_secure_installation

create database ownclouddb;
grant all privileges on ownclouddb.* to ownclouduser@localhost identified by 'owncloudpwd';
flush privileges;

4.安装owncloud

1
2
3
4
5
6
7
8
9
10
11
12
13
vim /etc/yum.repos.d/owncloud.repo
[OwnCloud_10.x]
name=wnCloud Server Version 10.x (CentOS 7)
type=rpm-md
baseurl=http://download.owncloud.org/download/repositories/production/CentOS_7
gpgcheck=1
gpgkey=http://download.owncloud.org/download/repositories/production/CentOS_7/repodata/repomd.xml.key
enabled=1

yum repolist
yum clean expire-cache
yum install owncloud -y
systemctl restart httpd

5.配置防火墙规则及SElinux或关闭

1
2
3
4
5
6
7
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload

systemctl stop firewalld
iptables -F
setenforce 0

6.移动目录

1
2
3
cp -a /var/www/html/owncloud/* /var/www/html/
chown -R apache:apache home/
systemctl restart httpd

7.配置页面

(1)配置数据库用户等

(2)登入

-------------纸短情长下次再见-------------