RadarURL
Skip to content
조회 수 1312 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

# 아래 작업에 대한 책임은 전적으로 본인에게 있습니다.

# nginx 는 정적서비스용입니다.

# mrtg 는 테스트가 필요합니다.

# Zend 는 php 5.2 버젼에 적용됩니다. 5.3는 아직 지원되지 않습니다.

# eaccelerator 에 대한 부분은 본인 필요에 따라 설치바랍니다.

# 기타 라이브러리는 본인이 설치해야 합니다.





#sulinux 2.0 설치후 작업
#sulinux 2.0 + APM + Zend + eaccelerator + nginx + mrtg

#시간 맞춤
rdate -s time.bora.net && /sbin/clock -w
ntpdate -b -s time.kriss.re.kr && /sbin/clock -w

crontab -e
*/30 * * * * rdate -s time.bora.net && /sbin/clock -w
*/30 * * * * ntpdate -b -s time.kriss.re.kr && /sbin/clock -w
/etc/init.d/crond restart

#yum 전체 업데이트
yum update -y

#한글 처리 UTF-8 -> EUC-KR
vi /etc/sysconfig/i18n
LANG="ko_KR.EUC-KR"
SUPPORTED="ko_KR.UTF-8:ko_KR:ko"
SYSFONT="latarcyrheb-sun16"

#APM 설치 Apache_2.2.16 + PHP_5.2.14 + MySQL_5.1.51
/root/bin/apmtools

#젠드설치
wget http://downloads.zend.com/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
tar xvfz ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
cd ZendOptimizer-3.3.3-linux-glibc23-i386
./install.sh
cd ..
rm -Rf ZendOptimizer-3.3.3-linux-glibc23-i386*

#eaccelerator 설치
wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6-rc1.tar.bz2
tar xvfj eaccelerator-0.9.6-rc1.tar.bz2
cd eaccelerator-0.9.6-rc1
export PHP_PREFIX="/usr/local/php/"
$PHP_PREFIX/bin/phpize
./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
make
make install

#아래는 확인해둘것 extension_dir= 에 입력
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/

mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator
chown nobody:nobody /tmp/eaccelerator

vi /usr/local/php/lib/php.ini
#[Zend] ;반드시 Zend 전에 입력
extension_dir=/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
extension="eaccelerator.so"
eaccelerator.shm_size="32"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.allowed_admin_path="/usr/local/apache/htdocs"

/etc/init.d/httpd restart

#모듈 설치 확인
php -v
PHP 5.2.2 (cli) (built: Mar 29 2010 18:45:51)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with eAccelerator v0.9.6-rc1, Copyright (c) 2004-2007 eAccelerator, by eAccelerator
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

#관리자 페이지 설정
vi control.php
$auth = true;
$user = "admin";
$pw = "tnghkrl";

cp control.php /usr/local/apache/htdocs/control.php

#설치파일 삭제
cd ..
rm -Rf eaccelerator-0.9.6-rc1*

#아파치 재실행
/etc/init.d/httpd restart

#nginx 설치
wget http://nginx.org/download/nginx-0.8.54.tar.gz
tar xvzf nginx-0.8.54.tar.gz
cd nginx-0.8.54
./configure --pid-path=/usr/local/nginx/logs/nginx.pid --sbin-path=/usr/local/sbin/nginx --with-md5=/usr/lib --with-sha1=/usr/lib --with-http_ssl_module --with-http_dav_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module
make
make install

vi /etc/rc.d/init.d/nginx

#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /usr/local/nginx/conf/nginx.conf
# pidfile: /var/run/nginx.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0

nginx="/usr/local/sbin/nginx"
prog=$(basename $nginx)

NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf"


lockfile=/var/lock/subsys/nginx

start() {
[ -x $nginx ] || exit 5
[ -f $NGINX_CONF_FILE ] || exit 6
echo -n $"Starting $prog: "
$nginx -c $NGINX_CONF_FILE
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}

stop() {
echo -n $"Stopping $prog: "
killproc $prog -QUIT
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}

restart() {
configtest || return $?
stop
start
}

reload() {
configtest || return $?
echo -n $"Reloading $prog: "
killproc $nginx -HUP
RETVAL=$?
echo
}

force_reload() {
restart
}

configtest() {
$nginx -t -c $NGINX_CONF_FILE
}

rh_status() {
status $prog
}

rh_status_q() {
rh_status >/dev/null 2>&1
}

case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart|configtest)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
exit 2
esac

chmod 750 /etc/rc.d/init.d/nginx

vi /usr/local/nginx/conf/nginx.conf

#CPU코어 갯수 * CPU 갯수
worker_processes 1;

#max_clients = worker_processes * worker_connections
events {
worker_connections 1024;
}

