Ubuntu配置Owncloud

1、安装curl

sudo apt-get install php-curl

2、下载owncloud

sudo wget https://download.owncloud.org/community/owncloud-9.02.tar.bz2

3、安装owncloud

解压owncloud到web目录下

sudo tar xjf owncloud-9.0.2.tar.bz2
sudo cp -r -v owncloud/ /var/www/html/

设置owncloud下的目录权限

sudo mkdir data
sudo chown -R www-data:www-data data
sudo chown -R www-data:www-data config
sudo chown -R www-data:www-data apps
sudo chmod 777 owncloud

配置web服务器

sudo vim /etc/apache2/apache2.conf
#修改如下内容,将AllowOverride对应的值改为All
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
sudo service apache2 restart
sudo a2enmod rewrite
Module rewrite already enabled
sudo a2enmod headers
Module headers already enable<pre name="code" class="plain">
$ sudo service apache2 restart