You cannot see this page without javascript.

APM 소스 설치

CentOS 조회 수 1053 추천 수 0 2015.05.29 20:11:01

설치 환경 :  CentOS7-x64bit

설치 위치

 

/apm /apps /phpmyadmin    
  /conf      
  /docs /xe    
  /server /apache /apr-ver  
      /apr-iconf-ver  
      /apr-util-ver  
      /httpd  
    /mariadb    
    /php    
         

 

- 각 Application 개발자사이트 소개

*Mariadb
- 최신버전 : 10.0.19
- 웹사이트 http://mariadb.org - Select Platform 의 콤보박스에서 Source Code 를 선택하여 가장 마지막 항목을 다운로드 한다. (Generic Linux (Architecture Independent), Compressed TAR Archive)
- 다운로드 URL : http://ftp.kaist.ac.kr/mariadb/mariadb-10.0.19/source/mariadb-10.0.19.tar.gz

*MySQL
- 최신버전 : 5.6.24
- 웹사이트 http://www.mysql.com - Select Platform 의 콤보박스에서 Source Code 를 선택하여 가장 마지막 항목을 다운로드 한다. (Generic Linux (Architecture Independent), Compressed TAR Archive)
- 다운로드 URL : http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.24.tar.gz

*Apache Portable Runtime
- 최신버전 : APR 1.5.2, APR-util 1.5.4, APR-iconv 1.2.1
- 웹사이트 : http://apache.org
- APR 다운로드 URL : http://mirror.apache-kr.org/apr/apr-1.5.2.tar.gz
- APR-iconv 다운로드 URL : http://mirror.apache-kr.org/apr/apr-iconv-1.2.1.tar.gz
- APR-util 다운로드 URL : http://mirror.apache-kr.org/apr/apr-util-1.5.4.tar.gz
 
 *Apache HTTP Server
- 최신버전 : 2.4.12
- 웹사이트 : http://apache.org - mirror 에서 다운받는 경우 http 폴더로 들어가서 다운로드한다.
- 다운로드 URL : http://mirror.apache-kr.org/httpd/httpd-2.4.12.tar.gz

*PHP
- 최신버전 : 5.6.9
- 웹사이트 : http://php.net
- 다운로드 URL : http://kr1.php.net/distributions/php-5.6.9.tar.gz

*phpMyAdmin
- 최신버전 : 4.4.8
- 웹사이트 : http://phpmyadmin.net
- 다운로드 URL : http://nchc.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.4.8/phpMyAdmin-4.4.8-all-languages.tar.gz

*XE
- 최신버전 : 1.8.2
- 웹사이트 : https://www.xpressengine.com
- 다운로드 URL : http://download.xpressengine.com/download/18325662/22755020

의존 라이브러리 설치
[root@host ~] yum -y groupinstall "Development Tools"
[root@host ~] yum install wget
[root@host ~] yum install cmake
[root@host ~] yum install ncurses-devel
[root@host ~] yum install libtool-ltdl-devel
[root@host ~] yum install expat-devel
[root@host ~] yum install db4-devel
[root@host ~] yum install pcre-devel
[root@host ~] yum install openssl-devel
[root@host ~] yum install libdb-devel

[root@host ~] yum -y install wget cmake ncurses-devel libtool-ltdl-devel expat-devel db4-devel pcre-devel openssl-devel libdb-devel

MariaDB 설치

- 관리그룹과 계정 생성
[root@host ~] groupadd dba
[root@host ~] useradd -M -c "MySQL" -d /var/mysql -g dba -s /bin/nologin mysql

- 소스를 다운로드 받고 압축 해제
[root@host ~] cd /usr/src
[root@host src] wget http://ftp.kaist.ac.kr/mariadb/mariadb-10.0.19/source/mariadb-10.0.19.tar.gz
[root@host src] tar zxvf mariadb-10.0.19.tar.gz

