OwnCloud是一个基于PHP开发的个人云盘工具,对于熟悉百度云盘的,界面操作上还是很相似的。
安装环境:ubuntu 14.04 LTS +LNMP1.1
owncloud下载,下载tar.bz2的压缩包并解压
wget https://download.owncloud.org/community/owncloud-7.0.4.tar.bz2
tar -xf owncloud-7.0.4.tar.bz2
cd owncloud
mkdir data
chown -R www:www data
2.编辑虚拟主机host文件
vim /usr/local/nginx/conf/vhost/pan.crazycen.com.conf
server {
listen 80;
server_name pan.crazycen.com;
index index.php;
root /homw/wwwroot/pan.crazycen.com;
client_max_body_size 10G;
fastcgi_buffers 64 4K;
rewrite ^/caldav((/|$).*)$ /remote.php/caldav$1 last;
rewrite ^/carddav((/|$).*)$ /remote.php/carddav$1 last;
rewrite ^/webdav((/|$).*)$ /remote.php/webdav$1 last;
location ~ ^/(data|config|.ht|db_structure.xml|README) {
deny all;
}
location / {
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
rewrite ^(/core/doc/1+/)$ $1/index.html;
try_files $uri $uri/ index.php;
}
location ~ ^(?<script_name>.+?.php)(?<path_info>/.*)?$ {
try_files $script_name = 404;
include fastcgi.conf;
fastcgi_param PATH_INFO $path_info;
fastcgi_param HTTPS off;
fastcgi_pass unix:/tmp/php-cgi.sock;
}
location ~* ^.+.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
expires 30d;
access_log off;
}
}
安装OwnCloud
配置完毕后,接下来使用浏览器打开。输入“http://your_host/owncloud”进入安装页面。如果能成功打开,先恭喜你,你已经完成了一大半了。接下来输入用户名密码以及MySQL相关的信息后选择“Finish Setup”。4. 安装完成,开始体验吧