1. Installing the JDK
#chmod u+x Jdk-6u4-linux-x64.bin
#./jdk-6u4-linux-x64.bin
Press ' Q ' key, enter Yes in the current directory will produce a jdk1.6.0_04 directory
#mv jdk1.6.0_04/usr/local/
Configuring Environment variables
#vim/etc/profile
Join
Java_home=/usr/local/jdk1.6.0_04
Export Java_home
Classpath=/usr/local/jdk1.6.0_04/lib:/usr/local/jdk1.6.0_04/jre/lib
Export CLASSPATH
Path= $PATH: $JAVA _home/bin: $JAVA _home/jre/bin
Export PATH
Jre=/usr/local/jdk1.6.0_04/jre
Export JRE
#source/etc/profile
View
#java-vejava
Version "1.6.0_04"
Java (TM) SE Runtime Environment (build 1.6.0_04-b12)
Java HotSpot (TM) 64-bit Server VM (build 10.0-b19, Mixed mode)
It means success!
2, Installation Apache-tomcat
#wget http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.16/bin/apache-tomcat-6.0.16.tar.gz
#tar XZVF apache-tomcat-6.0.16.tar.gz
#mv apache-tomcat-6.0.16/usr/local/
Configuring Environment variables
#vim/etc/profile
tomcat_home=/usr/local/apache-tomcat-6.0.16
Export Tomcat_home
#source/etc/profile
Start
#/usr/local/apache-tomcat-6.0.16/bin/startup.sh
Default boot port on 8080
3. Configure Nginx to parse JSP and PHP files simultaneously
#cat/usr/local/nginx/conf/vhosts/www.test.com.conf
Upstream Tomcat_server {
Server 127.0.0.1:8080;
}
Server
{
Listen 80;
server_name www.test.com;
Index index.html index.htm index.php;
root/data/httpd/channel.metromall.com.cn;
if (!-e $request _filename) {
Rewrite ^/(. +\. html|xml|json|htm|php|asp|shtml)) $/index.php?$1 last;
}
Location ~ \. (JSP|JSPX|DO)? $
{
Proxy_set_header Host $host;
Proxy_set_header x-forwarded-for $remote _addr;
Proxy_pass Http://tomcat_server;
}
Location ~. *\.php.*
{
Include php_fcgi.conf;
Include pathinfo.conf;
}
Location ~. *\. (gif|jpg|jpeg|png|bmp|swf) $
{
Expires 30d;
}
Location ~. *\. (JS|CSS)? $
{
Expires 1h;
}
Access_log/var/log/nginx/access.log;
#access_log off;
}
Author: yuangang_love
http://www.bkjia.com/PHPjc/478122.html www.bkjia.com true http://www.bkjia.com/PHPjc/478122.html techarticle 1, install the JDK #chmod u+x jdk-6u4-linux-x64.bin #./jdk-6u4-linux-x64.bin Press Q, enter Yes in the current directory will produce a jdk1.6.0_04 directory #mv jdk1.6.0 _04/usr/local/Configuration ring ...