- 컴파일과 설치
5.5 미만 버전에서는 configure 로 makefile 파일을 만들었는데 5.5 이상 버전부터 cmake 를 이용하여 makefile 을 생성하고 컴파일하도록 변경되었다.
cmake 는 멀티플랫폼을 지원하는 make 대용 개발 도구로 플랫폼 별로 make 파일을 만들어주는 meta make 이다.
자세한 설명은 [wiki:CMake] 에서 확인한다.
cmake 를 이용해 설치 옵션과 함께 makefile 을 생성하고 컴파일 및 설치를 진행한다.
[root@host src] cd mariadb-10.0.19
[root@host mariadb-10.0.19] cmake
-DCMAKE_INSTALL_PREFIX=/apm/server/mariadb
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
-DENABLED_LOCAL_INFILE=1
-DMYSQL_DATADIR=/apm/server/mariadb/data
-DMYSQL_TCP_PORT=3306
-DMYSQL_UNIX_ADDR=/apm/server/mariadb/mysql.sock
-DWITH_ARCHIVE_STORAGE_ENGINE=1
-DWITH_ARIA_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITH_EXTRA_CHARSETS=all
-DWITH_FEDERATEDX_STORAGE_ENGINE=1
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1
-DWITH_READLINE=1
-DWITH_SSL=system
-DWITH_XTRADB_STORAGE_ENGINE=1
-DWITH_ZLIB=system
[root@host mariadb-10.0.19] make;make install

이외의 MySQL 설치 옵션은 아래 URL을 참고한다.
http://dev.mysql.com/doc/refman/5.6/en/source-configuration-options.html

- 데이터베이스가 저장되는 폴더 생성
“/apm/server/mariadb/data” 에 데이터베이스 파일들을 저장하기 위해서 “data” 폴더의 부모 폴더인 “/apm/server/mariadb” 폴더를 생성한다.
기본 데이터베이스 저장 폴더인 “/apm/server/mariadb/data” 에 저장하는 경우는 부모 폴더가 존재하기 때문에 폴더를 생성하지 않아도 된다.
[root@host downloads] mkdir /apm/server/mariadb

- 기본 데이터베이스 생성 및 폴더 권한 변경
[root@host mariadb-10.0.19] cd /apm/server/mariadb
[root@host mariadb] ./scripts/mysql_install_db --user=mysql --datadir=/apm/server/mariadb/data  --defaults-file=/apm/server/mariadb/my.cnf
[root@host mariadb] chown -R mysql:dba /apm/server/mariadb <-- 서버
[root@host mariadb] chown -R mysql:dba /apm/server/mariadb <-- DB

- 환경 설정
 위에서 mysql_install_db 를 실행하면 “/etc” 디렉토리에 my.cnf 파일이 생성된다.
이 파일을 설치시에 지정한 “/apm/server/mariadb” 디렉토리로 이동시켜서 환경 설정 파일을 수정한다.
[root@host mariadb] mv /etc/my.cnf ./my.cnf
[root@host mariadb] vi my.cnf
 -<my.cnf>-------------------------------
[mysqld]

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

datadir=/apm/server/mariadb/data
socket=/apm/server/mariadb/mysql.sock

innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
 
# Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

# include all files from the config directory

!includedir /etc/my.cnf.d
 -<my.cnf>-------------------------------

더 자세한 옵션은 아래 URL을 참고한다.
http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html

- log파일과 pid파일 생성될 디렉토리 생성과 소유권 변경
[root@host mariadb] mkdir /var/log/mariadb
[root@host mariadb] mkdir /var/run/mariadb
[root@host mariadb] chown mysql:dba /var/run/mariadb

- MySQL 의 주요 실행 파일을 어떤 경로에서든지 실행할 수 있도록 PATH 환경 변수에 추가된 “/bin”, “/sbin” 폴더로 Symbolic Link 를 걸어둔다.
[root@host mariadb] ln -s /apm/server/mariadb/bin/mysql /usr/bin/mysql
[root@host mariadb] ln -s /apm/server/mariadb/bin/mysqldump /usr/sbin/mysqldump
[root@host mariadb] ln -s /apm/server/mariadb/bin/mysql_config /usr/sbin/mysql_config
[root@host mariadb] ln -s /apm/server/mariadb/bin/mysqladmin /usr/sbin/mysqladmin

