Configure a CentOS 6.4 Web Server on Rackspace
Updated for CentOS 6.5.
Before you can begin configuring your server, you'll first need to create a new server instance using the Rackspace cloud control panel. We're using CentOS 6.4 in this tutorial. Make note of the password — it will only be shown once! After the server is finished building, make note of the IP address as well. With the IP address and password in hand, we're ready to get started. For this example we'll assume that the IP is 12.34.56.78.
Open your terminal and let's SSH to the server so we can begin:
$ ssh root@12.34.56.78
You may receive a security warning about the RSA key. If so, type yes and then hit enter. When prompted, enter your password. You should now be logged in to the server and ready to get started.
Next, let's give our server a unique name. It can be anything:
$ echo "HOSTNAME=plato" >> /etc/sysconfig/network
$ hostname "plato"
Now add a fully qualified domain name in /etc/hosts. You'll probably want to use your hostname plus your primary domain name, like so:
12.34.56.78 plato.example.com plato
# you may also wish to add your ipv6
Be sure to add an A record to your DNS that points plato.example.com to your server's IP address.
Finally set the server timezone. We'll use UTC time:
$ ln -sf /usr/share/zoneinfo/UTC /etc/localtime
Next Steps
- Securing the Server
- Installing Packages
- Starting the Server
- Apache Virtual Hosts
- Postfix Email Forwarding