Overview of this chapter:
- Configure IP address under 1.linux system
- Install JDK under 2.linux System and configure environment variables
- Install Tomcat under 3.linux System and configure environment variables
- Install SSH remote Login tool under 4.linux System and implement password-free login
- Operation on the firewall under the 5.linux system
Configure IP address under 1.linux system
Install JDK under 2.linux System and configure environment variables
2.1 Uninstalling the Open JDK
Rpm-qa | grep java
RPM-E--nodeps Tzdata-java-2012c-1.el6.noarch
RPM-E--nodeps java-1.7.0-openjdk-1.7.0.45-1.45.1.11.1.el6.x86_64
2.2 Install JDK, configure environment variables under/etc/profile file, and take effect immediately
java_home=/usr/java/jdk1.7.0_79
Jre_home=/usr/java/jdk1.7.0_79/jre
Path= $PATH: $JAVA _home/bin: $JRE _home/bin
Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib
Export Java_home jre_home PATH CLASSPATH
Source/etc/profile
Install Tomcat under 3.linux System and configure environment variables
Unzip the Tomcat compressed file and add the catalina_home=/usr/local/apache-tomcat-6.0.30/after the catalina.sh file
Install SSH remote Login tool under 4.linux System and implement password-free login
4.1 Viewing OpenSSH installation conditions
Rpm-qa | grep ssh
4.2 If not installed
Yum Install Openssh-server
Yum Install openssh-clients
4.3 Restarting ssh
service sshd restart
4.4 setting on auto-start
chkconfig sshd on
chkconfig--list sshd
4.5 generate secret key
ssh-keygen-t RSA
4.6 Create a new Authorized_keys file in the. ssh file, add each machine's public key to the Authorized_keys file, and distribute it to each machine to
4.7 assigns 600 permissions to Authorized_keys files
chmod authorized_keys
Operation on the firewall under the 5.linux system
#查看防火墙状态
Service Iptables Status
#关闭防火墙
Service Iptables Stop
#查看防火墙开机启动状态
Chkconfig iptables--list
#关闭防火墙开机启动
Chkconfig iptables off
Common commands and actions under centos6.5