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.