CentOS 6.0安装jdk1.7 tomcat7 mysql5.6

分类:CentOS运维 阅读:70870 次

1.pre

为了更方便的管理安装的软件需要创建个专用目录

2.setup jdk

采用wget安装,安装源为官方jdk,选择jdk7

Install Java with Alternatives

CentOS 6.0安装jdk1.7 tomcat7 mysql5.6

Now you may also required to set upjavacandjarcommands path using alternatives command.

--------------------------------jdk8 下载地址------------------------------------------

jdk8安装方式

--------------------------------------------------------------------------

Configuring Environment Variables

我们采用下面的2种其一:

CentOS 6.0安装jdk1.7 tomcat7 mysql5.6

配置完毕需要使其生效并进行检测,输出如下:

[root@iZ23e9wcapqZ ~]# source ~/.bashrc

[root@iZ23e9wcapqZ ~]# echo $JAVA_HOME

/data/software/jdk1.7.0_75

[root@iZ23e9wcapqZ ~]#

检测jdk是否正确安装并配置

CentOS 6.0安装jdk1.7 tomcat7 mysql5.6

2.tomcat install

安装前需套检查是否安装了

JAVA is the first requirement for Tomcat 7 installation. Make sure you haveJAVA SE 6 or Later versioninstalled in your system. Use following command to check if you have java installed already on your system.

2.1 download the tomacat jar

2.2 extract and setup the jar

Tomcatis very easy to use,Thereare no need to compile its source.Yousimple extract the archive and start the tomcat server.Tomcatby default start on port8080,Makesure no other services are running on same port using‘telnet localhost8080′.

tomcat-7.0.59-8181/bin/startup.sh

Sample Output

Using CATALINA_BASE: /data/software/tomcat-7.0.59-8181

Using CATALINA_HOME: /data/software/tomcat-7.0.59-8181

Using CATALINA_TMPDIR: /data/software/tomcat-7.0.59-8181/temp

Using JRE_HOME: /usr

Using CLASSPATH: /data/software/tomcat-7.0.59-8181/bin/bootstrap.jar:/data/software/tomcat-7.0.59-8181/bin/tomcat-juli.jar

Tomcat started.

2.3 如果需要外网访问,请确保防火墙关闭或者tomcat的端口打开!

------------------------tips---------------------------

查看端口是否已经打开

netstat -an|grep 8181

查看端口是被哪个应用程序使用:

netstat -apn

ps -ef

---------------------------------------------------

查看防火墙中8181 port是否打开

service iptables status

如果没有打开需要:

ex:

CentOS 6.0安装jdk1.7 tomcat7 mysql5.6

端口已打开,如上所示!

3.mysql install

3.1 pre

3.2 mysql-jar

本文出自 “Romantic Dev” 博客,请务必保留此出处http://xinbaby88.blog.51cto.com/9943025/1616072