CentOS common commands

Historical articles

20 Unix/Linux command skills Https://

[Photos] some basic commands commonly used in Linux entry are 41. Https://

SSH password free login

  1. Generate key and public key ssh-keygen -t RSA -C "" on a computer that needs no secret.
  2. Append the contents of the public key to the end of the server ~/.ssh/authorized_keys file [no creation].
  3. Close the secret login function, edit the VIM /etc/ssh/sshd_config file, and set the PasswordAuthentication no to no.
  4. Restart SSH service service sshd restart

Install JDK

The following is the procedure of remote connection to CentOS system in windwos environment.

1. method 1

  1. Enter /usr/local/ directory
  2. CD /usr/local
  3. New JAVA folder
  4. MKDIR Java
  5. To upload compressed packets to server /usr/local/java directory
  6. Decompression file
  7. Tar -xvfz jdk*
  • Start configuring environment variables
  • Open environment variable configuration file
    1. VI /etc/profile
  • Add the following contents at the end.
    1. #set Java enviroment
    2. JAVA_HOME=/usr/local/java
    3. JRE_HOME=/usr/local/java/jre
    4. CLASS_PATH=.: $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
    5. PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
  • Enabling environmental variables to take effect
    1. Source /etc/profile
  • To check whether the installation is successful, the old method prints the version information of JAVA.
    1. Java -version

2. method two

  • View the JDK version Yum list java* that can be installed.
  • Install 1.8 JDKyum install java-1.8.0-openjdk.i686
  • See if JDK is installed successfully, Java -version

Install Tomcat

  • Download Tomcat
  • Decompression Tomcat
    1. Tar -zxvf apache-tomcat- Nine . Zero .M18.tar.gz
  • Mobile specified directory
    1. MV apache-tomcat- Nine . Zero .M18 /usr/local/
  • Set run environment variables
    1. #add Tomcat PID
    3. #add Java opts
    4. JAVA_OPTS= "-server -XX:PermSize=256M -XX:MaxPermSize=1024m -Xms512M -Xmx1024M -XX:MaxNewSize=256m"
  • Modify the 8080 port to 80 ports.
    1. VI /usr/local/apache-tomcat- Nine . Zero .M18/conf/server.xml
  • Configuration management account
    1. VI /usr/local/apache-tomcat- Nine . Zero .M18/conf/tomcat-users.xml
    2. <role rolename= "Manager" > >
    3. <role rolename= "Admin" > >
    4. <role rolename= "Admin-gui" > >
    5. <role rolename= "Manager-gui" > >
    6. <user username= "Admin" Password= "" Roles= "Admin-gui, manager-gui" > >
  • Solve 403 errors
    1. Modify the context.xml file to annotate the nodes.
    2. VI /usr/local/apache-tomcat- Nine . Zero .M18/webapps/manager/META-INF/context.xml
Fabulous ( Twenty-three )

This article is composed of Ji Chang Xin Creation, article address: Https://
Use Knowledge sharing signature 4 The international license agreement is licensed. In addition to the reprint / provenance, all originals or translations of this site must be signed before retransmission. The final editing time is August, 1, 2019 at 02:38 afternoon.

Key word:

Hot articles


The commentary has been closed.

  1.  Iherb
    Iherb Published in:

    Thank you for sharing command sets.

  2.  Tourist
    Tourist Published in:

    Thank you for sharing command sets.

The comments are closed!