发布于 2015-12-29 11:53:54 | 576 次阅读 | 评论: 0 | 来源: PHPERZ
ownCloud 基于 PHP 的自建网盘
ownCloud是一个自由且开源的个人云存储解决方案。最早由KDE开发者Frank Karlitschek于2010年一月创建,目标是成为商业云服务提供商的替代。与商业云存储服务不同,ownCloud可以自由获取无需付费;它可以被安装在个人服务器上,用户拥有控制和修改的权利。
平台:debian 7 x86_64
一、清晰安装服务端
1,安装源
wget http://dev.mysql.com/get/mysql-apt-config_0.6.0-1_all.deb
dpkg -i mysql-apt-config_0.6.0-1_all.deb (选mysql6或7,apply)
2,更新
apt-get update
apt-get upgrade -y
3,安装mysql
apt-get install -y mysql-server
4,建立owncloud的数据库
mysql -u root -p
CREATE DATABASE owncloud;
GRANT ALL ON owncloud.* TO admin@localhost IDENTIFIED BY 'hello';
FLUSH PRIVILEGES;
EXIT
5,安装Apache和php
apt-get install -y apache2 php5 php5-gd php5-common php5-intl php5-sqlite php5-mysql libcurl3 php5-curl php5-json php5-curl php5-mcrypt php5-imagick libapache2-mod-php5
6,下载owncloud
wget https://download.owncloud.org/community/owncloud-8.2.2.tar.bz2
tar jxvf owncloud-8.2.2.tar.bz2
mv owncloud /var/www/
chown -R www-data:www-data /var/www/owncloud
7,修改配置文件
vi /etc/apache2/sites-enabled/000-default
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
8,启用模块
a2enmod rewrite
a2enmod headers
启用ssl
a2enmod ssl
a2ensite default-ssl
service apache2 reload
9重启Apache
service apache2 restart
二、源安装服务端
echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/Debian_7.0/ /' >> /etc/apt/sources.list.d/owncloud.list
wget http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_7.0/Release.key
apt-key add - < Release.key
apt-get update
apt-get install -y owncloud
安装过程输入一下数据库root密码
a2enmod ssl
a2ensite default-ssl
service apache2 reload
mysql -u root -p 输入密码
CREATE DATABASE owncloud;
GRANT ALL ON owncloud.* to 'owncloud'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
EXIT
三、客户端管理员账户建立
http://yourserverip/owncloud/
admin
password
MYSQL
root
password
owncloud
localhost
下载相应终端app安装尝试即可