Installing Apache, MySQL, PHP in CentOS 5.5 on Rackspace Cloud

Hits: 28185  

Most of cloud users prefer Rackspace Cloud for its better service and cost effectiveness…
All commands are performed as root to install Apache, MySQL, PHP in CentOS 5.5 Server on Rackspace Cloud.

Install Apache

# sudo yum install httpd mod_ssl

Configure ServerName
# sudo /etc/init.d/httpd start

Remove Error
Starting httpd: httpd: Could not reliably determine the server’s fully qualified domain name, using for ServerName

# sudo vi /etc/httpd/conf/httpd.conf

Add server name after #ServerName

ServerName svnlabs

# sudo /etc/init.d/httpd reload

By default port 80 is blocked on server, enable in iptables…
# iptables -I RH-Firewall-1-INPUT -p tcp –dport 80 -j ACCEPT

Chkconfig to start automatically if the Cloud Server is rebooted.

# sudo /sbin/chkconfig httpd on

Install MySQL

# yum install mysql-server
# /etc/init.d/mysqld start

Install PHP

Edit Repo file
# sudo vi /etc/yum.repos.d/CentOS-Base.repo

add at last

name=CentOS-5 Testing

now run
# yum install php php-common php-gd php-mcrypt php-pear php-pecl-memcache php-mhash php-mysql php-xml php-mbstring

Install PhpMyAdmin

# cd /var/www/html
# wget

# tar zxvf phpMyAdmin-3.3.6-english.tar.gz
# mv phpMyAdmin-3.3.6-english phpmyadmin
# cd phpmyadmin
# cp

Edit for random string $cfg[‘blowfish_secret’] = ‘RandomStringHere’;

Restart server
# service httpd restart

Comparison between Amazon Cloud & Rackspace Cloud … Coming Soon 😉

Published by

Sandeep Verma

I’m an Entrepreneur. I’m proud to work as Blogger, LAMP Programmer, Linux Admin, Web Consultant, Cloud Manager, Apps Developer, Searcher. Concentrate > Observe > Imagine > Launch

  • fract

    Amazing, thanks! 

    The iptables didn’t work for me though, I had to open the file and make changes THEN source it like twice

  • Sandeep Verma

    Please check iptables service is running 😉

  • Wonder Newbie

    I used the following: 
    iptables -I INPUT -p tcp –dport 80 -j ACCEPT

  • Wonder Newbie

    I used the following: 
    iptables -I INPUT -p tcp –dport 80 -j ACCEPT

  • Girendra Persaud

    YUP iptable command is
    iptables -I INPUT -p tcp –dport 80 -j ACCEPT