###### MySQL 6 Install ########
[root@sunny♥泰用哲學♥/temp]# wget ftp://ftp.sayclub.com/pub/mysql/Downloads/MySQL-6.0/mysql-6.0.10-alpha.tar.gz
[root@sunny♥泰用哲學♥/temp]# tar xvfzp mysql-6.0.10-alpha.tar.gz
[root@sunny♥泰用哲學♥/temp]# mkdir -p /usr/local/mysql_data
[root@sunny♥泰用哲學♥/temp]# useradd -M -r -d /usr/local/mysql_data -s /bin/bash -c "MySQL Server" -u 27 mysql
[root@sunny♥泰用哲學♥/temp]# rm -fr /usr/local/mysql_data
[root@sunny♥泰用哲學♥/temp]# cd mysql-6.0.10-alpha
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha]# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql_data \
--sysconfdir=/etc --disable-shared  --with-mysqld-user=mysql --with-innodb --without-isam --without-debug \
--with-unix-socket-path=/usr/local/mysql_data/mysql.sock --with-charset=utf8
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha]# make
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha]# make install
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha]# install -m 644 ./include/my_config.h /usr/local/mysql/include/mysql
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha]# cd support-files
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# cp my-medium.cnf /etc/my.cnf
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chown root:sys /etc/my.cnf
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chmod 644 /etc/my.cnf
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# /usr/local/mysql/bin/mysql_install_db
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chown -R root:mysql /usr/local/mysql
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chown -R mysql:mysql /usr/local/mysql_data
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# ln -s /usr/local/mysql/bin/mysql /usr/local/sbin/
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# ln -s /usr/local/mysql/bin/mysqldump /usr/local/sbin/
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# ln -s /usr/local/mysql/bin/mysqladmin /usr/local/sbin/
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chmod 700 /usr/local/mysql/bin/mysqladmin
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chmod 700 /usr/local/mysql/bin/mysqldump
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# strip /usr/local/mysql/libexec/mysqld
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# ldconfig
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# cp -ab mysql.server /etc/init.d/dbServer
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chmod 700 /etc/init.d/dbServer
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chown root:root /etc/init.d/dbServer
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chkconfig --add dbServer
[root@sunny♥泰用哲學♥/temp/mysql-6.0.10-alpha/support-files]# chkconfig --level 3 dbServer on
내가 6.0을 설치하면서 이런 경우는 처음인데 pid 파일 에러가 나는 상황을 보고 한참 생각 하다가 결국
해결을 했는데 왜 이런 에러가 5.3버전 이후로 많이 발생하는지 정확히 모르겠다.
해결 방법은 다음과 같이 해 주면 실행 된다.
[root@sunny♥泰用哲學♥/etc]# vi my.cnf  ==> 열어서
다음 구문 옵션을 주석처리해 준다.
skip-federated  ==> #skip-federated 처리해 주고 저장한다.
기존해 생성했던 데이타베이스 파일을 모두 지우고 다시 생성해 준다.
[root@sunny♥泰用哲學♥/etc]# rm -fr /usr/local/mysql_data/*
[root@sunny♥泰用哲學♥/etc]# /usr/local/mysql/bin/mysql_install_db --user=mysql
[root@sunny♥泰用哲學♥/etc]# service dbServer start
Starting MySQL. SUCCESS!  ==> OK
[root@sunny♥泰用哲學♥/etc]# ps aux | grep mysql
..0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql_data --pid-file=/usr/local/mysql_data/xxx.xxxxx.com.pid
..0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql_data --user=mysql --log-error=/usr/local/mysql_data/xxx.xxxxxx.com --pid-file=/usr/local/mysql_data/xxx.xxxxxx.com.pid --socket=/usr/local/mysql_data/mysql.sock --port=3306
==> 이렇게 나와야 한다.

