AtoM 2.1.2 설치 매뉴얼 #1

한국어 적용된 v2.1.2 설치 매뉴얼입니다.
Ubuntu Server 14.04버전에서 MySQL+NGINX 사용하는 경우의 매뉴얼입니다.
Apache를 사용하는 경우 AtoM사이트 설치매뉴얼 원문을 참고해 주세요.

AtoM 사이트 매뉴얼에 잘못된 부분이 있습니다.
less 컴파일러를 최신버전 말고 1.7.5버전 설치해야 합니다.


MYSQL

MySQL 설치
sudo apt-get install mysql-server-5.5


ELASTICSEARCH

-JAVA설치
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

-공인키 설치

sources.list 파일 열기

sudo nano /etc/apt/sources.list

문서 최하단에 아래 리포지터리 URL 붙여넣기

문서 저장, 문서편집 종료

Ctrl + O
엔터키
Ctrl + X

ElasticSearch 설치

sudo apt-get update
sudo apt-get install elasticsearch

서비스 시작, 시스템 부팅 시 자동실행 설정

sudo update-rc.d elasticsearch defaults 95 10
sudo /etc/init.d/elasticsearch start



NGINX

nginx 설치

sudo apt-get install nginx

nginx 최신옵션 설치

sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx

기본서버 설정

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

atom파일 열기

 sudo nano /etc/nginx/sites-enabled/atom

아래 내용 복사해서 붙여넣기 (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;
}

# This is the most important part, as here we are redirecting some specific
# requests to PHP-FPM so PHP can do its job passing data to and from the
# web server.
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


PHP

PHP 설치

sudo apt-get install php5-cli php5-fpm php5-curl php5-mysql php5-xsl php5-json php5-ldap php-apc

php5-readline 옵션 설치 (Ubuntu 14.04만 해당)

sudo apt-get install php5-readline

atom.conf 파일 열기 (PHP pool 추가)

sudo nano /etc/php5/fpm/pool.d/atom.conf

아래 내용 복사하여 붙여넣기

[atom]

# The user running the application
user = www-data
group = www-data

# Use UNIX sockets if Nginx and PHP-FPM are running in the same machine
listen = /var/run/php5-fpm.atom.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0600

# The following directives should be tweaked based in your hardware resources
pm = dynamic
pm.max_children = 30
pm.start_servers = 10
pm.min_spare_servers = 10
pm.max_spare_servers = 10
pm.max_requests = 200

chdir = /

# Some defaults for your PHP production environment
# A full list here: http://www.php.net/manual/en/ini.list.php
php_admin_value[expose_php] = off
php_admin_value[allow_url_fopen] = on
php_admin_value[memory_limit] = 512M
php_admin_value[max_execution_time] = 120
php_admin_value[post_max_size] = 72M
php_admin_value[upload_max_filesize] = 64M
php_admin_value[max_file_uploads] = 10
php_admin_value[cgi.fix_pathinfo] = 0
php_admin_value[display_errors] = off
php_admin_value[display_startup_errors] = off
php_admin_value[html_errors] = off
php_admin_value[session.use_only_cookies] = 0

# APC, which is still used in PHP 5.5 for userland memory cache unless you
# are switching to something like sfMemcacheCache
php_admin_value[apc.enabled] = 1
php_admin_value[apc.shm_size] = 64M
php_admin_value[apc.num_files_hint] = 5000
php_admin_value[apc.stat] = 0

# Zend OPcache
# Only in Ubuntu 14.04 (PHP 5.5).
# Don't use this in Ubuntu 12.04, it won't work.
php_admin_value[opcache.enable] = 1
php_admin_value[opcache.enable_cli] = 0
php_admin_value[opcache.memory_consumption] = 192
php_admin_value[opcache.interned_strings_buffer] = 16
php_admin_value[opcache.max_accelerated_files] = 4000
php_admin_value[opcache.validate_timestamps] = 0
php_admin_value[opcache.fast_shutdown] = 1

# This is a good place to define some environment variables, e.g. use
# ATOM_DEBUG_IP to define a list of IP addresses with full access to the
# debug frontend or ATOM_READ_ONLY if you want AtoM to prevent
# authenticated users
env[ATOM_DEBUG_IP] = "10.10.10.10,127.0.0.1"
env[ATOM_READ_ONLY] = "off"

문서 저장, 문서편집 종료

Ctrl + O
엔터키
Ctrl + X

php 재시작

sudo service php5-fpm restart

php 시작 안될경우 아래 문구 입력하여 테스트

sudo php5-fpm --test

If you are not planning to use the default PHP pool (www), feel free to remove it:

sudo rm /etc/php5/fpm/pool.d/www.conf
sudo service php5-fpm restart


OTHER PACKAGES

이미지매직 설치

sudo apt-get install imagemagick ghostscript poppler-utils

ffmpeg 설치

sudo add-apt-repository ppa:archivematica/externals
sudo apt-get update
sudo apt-get install ffmpeg


Sign In or Register to comment.