天天看點

Linux系統實戰部署私有雲網盤

​​OwnCloud 一款檔案主機服務軟體,就是我們平時使用的雲存儲,不過這是在自己主機的伺服器上建立屬于自己的私有雲,OwnCloud 使用AGPLv3協定釋出。本項目是基于PHP和SQLite,MySQL,Oracle或PostgreSQL資料庫,是以它可以運作在所有的平台上

RHEL7部署私有雲網盤RHEL7部署私有雲網盤RHEL7部署私有雲網盤RHEL7部署私有雲網盤

下載下傳owncloud安裝包

[root@chao tools]# wget

https://download.owncloud.org/community/owncloud-10.0.2.zip

--2020-06-01 15:09:12--

正在解析主機 download.owncloud.org (download.owncloud.org)... 116.203.164.24, 2a01:4f8:1c0c:8147::

正在連接配接 download.owncloud.org (download.owncloud.org)|116.203.164.24|:443... 已連接配接。

已發出 HTTP 請求,正在等待回應... 301 Moved Permanently

位置:

https://attic.owncloud.org/community/owncloud-10.0.2.zip

[跟随至新的 URL]

--2020-06-01 15:09:18--

正在解析主機 attic.owncloud.org (attic.owncloud.org)... 195.201.36.192, 2a01:4f8:c2c:5c1d::1

正在連接配接 attic.owncloud.org (attic.owncloud.org)|195.201.36.192|:443... 已連接配接。

已發出 HTTP 請求,正在等待回應... 200 OK

長度:42123371 (40M) [application/zip]

正在儲存至: “owncloud-10.0.2.zip”

100%[=========================================================================================================>] 42,123,371 232KB/s 用時 3m 14s

2020-06-01 15:12:34 (212 KB/s) - 已儲存 “owncloud-10.0.2.zip” [42123371/42123371])

[root@chao tools]# ls

owncloud-10.0.2.zip

安裝依賴包元件

[root@chao tools]# yum install -y httpd php php-mysql mariadb-server mariadb sqlite php-dom php-mbstring php-gd php-pdo wget vim

将owncloud包與apache結合将owncloud解壓到apache目錄

[root@chao tools]# unzip owncloud-10.0.2.zip -d /var/www/html/

授權

[root@chao tools]# chown -R apache.apache /var/www/html/owncloud/

設定資料庫啟動資料庫和apache

[root@chao tools]# systemctl start mariadb

[root@chao tools]# systemctl start httpd

關閉防火牆和selinux

[root@chao tools]# setenforce 0

[root@chao tools]# systemctl stop firewalld

建立使用者并授權

[root@chao tools]# mysql

Welcome to the MariaDB monitor. Commands end with ; or g.

Your MariaDB connection id is 2

Server version: 5.5.56-MariaDB MariaDB Server

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

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

MariaDB [(none)]> create database owncloud;

Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> create user 'owncloud'@'localhost' identified by '123456';

Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> grant all on owncloud.* to 'owncloud'@'%';

MariaDB [(none)]> flush privileges;

MariaDB [(none)]> quit

Bye

登入

填寫相關資料庫資訊

部署完成

測試

上傳成功!