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

How to use VUE to call Ali Iconfont library online

Preface Many years ago, I was a newbie on the ser...

How to set the text in the select drop-down menu to scroll left and right

I want to use the marquee tag to set the font scro...

Basic knowledge: What does http mean before a website address?

What is HTTP? When we want to browse a website, w...

uniapp implements date and time picker

This article example shares the specific code of ...

Vue component encapsulates sample code for uploading pictures and videos

First download the dependencies: cnpm i -S vue-uu...

Comparison of the advantages of vue3 and vue2

Table of contents Advantage 1: Optimization of di...

MySQL database migration quickly exports and imports large amounts of data

Database migration is a problem we often encounte...

The implementation of Youda's new petite-vue

Table of contents Preface Introduction Live Easy ...

5 JavaScript Ways to Flatten Arrays

Table of contents 1. Concept of array flattening ...

The difference between float and position attributes in CSS layout

CSS Layout - position Property The position attri...

Vue uses ECharts to implement line charts and pie charts

When developing a backend management project, it ...

Advanced and summary of commonly used sql statements in MySQL database

This article uses examples to describe the common...

Analysis of centos6 method of deploying kafka project using docker

This article describes how to use docker to deplo...

Nginx implements dynamic and static separation example explanation

In order to speed up the parsing of the website, ...