OS/Linux2014. 2. 6. 18:16

기능 설명 

RPM 패키지 설치 및 정보 확인 삭제


사용법

※ rpm 설치 되었는지 확인하는 방법

[root@localhost]# rpm -qa | grep 패키지 이름 

[root@localhost]# rpm -qa | grep httpd ※설치 정보 보기

[root@localhost]# rpm -qi | grep httpd  ※자세히

[root@localhost]# rpm -ql | grep httpd  ※설치 파일 목록

※ rpm 설치

[root@localhost]# rpm -ivh 패키지.rpm 

※ rpm 삭제

[root@localhost]# rpm -e httpd





Posted by idwook
OS/Linux2014. 2. 6. 14:16

기본 설명 

/etc/init.d/ 는 /etc/rc.d/init.d/ 심볼릭 링크(바로가기) 로 같은 폴더이다

/etc/rc.d/내에는  rc1.d , rc2.d ,rc3.d rc4.d rc5.d ,rc6.d init.d 각 부트레벨을 포함한다


서비스 확인 방법

# service crond

# /etc/init.d/crond status 

# chkconfig list

서비스 등록 방법

/etc/init.d 내에 스크립트 작성

# vi /etc/init.d/test

#!/bin/sh

# chkconfig: 234 90 90                ※ chkconfig 등록하기 위해 반드시 필요

# description: test service          ※ chkconfig 등록하기 위해 반드시 필요

case $"1" in

start)

echo "start"

;;

stop)

echo "stop"

;;

*)

echo "Usage:{start|stop}"

exit 1

esac

exit 0

# chmod 755 test                

# chwon root.root test          

# chkconfig --add test

# service test start

# service test stop

참고 사이트

http://lesstif.com/pages/viewpage.action?pageId=6979609

'OS > Linux' 카테고리의 다른 글

[Centos] yum 으로 mysql 설치  (0) 2014.02.06
[Centos] rpm 명령어  (0) 2014.02.06
[Centos] apache+tomcat mod_jk를 이용한 연동  (0) 2014.02.06
[Centos] Java 1.7.0.51 설치  (1) 2014.02.05
[Centos] Centos 6.5 tomcat 7.0.50 설치  (0) 2014.02.05
Posted by idwook
OS/Linux2014. 2. 6. 11:33

설치환경 : Centos6.5 x64, Apache2.4.7 ,Tomcat7.0.50

설치버전 : tomcat-connectors-1.2.37

설치전 확인사항 

아파치 설치 톰캣설치 


설치사항

1경로선택및 파일 소스 다운로드

#cd /usr/local/src

#wget http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.37-src.tar.gz

2.압축해제 

# tar zxvf tomcat-connectors-1.2.37-src.tar.gz

3.빌드 검사 및 의존패키지 설치

# cd /usr/local/src/tomcat-connectors-1.2.37-src/native

# ./buildconf.sh

# yum install autoconf

# yum install libtool

※ buildconf 로 의존패키지를 반드시 확인한후 설치하고 빌드해야 한다

4.빌드 및 인스톨

# ./configure --with-apxs=/usr/local/apache2/bin/apxs

# make && make install

# find / -name "mod_jk.so"

※ /usr/local/apache2/modules/mod_jk.so 제대로 있는지 확인해야합니다.


5.환경설정

# cd /usr/local/apache2/conf

# vi httpd.conf

Include conf/extra/httpd-jk.conf

# cd /usr/local/apache2/conf/extra

# vi httpd-jk.conf

LoadModule jk_module modules/mod_jk.so

JkWorkersFile conf/extra/workers.properties

JkMountFile conf/extra/uriworkermap.properties

JkLogFile /usr/local/tomcat7/logs/mod_jk.log

JkLogLevel info

JkLogstampFormat "[%a %b %d %H:%M:%S %Y]"

JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

JkRequestLogFormat "%w %V %T"

# vi workers.properties
worker.list=lb
worker.tomcat7.type=ajp13
worker.tomcat7.host=localhost
worker.tomcat7.port=8009

worker.lb.type=lb
      worker.lb.balance_workers=tomcat7

# vi uriworkermap.properties

/manager/*=lb

/docs/*=lb

/host-manager/*=lb

/index.jsp=lb

!/servlet-examples/*.jpeg=lb

톰캣 재시작

아파치 재시작


6.테스트

http://localhost/index.jsp 

http://localhost/manager/

주의 사항 및 확인 사항

※ 아파치가 제대로 설치되어있어야 한다  apr,apr-util,pcre 

※ 톰캣 관리자를 추가해야 http://localhost/manager 에 들어 갈수 있습니다.

※ 환경설정에서 localhost 대신 자신의 IP 가 대신 할수 있습니다.

참고 사이트

http://lesstif.com/pages/viewpage.action?pageId=12943367

Posted by idwook