#### APACHE 2 Install #####
[root@sunny♥泰用哲學♥/temp]# tar xvfjp httpd-2.2.6.tar.bz2
[root@sunny♥泰用哲學♥/temp]# cd httpd-2.2.6
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6]# SSL_BASE=/usr/local ./configure --prefix=/usr/local/apache2 \
--sysconfdir=/usr/local/etc --enable-module=so --enable-rule=SHARED_CORE --enable-module=ssl \
--enable-ssl=shared --with-mpm=prefork --enable-shared=max --enable-module=all
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6]# make
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6]# make install
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6]# cd support
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# cp apachectl /etc/init.d/webserver2
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# vi /etc/init.d/webserver2
# Comments to support chkconfig on RedHat Linux
# chkconfig: 2345 90 90
# description: A very fast and reliable WebServer engine.  ==> 입력
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# chkconfig --add webserver2
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# chkconfig --level 3 webserver2 on
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# chmod 700 /etc/init.d/webserver2
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# ln -s /usr/local/apache2/bin/apachectl /usr/local/sbin/apachectl2
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# ln -s /usr/local/apache2/bin/httpd /usr/local/sbin/httpd2
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# ln -s /usr/local/apache2/bin/htpasswd /usr/local/sbin/htpasswd2
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# ln -s /usr/local/apache2/bin/apxs /usr/local/sbin/apxs2
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# service webserver2 start
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# ps aux | grep httpd
root     16690  0.0  0.2   8988  1860 ?        Ss   21:00   0:00 /usr/local/apache2/bin/httpd -k start
daemon   16705  0.0  0.1   8988  1380 ?        S    21:00   0:00 /usr/local/apache2/bin/httpd -k start ...
[root@sunny♥泰用哲學♥/temp/httpd-2.2.6/support]# nmap -sS -O -v localhost | grep 80
80/tcp   open  http  ==> 설정 완료

#### PHP 5 Install ######

[root@sunny♥泰用哲學♥/temp]# cd php-5.1.2
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# ./configure --prefix=/usr/local/php2 --with-apxs2=/usr/local/apache2/bin/apxs
--with-config-file-path=/usr/local/php2 --with-mysql=/usr/local/mysql  --with-mysql-sock=/usr/local/mysql_data/mysql.sock
--with-gd --with-gd-dir=/usr/local/ --with-jpeg-dir=/usr --with-png --with-freetype-dir=/usr --with-mod_charset
--with-language=korean --with-charset=euc_kr --with-gdbm --with-xml --with-regex=php --with-iconv --enable-module=so
--enable-memory-limit --enable-track-vars --enable-ftp --enable-sockets --enable-trans-sid --enable-magic-quotes
--enable-sysvsem  --enable-sysvshm --enable-mailparse --enable-sigchild --enable-calender --enable-inline-optimization
--disable-debug --enable-mbstring --with-gettext --with-zlib-dir=/usr/local
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# make ; make install
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# cp php.ini-dist /usr/local/php2/php.ini
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# ln -s /usr/local/php2/bin/php /usr/local/sbin/php2
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# ln -s /usr/local/php2/bin/phpize /usr/local/sbin/phpize2
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# ls -al /usr/local/apache2/modules
-rwxr-xr-x  1 root root 16585979  4월  3 21:50 libphp5.so
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# vi /usr/local/etc/httpd/httpd.conf
LoadModule php5_module        modules/libphp5.so
<IfModule dir_module>
    DirectoryIndex DirectoryIndex index.html index.htm start.htm index.mht INDEX.MHT INDEX.HTML
index.php INDEX.HTM INDEX.PHP INDEX.JSP index.jsp
</IfModule>
####### ============== PHP 5 확장자 설정 ============== ###########
AddType application/x-tar .tgz
AddType application/x-httpd-php .php4 .php3 .php .htm .html .phtml .ph .inc
AddType application/x-httpd-php-source .phps
##################################################################
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# service webserver2 restart
[root@sunny♥泰用哲學♥/temp/php-5.1.2]# cd /usr/local/apache2/htdocs/
[root@sunny♥泰用哲學♥/usr/local/apache2/htdocs]# vi index.php
<? phpinfo(); ?>
==>
http://localhost ==> 정보가 나오면 확인해 본다.
[root@sunny♥泰用哲學♥/usr/local/apache2/htdocs]# php2 -v
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies  ==> 정상적인 출력
[root@sunny♥泰用哲學♥/usr/local/apache2/htdocs]# yum -y install lynx
[root@sunny♥泰用哲學♥/usr/local/apache2/htdocs]# lynx
http://localhost
PHP Logo
PHP Version 5.1.2
System Linux xxx.xxxxxxxx.com 2.6.18-164.15.1.el5 #1 SMP Wed Mar 17 11:37:14 EDT 2010 i686...... 생략.
==> 콘솔 상태에서 web으로 접속해 폐이지를 볼수있는 프로그램이다.

 

