sundry

CentOS common commands

Historical articles

20 Unix/Linux command skills Https://blog.isoyu.com/archives/20ge-unix-linux-minglingjiqiao.html

[Photos] some basic commands commonly used in Linux entry are 41. Https://blog.isoyu.com/archives/linuxnew.html

SSH password free login

  1. Generate key and public key ssh-keygen -t RSA -C "admin@isoyu.com" 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
    6. Export JAVA_HOME JRE_HOME CLASS_PATH PATH
  • 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
    WGet http://archive.apache.org/dist/tomcat/tomcat-9/v9.0.0.M18/bin/apache-tomcat-9.0.0.M18.tar.gz
  • 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
    2. CATALINA_PID= "$CATALINA_BASE/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. "Manager" > >
    3. "Admin" > >
    4. "Admin-gui" > >
    5. "Manager-gui" > >
    6. "Admin" Password= "Isoyu.com" 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://blog.isoyu.com/archives/centoschangyongmingling.html
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 April, 15, 2019 at 08:22 afternoon.

Key word:

Hot articles

Commentary:

3 comments, visitors: 3, blogger: 0
  1.  Iherb
    Iherb Published in:

    Thank you for sharing command sets.

  2.  Tourist
    Tourist Published in:

    Thank you for sharing command sets.

Comment

[required]

Invisibility?

Please wait three seconds after submission, so as not to cause unsuccessful successes and duplication.