How to open port 80 on Centos7

To open port 80 in the firewall, run the following……….. [root@srv ]# firewall-cmd –permanent –zone=public –add-port=80/tcp Next, you want to reload the firewall with the following command [root@srv ]# firewall-cmd –reload You can verify this by running the following, [root@srv ]# firewall-cmd –zone=public –query-port=80/tcp

How to “hostname” on Rhel/Centos 7

To see all hostname types do “hostnamectl” or “hostnamectl status” hostnamectl set-hostname rhel7.olivermel.com hostnamectl set-hostname rhel7.olivermel.com –pretty hostnamectl set-hostname rhel7.olivermel.com –static hostnamectl set-hostname rhel7.olivermel.com –transient the additional flags/options are to change for pretty, static and transient hostnames To delete hostname, just set to empty string hostnamectl set-hostname “” hostnamectl set-hostname “” –pretty hostnamectl set-hostname “” …

Turn off colors in vim

If you’re like me and don’t want to have any colors in your vim environment. Edit your .vimrc file in your home directory and add the following to the bottom of the file AND if the file doesn’t exist, just create one with (in your home directory) with the following lines below syntax off set …