- 서비스 등록

PID1이 init(System V Init)일 경우
MySQL 을 서비스에 등록하여 chkconfig 유틸리티로 관리할 수 있도록 한다.
MySQL 에서 제공하는 daemon 실행 스크립트의 링크를 생성하고 서비스에 등록하여 데몬을 시작한다.
아래는 3, 5 runlevel 에서만 동작하도록 2, 3 runlevel 에서는 동작하지 않도록 했다.
[root@host mariadb] ln -s /apm/server/mariadb/support-files/mysql.server /etc/rc.d/init.d/mysql
 mysql 시작
[root@host ~] service mysql start
 mysql 종료
[root@host ~] service mysql stop
 mysql 자동시작 등록
[root@host ~] chkconfig --add mysql
 mysql runlevel별 자동시작 해재
[root@host ~] chkconfig --level 24 mysql off

PID1이 systemd일 경우
[root@host ~] vi /etc/systemd/system/mysql.service
 -<mysql.service>-------------------------------
# It's not recommended to modify this file in-place, because it will be
# overwritten during package upgrades.  If you want to customize, the
# best way is to create a file "/etc/systemd/system/@DAEMON_NAME@.service",
# containing
#       .include /usr/lib/systemd/system/@DAEMON_NAME@.service
#       ...make your changes here...
# or create a file "/etc/systemd/system/@DAEMON_NAME@.service.d/foo.conf",
# which doesn't need to include ".include" call and which will be parsed
# after the file @DAEMON_NAME@.service itself is parsed.
#
# For more info about custom unit files, see systemd.unit(5) or
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F

# For example, if you want to increase mysql's open-files-limit to 10000,
# you need to increase systemd's LimitNOFILE setting, so create a file named
# "/etc/systemd/system/@DAEMON_NAME@.service.d/limits.conf" containing:
#       [Service]
#       LimitNOFILE=10000

# Note: /usr/lib/... is recommended in the .include line though /lib/...
# still works.
# Don't forget to reload systemd daemon after you change unit configuration:
# root> systemctl --system daemon-reload

[Unit]
Description=MariaDB database server
After=syslog.target
After=network.target

[Service]
Type=simple
User=mysql
Group=dba

#ExecStartPre=@libexecdir@/mysql-check-socket
#ExecStartPre=@libexecdir@/mysql-prepare-db-dir %n
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
# per bug #547485
ExecStart=/apm/server/mariadb/bin/mysqld --defaults-file=/apm/server/mariadb/my.cnf --datadir=/apm/server/mariadb/data --socket=/apm/server/mariadb/mysql.sock
#ExecStartPost=@libexecdir@/mysql-wait-ready $MAINPID
#ExecStartPost=@libexecdir@/mysql-check-upgrade
#ExecStopPost=@libexecdir@/mysql-wait-stop

# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=300

# Place temp files in a secure directory, not /tmp
PrivateTmp=true

[Install]
WantedBy=multi-user.target
-<mysql.service>-------------------------------

mysql 시작
[root@host ~] systemctl start mysql.service
 mysql 종료
[root@host ~] systemctl stop mysql.service
 mysql 상태확인
[root@host ~] systemctl status mysql.service
 mysql 자동시작 등록
[root@host ~] systemctl enable mysql.service
 mysql 자동시작 해재
[root@host ~] systemctl disable mysql.service

- 관리자 비밀번호 설정
MySQL 의 관리자 계정인 “root” 의 암호를 설정한다.
암호를 설정한 뒤에는 MySQL 의 root 계정으로 접속 시에 설정한 암호를 요구하게 된다.
[root@host mariadb] mysqladmin -u root password "1234"
[root@host mariadb] mysqladmin -u root -p reload

- 공유 라이브러리 추가
MySQL 라이브러리를 다른 어플리케이션에서 쉽게 접근할 수 있도록 공유 라이브러리에 추가한다.
[root@host mariadb] echo "/apm/server/mariadb/lib" >> /etc/ld.so.conf
[root@host mariadb] ldconfig

