CentOS Archives

How to set the hostname on CentOS and Fedora

CentOS 7 has a nice command called hostnamectl. With it we can display the current hostname, and set any of the three types of hostname: static hostname (something like example.com) transient hostname (anything you like, assigned when using DHCP) pretty hostname (something like Jay’s MacBook Pro) By default, a CentOS installation comes back with localhost.localdomain … Read more

OS X Server vs. Parallels Desktop – Overhead Differences

Screen Shot 2015-11-04 at 10.28.17

Ever wondered if there’s a difference in overhead and memory usage when you’re using a VM instead of OS X directly? Here’s a comparison for website hosting.

The above graph shows the difference of hosting one of my websites for the last few days on OS X Server (in blue) that I got from Hostgator (using their HostGator Thanksgiving Deal 2016 coupon), and in a CentOS VM under Parallels Desktop 10 on the same hardware (in red).

The traffic logs show that the amount of requests and visitors has remained the same, so we can deduce that the load put on either OS X and the VM is the same. There is a little more overhead when using the VM, but not as much as I had feared: the requests have to be forwarded to another software layer after all, and that takes some CPU power.

Let’s have a look at memory next:

Read more

How to disable SSH access from everywhere except for certain IPs in CentOS 7

Here’s how to do it: firewall-cmd –zone=internal –add-service=ssh –permanent firewall-cmd –zone=internal –add-source=1.2.3.4/32 –permanent firewall-cmd –zone=internal –add-source=5.6.7.8/32 –permanent firewall-cmd –zone=public –remove-service=ssh –permanent firewall-cmd –reload This declares an internal zone with two IPs (add as many or as few as you like) and subsequently removes the SSH service from the public zone altogether. As a result, any … Read more

How to install Parallels Tools via the Command Line in CentOS

I like setting up barebones CentOS and other flavoured VMs on my Mac via Parallels Desktop. Trouble is, for such things like time synchronisation to work properly, something called Parallels Tools needs to be installed on each VM. This is to make sure Parallels Desktop can speak to the VM and communicate with it properly. … Read more

How to update Plesk via the Command Line

You can update Plesk via the Web Interface (under Tools and Settings – Updates and Upgrades). However sometimes the interface times out, or browsers get confused – therefore it’s good to know that you can apply updates via the command line interface as well. In this article I’ll show you how (in Linux – I … Read more