AtoM 2.2 설치 매뉴얼 1
Ubuntu 14.04 LTS에 AtoM 설치하는 방법입니다.
○ Nano 에디터 설치 (리눅스 초보자의 경우 vi 에디터 보다 사용이 편리)
○ 시스템 요구사항
아래와 같이 최신의 안정화 버전 설치가 필요합니다.
- A webserver like Apache or Nginx; Artefactual prefers the latter in development
- Elasticsearch 1.3.0 or newer
- Oracle Java 8 or newer (required for Elasticsearch)
- MySQL 5.1 or newer
- PHP 5.3.10 or newer (PHP 5.4 and PHP 5.5 work too)
- Memcached
- Gearman job server
추가적으로, 아래의 PHP 확장기능도 설치해야 합니다.
- cURL (php5-curl)
- JSON (php5-json)
- APC (php-apc, or php5-apcu in PHP 5.5)
- PDO and PDO-MySQL (php5-mysql)
- XSL (php5-xsl)
옵션:
- Readline (php5-readline, required in 14.04 only, not available in Windows).
○ 리눅스 Ubuntu 업데이트
sudo apt-get update (패키지 리스트 저장소 갱신)
sudo apt-get upgrade (시스템 업그레이드)
○ Nano 에디터 설치 (리눅스 초보자의 경우 vi 에디터 보다 사용이 편리)
sudo apt-get install nano
([Y/N] 물으면 y 입력 후 엔터)
1. 각종 어플리케이션 설치
○ MySQL 설치
sudo apt-get install mysql-server-5.5
패스워드 입력하라고 나오면 패스워드 입력(root계정 패스워드)
○ Java 설치
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
○ ElasticSearch 설치
wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -
root계정 패스워드 설정
sudo passwd root
새 비밀번호 입력 (2회)
su -
sources.list 문서 열어서 소스리스트 추가
nano /etc/apt/sources.list
맨 밑에 줄에 아래 문장 붙여넣기
deb http://packages.elasticsearch.org/elasticsearch/1.3/debian stable main
문서 저장 (Ctrl + O) 엔터
나가기 (Ctrl + X) 엔터
업데이트 및 Elasticsearch 설치
sudo apt-get update
sudo apt-get install elasticsearch
시스템 부팅 시 Elasticsearch 자동실행 설정
sudo update-rc.d elasticsearch defaults 95 10
sudo /etc/init.d/elasticsearch start
○ 웹서버 설치 (NGINX)
AtoM은 NGINX와 Apache 웹서버 모두 최적화되어 있음. 여기서는 NGINX 설치방법을 설명함.
sudo apt-get install nginx
NGINX 최신버전 업데이트 (선택사항)
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
NGINX에서 default라 불리는 기본 서버(Apache 이용자의 경우 VirtualHost에 해당)는
/etc/nginx/sites-available/default 에서 설정함.
AtoM을 설치하기 위해 특정 서버를 블락하거나 추가할 경우 사용함.
설정파일 추가 및 링크방법은 아래와 같음
sudo touch /etc/nginx/sites-available/atom
sudo ln -sf /etc/nginx/sites-available/atom /etc/nginx/sites-enabled/atom
sudo rm /etc/nginx/sites-enabled/default
위 명령을 통해 설정 파일(configuration file)이 생성되고 sites-enabled/ 경로에 링크가 완료됨.
AtoM을 위해 추천되는 서버 블록 방법은 아래와 같음.
설정파일 열기
nano /etc/nginx/sites-enabled/atom
설정파일에 아래 문구 붙여넣기
upstream atom {
server unix:/var/run/php5-fpm.atom.sock;
}
server {
listen 80;
root /usr/share/nginx/atom;
# http://wiki.nginx.org/HttpCoreModule#server_name
# _ means catch any, but it's better if you replace this with your server
# name, e.g. archives.foobar.com
server_name _;
client_max_body_size 72M;
# http://wiki.nginx.org/HttpCoreModule#try_files
location / {
try_files $uri /index.php?$args;
}
location ~ /\. {
deny all;
return 404;
}
location ~* (\.yml|\.ini|\.tmpl)$ {
deny all;
return 404;
}
location ~* /(?:uploads|files)/.*\.php$ {
deny all;
return 404;
}
location ~* /uploads/r/(.*)/conf/ {
}
location ~* ^/uploads/r/(.*)$ {
include /etc/nginx/fastcgi_params;
set $index /index.php;
fastcgi_param SCRIPT_FILENAME $document_root$index;
fastcgi_param SCRIPT_NAME $index;
fastcgi_pass atom;
}
location ~ ^/private/(.*)$ {
internal;
alias /usr/share/nginx/atom/$1;
}
location ~ ^/(index|qubit_dev)\.php(/|$) {
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_pass atom;
}
location ~* \.php$ {
deny all;
return 404;
}
}
문서 저장 (Ctrl + O) 엔터
나가기 (Ctrl + X) 엔터
NGINX 재시작
sudo service nginx restart