Sulinux는 CentOS와 Redhat 계열의 팩키지를 포팅해서 만든 리눅스 OS라 거의 전반적인 내용이
같고 거의 비숫한 라이브러리를 사용하기 때문에 필요한 의존 팩키지만 설치해 주면
CentOS에서 마음대로 사용할수 있는 팩키지이다.
<기존에 설치되 있는 APM를 모두 삭제 한다.>
[root@ns♥Sunny♥/temp]# yum -y remove httpd-suexec httpd httpd-manual   
[root@ns♥Sunny♥/temp]# yum -y remove mysql-server mysql mysqlclient mysql-devel
< Cuteos에서 필요한 의존 라이브러리 팩키지 설치>
[root@ns♥Sunny♥/temp]# yum -y install flex libxml2-devel gdbm-devel gcc-c++ libc-client-devel gmp-devel gd-devel libc-client-devel \
gmp-develbzip2-devel pcre-devel libxslt-devel freetype-devel
< CuteOS에서 수 리눅스의 APM 팩키지를 소스 SRPM로 받아서 설치한다.>
[root@ns♥Sunny♥/temp]# wget
ftp://ftp.superuser.co.kr/SULinux/1.5/os/i386/SULinux/RPMS/dialog*.rpm
[root@ns♥Sunny♥/temp]# wget ftp://ftp.superuser.co.kr/SULinux/1.5/os/i386/SULinux/RPMS/APM_Install-tools*.rpm
[root@ns♥Sunny♥/temp]# rpmbuild --rebuild  APM_Install-tools-1.4-1.SULinux.src.rpm
[root@ns♥Sunny♥/temp]# rpm -Uvh /usr/src/redhat/RPMS/i386/APM_Install-tools-1.4-1.SULinux.i386.rpm
[root@ns♥Sunny♥/temp]# rpm -Uvh /usr/src/redhat/RPMS/i386/APM_Install-tools-debuginfo-1.4-1.SULinux.i386.rpm
[root@ns♥Sunny♥/temp]# cd /mnt/disk_backup2/SULinux-Server/RPMS
<다음 팩키지가 없으면 스크립트가 실행되지 않는다. 꼭 설치해 주어야 한다.>
[root@ns♥Sunny♥/mnt/disk_backup2/SULinux-Server/RPMS]# rpm -Uvh dialog-1.0.20040731-3.i386.rpm
[root@ns♥Sunny♥/mnt/disk_backup2/SULinux-Server/RPMS]# cd ~/bin/
[root@ns♥Sunny♥~/bin]# ./apmtools  ==> 설치 자동 스크립트
어떤 작업을 하시겠습니까?
(X) ==> APM 설치  ==> OK
(X) ==>  Apache_1.3.37  + (X) ==>  PHP_5.2.1  + (X)  MySQL_5.0.27  ==> 3가지 선택해서 설치가 가능하다.
 Apache : 1.3.37  +  PHP : 5.2.1  + MySQL : 5.0.27 
