Summary of solutions to common Linux problems

Summary of solutions to common Linux problems

1. Connect Centos7 under VMware and set a fixed IP

1) First, right-click the virtual image name and click "Settings"

2) Open the terminal and check the network

3) Edit this file as root user

4) Restart the network card and check the network

5) Edit the previously edited file again

[root@nginx ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33
#IPADDRO and PREFIXO are as shown above. For GATWAYO and DNS1, you only need to change the last part of IPADDRO to 1.
IPADDRO=192.168.126.136
PREFIXO=24
GATWAYO=192.168.126.1
DNS1=192.168.126.1

6) Restart the network card and the setting is completed

[root@nginx ~]# systemctl restart network

2. Install wget on Linux

[root@nginx ~]# yum -y install wget

3. Linux installation tree

[root@nginx ~]# yum install tree -y

4. Install vim on Linux

[root@nginx conf]# yum -y install vim*

5. Linux installation zip

[root@Nginx images]# yum install zip

6. CentOS7 uses firewalld to open and close the firewall

  • Start: systemctl start firewalld
  • To shut down: systemctl stop firewalld
  • Check the status: systemctl status firewalld
  • Disable at boot: systemctl disable firewalld
  • Enable at boot: systemctl enable firewalld

7. Install netstat on Linux

[root@Nginx sbin]# yum install net-tools

8. Linux uses netstat to check whether the port is occupied

[root@Nginx sbin]# netstat -anp|grep 8080
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 1245/nginx:master

9. Install bc calculator on Linux

[root@localhost ~]# yum install bc

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • Tips for viewing History records and adding timestamps in Linux
  • Several ways to run Python programs in the Linux background
  • Creating and executing Linux shell scripts
  • Python uses paramiko to operate Linux
  • Android's implementation method of executing shell scripts in the Linux terminal to directly print the log of the currently running app
  • How to remotely batch execute Linux command programs using pyqt
  • Use of Zabbix Api in Linux shell environment
  • How to recover accidentally deleted messages files in Linux
  • In-depth analysis of the Linux kernel macro container_of
  • Linux shell command counts the value of a column after deduplication

<<:  js implements a simple calculator

>>:  Detailed explanation of MySQL stored procedures, cursors, and transaction examples

Recommend

Solution to the Docker container being unable to access the host port

I recently encountered a problem at work. The doc...

Continuous delivery using Jenkins and Docker under Docker

1. What is Continuous Delivery The software produ...

Detailed explanation of flex and position compatibility mining notes

Today I had some free time to write a website for...

Detailed explanation of Vue's SSR server-side rendering example

Why use Server-Side Rendering (SSR) Better SEO, s...

How to make Python scripts run directly under Ubuntu

Let’s take the translation program as an example....

Example code for implementing fullpage.js full-screen scrolling effect with CSS

When I was studying CSS recently, I found that I ...

How to realize vertical arrangement of text using CSS3

In a recent project, I wanted to align text verti...

Simple web design concept color matching

(I) Basic concepts of web page color matching (1) ...

Example code for converting html table data to Json format

The javascript function for converting <table&g...

How to purchase and initially build a server

I haven't worked with servers for a while. No...

Implementation of proxy_pass in nginx reverse proxy

The format is simple: proxy_pass URL; The URL inc...

Vue implements small form validation function

This article example shares the specific code of ...

How to use MySQL group by and order by together

Suppose there is a table: reward (reward table), ...