# keepalive 설정
http {
...

keepalive_timeout 5 5;
keepalive_requests 5;

...

#서비스 포터 설정
server {

...

listen 5135;
server_name localhost;

location / {

root /usr/local/apache/htdocs;

index index.html index.htm, index.php;

expires 24h;

}

...

}
}

#이미지 서비스용 포트
setup -> 방화벽 설정 -> 사용자설정 -> 그외의 포트 -> 5135:tcp

/etc/init.d/iptables restart

cd ..
rm -Rf nginx-0.8.54*

#cacti 설치
wget http://www.cacti.net/downloads/cacti-0.8.7g.tar.gz
tar xvzf cacti-0.8.7g.tar.gz
cd cacti-0.8.7g




#mrtg
yum install net-snmp

vi /etc/snmp/snmpd.conf
com2sec network 192.168.163.135 public

group notConfigGroup v2c notConfigUser
group rwgroup v1 local
group rwgroup v2c local
group rwgroup v1 network
group rwgroup v2c network

view all included .1 80
view systemview included system
view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc

access rwgroup "" any noauth exact all all all
access rogroup "" any noauth exact systemview none none

/etc/init.d/snmpd restart

wget http://oss.oetiker.ch/mrtg/pub/mrtg-2.17.0.tar.gz
tar xvzf mrtg-2.17.0.tar.gz
cd mrtg-2.17.0
./configure --prefix=/usr/local/mrtg/
make && make install

vi /root/mrtg.sh
#!/bin/sh
/usr/bin/cfgmaker --global 'WorkDir: /usr/local/apache/htdocs/' --global 'Language: korean' --global 'Options[_]: bits,growright' -output /usr/local/apache/htdocs/mrtg.cfg public@192.168.163.135
/usr/bin/indexmaker --title "mrtg.kantukan.co.kr" --output /usr/local/apache/htdocs/index.htm /usr/local/apache/htdocs/mrtg.cfg
/usr/bin/mrtg /usr/local/apache/htdocs/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
chmod 700 mrtg.sh

*/5 * * * * su - root -c '/home/mrtg/public_html/mrtg.sh' >& mrtg.log


출처 : http://lcm790203.blogspot.kr/2011/01/sulinux-20-apm-zend-eaccelerator-nginx.html

?

List of Articles
번호 제목 글쓴이 날짜 조회 수
42 CentOS Network 설정 JAESOO 2014.05.26 997
41 RHEL 6.5 에서 bmc-watchdog[xxxx]: Log 가 발생되면서 rebooting 되는 문제 JAESOO 2014.05.22 1433
40 RHEL5, 6 Ctrl + Alt + Del 키 막기 JAESOO 2014.05.22 1213
39 Linux YUM 을 이용하여 보안 업데이트를 진행해 보자 JAESOO 2014.05.22 1039
38 Red Hat RHN 등록이 왜? 안될까? ( RHN connection refused ) JAESOO 2014.05.22 1014
37 RHEL 6.5 Release… JAESOO 2014.05.22 1300
» sulinux 2.0 + APM + Zend + eaccelerator + nginx + mrtg JAESOO 2014.05.22 1312
35 SULinux 2.0 GUI 버전 - GUI가 편하긴 하구나... JAESOO 2014.05.22 1769
34 sulinux APMtools 설치 위치 정리 JAESOO 2014.05.22 1378
33 howto: RHEL6 x86_64 + APM + mediawiki + CKEditor + IPA(LDAP) JAESOO 2014.05.22 2061
32 RedHat 계정 만들기 ( 평가용 서브스크립션 다운로드 ) JAESOO 2014.05.22 1165
31 리눅스 시스템 성능 모니터링(CPU, 메모리) JAESOO 2014.05.14 1358
30 Linux CPU, I/O, Memory 사용량 측정 JAESOO 2014.05.14 2171
29 리눅스 시스템 모니터링 시스템 최적화 JAESOO 2014.05.14 834
28 Conversion Struts to Spring MVC JAESOO 2014.05.09 909
27 Unix/Linux 디스크 용량 확인 명령어 (df/du) JAESOO 2014.05.09 1668
26 Spring 3.1 Overview JAESOO 2014.05.09 640
25 Spring MVC 에서 ContentNegotiatingViewResolver를 이용한 단일 RequestMapping 으로 Muilti-View 처리하기 JAESOO 2014.05.09 1337
24 Struts와 Spring의 Controller 의 차이는? JAESOO 2014.05.09 585
23 Spring MVC JAESOO 2014.05.09 792
Board Pagination Prev 1 2 3 4 5 6 7 8 9 Next
/ 9

PageViews   Today : 1373 Yesterday : 2356 Total : 21721492  /  Counter Status   Today : 1237 Yesterday : 1688 Total : 1146606

Edited by JAESOO

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소