“This is the 30th day of my participation in the August Text Challenge.

The vast sea of millions, thank you for this second you see here. Hope my article is helpful to you!

May you keep your love and go to the mountains and seas in the coming days!

Linux deployment environment

Yesterday we covered all the basic advanced Linux commands, but there are probably more to explore! Let’s move on to how we deploy environments in the enterprise. Let’s GO!

Deployment environment – Software installation commands RPM and yum

Linux is commonly used for software installation

  1. RPM installation, suitable for local installation
  2. Yum install, suitable for online network download installation

1. rpm

A package and installation tool for Downloading packages over the Internet, included with some Linux distributions. It generates a file with an RPM extension.

RedHat Package Manager(RPM) is good at installing software

Function:

  • Query the installed software
  • Install the software
  • Uninstall software

Command:

  • RPM -qa: Queries all installed software
  • RPM -ivh Software package: Installs the specified software package
  • RPM -e –nodep Software package: Uninstall the specified software package without verifying software dependencies
  • RPM -ivhu * –nodeps –force: does not verify dependencies or dependencies, forcibly installs software packages, or updates existing software packages * indicates that all RPM packages in the current directory are installed

Parameter details:

-v Displays the detailed installation process.
-q< software name > Query Queries whether a software is installed
-a Querying all Software
-h Lists the flags for software installation
-i< software name > Install Installs the specified software
-e Uninstall software
–nodeps Do not verify software correlation
— force Enforcement action
-U Overwrite updates if the software already exists

2. yum

Install command: yum (full Yellow dog Updater Modified)

Function: Used to automatically download the corresponding software package from the server, automatically install, and automatically download its dependency package.

The premise of using YUM is to have an Internet connection.

Command:

Yun-y install Software name: indicates the installation software

Yun-y remove Software name: indicates the software to be deleted

Note: When installing software using yum, use yum to uninstall the software

3. Differences between RPM and YUM

way The difference between
Yum online download installation mode In addition to downloading the current software package, the system automatically downloads dependent software packages for installation. The underlying use of YUM is RPM, which is further wrapped and optimized
RPM Indicates the online download and installation mode Download only the currently specified package, not dependencies, so downloading RPMS online is cumbersome

Deployment environment — JDK installation

To execute Java code in a virtual machine, you need to install the JDK as you do in Windows

Installation software:

Link: pan.baidu.com/s/1vP6KAmj3… Extraction code: XWNE

Installation steps:

  1. Go to the /soft directory

    mkdir /soft
    cd /soft
    Copy the code
  2. Upload the JDK to the soft directory in Linux

  3. To decompress the JDK to /usr/local, run the following command:

    tar -xvf jdk-8u162-linux-x64.tar.gz -C /usr/local
    Copy the code
  4. To configure JDK environment variables for Linux, operate a /etc/profile environment variable configuration file

    Edit the configuration file to configure environment variables

    vim /etc/profile
    Copy the code

    Add the following configuration at the bottom of the file

    #set JAVA_HOME=/usr/local/jdk1.8.0_162 CLASSPATH=.:$JAVA_HOME/lib PATH=$JAVA_HOME/bin:$PATH export JAVA_HOME CLASSPATH PATHCopy the code

    $JAVA_HOME/bin:$PATH is similar to the value of the concatenation string variable 1+= PATH

    Save the exit

  5. Reload the environment variable configuration file

    source /etc/profile
    Copy the code

    Check whether JDK environment variables are configured successfully

    java -version
    Copy the code

conclusion

I believe you all have a certain understanding of the deployment environment of the Linux system, looking forward to waiting for the next chapter of Linux in the installation of more environment learning! Welcome to the next chapter!

Let’s refuel together, too! I am not just, if there is any missing, wrong place, also welcome you to criticize in the comments of talent leaders! Of course, if this article is sure to help you a little, please kindly and lovely talent leaders to give a thumb-up, favorites, one key three even, thank you very much!

Here, the world is closed for today, good night! Although this article is over, I am still here, never finished. I will try to keep writing articles. The coming days are long, why fear the car yao ma slow!

Thank you all for seeing this! May you live up to your youth and have no regrets!