1、安装mysql:yum -y install mysql-server
2、安装java:在centOS-6.4中默认安装了jdk-1.7,若要使用jdk-1.6的话可以按照下面的方式进行
首先yum search java找到要安装的rpm包
然后yum install 相应的rpm包即可
配置java环境变量:
#vim /etc/profile
在尾部添加:
export JAVA_HOME=/usr/lib/jvm/java-1.6.0(若是默认安装java的话路径一定要选择正确)
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
#source /etc/profile
3、安装tomcat:
$ cd ~ # or any path
$ wget http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin/apache-tomcat-6.0.33.tar.gz
$ tar xzf apache-tomcat-6.0.33.tar.gz
$ export CATALINA_HOME=~/apache-tomcat-6.0.33
$ export CATALINA_BASE=~/apache-tomcat-6.0.33
配置tomcat环境变量
export CATALINA_HOME=/opt/apache-tomcat-6.0.33
4、安装maven(可以参考http://www.blogjava.net/caojianhua/archive/2011/04/02/347559.html)
wget http://archive.apache.org/dist/maven/maven-3/3.1.0/binaries/apache-maven-3.1.0-bin.tar.gz
tar -xvfapache-maven-3.1.0-bin.tar.gz
然后配置maven环境变量
export MAVEN_HOME=/opt/apache-maven-3.1.0
export PATH=${MAVEN_HOME}/bin::$PATH
=====下面对上面安装的java、tomcat和maven环境变量的预览
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
export JAVA_HOME=/usr/lib/jvm/java-1.6.0
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export CATALINA_HOME=/opt/apache-tomcat-6.0.33
export MAVEN_HOME=/opt/apache-maven-3.1.0
export PATH=${MAVEN_HOME}/bin::$PATH
centOS-6.4安装Mysql、maven和tomcat
最新推荐文章于 2022-04-19 23:12:39 发布