Apache 설치
Apache 를 설치하기 위해서는 APR 이 설치되어 있어야 한다. 이전에 APR 은 Apache 프로젝트에 포함되었으나 별도 프로젝트로 분리되었다. Apache 에 포함된 bundle 를 사용해도 되지만 APR 을 별도로 설치하겠다.

- APR 설치
# APR 다운로드 및 압축 해제
[root@host mariadb] cd /usr/src
[root@host src] wget http://mirror.apache-kr.org/apr/apr-1.5.2.tar.gz
[root@host src] wget http://mirror.apache-kr.org/apr/apr-iconv-1.2.1.tar.gz
[root@host src] wget http://mirror.apache-kr.org/apr/apr-util-1.5.4.tar.gz
[root@host src] tar zxvf apr-1.5.2.tar.gz
[root@host src] tar zxvf apr-iconv-1.2.1.tar.gz
[root@host src] tar zxvf apr-util-1.5.4.tar.gz

# APR 설치
[root@host src] cd apr-1.5.2
[root@host apr-1.5.2] ./configure --prefix=/apm/server/apache/apr
[root@host apr-1.5.2] make;make install

# APR-iconv 설치
[root@host apr-1.5.2] cd ../apr-iconv-1.2.1
[root@host apr-iconv-1.2.1] ./configure
--prefix=/apm/server/apache/apr-iconv-1.2.1
--with-apr=/apm/server/apache/apr/bin/apr-1-config
[root@host apr-iconv-1.2.1] make;make install

# APR-util 설치
[root@host apr-iconv-1.2.1] cd ../apr-util-1.5.4
[root@host apr-util-1.5.4] ./configure
--prefix=/apm/server/apache/apr-util-1.5.4
--with-apr=/apm/server/apache/apr/bin/apr-1-config
--with-apr-iconv=/apm/server/apache/apr-iconv-1.2.1/apriconv
--with-crypto=/usr
--with-openssl
--with-dbm=db47
--with-gdbm
--with-berkeley-db
--with-mysql=/apm/server/mariadb
--with-sqlite3
--with-expat=/usr
[root@host apr-util-1.5.4] make;make install

- 소스를 다운로드 받고 압축 해제
[root@host apr-util-1.5.4] cd /usr/src
[root@host src] wget http://mirror.apache-kr.org/httpd/httpd-2.4.12.tar.gz
[root@host src] tar zxvf httpd-2.4.12.tar.gz

- 컴파일과 설치
[root@host src] cd httpd-2.4.12
[root@host httpd-2.4.12] ./configure
--prefix=/apm/server/apache/httpd
--sysconfdir=/apm/server/apache/httpd/conf
--with-apr=/apm/server/apache/apr/bin/apr-1-config
--with-apr-iconv=/apm/server/apache/apr-iconv-1.2.1/apriconv
--with-apr-util=/apm/server/apache/apr-util-1.5.4/bin/apu-1-config
--with-libxml2
--with-mpm=worker
--with-pcre
--with-ssl
--with-z
--enable-authn-socache=no
--enable-authnz-ldap=no
--enable-cache
--enable-cgid=no
--enable-deflate
--enable-dav
--enable-dav-fs=no
--enable-dav-lock=no
--enable-ext-filter=no
--enable-expires
--enable-file-cache
--enable-headers
--enable-isapi=no
--enable-lbmethod-bybusyness=no
--enable-lbmethod-byrequests=no
--enable-lbmethod-bytraffic=no
--enable-lbmethod-heartbeat=no
--enable-ldap=no
--enable-mime-magic
--enable-mods-shared=most
--enable-modules=most
--enable-mpms-shared=all
--enable-proxy
--enable-proxy-ajp=no
--enable-proxy-balancer=no
--enable-proxy-connect=no
--enable-proxy-express=no
--enable-proxy-fcgi=no
--enable-proxy-fdpass=no
--enable-proxy-ftp=no
--enable-proxy-http=no
--enable-proxy-scgi=no
--enable-rewrite
--enable-so
--enable-socache-dbm=no
--enable-socache-shmcb
--enable-ssl
--enable-vhosts-alias
[root@host httpd-2.4.12] make;make install

