Common Linux operations

Source: Internet
Author: User

Common Linux operations
Modify the virtual Nic Interface Name

1. Edit the grub configuration file "/etc/sysconfig/grub": Add a "net. ifnames = 0 biosdevname = 0" in the "GRUB_CMDLINE_LINUX" variable.

GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet net.ifnames=0 biosdevname=0"

2. regenerate grub configuration and update Kernel Parameters

[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg

3. Add udev rules: vim/etc/udev/rules. d/70-persistent-net.rules

 ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="1", ATTR{address}=="00:0c:29:ec:72:43", NAME="eth0",KERNEL=="eth*"

4. Shutdown and restart

Enable and disable firewall in Redhat Linux 7

1. view the Firewall Status

[root@localhost /]# systemctl status firewalld

2. temporarily shut down the firewall, restart the computer, and recover again.

[root@localhost /]# systemctl stop firewalld

3. permanently disable the firewall and restart the computer.

[root@localhost /]# systemctl disable firewalld

4. Enable Firewall

[root@localhost /]# systemctl enable firewalld
The following error occurs when installing nginx:

Operation: Execute./configure -- prefix =/usr/local/nginx and then make.

Error: make: *** no rule can be used to create the target "build" required by "default ". Stop.

Solution: yum-y install pcre-devel openssl-devel and then make.

Summary

This article is about continuous updates, because there will always be some problems in the use or development process. At that time, I solved the problem and forgot it after a while. As the saying goes, it's good, this is an article inherent in the bad notes.

The following is your favorite summary. The content is as follows:

1. I hope to keep an eye on my other articles.

2. Are there any clear instructions in the blog, or you have a better way? Join the two chat groups in the upper left corner to study and discuss them together.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.