centos5.4 x86 最小化安装源码目录 :/usr/src #tomcat我就放在这安装目录 :/usr/local关闭selinux ,重启生效。#sed -i 's/enforcing/disabled/g' /etc/selinux/config#reboot#yum -y install gcc gcc-c++ ncurses* zlib*可以到这里下载jdk我下的是这个#chmod u+x jdk-*#./jdk*等待,最后会提示你摁 enter ,done。默认是装在 /usr/java/jdk1.6.0_21下设置环境变量#vim /etc/profile #添加到末尾export JAVA_HOME=/usr/java/jdk1.6.0_21export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/libexport PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin#source /etc/profile马上生效#java -version查看版本。mysql#wget#tar zxvf mysql-5.0.75.tar.gz#cd mysql*#./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-extra-charsets=all#make && make installgroupadd mysqluseradd -g mysql mysqlcp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnfcp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqldchown -R mysql.mysql /usr/local/mysql/usr/local/mysql/bin/mysql_install_db --user=mysqlchown -R mysql.mysql /usr/local/mysql/var/usr/local/mysql/bin/mysqld_safe --user=mysql &apache#wget#tar jxv -f httpd-2.2.17.tar.bz2#cd httpd*/srclib/apr#./configure --prefix=/usr/loca/apr && make && make install#cd ../apr-util#./configure --prefix=/usr/local/apr-util --with-apr=/usr/loca/apr#make && make install#cd ../..#./configure --prefix=/usr/local/apache --enable-mods-shared=all --with-mpm=worker --enable-deflate --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache --enable-proxy --enable-proxy-ajp --enable-proxy-balancer --enable-proxy-http --enable-rewrite --enable-charset-lite --disable-ipv6 --disable-dav --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-uti#make && make installtomcat#wget#tar zxvf apache-tomcat*#mv apache-tomcat* tomcat#vim tomcat/bin/setenv.sh 没有就新建JAVA_HOME=/usr/java/jdk1.6.0_21KRE_HOME=/usr/java/jdk1.6.0_21/jre#sh /usr/src/tomcat/bin/startup.sh浏览器访问 http://localhost:8080