2009. 10. 6.

2. Apache 설치

아파치 설치.


httpd 버전 : httpd-2.2.14.tar.bz2
http://ftp.kaist.ac.kr/Apache/httpd/httpd-2.2.14.tar.bz2

httpd 설치경로 : /usr/local/server/httpd
./configure --prefix=/usr/local/server/httpd --enable-so --enable-mods-shared=all --enable-ssl --with-ssl


아파치 시작 스크립트 복사 및 수정

[root@sms APM]# pwd
/usr/local/src/APM
[root@sms APM]# lftpget http://ftp.kaist.ac.kr/pub/Apache/httpd/httpd-2.2.14.tar.bz2
[root@sms APM]# tar xjf httpd-2.2.14.tar.bz2
[root@sms APM]# cd httpd-2.2.14
[root@sms httpd-2.2.14]# pwd
/usr/local/src/APM/httpd-2.2.14
[root@sms httpd-2.2.14]# ./configure --prefix=/usr/local/server/httpd --enable-so --enable-mods-shared=all --enable-ssl --with-ssl
[root@sms httpd-2.2.14]# make && make install
[root@sms httpd-2.2.14]# cp /usr/local/server/httpd/bin/apachectl /etc/init.d/httpd
[root@sms httpd-2.2.14]# vi /etc/init.d/httpd



아랫줄 내용 추가

#!/bin/sh
# Comments to support chkconfig on CentOS Linux, http://www.lug.or.kr  
# chkconfig: 35 90 90  
# description: A very fast and reliable WebServer engine.  




[root@sms httpd-2.2.14]# chmod 755 /etc/init.d/httpd
[root@sms httpd-2.2.14]# chkconfig --add httpd
[root@sms httpd-2.2.14]# chkconfig --list httpd
httpd           0:해제  1:해제  2:해제  3:활성  4:해제  5:활성  6:해제
[root@sms httpd-2.2.14]#







https://www.sulinux.net/bbs/board.php?bo_table=qna_1_0&wr_id=451&sca=1.x&page=86

chkconfig 설정방법은..
[root@sms httpd-2.2.14]# vi /etc/init.d/httpd


#!/bin/sh
#
이 아래줄에 추가합니다...
# httpd        Startup script for the Apache HTTP Server
#
# chkconfig: - 85 15
# description: Apache is a World Wide Web server.  It is used to serve \
#              HTML files and CGI.
# processname: httpd
#


[root@sms httpd-2.2.14]# chkconfig --add httpd
[root@sms httpd-2.2.14]# chkconfig --level 35 httpd on  // 런레벨 3,5 에 on 을 합니다..
[root@sms httpd-2.2.14]# chkconfig --list // httpd 가 등록되었는지 확인합니다..

그럼 다음부팅부터는 httpd 가 자동으로 시작을합니다..


httpd 기본 셋팅

vi /etc/init.d/httpd
ServerAdmin webmaster@localhost.com
ServerName 192.168.1.99

DocumentRoot "/home/fnf/public_html"

<Directory "/home/fnf/public_html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

* Htdocs 디렉터리 변경에 따른 해당디렉토리의 권한...설정




DocumentRoot "/home/fnf/public_html"




/etc/init.d/httpd restart


0 개의 댓글:

Archive

prof

With you not around it’s a little bit more than I can stand. Don’t tell me I ran out of time If it takes the rest of my life.