CentOS 6.4 minimum 다운 및 설치 (http://gotocloud.co.kr/?p=506 GotoCloud 블로그에서 대부분 참고 했습니다.)
* (2013-09-07) 현재는 버전이 좀 올라가서 조금 틀릴 수도 있슴을 알립니다.
http://mirror-status.centos.org/#kr
http://centos.mirror.cdnetworks.com/6.4/isos/x86_64/
* 설치중 파티션시 애초에 클라우드를 위한 것이므로 단일 하드라면, OS 8GB, Paging 램만큼 하고 나머지를 /share 등으로
전부 할당. 클라우드 서비스를 위해 가능한 큰 단일 하드 또는 RAID Array 사용을 추천한다.
단, RAID 사용은 CLI 모드인 minimum 버전에서는 쓰기가 힘드니 일반 버전을 설치하고 KDE를 제거하면 어느 정도 가볍게
사용이 가능하겠다. X-Windows 환경에서도 RAID 디스크 설정외엔 터미널을 실행하여 아래의 과정을 따르면 된다.
* ownCloud 5 설치 후 에러가 뜨는데 php의 버전이 낮아서 뜨는 오류이다. CentOS 6 기본 repo 에선 최신버전이 제공되지
않으므로 아래의 링크를 보고 CentOS 3rd Party Repository인 RPMForge를 미리 추가해 놓는다.
http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
영문키보드 English UTF-8 권장. 로케일과 시간대는 한국과 서울로..
0. 업데이트
yum list updates
yum update -y
yum install vim -y
alias vi=vim
1. SELinux 비활성
setenforce 0
vi /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
:wq
2. 방화벽(Iptables) 수정
vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibitedCOMMIT
:wq
service iptables restart
chkconfig iptables on
3. NTP 활성화
service ntpd start
chkconfig ntpd on
4. APM 설치
yum install -y httpd mysql mysql-server php php-mysql php-gd php-mbstring php-dom php-ldap
service httpd start
service mysqld start
chkconfig httpd on
chkconfig mysqld on
다른컴의 브라우저에서 서버가 동작중인 IP를 입력하면 아파치 기본페이지가 보인다.
5. mysql 설정
mysql -u root -p
Enter password: (암호가 없으므로 그냥 'Enter')
mysql> SET PASSWORD = PASSWORD(‘원하는암호입력‘);
mysql> CREATE DATABASE owncloud; (원하는 owncloud DB명)
mysql> GRANT ALL PRIVILEGES ON owncloud.* TO root;
(owncloud DB의 권한을 부여)
mysql> FLUSH PRIVILEGES;
mysql> exit;
6. ownCloud 5 설치
* owncloud.org 홈페이지 첫화면에 가장 최근 버전의 링크가 있다. wget 이후의 주소는 확인 후 수정할 것.
* 기본적인 매뉴얼은 영문이긴 하지만, 어느 정도 되어 있는 편이다. 다운은 홈폴더에서 진행
wget http://download.owncloud.org/community/owncloud-5.0.5.tar.bz2
tar jxvf owncloud-5.0.5.tar.bz2mkdir -p /owncloud (ownCloud 가 설치될 곳)
cp -a ~/owncloud/* /owncloud/
chown -R apache.apache /owncloud
service httpd stop
vi /etc/httpd/conf/httpd.conf
/DocumentRoot (vi에서 '/' 입력후, 뒷문자열 입력하면 해당 문자열을 검색)
~~ <중략> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
# DocumentRoot "/var/www/html"
DocumentRoot "/owncloud"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# This should be changed to whatever you set DocumentRoot to.
#
#<Directory "/var/www/html">
<Directory "/owncloud">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
~~ <이하 생략> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:wq
service httpd start
이후 owncloud 관리자 페이지 설정등은 한글로 되어 있어 무리없고 다만, 안전을 위해 사이트 접속시 SSL(https) 인증서를
사용하도록 셋팅해주는 것이 좋음(아래의 주소를 참고).
Startcom 무료SSL 받기 http://lightsea16.tistory.com/619
SSL 인증서 서버에 적용하기 http://ubuntuserverguide.com/2013/04/how-to-setup-owncloud-server-5-with-ssl-connection.html
- 링크데로 따라하되 조금씩 틀리거나 다른 부분은 요령껏 극복 :)