(RPM)버젼으로 LAMP+JDK(rebuild) + Tomcat 연동
1. Apache
# yum -y install httpd
# vi /etc/httpd/conf/httpd.conf
…
DirectoryIndex index.html index.htm index.php index.jsp
2. PHP
# yum -y install php
3. Mysql
# yum -y install mysql
4. PHP+Mysql
# yum -y install php-mysql
5. JDK
‘rpm.bin’파일을 통해 JDK를 설치하면각종 경로문제가 발생하므로 아래와같은방법으로설치한다.
Download : jdk-1_5_0_14-linux-i586.bin (해당싸이트에서 받을것)
Download : java-1.5.0-sun-1.5.0.14-1jpp.nosrc.rpm( http://mirrors.dotsrc.org/jpackage/1.7/generic/non-free/SRPMS/)
# yum – y install rpm-build
# mv * /usr/src/redhat/SOURCE/
# rpmbuild –rebuild java-1.5.0-sun-1.5.0.14-1jpp.nosrc.rpm
# yum -y localinstall /usr/src/redhat/RPMS/i586/java-1.5.0-sun-*
…
Package java-1.5.0-sun-plugin-1.5.0.14-1jpp.i586.rpm is not signed //에러가 발생한다. (생략)
# yum -y install unixODBC unixODBC-devel
# yum -y install libXp
# cd /usr/src/redhat/RPMS/i586
# rpm -Uvh * //각각의 파일을 ‘-Uvh’옵션으로 설치해준다.
또는
# for i in `ls -l | grep -v total |awk ‘{print $9}’`;do rpm -Uvh ${i} ; done
# alternatives –auto java
# java -version
java version “1.5.0_14”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode, sharing)
# yum -y install xml-commons-*
# service tomcat5 start
6. Apache + Tomcat
# vi /usr/share/tomcat5/bin/relink
..
(find $CATALINA_HOME/webapps -mindepth 1 -maxdepth 2 -type d )
//’type d’가 뒤에 붙어 있는지 확인한다.
# vi /usr/share/tomcat5/conf/workers.properties
..
workers.tomcat_home=/usr/share/tomcat5
..
workers.java_home=/usr/lib/jvm/java
# vi /etc/tomcat5/server.xml
..
docBase=”/home/www”
crossContext=”false”
trusted=”false”
debug=”0″
reloadable= “true”>
7. TEST
# vi /home/www/index.php
<?
phpinfo();
?>
# vi /home/www/index.jsp
Client Hosts = notepad c:\\windows\\system32\\drivers\\etc\\hosts
http://localhost/index.php
http://localhost/index.jsp