|
###########################################
### ÀÛ¼ºÀÚ : Han sang heon ###
### ÀÛ¼ºÀÏ : 2003. 08. 19 ###
### ¿ë µµ : APO + j2sdk + resin(jsp) ¼³Ä¡Çϱâ
### ¹èÆ÷±Ç : GNU Á¤½Å¿¡ ÀÇ°Å ###
############################################
¼³Ä¡È¯°æ
OS: solaris 9 intel
DB: oracle 817
¹Ýµå½Ã gcc,make ¸¦ ¼³Ä¡ÇØ¾ß ÇÑ´Ù..
1. ¼Ò½º ¾ÐÃà Ç®±â
# gzip -d apache_1.3.27.tar.gz
# tar xvf apache_1.3.27.tar
# gzip -d php-4.1.1.tar.gz
# tar xvf php-4.1.1.tar
2. apache Àá½Ã Ç®±â
# ./configure --prefix=/usr/local/apache
PATH ¼³Á¤Çϱâ : /etc/profile ÀÇ PATH¿¡ /usr/ccs/bin °æ·Î¸¦
¼³Á¤ÇØ¾ß ar ¿¡·¯°¡ ³ªÁö ¾Ê´Â´Ù...
3. php ¼³Ä¡Çϱâ
# ./configure --with-apache=/usr/local/src/apache_1.3.27 --enable-trac-vars --without-gd2 --with-oci8=/opt/oracle/product/9.2.0.1 --with-oracle=/opt/oracle/product/9.2.0.1 --enable-sigchild --disable-deb
# make
# make install
4. apache ÄÄÆÄÀÏ
# ./configure --prefix=/usr/local/apache --activate-module=src/modules/php4/libphp4.a --enable-shared=max --enable-module=so
# make
# make install
5. ZendOptimizer ¼³Ä¡Çϱâ
# gzip -d ZendOptimizer-1.2.0-PHP_4.1.0-Linux_glibc21-i386.tar.gz
# tar xvf ZendOptimizer-1.2.0-PHP_4.1.0-Linux_glibc21-i386.tar
# mkdir /usr/local/Zend
# mv ZendOptimizer-1.2.0-PHP_4.1.0-Linux_glibc21-i386 /usr/local/Zend/ lib
6. apachectl¿¡ ȯ°æº¯¼ö ÷°¡Çϱâ
-- linux¿¡¼´Â ¹Ýµå½Ã Ãß°¡ÇØÁÖ¾î¾ß Çϳª, ¼Ö¶ó¸®½º¿¡¼´Â »ý·«°¡´É
7. rootÀÇ .profile¿¡ ȯ°æº¯¼ö Ãß°¡Çϱâ
stty istrip
stty cs8 -istrip -parenb
LANG=ko; export LANG
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/openwin/bin:/opt/SUNWspro/bin:
/usr/ucb:/
etc:.
export PATH
######################################################################
##########
umask 022
JAVA_HOME=/usr/java; export JAVA_HOME
DISPLAY=localhost:0.0; export DISPLAY
TMDIR=/var/tmp; export TMDIR
ORACLE_OWNER=oracle; export ORACLE_OWNER
ORACLE_BASE=/opt/oracle; export ORACLE_BASE
ORACLE_HOME=/opt/oracle/product/9.2.0.1; export ORACLE_HOME
ORACLE_SID=DBA9I; export ORACLE_SID
ORACLE_TERM=vt100; export ORACLE_TERM
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data; export ORA_NLS33
# NLS_LANG=KOREAN_KOREA.KO16KSC5601; export NLS_LANG
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
PATH=$PATH:.:/usr/bin:$ORACLE_HOME/bin:/sbin:/usr/ccs/bin:/usr/ucb; export PATH
LC_ALL=; export LC_ALL
PS1='[oracle:$PWD]'
CLASSPATH=/opt/oracle/jre/1.1.8/lib:$ORACLE_HOME/jlib; export CLASSPATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$JAVA_HOME/lib
export LD_LIBRARY_PATH
######################################################################
##########
#
# If possible, start the windows system
#
if [ "`tty`" = "/dev/console" ] ; then
if [ "$TERM" = "sun" -o "$TERM" = "AT386" ] ; then
if [ ${OPENWINHOME:-""} = "" ] ; then
OPENWINHOME=/usr/openwin
export OPENWINHOME
fi
echo ""
echo "Starting OpenWindows in 5 seconds (type Control-C to inter
rupt)"
sleep 5
echo ""
$OPENWINHOME/bin/openwin
clear # get rid of annoying cursor rectangle
exit # logout after leaving windows system
fi
fi
7. oracle¿¬µ¿ Å×½ºÆ®
<?
$conn=OCILogon("system","manager","ora920");
print "Server Version:" .OCIServerVersion($conn);
OCILogOff($conn);
?>
8. jdk ¼³Ä¡
j2sdk-1_4_1_04-solaris-i586.sh
´Ù¿î·Îµå :
target=_blank>http://java.sun.com/webapps/download/DisplayLinks
/usr/java/j2sdk1.4.1_04 ¿¡ ¼³Ä¡
9. Resin ¼³Ä¡
# gzip -d resin-2.1.6.tar.gz
# tar xvf resin-2.1.6.tar
# ./configure --with-apache=/usr/local/apache --with-java-home=/usr/java
# make
# make install
# vi bin/wrapper.p1 $ JAVA_HOME="/usr/java/jdk1.3.1_07";$ CLASSPATH="$CLASSPATH"; À§Ç׸ñÀ» Ãß°¡ÇÑ´Ù
# vi conf/resin.conf <doc-dir>/home/jsp/public_html</doc-dir>
10. httpd.conf ÆÄÀÏ¿¡ resin ¸ðµâ Ãß°¡ È®ÀÎ
## mod_caucho Resin Configuration#LoadModule caucho_module /usr/local/httpd/libexec/mod_caucho.soAddModule mod_caucho.c
<IfModule mod_caucho.c> CauchoConfigFile /usr/local/resin-2.1.6/conf/resin.conf
<Location /caucho-status>
SetHandler caucho-status
</Location>
</IfModule>
11. /etc/profile ÆÄÀÏ Ãß°¡Ç׸ñ
CLASSPATH=/home/jsp:/usr/local/resin2.1.6/lib:/usr/java/j2sdk1.4.1_04 /lib/tools.jar:/usr/java/j2sdk1.4.1_04 /lib/servlet.jar:/usr/java/j2sdk1.4.1_04 /lib/nls_charset12.jar:/home/jsp/WEB-INF/classes:/usr/java/j2sdk1.4.1_
04 /lib/classes12.jar: /usr/java/j2sdk1.4.1_04 /lib/activation.jar:/usr/java/j2sdk1.4.1_04 /lib/mail.jar
PATH=$PATH:/usr/local/resin2.1.6/bin:/usr/java/jdk1.3.1_07/bin
JAVA_HOME=/usr/java/j2sdk1.4.1_04
RESIN_HOME=/usr/local/resin-2.1.6
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC CLASSPATH JAVA_HOME RESIN_HOME
12. DB pool »ç¿ëÇϱâ
Resin.conf¿¡ Ãß°¡ÇÑ´Ù.
<resource-ref>
<res-ref-name>php_oracle</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<init-param driver-name="oracle.jdbc.driver.OracleDriver"/> <init-param url="jdbc:oracle:thin:@211.113.46.5:1521:orasid"/> <init-param user="scott"/>
<init-param password="tiger"/>
<init-param max-connections="20"/>
<init-param enable-transaction="false"/>
</resource-ref>
13. apache ¿Í resin ±¸µ¿Çϱâ
# apachectl restart
# httpd.sh start
|