Skip to Main Content

Configure a CentOS 6.4 Web Server on Rackspace - Part 2: Installing Packages

We'll need to install the various pieces of software. The easiest way to do that is with the yum package manager. After entering each yum command you will be asked to confirm the installation by typing the y key and pressing enter.

First, let's update the OS and any preinstalled packages. Notice we now have to use the sudo command to run system admin tasks. You will be prompted for your password when using sudo.

$ sudo yum -y update

Next, I'm going to add the Extra Packages for Enterprise Linux 6 (EPEL) repository. This is not required, but EPEL has additional packages that I want (e.g. Fail2Ban, phpMyAdmin).

$ curl -L https://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm > epel-release-6-8.noarch.rpm

$ sudo yum -y install epel-release-6-8.noarch.rpm
$ rm -f epel-release-6-8.noarch.rpm

Next let's install a collection of useful developer tools. This includes things like git, subversion, make, and the gcc complier. Most people won't use all of these tools, so you could also install tools individually if you want to be more selective. But we'll take the easy way in this tutorial.

$ sudo yum -y groupinstall 'Development Tools'

You may want to install debugging tools like gdb and valgrind as well. If you're only going to use PHP on the server side you can skip this step.

$ sudo yum -y groupinstall 'Debugging Tools'

Now let's install the Apache web server:

$ sudo yum -y install httpd mod_ssl

You'll probably want PHP, so let's install PHP along with a set of common PHP extensions:

$ sudo yum -y install php php-common

And let's install a few additional useful PHP extensions, including MySQL support, Pear, and mcrypt:

$ sudo yum -y install php-mysql php-pear php-devel php-gd php-pecl-memcache php-pspell php-snmp php-xmlrpc php-xml php-mbstring.x86_64

Finally, we'll add MySQL to complete our LAMP stack:

$ sudo yum -y install mysql mysql-server

Okay, one last thing. We'll need to manage iptables (the CentOS firewall). To make that easier let's install a GUI:

$ sudo yum -y install system-config-firewall-tui system-config-firewall

That's it for software. In the next section we'll get our web server up and running.

Next > Part 3: Starting the Web Server

 

Most RecentRSS

ArchiveRSS

March 2016 (1)
January 2016 (1)
September 2015 (1)
May 2015 (1)
April 2015 (1)
March 2015 (1)
February 2015 (2)
January 2015 (5)
September 2014 (2)
August 2014 (4)
July 2014 (1)
March 2014 (1)
November 2013 (3)
September 2013 (3)
July 2013 (6)
June 2013 (1)
May 2013 (1)
March 2013 (2)
February 2013 (3)
January 2013 (4)