티스토리 뷰

OS/Linux

[Ubuntu 16.04] OwnCloud 설치

파란크리스마스 2017. 10. 24. 01:28
728x90

출처 : 우분투 자작 NAS 설치하기 - (7) OwnCloud - 살만한 세상 만들기 - Tistory
우분투 리눅스 서버 16.04 LTS에서 APM설치(PHP5 설치가 안될때) - 따뜻한 커피한잔

Apache2 설치

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install apache2

PHP 설치

$ sudo apt-get install php

Apache2 와 PHP 연동 모듈 설치

$ sudo apt-get install libapache2-mod-php

MySQL - PHP 연동 모듈 설치

$ sudo apt-get install php-mysql 

PHP 확장 모듈 설치

$ sudo apt-get install php-gd php-json php-curl php-intl php-mcrypt php-imagick
$ sudo apt-get install php-zip php-dom php-mbstring

MySQL에 OwnCloud DB와 사용자 생성

$ cd /usr/local/mysql
$ bin/mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.20-log
 
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql> CREATE DATABASE owncloud;
Query OK, 1 row affected (0.00 sec)
 
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
mysql> create user 'owncloud'@'localhost' identified by '***';
Query OK, 0 rows affected (0.00 sec)
 
mysql> GRANT ALL privileges ON owncloud.* TO 'owncloud'@'localhost' identified by '***'; 
Query OK, 0 rows affected, 1 warning (0.00 sec)
 
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
 
mysql> exit
Bye
$ 

OwnCloud 설치

$ wget https://download.owncloud.org/community/owncloud-10.0.3.tar.bz2
$ tar jxvf owncloud-10.0.3.tar.bz2
$ sudo mv owncloud /var/www
$ sudo chown -R www-data:www-data /var/www/owncloud

Apache2에 경로 추가

$ sudo vi /etc/apache2/apache2.conf

Alias /cloud "/var/www/owncloud"

# ownCloud
<Directory /var/www/owncloud>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

PHP환경파일(php.ini) - MySQL 정보 설정

Message: mysqli::real_connect(): (HY000/2002): No such file or directory 오류 발생시 적용

$ sudo vi /etc/php/7.0/apache2/php.ini

pdo_mysql.default_socket=/usr/local/mysql/mysql.sock

Apache2 재시작

$ sudo service apache2 restart







---------------------------------------------------------------------------------------

가상경로로 사용하는 경우 (참고용)

---------------------------------------------------------------------------------------

OwnCloud 설치

$ cd /etc/apache2/sites-available
$ sudo cp 000-default.conf owncloud.conf

owncloud.conf 수정

$ sudo vi /etc/apache2/sites-available/owncloud.conf

DocumentRoot /var/www/owncloud

a2dissite

$ sudo a2ensite owncloud.conf 
Enabling site owncloud.
To activate the new configuration, you need to run:
  service apache2 reload

a2dissite

$ sudo a2dissite owncloud.conf
Site owncloud disabled.
To activate the new configuration, you need to run:
  service apache2 reload
댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
글 보관함