Changing the Hostname and IP Address on a CentOS server and re-configuring Oracle and ORDS

I use VirtualBox quite a lot. Rather than going through the rigmarole of installing the software I need every time I want a new environment, I simply clone the VM I’ve already installed everything on.
One drawback with this approach is that, because I’ve already configured the network settings on this baseline VM, I can’t run two clones concurrently as they both have the same hostname and IP address.

What I’ll be covering here is :

The approach I’ve taken is to execute each step on the command line without the need for any interactive input. Therefore, it’s possible to take the steps described here as building blocks for a bash script (or scripts) to accomplish these tasks.
The exception is where I edit the contents of files. If you wanted to automate this, you can use something like…

sed -i s/192.168.56.220/192.168.56.225/g file_to_edit

…for the IP address and…

sed -i s/frea./rincewind./g file_to_edit

…for the hostname where file_to_edit is the file you want to change.

If you’ve found your way here in search of simply changing the hostname and/or the IP address on a CentOS7 server, then you can just skip all the database related stuff and start right here.

By the way, I’ve decided upon a new naming convention for my servers which makes use of Discworld characters. There may be the odd reference to this in what follows…

Continue reading

VirtualBox – configuring a Host-Only Network

I’m currently indulging in the pastime that’s sweeping the country – trying not to think about Brexit.
It’s a craze that’s even spread as far our political elite. In their case, it manifests itself in slightly different ways.
On the one hand, there are those who are refusing to accept any solution offered to maintain a “soft” border on the island of Ireland. As far as I can tell, they haven’t managed to offer any practical solution that they would accept as that would involve thinking about Brexit.
On the other hand there are those who are pushing for a new referendum because, apparently, some politicians lied when campaigning. Maybe someone was “Putin” ’em up to it ?

For my part, as I don’t quite have the space for a bunker at the bottom of my garden, I’ve decided to hide out in to a world of make-believe…well Virtual Machines at any rate.

I want to setup a CentOS Virtual Machine (VM) that I can then use as to clone environments to host various software stacks that I may want to play with.
I’d like to be able to connect to these VMs directly from my host OS, just like a real-world server. However, I’d also like to be able to connect the VM to the outside world occasionally so I can run package updates via yum.
The specific steps I’m going to go through are :

  • Install CentOS7 into a Virtualbox VM
  • Setup Host Only Network in VirtualBox
  • Create a Network Interface on the Guest to use the Host Only Network
  • Assign a static IP address to the Guest

The software I’m using for this is :

Before we get cracking, it’s probably a good idea to have a quick look at… Continue reading