위와같이 설치하시겠습니까?    ==> OK
==> 설치가 시작되고 시간은 시스템 사양에 따라 다르다. 보통 6분 걸리다.
[root@ns♥Sunny♥~/bin]# mkdir -m 755 -p /home/httpd/www
[root@ns♥Sunny♥~/bin]# mkdir -m 644 /etc/httpd
[root@ns♥Sunny♥~/bin]# ln -s /usr/local/apache/bin/apachectl /usr/local/sbin/
[root@ns♥Sunny♥~/bin]# ln -s /usr/local/apache/bin/httpd /usr/local/sbin/
[root@ns♥Sunny♥~/bin]# ln -s /usr/local/apache/bin/htpasswd /usr/local/sbin/
[root@ns♥Sunny♥~/bin]# ln -s /usr/local/apache/bin/apxs /usr/local/sbin/
[root@ns♥Sunny♥~/bin]# chmod 750 /usr/local/apache_1.3.37/bin/apachectl
[root@ns♥Sunny♥~/bin]# chmod 750 /usr/local/apache_1.3.37/bin/httpd
[root@ns♥Sunny♥~/bin]# chmod 750 /usr/local/apache_1.3.37/bin/htpasswd
[root@ns♥Sunny♥~/bin]# chmod 750 /usr/local/apache_1.3.37/bin/apxs
[root@ns♥Sunny♥~/bin]# chown root:sunny /usr/local/apache_1.3.37/bin/apachectl
[root@ns♥Sunny♥~/bin]# chown root:sunny /usr/local/apache_1.3.37/bin/httpd
[root@ns♥Sunny♥~/bin]# chown root:sunny /usr/local/apache_1.3.37/bin/htpasswd
[root@ns♥Sunny♥~/bin]# chown root:sunny /usr/local/apache_1.3.37/bin/apxs
[root@ns♥Sunny♥~/bin]# chkconfig --add httpd
[root@ns♥Sunny♥~/bin]# chkconfig --level 3 httpd on
[root@ns♥Sunny♥~/bin]# chmod 700 /usr/local/mysql/share/mysql/mysql.server
[root@ns♥Sunny♥~/bin]# chkconfig --add mysqld
[root@ns♥Sunny♥~/bin]# chkconfig --level 3 mysqld on
[root@ns♥Sunny♥~/bin]# chmod 644 /usr/local/apache_1.3.37/conf/*
[root@ns♥Sunny♥~/bin]# mkdir -m 644 /usr/local/apache/conf.d
[root@ns♥Sunny♥~/bin]# ln -s /usr/local/apache_1.3.37/conf.d/ /etc/httpd/conf.d/
[root@ns♥Sunny♥~/bin]# chmod 644 /usr/local/apache_1.3.37/conf.d
[root@ns♥Sunny♥~/bin]# rm -fr /usr/local/apache_1.3.37/conf/httpd.conf
[root@ns♥Sunny♥~/bin]# cat << EOF >> /usr/local/apache_1.3.37/conf/httpd.conf
---------------------------------------------------------------------------------------------
# server as "/usr/local/apache/logs/foo.log".
ServerType standalone
ServerRoot "/usr/local/apache_1.3.37"
#LockFile /usr/local/apache_1.3.37/logs/httpd.lock
PidFile /usr/local/apache_1.3.37/logs/httpd.pid
ScoreBoardFile /usr/local/apache_1.3.37/logs/httpd.scoreboard
#ResourceConfig /usr/local/apache_1.3.37/conf/srm.conf
#AccessConfig /usr/local/apache_1.3.37/conf/access.conf
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
MaxRequestsPerChild 0
#Listen 3000
#Listen 12.34.56.78:80
#BindAddress *
# Example:
# LoadModule foo_module libexec/mod_foo.so
LoadModule security_module    libexec/mod_security.so
LoadModule php5_module        libexec/libphp5.so
#ExtendedStatus On
Port 80
User nobody
Group nobody
#ServerAdmin
root@localhost.localdomain
ServerAdmin root@linuxsunny.pe.kr
#ServerName www.example.com
ServerName www.linuxsunny.pe.kr
DocumentRoot "/home/httpd/www"
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory "/home/httpd/www">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
#<IfModule mod_userdir.c>
#    UserDir public_html
#</IfModule>
#<Directory /home/*/public_html>
#    AllowOverride FileInfo AuthConfig Limit
#    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
#    <Limit GET POST OPTIONS PROPFIND>
#        Order allow,deny
#        Allow from all
#    </Limit>
#    <LimitExcept GET POST OPTIONS PROPFIND>
#        Order deny,allow
#        Deny from all
#    </LimitExcept>
#</Directory>
<IfModule mod_userdir.c>
    UserDir web
</IfModule>
<Directory /home/*/web>
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS PROPFIND>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>
<IfModule mod_dir.c>
    DirectoryIndex index.html index.htm index.php index.php3 index.cgi index.jsp main.htm start.htm
</IfModule>
AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>
#CacheNegotiatedDocs
UseCanonicalName On
<IfModule mod_mime.c>
    TypesConfig /usr/local/apache_1.3.37/conf/mime.types
</IfModule>
DefaultType text/plain
<IfModule mod_mime_magic.c>
    MIMEMagicFile /usr/local/apache_1.3.37/conf/magic
</IfModule>
HostnameLookups Off
ErrorLog /usr/local/apache_1.3.37/logs/error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /usr/local/apache_1.3.37/logs/access_log common
#CustomLog /usr/local/apache_1.3.37/logs/referer_log referer
#CustomLog /usr/local/apache_1.3.37/logs/agent_log agent
#CustomLog /usr/local/apache_1.3.37/logs/access_log combined
ServerSignature On
# > AddType       text/html .ahtml
# > EBCDICConvert Off=InOut .ahtml
# EBCDICConvertByType  On=InOut text/* message/* multipart/*
# EBCDICConvertByType  On=In    application/x-www-form-urlencoded
# EBCDICConvertByType  On=InOut application/postscript model/vrml
# EBCDICConvertByType Off=InOut */*
<IfModule mod_alias.c>
    Alias /icons/ "/usr/local/apache_1.3.37/icons/"
    <Directory "/usr/local/apache_1.3.37/icons">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
    Alias /manual/ "/usr/local/apache_1.3.37/htdocs/manual/"
    <Directory "/usr/local/apache_1.3.37/htdocs/manual">
        Options Indexes FollowSymlinks MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
    ScriptAlias /cgi-bin/ "/usr/local/apache_1.3.37/cgi-bin/"
    <Directory "/usr/local/apache_1.3.37/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>
