nextcloud 私有云存储搭建

1.准备工作

关闭selinux 和防火墙

[root@server ~]# systemctl stop firewalld

[root@server ~]# setenforce 0
 

2.搭建LAMP环境

[root@server ~]# yum install httpd -y
[root@server ~]# yum install php*
[root@server ~]# yum install mariadb-server -y
[root@server ~]# cd /

使用xftp上传nextcloud-25.0.1.zip 软件压缩包到linux 的根目录,并解压缩

[root@server /]# unzip nextcloud-25.0.1.zip 

3.设置nextcloud 安装目录的权限

[root@server /]# cd ~
[root@server ~]# chmod -Rf 777 /nextcloud

4.设置数据库

#启动数据库
[root@server ~]# systemctl start mariadb.service 
[root@server ~]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.5.16-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database nextcloud;    #新建数据库
Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]> create user 'nextcloud'@'localhost' identified by '123456';    #新建用户及对应主机以及密码
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> grant all on nextcloud.* to 'nextcloud'@'localhost';    #设置权限
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> exit    #退出
Bye

5.重启数据库

[root@server ~]# systemctl restart mariadb

6.配置http

[root@server ~]# vim /etc/httpd/conf/httpd.conf

#定位第124行开始如下修改:
124 DocumentRoot "/nextcloud"
125 
126 
127 #
128 # Relax access to content within /var/www.
129 #
130 <Directory "/nextcloud">
131     AllowOverride None
132     # Allow open access:
133     Require all granted
134 </Directory>

7.重启httpd服务

[root@server ~]# systemctl restart httpd
8.打开浏览器输入Linux服务器IP地址,完成安装向导设置

用户名自订

密码:自定 如:123456

存储与数据库:选择        Mysql/MaraiaDB,设置数据库用户、密码、数据库名,必须与第四步对应

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值