더 자세한 옵션은 아래 URL을 참고한다.
http://httpd.apache.org/docs/2.4/en/programs/configure.html

- 환경 설정
 설치시 환경 설정 경로(–sysconfdir)를 “/apm/server/apache/httpd/conf” 폴더로 설정했기 때문에 “/apm/server/apache/httpd/conf” 폴더에 설정 파일들이 생성되어 있다.
[root@host httpd-2.4.12] cd /apm/server/apache/httpd/conf
[root@host conf] vi httpd.conf
-<httpd.conf>-------------------------------
ServerRoot "/apm/server/apache/httpd"

Listen 80

# 사용할 모듈의 주석을 제거하여 활성화한다
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
LoadModule dav_module modules/mod_dav.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
...

# 그룹 계정 비활성화
<IfModule unixd_module>
User daemon
Group daemon
</IfModule>

# 관리자 이메일
ServerAdmin admin@my.domain

# 서버 이름
#ServerName www.my.domain:80
ServerName 127.0.0.1

# 루트 디렉토리
<Directory />
    AllowOverride none
    Require all denied
</Directory>

# 도큐먼트 루트 디렉토리
DocumentRoot "/apm/docs"
<Directory "/apm/docs">
    Options FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

# 폴더로 접근할 때 실행하는 인덱스 파일 설정
<IfModule dir_module>
    DirectoryIndex index.html index.htm index.php index.php3
</IfModule>

# 개발 환경 설정 참조
<Files ".ht*">
    Require all denied
</Files>

# 로그 파일 저장 위치
ErrorLog "/apm/server/apache/httpd/logs/error_log"

<IfModule log_config_module>
    CustomLog /apm/server/apache/httpd/logs/access_log" common
</IfModule>

# 설정 파일 import
# Server-pool management (MPM specific)
Include /etc/httpd/extra/httpd-mpm.conf
# Language settings
Include /etc/httpd/extra/httpd-languages.conf
-<httpd.conf>-------------------------------

[root@host conf] vi extra/httpd-mpm.conf
-<httpd-mpm.conf>-------------------------------
   PidFile "/apm/server/apache/httpd/logs/httpd.pid"
-<httpd-mpm.conf>-------------------------------

[root@host httpd] vi extra/httpd-languages.conf
-<httpd-languages.conf>-------------------------------
DefaultLanguage ko
-<httpd-languages.conf>-------------------------------

- apachectl 스크립트 수정
apachectl 스크립트는 chkconfig 로 동작할 수 있도록 수정해야 한다.
apachectl 스크립트의 상단 부분을 아래와 같이 수정해야만 서비스로 추가가 가능하다.
 [root@host conf] vi /apm/server/apache/httpd/bin/apachectl
-<apachectl>-------------------------------
#!/bin/sh
#
# Apache This starts and stops Apache.
#
# chkconfig: 35 20 80
# description: Apache Web Service
#
# Licensed to the Apache Software Foundation
...
-<apachectl>-------------------------------

- selinux 비활성화
[root@host ~] vi /etc/selinux/config
-<config>-------------------------------
SELINUX=disabled
-<config>-------------------------------
 
[root@host ~] reboot

- firewalld 방화벽 허용
[root@host ~] vi /etc/firewalld/zones/public.xml
-<public.xml>-------------------------------
프로토콜명으로 허용시
  <service name="ssh"/>

포트번호로 허용시
  <port protocol="tcp" port="80"/>
-<public.xml>-------------------------------

[root@host ~] service firewalld restart

- 서비스 등록
PID1이 init(System V Init)일 경우
Apache 를 서비스에 등록하여 chkconfig 유틸리티로 관리할 수 있도록 한다.
Apache 에서 제공하는 daemon 실행 스크립트의 링크를 생성하고 서비스에 등록하여 데몬을 시작한다.
[root@host conf] ln -s /apm/server/apache/httpd/bin/apachectl /etc/rc.d/init.d/apache
 Apache 시작
