JDK installation in centos
1. First download the JDK installation package online, and then put the installation package under the usr/local/Java directory (where it is put, I am used to it)
2. Open the terminal
1> Cd/usr/local/Java (locate the folder/usr/local/Java)
2> tar zxvf jdk-7u51-linux-x64.tar.gz (decompress to the current directory)
3> Add the environment variable at the end of the/etc/profile file (configure the JDK environment variable)
Export java_home =/usr/Java/jdk1.7.0 _ 67
Export Path = $ path: $ java_home/bin
Export classpath =.: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar
4> after the modification is complete, log on to logout again or # source/etc/profile to make the file take effect immediately.
5> test Java-version (query JDK version)
Tomcat installation in centos
1. First download the tomcat installation package online, and then put the installation package under the usr/local/Java directory.
2. Open the terminal
1> Cd/usr/local/Java (locate the folder/usr/local/Java)
2> tar zxvf apache-tomcat-7.0.47.tar.gz (decompress to the current directory)
3> modify the configuration file and add the Java environment variable information. In/usr/local/Apache-Tomcat-7.0.47/bin, add the following information to the file header:
Exportjava_home =/usr/local // Java/jdk1.7.0 _ 67
Exportclasspath =.: $ classpath: $ java_home/lib: $ java_home/JRE/lib
Exportpath = $ path: $ java_home/bin: $ java_home/JRE/bin
4> start Tomcat/usr/local/Apache-Tomcat-7.0.47/bin/startup. Sh.
5> test Java-version (query JDK version)
6> test tomcat. Open the browser and access http: // 127.0.0.1: 8080. The Tomcat startup welcome page is displayed, proving that the tomcat configuration is correct.
Install nginx in centos
1. First download the nainx installation package on the Internet, and then put the installation package under the usr/local/Java directory.
2. Before installing nginx, make sure that the system has installed G ++, GCC, OpenSSL-devel, PCRE-devel, and zlib-devel.
1> Yum install gcc-C ++
2> Yum-y install zlib-devel OpenSSL -- devel PCRE-devel
3> Cd/usr/local
4> mkdir nginx
5> put the installation package in CD/nginx under this folder.
6> tar zxvf nginx-1.7.4.tar.gz
7> Cd nginx-1.7.4
8>./configure -- prefix =/opt/nginx
9> make & make install
10> Yum-y install telnet (prompt when the Telnet command cannot be found)
11> systemctl stop firewalld. Service (disable the firewall and test it in the browser under the window)