이전 포스트에서 웹하드라고 하는 웹 응용서비스를 활용해보았다.
이번 포스트에서는 클라우드 저장소 기능을 제공하는 오픈소스 'owncloud'를 설치해 활용해보았다.
[root@localhost ~]# dnf install -y httpd mariadb-server php php-mysqlnd php-gd php-mbstring php-pecl-zip php-xml php-json php-intl
[root@localhost ~]# systemctl restart mariadb
[root@localhost ~]# systemctl enable mariadb
[root@localhost ~]# mysql
MariaDB [(none)]> create database webDB;
MariaDB [(none)]> grant all on webDB.* to webUser@localhost identified by '1234';
MariaDB [(none)]> exit
[root@localhost ~]# systemctl restart httpd
[root@localhost ~]# systemctl enable httpd
[root@localhost ~]# firewall-cmd --permanent --add-service=http
[root@localhost ~]# firewall-cmd --permanent --add-service=https
[root@localhost ~]# firewall-cmd --reload
[root@localhost html]# wget https://download.owncloud.org/community/owncloud-10.3.1.zip
[root@localhost html]# unzip -q owncloud-10.3.1.zip
[root@localhost html]# mkdir owncloud/data
[root@localhost html]# chown -R apache.apache owncloud
[root@localhost html]# chown -R 755 owncloud
[root@localhost html]# systemctl restart httpd
owncloud 접속 화면
Client 설치
[centos@localhost ~]$ su
[root@localhost centos]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# wget https://download.opensuse.org/repositories/isv:ownCloud:desktop/CentOS_8/isv:ownCloud:desktop.repo
[root@localhost yum.repos.d]# dnf install -y owncloud-client
[root@localhost yum.repos.d]# exit
[centos@localhost ~]$ owncloud &
웹 서비스를 구현하려면 웹 서버의 설정파일은 /etc/httpd/conf/httpd.conf 파일의 의미를 알아야 한다.
ServerRoot "/etc/httpd"
Listen 80
Include conf.modules.d/*.conf
User apcahe / Group apache
ServerAdmin root@localhost
DocumentRoot "/var/www/html"
<Directory "/var/www/html">
Option Indexes FollowSymLinks
AllowOveride None
Require all granted
</Directory>
- Option Indexes FollowSymLinks
현재 디렉토리에서 Directoryindex에 지정된 파일이 없다면 파일 목록을 대신 출력하라는 의미를 가짐
service httpd configtest
명령어를 입력하고 이상없는 상태라면 Syntax OK
라는 메세지가 나타난다.