[root@host ~] service apache start
 Apache 종료
[root@host ~] service apache stop
 Apache 자동시작 등록
[root@host ~] chkconfig --add apache
 Apache runlevel별 자동시작 해재
[root@host ~] chkconfig --level 24 apache off

PID1이 systemd일 경우
[root@host ~] vi /etc/systemd/system/apache.service
-<apache.service>-------------------------------
[Unit]
Description=Apache Web Server.
After=network.target

[Service]
Type=simple
ExecStart=/apm/server/apache/httpd/bin/httpd $OPTIONS -DFOREGROUND
ExecStop=/apm/server/apache/httpd/bin/httpd $OPTIONS -k graceful-stop
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target
-<apache.service>-------------------------------

Apache 시작
[root@host ~] systemctl start apache.service
Apache 종료
[root@host ~] systemctl stop apache.service
Apache 상태확인
[root@host ~] systemctl status apache.service
Apache 자동시작 등록
[root@host ~] systemctl enable apache.service
Apache 자동시작 해재
[root@host ~] systemctl disable apache.service

- Apache 테스트
[root@host conf] echo "apache TEST" > /apm/docs/index.html

- 공유 라이브러리 추가
[root@host conf] echo "/apm/server/apache/httpd/module" >> /etc/ld.so.conf
[root@host conf] ldconfig

- 의존 라이브러리 설치를 위한 레포지터리 추가

