Ubuntu安装owncloud服务端

Screenshot from 2016-03-27 06-56-49
Gnome-shell在新版为owncloud出了同步功能。例如联系人、日历和笔记等等。。。VPS用来自己Dropbox/网盘还是非常合适的。

1.更新与安装依赖

$ sudo su
# apt-get update
# apt-get upgrade
apt-get install apache2 mariadb-server libapache2-mod-php5
apt-get install php5-gd php5-json php5-mysql php5-curl
apt-get install php5-intl php5-mcrypt php5-imagick

2.设置数据库

# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 35
Server version: 5.5.47-MariaDB-1ubuntu0.14.04.1 (Ubuntu)

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

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

MariaDB [(none)]> CREATE DATABASE ownclouddb;
Query OK, 1 row affected (0.04 sec)

MariaDB [(none)]> GRANT ALL ON ownclouddb.* TO ownclouduser@localhost IDENTIFIED BY 'ubuntu';
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> exit
Bye

3.安装
现在最新版暂时是9,出了新版自己替换地址

# wget https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2
# tar xvf owncloud-9.0.0.tar.bz2
# mv owncloud/ /var/www/html/
# chown -R apache:apache /var/www/html/owncloud/
# chown www-data:www-data -R /var/www/html/owncloud/
# chmod 777 /var/www/html/owncloud/config/

4.创建或者编辑文件

# vim /etc/apache2/conf-available/owncloud.conf
添加:
Alias /owncloud /var/www/html/owncloud
<Directory /var/www/html/owncloud/>
AllowOverride All
</Directory>
保存

5.几条终端命令

# cd /etc/apache2/conf-available/
# a2enconf owncloud.conf
# a2enmod rewrite
# service apache2 restart

6.结尾
通过你的网页浏览器导航到 http://ip-address/owncloud 或 http://domain-name/owncloud。
数据库用户一般root或者你设置的用户,数据库名就是刚刚设置的owncloud,和你设置的密码。

etc题外
貌似一个更快捷的方法(noob源):
http://www.noobslab.com/2015/01/install-owncloud-in-ubuntulinux-mint.html

参考:
https://www.youtube.com/watch?v=sqSTeWO-pkM
https://linux.cn/article-2494-1.html
http://www.ubuntu-tw.org/modules/newbb/viewtopic.php?post_id=331852

发表评论

电子邮件地址不会被公开。 必填项已用*标注