::norai.net 
the place to be...

Today is:
Tuesday, January 06 2009
 
Home arrow News and Articles arrow Tools arrow CentOS - installing Apache and PHP5
 
 
 
  :: Main Menu
Home
About norai.net
Events
News and Articles
Feeds and Podcasts
Reader's favourites articles
Downloads
Chat
Web links
Forum and FAQ
Yellow Pages
photo s e l e c t i o n
Gallery
Guestbook
Contact Us
Webmail
- - - - - - -
SHOP
Mobile Photo B L O G
Google Maps cool sites
Login
CB Online
No Users Online
 
CentOS - installing Apache and PHP5 PDF Print E-mail
Written by dani   
Tuesday, 30 September 2008

CentOS - installing Apache and PHP5
(from slicehost.com)

CentOS comes with Apache v.2.2.3 and PHP v.5.1.6 and they are easily installed via the default CentOS Package Manager 'yum'.

The advantage of using yum (as opposed to installing via source code) is that you will get any security updates (if and when distributed) and dependencies are automatically taken care of.


Apache Install

A basic Apache install is very easy:

sudo yum install httpd mod_ssl

ServerName

Oddly, the server does not start automatically when you install it so you have to do this by hand:

sudo /etc/init.d/httpd start

The first thing you will see is this error:

Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name,
using xxxxxx for ServerName

The xxxxxx will be your Slice hostname. It's a good idea to set the ServerName for the next time the server is started.

Open the main apache config:

sudo nano /etc/httpd/conf/httpd.conf

Towards the end of the file you will find a section that starts with 'ServerName' and gives the example:

#ServerName www.example.com:80

All you need to do is enter your Slice hostname or a FQDN:

ServerName demo

Note that my Slice hostname is 'demo'.

Reload Apache:

sudo /etc/init.d/httpd reload

Now the warning has gone. Nice.

Default Page

If you navigate to your Slice IP address:

http://123.45.67.890

You will see the default CentOS Apache welcome screen:

Apache Welcome Screen Listing

I think that's a good start.

PHP5 Install

Let's move on to the PHP5 install. I'm not going to install all the modules available. Just a few common ones so you get the idea.

As before, due to using yum to install PHP5, any dependencies are taken care of:

sudo yum install php-common php-gd php-mcrypt php-memchache php-mhash php-mysql php-xml

Once done, do a quick Apache reload:

sudo /etc/init.d/httpd reload

Done.

Almost

Well, almost done.

We do need to configure Apache for our setup so we can host multiple sites and so on.





Digg!Reddit!Del.icio.us!Google!Live!Facebook!Slashdot!Netscape!Technorati!StumbleUpon!Spurl!Wists!Simpy!Newsvine!Blinklist!Furl!Fark!Blogmarks!Yahoo!Smarking!Netvouz!Shadows!RawSugar!Ma.gnolia!PlugIM!Squidoo!BlogMemes!FeedMeLinks!BlinkBits!Tailrank!linkaGoGo!Free social bookmarking plugins and extensions for Joomla! websites! title=

Quote this article on your site | Views: 148

Be first to comment this article
RSS comments

Write Comment
  • Please keep the topic of messages relevant to the subject of the article.
  • Personal verbal attacks will be deleted.
  • Please don't use comments to plug your web site. Such material will be removed.
  • Just ensure to *Refresh* your browser for a new security code to be displayed prior to clicking on the 'Send' button.
  • Keep in mind that the above process only applies if you simply entered the wrong security code.
Name:
E-mail
Homepage
Title:
BBCode:Web AddressEmail AddressBold TextItalic TextUnderlined TextQuoteCodeOpen ListList ItemClose List
Comment:



Code:* Code
I wish to be contacted by email regarding additional comments

Powered by AkoComment Tweaked Special Edition v.1.4.6
AkoComment © Copyright 2004 by Arthur Konze - www.mamboportal.com
All right reserved

 
< Prev   Next >


 

Latest News
Last comments
Ski Rando
Tes photos sont vraiment superbes! Y-a-t-il du nouveau pour...
12/03/07 08:27 More...
By Dominique de Jonge

::sitebar::
cool
This is really cool
04/03/07 14:20 More...
By dani

Latest forum posts
Popular
 
norai.net is powered by mambo open soruce