[root@host ~] vi /etc/yum.repos.d/public-yum-el5.repo
-<public-yum-el5.repo>-------------------------------
[el5_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=1

[el5_ga_base]
name=Oracle Linux $releasever GA installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/0/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_u1_base]
name=Enterprise Linux $releasever Update 1 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/1/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_u2_base]
name=Enterprise Linux $releasever Update 2 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/2/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_u3_base]
name=Enterprise Linux $releasever Update 3 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/3/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_u4_base]
name=Enterprise Linux $releasever Update 4 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/4/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_u5_base]
name=Enterprise Linux $releasever Update 5 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/5/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[ol5_u5_base]
name=Oracle Linux $releasever Update 5 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/5/base/x86_64/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[ol5_u6_base]
name=Oracle Linux $releasever Update 6 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/6/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[ol5_u7_base]
name=Oracle Linux $releasever Update 7 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/7/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[ol5_u8_base]
name=Oracle Linux $releasever Update 8 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/8/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_addons]
name=Enterprise Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/addons/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_oracle_addons]
name=Oracle Software addons for Enterprise Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/oracle_addons/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[ol5_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/UEK/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[ol5_UEK_base]
name=Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/UEK/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0

[el5_unsupported]
name=Productivity Applications for Enterprise Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/unsupported/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0
-<public-yum-el5.repo>-------------------------------

PHP 설치

- 의존 라이브러리 설치
[root@host ~] yum install libxml2-devel
[root@host ~] yum install bzip2-devel
[root@host ~] yum install libcurl-devel
[root@host ~] yum install gdbm-devel
[root@host ~] yum install libvpx libvpx-devel
[root@host ~] yum install libjpeg-turbo-devel
[root@host ~] yum install libpng-devel
[root@host ~] yum install libXpm libXpm-devel
[root@host ~] yum install freetype-devel
[root@host ~] yum install t1lib t1lib-devel
[root@host ~] yum install gmp-devel
[root@host ~] yum install libc-client libc-client-devel
[root@host ~] yum install pam-devel
[root@host ~] yum install libicu libicu-devel
[root@host ~] yum install openldap-devel
[root@host ~] yum install readline-devel
[root@host ~] yum install libedit-devel
[root@host ~] yum install libtidy libtidy-devel
[root@host ~] yum install libxslt libxslt-devel

[root@host ~] yum -y install libxml2-devel bzip2-devel libcurl-devel gdbm-devel libvpx libvpx-devel libjpeg-turbo-devel libpng-devel libXpm libXpm-devel freetype-devel t1lib t1lib-devel gmp-devel libc-client libc-client-devel pam-devel libicu libicu-devel openldap-devel readline-devel libedit-devel libtidy libtidy-devel libxslt libxslt-devel

- libmcrypt 설치
[root@host src] wget http://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
[root@host src] tar zxvf libmcrypt-2.5.8.tar.gz
[root@host src] cd libmcrypt-2.5.8
[root@host libmcrypt-2.5.8] ./configure
[root@host libmcrypt-2.5.8] make;make install
[root@host libmcrypt-2.5.8] ln -s /usr/local/lib/libmcrypt.so.4 /usr/local/lib64/libmcrypt.so.4

- 의존 라이브러리 설치후 레포지터리 업데이트 오류가 발생할 확율이 있음으로 el5 레포지터리를 삭제한다.
[root@host libmcrypt-2.5.8] rm /etc/yum.repos.d/public-yum-el5.repo

- MySQL 라이브러리 참조
[root@host ~] ln -s /apm/server/mariadb/lib /apm/server/mariadb/lib64

- 소스를 다운로드 받고 압축 해제
[root@host ~] cd /usr/src
[root@host src] wget http://kr1.php.net/distributions/php-5.6.9.tar.gz
[root@host src] tar zxvf php-5.6.9.tar.gz

- 컴파일과 설치
[root@host src] cd php-5.6.9
[root@host php-5.6.9] ./configure
--prefix=/apm/server/php
--with-apxs2=/apm/server/apache/httpd/bin/apxs
--with-bz2
--with-config-file-path=/apm/server/apache/httpd/conf
--with-curl
--with-db4=/usr
--with-freetype-dir=/usr
--with-gd
--with-gdbm
--with-gettext
--with-gmp
--with-iconv
--with-icu-dir=/usr
--with-imap=/usr/local/imap-2007
--with-imap-ssl
--with-jpeg-dir=/usr
--with-kerberos
--with-ldap
--with-ldap-sasl
--with-libdir=lib64
--with-libedit
--with-libexpat-dir=/usr
--with-libmbfl
--with-libxml-dir=/usr
--with-mcrypt
--with-mhash
--with-mysql=mysqlnd
--with-mysql-sock=/apm/server/mariadb/mysql.sock
--with-mysqli=mysqlnd
--with-onig
--with-openssl
--with-openssl-dir=/usr
--with-pcre-dir=/usr
--with-pcre-regex
--with-pdo-mysql=mysqlnd
--with-pear
--with-pic
--with-png-dir=/usr
--with-readline
--with-regex=php
--with-t1lib=/usr
--with-vpx-dir=/usr
--with-xmlrpc
--with-xpm-dir=/usr
--with-xsl
--with-zlib
--with-zlib-dir=/usr
--enable-bcmath
--enable-calendar
--enable-dba=shared
--enable-dom
--enable-exif
--enable-fpm
--enable-ftp
--enable-gd-jis-conv
--enable-gd-native-ttf
--enable-inline-optimization
--enable-intl
--enable-maintainer-zts
--enable-mbregex
--enable-mbstring
--enable-mod-charset
--enable-mysqlnd
--enable-opcache
--enable-pcntl
--enable-shmop
--enable-sigchild
--enable-soap
--enable-sockets
--enable-sysvmsg
--enable-sysvsem
--enable-sysvshm
--enable-wddx
--enable-zip
[root@host php-5.6.9] make;make install

- 환경 설정
[root@host php-5.6.9] cp php.ini-production /apm/server/apache/httpd/conf/php.ini
[root@host php-5.6.9] vi /apm/server/apache/httpd/conf/php.ini
-<php.ini>-------------------------------
engine = On
short_open_tag = On
asp_tags = On
memory_limit = 1024M
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
display_startup_errors = Off
post_max_size = 1023M
default_charset = "UTF-8"
file_uploads = On
upload_tmp_dir = /tmp
upload_max_filesize = 1022M
max_file_uploads = 20
date.timezone = "Asia/Seoul"
-<php.ini>-------------------------------

- Apache 설정
[root@host php-5.6.9] vi /apm/server/apache/httpd/conf/httpd.conf
-<httpd.conf>-------------------------------
# PHP 모듈이 정상적으로 추가되었는지 확인
LoadModule php5_module modules/libphp5.so

<IfModule mime_module>

    ... 중략 ...

    AddType application/x-httpd-php .php .html
    AddType application/x-httpd-php-source .phps

</IfModule>
-<httpd.conf>-------------------------------

[root@host php-5.6.9] service apache restart

- PATH 추가
[root@host php-5.6.9] ln -s /apm/server/php/bin/php /bin/php
[root@host php-5.6.9] ln -s /apm/server/php/bin/php-config /usr/local/bin/php-config
[root@host php-5.6.9] ln -s /apm/server/php/bin/phpize /usr/local/bin/phpize

- 테스트
[root@host php-5.6.9] echo "<?php phpinfo() ?>" > /apm/docs/phpinfo.php

PHP 테스트

- phpMyAdmin 설치
[root@host php-5.6.9] cd /apm/docs
[root@host docs] wget http://nchc.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.4.8/phpMyAdmin-4.4.8-all-languages.tar.gz
[root@host docs] tar zxvf phpMyAdmin-4.4.8-all-languages.tar.gz
[root@host docs] mv phpMyAdmin-4.4.8-all-languages phpmyadmin
 DB연결 테스트를 하고 XE가 사용할 DB와 계정을 생성한다.

- XE 설치
[root@host docs] wget http://download.xpressengine.com/download/18325662/22755020
[root@host docs] unzip 22755020
[root@host docs] cd xe
[root@host docs] mkdir files
[root@host docs] chmod 707 files
웹에서 XE를 호출하고 DB정보와 XE관리자정보를 입력하여 설치를 완료한다.

첨부
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
369 Xpress Engine xe 모든 변수값 출력해 보기 LynX 2014-07-14 93754
368 Linux systemd unit 등록 옵션 LynX 2014-07-22 20455
367 Linux Install PHP 5.5.13 modules LynX 2014-06-27 11866
366 아래아 한글 웹 한글 뷰어 소스 LynX 2014-06-11 9426
365 Internet Explorer KT 인터넷 접속제한 공유기 설정 LynX 2014-01-13 9228
364 Linux lineage1 server [6] LynX 2016-01-11 9051
363 CentOS CentOS7 Mail Server Setting file [13] LynX 2015-06-13 7906
362 Server Apache HTTP Server와 Tomcat의 연동 file LynX 2014-05-20 6112
361 Windows 7 외부 윈도우 클라이언트에서 삼바서버 접속하기 LynX 2014-03-06 6030
360 CentOS7 ▒ Doly의 CentOS7 강좌13 4. 원격접속 - 3.Telnet file [8] LynX 2014-10-23 5922
359 CentOS7 ▒ Doly의 CentOS7 강좌27 10. 디스크관리 6 XFS 쿼타 file [15] LynX 2015-06-09 5732
358 CentOS7 ▒ Doly의 CentOS7 강좌29 12. 네트워크 보안설정 12.1 firewalld (2/2) [21] LynX 2015-06-09 5282
357 CentOS APM 소스설치 정리 file [18] LynX 2015-06-17 4628
356 Network VLAN 설정 ① Access mode file [27] LynX 2015-04-29 4270
355 Programing meadco print LynX 2013-12-12 4267
354 Programing Sublime Text License Keys LynX 2016-03-24 4182
353 CentOS7 ▒ Doly의 CentOS7 강좌19 6. CentOS 네트워크 5-관련 명령어 LynX 2014-10-23 4070
352 Linux musescore LynX 2015-03-28 3779
351 Linux imap-php 설치 [7] LynX 2014-09-02 3727
350 CentOS7 ▒ Doly의 CentOS7 강좌18 6. CentOS 네트워크 4-네트워크 본딩(bonding) file [10] LynX 2014-10-23 3659

XE Login