OwnCloud是一個開源的個人云儲存方案,我們利用這一套解決方案可以在自己的服務器上搭建屬于自己的云盤系統(tǒng)。
OwnCloud具有配套的網(wǎng)站客戶端,PC客戶端以及手機客戶端可以讓用戶方便的管理云盤文件
1.服務器CentOS 6.5,且處于公網(wǎng)內(nèi)
2.OwnCloud版本為9.1.4
#cd /etc/yum.repos.d/#wget http://download.opensuse.org/repositories/isv:ownCloud:community/CentOS_CentOS-6/isv:ownCloud:community.repo
#rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
在安裝OwnCloud9前,由于其要求的PHP版本為7.0以上,而CentOS6.5中yum的php只有5.3版本,所以需要手動下載PHP7.0
php的版本通過 #php -v
查看
#wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm#wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm#rpm -Uvh remi-release-6.rpm epel-release-latest-6.noarch.rpm
#yum-config-manager --enable remi-php70
得到結(jié)果
[remi-php70]bandwidth = 0base_persistdir = /var/lib/yum/repos/x86_64/6baseurl =cache = 0cachedir = /var/cache/yum/x86_64/6/remi-php70cost = 1000enabled = Trueenablegroups = Trueexclude =failovermethod = prioritygpgcadir = /var/lib/yum/repos/x86_64/6/remi-php70/gpgcadirgpgcakey =
#yum update
#remi-php70
再次查看版本可發(fā)現(xiàn)已安裝php7
#yum install owncloud
#yum install httpd
#chkconfig --levels 235 httpd on#/etc/init.d/httpd start
#setup
選擇FireWall Configuration
若選擇失敗并彈出錯誤
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
則通過
# service messagebus start# chkconfig messagebus on
解決
成功進入后如圖配置
#yum install mysql-server#chkconfig --levels 235 mysqld on#/etc/init.d/mysqld start#mysql_secure_installation
在登錄后
CREATE DATABASE owncloud;GRANT ALL ON owncloud.* to 'owncloud'@'localhost' IDENTIFIED BY 'database_password';
訪問地址為
服務器IP/owncloud
此時若無法訪問并提示錯誤類似
ForbiddenYou don't have permission to access / on this server.Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.6 with Suhosin-Patch Server at xxx.xx.xxx..x Port 80
則是因為不在本地沒有訪問權(quán)限,需要到httpd配置文件中修改權(quán)限
移動到配置文件夾
#cd /etc/httpd/conf.d/owncloud.conf
對owncloud-auth-local.inc文件進行修改
#vi owncloud-auth-local.inc
owncloud-auth-local.inc文件,只要在對應版本的位置修改規(guī)則為Allow 則可在遠程登錄此服務器的owncloud
<IfModule mod_authz_core.c># Apache 2.4Require local#Allow from all</IfModule><IfModule !mod_authz_core.c># Apache 2.2Order Deny,AllowDeny from all#Allow from 127.0.0.1#Allow from ::1Allow from all</IfModule>
最后重新啟動httpd
#service httpd restart
10.成功瀏覽
引用
1.How To Install ownCloud 7 on CentOS 6.5
https://www.howtoforge.com/how-to-install-owncloud_7-on-centos_6.5
2.Upgrading to PHP 7
https://www.centos.org/forums/viewtopic.php?t=57338
3.CentOS 6 安裝setup 工具包
https://idoseek.com/1890