Erik's blog

Code, notes, recipes, general musings

installing Apache MySQL PHP on a CentOS 5.2 VMWare image

leave a comment »

install apache and php

  • ref: http://articles.slicehost.com/2008/2/6/centos-installing-apache-and-php5
  • install apache w/ ssl support:
    sudo yum install httpd mod_ssl
  • launch apache:
    sudo /etc/init.d/httpd start
  • browse to your vm’s address (run ifconfig in the vm if you don’t know the address)
  • if your browser can’t find the address, write an iptable rule to allow access to port 80:
    • ref: http://www.cyberciti.biz/faq/howto-rhel-linux-open-port-using-iptables/
    • open the iptable definition file:
      vi /etc/sysconfig/iptables
    • plug in the new rule:
      -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT 
    • note: the leading ‘-‘ in the rule is intentional
    • restart the iptables process:
      /etc/init.d/iptables restart
  • install php:
    sudo yum install php-common php-gd php-mcrypt php-pear php-pecl-memcache php-mhash php-mysql php-xml
  • reload apache:
    sudo /etc/init.d/httpd reload

set up mysql

upgrade beyond stock centos support so we can get php version > 5.2.2, which is required for phpmyadmin

install phpmyadmin

related post: running a CentOS 5.2 server using VMWare on Mac OS X 10.5

Advertisements

Written by Erik

May 5, 2009 at 9:48 pm

Posted in tutorial

Tagged with , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: