우분투서버 owncloud 설치

 

우분투 서버 PHP7.4 owncloud 설치

서버 설치 순서:

sudo apt update
sudo apt install smbclient redis-server unzip openssl rsync imagemagick

 

PHP 7.4 설치:
sudo add-apt-repository ppa:ondrej/php -y
sudo apt install php7.4 php7.4-intl php7.4-mysql php7.4-mbstring php7.4-imagick php7.4-igbinary php7.4-gmp php7.4-bcmath php7.4-curl php7.4-gd php7.4-zip php7.4-imap php7.4-ldap php7.4-bz2 php7.4-ssh2 php7.4-common php7.4-json php7.4-xml php7.4-dev php7.4-apcu php7.4-redis libsmbclient-dev php-pear php-phpseclib

sudo update-alternatives –config php

php -version

sudo update-alternatives –set phar /usr/bin/phar7.4
sudo update-alternatives –set phar.phar /usr/bin/phar.phar7.4

sudo update-alternatives –set phpize /usr/bin/phpize7.4

sudo update-alternatives –set php-config /usr/bin/php-config7.4

sudo mkdir -p /tmp/pear/cache
sudo pear upgrade –force –alldeps http://pear.php.net/get/PEAR-1.10.13
sudo pear clear-cache
sudo pear update-channels

sudo pear upgrade –force

sudo pear upgrade-all

pear version

 

Apache2 웹 서버 설치:

sudo apt install libapache2-mod-php7.4 apache2
sudo a2enmod rewrite env dir mime unique_id headers ssl
sudo systemctl restart apache2

 

MariaDB 서버 설치:

sudo apt install mariadb-server
sudo mysql_secure_installation

sudo mysql -u root -p
# 데이터베이스 “owncloud” 및 사용자 “owncloud” 생성

CREATE DATABASE owncloud;
CREATE USER IF NOT EXISTS ‘owncloud’@’localhost’ IDENTIFIED BY ‘owncloudpass’;
GRANT ALL PRIVILEGES ON owncloud.* TO ‘owncloud’@’localhost’ WITH GRANT OPTION;
FLUSH PRIVILEGES;

SHOW GRANTS FOR ‘owncloud’@’localhost’;

 

OwnCloud 소스 코드 다운로드:

cd /var/www/
wget https://download.owncloud.com/server/stable/owncloud-complete-latest.tar.bz2
wget https://download.owncloud.com/server/stable/owncloud-complete-latest.tar.bz2.sha256
sudo sha256sum -c owncloud-complete-latest.tar.bz2.sha256 < owncloud-complete-latest.tar.bz2

tar -xf owncloud-complete-latest.tar.bz2
sudo chown -R www-data:www-data owncloud

 

Apache 설정:

sudo nano /etc/apache2/conf-available/owncloud.conf

해당 파일에 아래 설정을 붙여넣는다

Alias /owncloud “/var/www/owncloud/”
<Directory /var/www/owncloud/>
Options +FollowSymlinks
AllowOverride All

<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/owncloud
SetEnv HTTP_HOME /var/www/owncloud
</Directory>

파일을 저장하고 닫는다.

sudo a2enconf owncloud
 sudo a2enmod rewrite
 sudo a2enmod headers
 sudo a2enmod env
 sudo a2enmod dir
 sudo a2enmod mime
 sudo systemctl restart apache2

 

sudo cp /etc/apache2/conf-available/owncloud.conf /etc/apache2/conf-enabled/


sudo systemctl reload apache2

 

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다