</IfModule>
<IfModule mod_autoindex.c>
    IndexOptions FancyIndexing
    AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
    AddIconByType (TXT,/icons/text.gif) text/*
    AddIconByType (IMG,/icons/image2.gif) image/*
    AddIconByType (SND,/icons/sound2.gif) audio/*
    AddIconByType (VID,/icons/movie.gif) video/*
    AddIcon /icons/binary.gif .bin .exe
    AddIcon /icons/binhex.gif .hqx
    AddIcon /icons/tar.gif .tar
    AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
    AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
    AddIcon /icons/a.gif .ps .ai .eps
    AddIcon /icons/layout.gif .html .shtml .htm .pdf
    AddIcon /icons/text.gif .txt
    AddIcon /icons/c.gif .c
    AddIcon /icons/p.gif .pl .py
    AddIcon /icons/f.gif .for
    AddIcon /icons/dvi.gif .dvi
    AddIcon /icons/uuencoded.gif .uu
    AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
    AddIcon /icons/tex.gif .tex
    AddIcon /icons/bomb.gif core
    AddIcon /icons/back.gif ..
    AddIcon /icons/hand.right.gif README
    AddIcon /icons/folder.gif ^^DIRECTORY^^
    AddIcon /icons/blank.gif ^^BLANKICON^^
    DefaultIcon /icons/unknown.gif
    # Format: AddDescription "description" filename
    #AddDescription "GZIP compressed document" .gz
    #AddDescription "tar archive" .tar
    #AddDescription "GZIP compressed tar archive" .tgz
    #ReadmeName README.html
    #HeaderName HEADER.html
    #IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
### -------------------------------------------------- ###
    #ReadmeName list1.htm
    #HeaderName list2.htm
    #IndexIgnore .??* *~ *# HEADER* README* list* RCS CVS *,v *,t
</IfModule>
<IfModule mod_mime.c>
    AddLanguage da .dk
    AddLanguage nl .nl
    AddLanguage en .en
    AddLanguage et .ee
    AddLanguage fr .fr
    AddLanguage de .de
    AddLanguage el .el
    AddLanguage he .he
    AddCharset ISO-8859-8 .iso8859-8
    AddLanguage it .it
    AddLanguage ja .ja
    AddCharset ISO-2022-JP .jis
    AddLanguage kr .kr
    AddCharset ISO-2022-KR .iso-kr
    AddLanguage nn .nn
    AddLanguage no .no
    AddLanguage pl .po
    AddCharset ISO-8859-2 .iso-pl
    AddLanguage pt .pt
    AddLanguage pt-br .pt-br
    AddLanguage ltz .lu
    AddLanguage ca .ca
    AddLanguage es .es
    AddLanguage sv .sv
    AddLanguage cs .cz .cs
    AddLanguage ru .ru
    AddLanguage zh-TW .zh-tw
    AddCharset Big5         .Big5    .big5
    AddCharset WINDOWS-1251 .cp-1251
    AddCharset CP866        .cp866
    AddCharset ISO-8859-5   .iso-ru
    AddCharset KOI8-R       .koi8-r
    AddCharset UCS-2        .ucs2
    AddCharset UCS-4        .ucs4
    AddCharset UTF-8        .utf8
    <IfModule mod_negotiation.c>
        LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
    </IfModule>
    AddType application/x-tar .tgz
    AddType application/x-httpd-php .php4 .php3 .php .htm .html .phtml .ph .inc
    AddType application/x-httpd-php-source .phps
    AddEncoding x-compress .Z
    AddEncoding x-gzip .gz .tgz
    #AddType application/x-compress .Z
    #AddType application/x-gzip .gz .tgz
    #AddHandler cgi-script .cgi
    #AddType text/html .shtml
    #AddHandler server-parsed .shtml
    #AddHandler send-as-is asis
    #AddHandler imap-file map
    #AddHandler type-map var
</IfModule>
</IfModule>
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#MetaDir .web
#MetaSuffix .meta
#ErrorDocument 500 "The server made a boo boo.
#ErrorDocument 404 /missing.html
#ErrorDocument 404 /cgi-bin/missing_handler.pl
#ErrorDocument 402
http://www.example.com/subscription_info.html
<IfModule mod_setenvif.c>
    BrowserMatch "Mozilla/2" nokeepalive
    BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    BrowserMatch "RealPlayer 4\.0" force-response-1.0
    BrowserMatch "Java/1\.0" force-response-1.0
    BrowserMatch "JDK/1\.0" force-response-1.0
</IfModule>
<IfModule mod_security.c>
    # Enable ModSecurity
    SecFilterEngine On
    # Reject requests with status 403
    SecFilterDefaultAction "deny,log,status:403"
    # Some sane defaults
    SecFilterScanPOST On
    SecFilterCheckURLEncoding On
    SecFilterCheckUnicodeEncoding Off
    # Accept almost all byte values
    SecFilterForceByteRange 1 255
    # Server masking is optional
    # SecServerSignature "Microsoft-IIS/5.0"
    # Designate a directory for temporary files
    # storage. It is a good idea to change the
    # value below to a private directory, just as
    # an additional measure against race conditions
    SecUploadDir /tmp
    SecUploadKeepFiles Off
    # Only record the interesting stuff
    SecAuditEngine RelevantOnly
    # Uncomment below to record responses with unusual statuses
    # SecAuditLogRelevantStatus ^5
    SecAuditLog logs/modsec_audit.log
    # You normally won't need debug logging
    SecFilterDebugLevel 0
    SecFilterDebugLog logs/modsec_debug.log
    # Only accept request encodings we know how to handle
    # we exclude GET requests from this because some (automated)
    # clients supply "text/html" as Content-Type
    SecFilterSelective REQUEST_METHOD "!^(GET|HEAD)$" chain
    SecFilterSelective HTTP_Content-Type "!(^application/x-www-form-urlencoded$|^multipart/form-data;)"
    # Do not accept GET or HEAD requests with bodies
    SecFilterSelective REQUEST_METHOD "^(GET|HEAD)$" chain
    SecFilterSelective HTTP_Content-Length "!^$"
    # Require Content-Length to be provided with
    # every POST request
    SecFilterSelective REQUEST_METHOD "^POST$" chain
    SecFilterSelective HTTP_Content-Length "^$"
    # Don't accept transfer encodings we know we don't handle
    SecFilterSelective HTTP_Transfer-Encoding "!^$"
</IfModule>
#<Location /server-status>
#    SetHandler server-status
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
#</Location>
#<Location /server-info>
#    SetHandler server-info
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
#</Location>
#<Location /cgi-bin/phf*>
#    Deny from all
#    ErrorDocument 403
http://phf.apache.org/phf_abuse_log.cgi
#</Location>
#NameVirtualHost *:80
#<VirtualHost *:80>
#    ServerAdmin
webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
NameVirtualHost *
<VirtualHost *>
    DocumentRoot /usr/local/apache/htdocs/
    ServerName *
</VirtualHost>
#Added for SSU
<Directory "/usr/local/apache/htdocs/>
    AllowOverride AuthConfig
</Directory>
EOF
-------------------------------------------------------------------------------------
[root@ns♥Sunny♥/etc/init.d]# ./httpd restart
./httpd restart: httpd restarted
[root@ns♥Sunny♥/etc/init.d]# ./mysqld start
Starting MySQL                                             [  확인  ]
[root@ns♥Sunny♥/etc/init.d]# ps aux | grep httpd
root      4495  0.1  1.7 18148 8108 ?        Ss   20:32   0:00 /usr/local/apache_1.3.37/bin/httpd
nobody    4509  0.0  1.4 18280 6520 ?        S    20:33   0:00 /usr/local/apache_1.3.37/bin/httpd
[root@ns♥Sunny♥/etc/init.d]# ps aux | grep mysql
root      4562  0.0  0.2  6720 1176 pts/6    S    20:34   0:00 /bin/sh /usr/local/mysql_5.0.27/bin/mysqld_safe --datadir=/usr/local/mysql_5.0.27/data --pid-file=/usr/local/mysql_5.0.27/data/ns.linuxsunny.pe.kr.pid ................ 생략...
[root@ns♥Sunny♥/etc/init.d]# nmap -sS -O -v localhost
80/tcp   open  http
3306/tcp open  mysql
==>  서비스 포트 상황을 확인하면 된다

 

+ Recent posts