Common commands and actions under centos6.5

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.