


Detailed explanation of the basic environment configuration of Centos7 operating system
The tutorial column of centos below will introduce you to the basic environment configuration method of Centos7 operating system. I hope it will be helpful to friends in need!
1. System firewall settings
Description: For the Linux firewall of the Red Hat kernel series, iptables is the system default and only firewall. However, on the Centos system, it is based on the original iptables. You only need to manage firewalld and install the iptables components to perform relevant configurations.
(1) Use service firewalld status to check the current status of the firewall. Generally speaking, the firewall is in the automatic startup state after the system is installed;
(2 ) Close the firewall command (systemctl stop firewalld.service)
After closing the firewall, enter service firewalld status again to view the current firewall status, as shown in the figure below;
(3) The above management method is only effective for the current method. If the server is restarted, it will not take effect. If you want the configuration to take effect all the time, you need to use the following command; systemctl disable firewalld.service, as shown in the figure below
Summary: Through the above three steps, you can configure the Contos operating system Manage the firewall under. If you need to turn on the firewall, you need to change the original stop to start and disable to enable;
2.SELinux is turned off
(1) SELinux is in Linux A flexible mandatory access control system (MAC) is provided at the kernel level. This mandatory access control system is built on top of the discretionary access control system (DAC). DAC means that the security access control of the system is freely managed by the system administrator root. SELinux defines access and transmission permissions for each user, process and file in the system, and sets strict permissions on the interaction between these objects, or completely disables them. However, SELinux is completely transparent to users, and ordinary users are completely unaware of its existence. Only system administrators need to consider these strategies.
(2) SELinux provides very specific strategies, and the reset covers the entire Linux system.
(3) Use sestatus to check the current SELinux service status, as shown in the following figure:
The current SELinux is closed;
(4) If you want to turn off SELinux, you need to modify the configuration file /etc/selinux/config and modify the value of SELINUX to disable, as shown in the figure below;
Enter source /etc/selinux/config, the modified configuration file will take effect, check again;
Summary: After turning off the firewall and managing SELinux, such related security issues can generally be resolved fixed;
The above is the detailed content of Detailed explanation of the basic environment configuration of Centos7 operating system. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











When loading CentOS-7.0-1406, there are many optional versions. For ordinary users, they don’t know which one to choose. Here is a brief introduction: (1) CentOS-xxxx-LiveCD.ios and CentOS-xxxx- What is the difference between bin-DVD.iso? The former only has 700M, and the latter has 3.8G. The difference is not only in size, but the more essential difference is that CentOS-xxxx-LiveCD.ios can only be loaded into the memory and run, and cannot be installed. Only CentOS-xxx-bin-DVD1.iso can be installed on the hard disk. (2) CentOS-xxx-bin-DVD1.iso, Ce

Open the centos7 page and appear: welcome to emergency mode! afterloggingin, type "journalctl -xb" to viewsystemlogs, "systemctlreboot" toreboot, "systemctldefault" to tryagaintobootintodefaultmode. giverootpasswordformaintenance(??Control-D???): Solution: execute r

There is a lot of garbage in the tmp directory in the centos7 system. If you want to clear the garbage, how should you do it? Let’s take a look at the detailed tutorial below. To view the list of files in the tmp file directory, execute the command cdtmp/ to switch to the current file directory of tmp, and execute the ll command to view the list of files in the current directory. As shown below. Use the rm command to delete files. It should be noted that the rm command deletes files from the system forever. Therefore, it is recommended that when using the rm command, it is best to give a prompt before deleting the file. Use the command rm-i file name, wait for the user to confirm deletion (y) or skip deletion (n), and the system will perform corresponding operations. As shown below.

Set password rules for security reasons Set the number of days after which passwords expire. User must change password within days. This setting only affects created users, not existing users. If setting to an existing user, run the command "chage -M (days) (user)". PASS_MAX_DAYS60#Password expiration time PASS_MIN_DAYS3#Initial password change time PASS_MIN_LEN8#Minimum password length PASS_WARN_AGE7#Password expiration prompt time Repeat password restriction use [root@linuxprobe~]#vi/etc/pam.d/system-auth#nearline15:

1. The compressed folder is a zip file [root@cgls]#zip-rmydata.zipmydata2. Unzip mydata.zip into the mydatabak directory [root@cgls]#unzipmydata.zip-dmydatabak3.mydata01 folder and mydata02.txt are compressed into mydata.zip[root@cgls]#zipmydata.zipmydata01mydata02.txt4. Decompress the mydata.zip file directly [root@cgls]#unzipmydata.zip5. View myd

1.UncaughtError:Calltoundefinedfunctionmb_strlen(); When the above error occurs, it means that we have not installed the mbstring extension; 2. Enter the PHP installation directory cd/temp001/php-7.1.0/ext/mbstring 3. Start phpize(/usr/local/bin /phpize or /usr/local/php7-abel001/bin/phpize) command to install php extension 4../configure--with-php-config=/usr/local/php7-abel

Centos7 does not have a mysql database. The default database is mariadb (a branch of mysql). You can install the mysql database manually by following the steps below. 1. Download the rpm installation file wgethttp://repo.mysql.com/mysql-community-release-el7.rpm 2. Execute rpm to install rpm-ivhmysql-community-release-el7.rpm. After the dependency resolution is completed, the following options appear: dependenciesresolved =================================

1. Download the installation package from the official website and select the version suitable for Linux. Select the latest version here, download it locally and then upload it to the server or download it directly with the wget command under centos. Switch to the /usr/local directory and download the software package #cd/usr/local#wgethttp://nginx.org/download/nginx-1.11.5.tar.gz2. To install nginx, first execute the following command to install the nginx dependent library. If dependent libraries are missing, the installation may fail. For details, please refer to the error message at the end of the article. #yuminstallgcc-c++#yuminstallpcre#yumins
