[웹서버] 2004년도 APM 설치 하기 – 표준
## apm 셋팅 – 2004년도
1. mysql setting
cd /usr/local/src/apm
tar xzvf mysql-4.0.17.tar.gz
cd mysql-4.0.17
./configure –prefix=/usr/local/mysql –localstatedir=/usr/local/mysql/data –with-mysqld-user=mysql –with-charset=euc_kr make make install
2. lib setting
zlib
#rpm -e –nodeps zlib //rpm이 설치 되 있다면 삭제..
#rpm -e –nodeps zlib-devel
http://www.gzip.org/zlib/ 에서
zlib 을 다운 받습니다.
#tar zxvf zlib-1.2.1.tar.gz
#cd zlib-1.2.1
#./configure -s // libz.so 생성
#make
#./configure //libz.a 생성
#make test && make install
#cp libz.so* /usr/local/lib
#cd /usr/local/lib
#rm -rf libz.so
#rm -rf libz.so.1
#ln -s libz.so.1.2.1 libz.so
#ln -s libz.so.1.2.1 libz.so.1
# vi /etc/ld.so.conf
————————————————–
/usr/local/lib
/usr/lib
추가 함
# ldconfig
tiff
# tar xzvf tiff-v3.5.7.tar.gz
# cd tiff-v3.5.7
# ./configure && make && make install
libpng
#rpm -e –nodeps libpng
#rpm -e –nodeps libpng-devel
http://www.libpng.org/pub/png/libpng.html 에서 다운..
#tar zxvf libpng-1.2.5.tar.gz
#cd libpng-1.2.5
#cp scripts/makefile.linux Makefile
#make test && make install
clibpdf
http://www.fastio.com 에서 다운..
#tar zxvf clibpds202r1.tar.tar
#cd ClibPDF/source
#mv Makefile Makefile.orig
#cp Makefile.Linux Makefile
#make lib && make install
pdflib
http://www.pdflib.com 에서 다운..
#tar zxvf pdflib-4.0.3.tar.gz
#cd pdflib-4.0.3
#./configure
#make && make install
swf
ftp://ftp.sgi.com/sgi/graphics/grafica/flash 에서 다운..
#tar zxvf dist.99.linux.tar.Z
#mkdir /usr/local/swf
#cd dist
#mkdir /usr/local/swf/include
#mkdir /usr/local/swf/lib
#mkdir /usr/local/swf/fonts
#mkdir /usr/local/swf/psfonts
#mkdir /usr/local/swf/bin
#cp swf.h /usr/local/swf/include
#cp libswf.a /usr/local/swf/lib
#cp bin/* /usr/local/swf/bin
#cp fonts/* /usr/local/swf/fonts
#cp psfonts/* /usr/local/swf/psfonts
freetype
http://freetype.sourceforge.net
# tar xzvf freetype-2.1.3.tar.gz
# cd freetype-2.1.3
# ./configure && make && make install
jpeg
# tar xzvf jpegsrc.v6b.tar.gz
# cd jpeg-6b
# ./configure –enable-shared –enable-static
# make && make test && make install
libungif
#rpm -e –nodeps libungif
#rpm -e –nodeps libungif-devel
ftp://sunsite.unc.edu/pub/Linux/libs/graphics 에서 다운..
#tar zxvf libungif-4.1.0.tar.gz
#cd libungif-4.1.0
#./configure && make && make install
libungif 설치 끝..
gd
#rpm -e –nodeps gd
#rpm -e –nodeps gd-devel
http://www.boutel.com/gd/http
에서 다운..
#tar zxvf gd-2.0.16.tar.gz
#cd gd-2.0.17
#./configure
#make && make install
gd 설치 끝…
imap
#rpm -qa|grep imap
설치 확인후 설치 되 있다면 삭제…
ftp://ftp.cac.washington.edu
에서 다운..
#tar xzvf imap-2001.BETA.SNAP-0104262058.tar.Z
#mv imap-2001.BETA.SNAP-0104262058 /usr/local/imap
#cd /usr/local/imap
#make slx // 만약 컴파일 에러가 생긴다… imap-2001.BETA.SNAP-0104262058.tar.Z
을 다운 받아서 다시 시도한다… imap-2001 파일을 구하기 힘들다면
intomuse.com/pds/apm.tar.gz 의 패키지에 있음..
컴파일이 무사히 끝났다면…
#cp imapd/imapd /usr/sbin
#cp ipopd/ipop3d /usr/sbin
#vi /etc/xinetd.d/imapd <=아래의 내용을 새로 적던지.. 복사 붙여넣기 한다..
service imap
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/imapd
log_on_success += DURATION USERID
log_on_failure += USERID
}
저장후 빠져나옴
#vi /etc/xinetd.d/ipop3d <= 아래의 내용을 추가..
service pop3
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/ipop3d
log_on_success += USERID
log_on_failure += USERID
}
저장후 빠져나옴..
#/etc/rc.d/init.d/xinetd restart
3. apache 1차 설치
# cd /usr/local/src/apm
# tar xzvf apache_1.3.29.tar.gz
# cd apache_1.3.29
# ./configure –prefix=/usr/local/apache
# cd ..
4. PHP 설치
# tar xzvf php-4.3.4.tar.gz
# cd php-4.3.4
# ./configure –with-apache=/usr/local/src/apm/apache_1.3.29 –with-mysql=/usr/local/mysql –with-imap=/usr/local/imap –with-jpeg-dir=/usr/local/lib –with-png-dir=/usr/local/lib –with-gif-dir=/usr/lib –with-zlib-dir=/usr/local/lib –with-gd –with-freetype-dir=/usr/include/freetype2 –with-zlib –with-tiff-dir=/usr/local/lib –with-pdflib –with-cpdflib –with-gettext –with-swf=/usr/local/swf –with-mod_charset –with-language=korean –with-charset=euc_kr –with-xml –enable-ftp –enable-sockets –disable-debug –enable-system –enable-track-vars –enable-calendar –enable-magic-quotes
# make && make install
# cp libs/libphp4.a /usr/local/src/apm/apache_1.3.29/src/modules/php4/
# cp php.ini-dist /usr/local/lib/php.ini
5. apache 2차 셋팅
# cd /usr/local/src/apm/apache_1.3.29
# ./configure –prefix=/usr/local/apache –activate-module=src/modules/php4/libphp4.a –enable-module=php4 –enable-shared=max –enable-rule=SHARED_CORE –enable-module=so
# make
# make install
# vi /usr/local/apache/conf/httpd.conf
간단히 ServerName 의 주석을 풀고 현 시스테의 도메인이나 IP 를 적어준다.
800 줄 근처에 AddType allplcation/x-httpd-php 로 시작하는 부분을 찾아서..
AddType application/x-httpd-php .html .php3 .php4 .inc .phtml .php .ph <= 요렇게
바꿉니다.
그렇후 ..
# /usr/local/apache/bin/apachectl restart
6. Zend 설치
Zend 설치는 반드시 Apache 가 실행된 상태에서 설치함
# cd /usr/local/src/apm
# tar xzvf ZendOptimizer-2\\[1\\].1.0b-Linux_glibc21-i386.tar.gz
# cd ZendOptimizer-2.1.0b-Linux_glibc21-i386/
# ./install
7. httpd.conf
===============================================================================
ServerType standalone
ServerRoot “/usr/local/apache”
#LockFile /usr/local/apache/logs/httpd.lock
PidFile /usr/local/apache/logs/httpd.pid
ScoreBoardFile /usr/local/apache/logs/httpd.scoreboard
#ResourceConfig /usr/local/apache/conf/srm.conf
#AccessConfig /usr/local/apache/conf/access.conf
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 20
MaxSpareServers 40
StartServers 20
MaxClients 150
MaxRequestsPerChild 0
#Listen 3000
#Listen 12.34.56.78:80
#BindAddress *
# Dynamic Shared Object (DSO) Support
# LoadModule foo_module libexec/mod_foo.so
LoadModule env_module libexec/mod_env.so
LoadModule config_log_module libexec/mod_log_config.so
LoadModule mime_module libexec/mod_mime.so
LoadModule negotiation_module libexec/mod_negotiation.so
LoadModule status_module libexec/mod_status.so
LoadModule includes_module libexec/mod_include.so
LoadModule autoindex_module libexec/mod_autoindex.so
LoadModule dir_module libexec/mod_dir.so
LoadModule cgi_module libexec/mod_cgi.so
LoadModule asis_module libexec/mod_asis.so
LoadModule imap_module libexec/mod_imap.so
LoadModule action_module libexec/mod_actions.so
LoadModule userdir_module libexec/mod_userdir.so
LoadModule alias_module libexec/mod_alias.so
LoadModule access_module libexec/mod_access.so
LoadModule auth_module libexec/mod_auth.so
LoadModule setenvif_module libexec/mod_setenvif.so
LoadModule php4_module libexec/libphp4.so
ClearModuleList
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_so.c
AddModule mod_setenvif.c
AddModule mod_php4.c
#ExtendedStatus On
Port 80
User nobody
Group nobody
ServerAdmin alang@clunix.com
ServerName 211.241.202.235
DocumentRoot “/usr/local/apache/htdocs”
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory “/usr/local/apache/htdocs”>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory “/home”>
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Deny from env=go_out
Deny from export=go_out
</Directory>
<IfModule mod_userdir.c>
UserDir www
</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_dir.c>
DirectoryIndex index.html index.htm index.php index.phtml index.php3
</IfModule>
AccessFileName .htaccess
<Files ~ “^\\.ht”>
Order allow,deny
Deny from all
Satisfy All
</Files>
<Files ~ “^\\.ht”>
Order allow,deny
Deny from all
</Files>
<Files ~ “*Chat*”>
Order allow,deny
Deny from all
</Files>
<Files ~ “*CHAT*”>
Order allow,deny
Deny from all
</Files>
#CacheNegotiatedDocs
UseCanonicalName On
<IfModule mod_mime.c>
TypesConfig /usr/local/apache/conf/mime.types
</IfModule>
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/local/apache/conf/magic
</IfModule>
HostnameLookups Off
ErrorLog /usr/local/apache/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/logs/access_log common
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/icons/”
<Directory “/usr/local/apache/icons”>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /manual/ “/usr/local/apache/htdocs/manual/”
<Directory “/usr/local/apache/htdocs/manual”>
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ “/usr/local/apache/cgi-bin/”
<Directory “/usr/local/apache/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
#AddDescription “GZIP compressed document” .gz
#AddDescription “tar archive” .tar
#AddDescription “GZIP compressed tar archive” .tgz
ReadmeName README
HeaderName HEADER
IndexIgnore .??* *~ *# HEADER* README* 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 kr en da nl et fr de el it ja no pl pt pt-br ru ltz ca es sv tw
</IfModule>
AddType application/x-tar .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
#AddType application/x-compress .Z
#AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .html .php3 .php4 .inc .phtml .php .ph
AddType application/x-httpd-php-source .phps
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>
#MetaDir .web
#MetaSuffix .meta
# Customizable error response (Apache style)
# these come in three flavors
#
# 1) plain text
#ErrorDocument 500 “The server made a boo boo.
# n.b. the single leading (“) marks it as text, it does not get output
#
# 2) local redirects
#ErrorDocument 404 /missing.html
# to redirect to local URL /missing.html
#ErrorDocument 404 /cgi-bin/missing_handler.pl
# N.B.: You can redirect to a script or a document using server-side-includes.
#
# 3) external redirects
#ErrorDocument 402 http://www.example.com/subscription_info.html
# N.B.: Many of the environment variables associated with the original
# request will *not* be available to such a script.
#
# Customize behaviour based on the browser
#
<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
BrowserMatch “Webzip” go_out
BrowserMatch “WebZip” go_out
BrowserMatch “Teleport” go_out
BrowserMatch “GetRight” go_out
BrowserMatch “Wget” go_out
</IfModule>
#<Location /server-status>
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from .example.com
#</Location>
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the “.example.com” to match your domain to enable.
#
#<Location /server-info>
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from .example.com
#</Location>
#
# There have been reports of people trying to abuse an old bug from pre-1.1
# days. This bug involved a CGI script distributed as a part of Apache.
# By uncommenting these lines you can redirect these attacks to a logging
# script on phf.apache.org. Or, you can record them yourself, using the script
# support/phf_abuse_log.cgi.
#
#<Location /cgi-bin/phf*>
# Deny from all
# ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi
#</Location>
NameVirtualHost 211.241.202.235
<VirtualHost 211.241.202.235>
ServerAdmin alang@clunix.com
DocumentRoot /home/clunix/www
ServerName clunix.com
ServerAlias clunix.com www.clunix.com
</VirtualHost>
============================================================
3 Responses
… [Trackback]
[…] Find More on to that Topic: nblog.syszone.co.kr/archives/488 […]
… [Trackback]
[…] Read More Information here to that Topic: nblog.syszone.co.kr/archives/488 […]
… [Trackback]
[…] There you can find 1437 additional Info on that Topic: nblog.syszone.co.kr/archives/488 […]