You are on page 1of 4

Install Apache 2.2.15, MySQL 5.5.34 & PHP 5.5.4 on RHEL/ ent!S ".4/5.

# & $e%o&a 1#'12


This howto guide explains youll how to install Apache Server with latest MySQL 5.5.32 and PHP 5.5.0 versions with php required following modules on RHEL 6.4/6.3/6.2/6.1/6.0/5.9/5.8/5.6, Cen !S 6.4/6.3/6.2/6.1/6.0/5.9/5.8/5.6 and "e#$ra 12%13%14%15%16%1&%18%19 systems using Re'( repository via )*' tool. What is Apache?

Apache is an open source freely available HTTP web server that runs on most UNIX-based operating systems as well as on Windows !pache web server is used to serve web pages li"e # htm php pl cgi $s% etc !s per &arch '()'* !pache web server runs on almost "5.24( websites across all the domains
What is MySQL?

MySQL is one of the world+s most popular open source relational database management system #,-.&/% that runs any server by providing multi-user access to multiple databases &y/01 runs with !pache
What is PHP?

PHP #Hyperte2t Preprocessor% is an open source server-side scripting language that is best suited for web development and can be used to produce dynamic web pages for a website
PHP Modules

We are going to install all these following PHP modules in this installation
MySQL (php mysql! " # extension for $%$ appli&ations that use MySQL data'ases. $ostgreSQL (php pgsql! " # extension for $ostgreSQL data'ase for $%$. Mongo() (php pe&l mongo! " # driver for Mongo() data'ase. SQLite (php sqlite! " *xtension for SQLite (ata'ase *ngine. Mem&a&he (php pe&l mem&a&he! " Mem&a&hed &a&hing daemon. Mem&a&hed (php pe&l mem&a&hed! " Mem&a&hed &a&hing daemon.

3- #php-gd% 4 3- e2tension for PHP application to serve graphics X&1 #php-2ml% 4 X&1 Parser for PHP applications &./tring #php-mbstring% 4 &bstring e2tension is used to handle multi-byte string in PHP applications

&5rypt #php-mcrypt% 4 ! &crypt library for PHP scripts !P5 #php-pecl-apc% 4 !P5 module used to optimi6e and cache PHP code 51I #php-cli% 4 5ommand-line interface for PHP P7!, #php-pear% 4 !pplication ,epository framewor" for PHP P-8 #php-pdo% 4 -atabase access module for PHP applications

Step 1: Installing Remi Repository


## Install Remi Repository on Fedora 19, 18, 17, 16, 15 ## rpm -Uvh http://do nload1!rpm"#sion!or$/"ree/"edora/rpm"#sion-"ree-releasesta%le!noar&h!rpm rpm -Uvh http://do nload1!rpm"#sion!or$/non"ree/"edora/rpm"#sion-non"reerelease-sta%le!noar&h!rpm ## Fedora 19 ## # rpm -Uvh http://rpms.famillecollet.com/remi-release-19.rpm ## Fedora 18 ## # rpm -Uvh http://rpms.famillecollet.com/remi-release-18.rpm ## Fedora 17 ## # rpm -Uvh http://rpms.famillecollet.com/remi-release-17.rpm ## Fedora 16 ## # rpm -Uvh http://rpms.famillecollet.com/remi-release-16.rpm ## Fedora 15 ## # rpm -Uvh http://rpms.famillecollet.com/remi-release-15.rpm ## Fedora 1' ## # rpm -Uvh http://rpms.famillecollet.com/remi-release-14.rpm ## Fedora 1( ## # rpm -Uvh http://rpms.famillecollet.com/remi-release-13.rpm ## Fedora 1) ## # rpm -Uvh http://rpms!"amille&ollet!&om/remi-release-1)!rpm ## Install Remi * +pel Repository on R,+-/.ent/0 6!'-6!1 - () 2it ## rpm -Uvh http://do nload!"edorapro3e&t!or$/p#%/epel/6/i(86/epel-release-68!noar&h!rpm rpm -Uvh http://rpms!"amille&ollet!&om/enterprise/remi-release-6!rpm ## Install Remi * +pel Repository on R,+-/.ent/0 6!'-6!1 - 6' 2it ## rpm -Uvh http://do nload!"edorapro3e&t!or$/p#%/epel/6/48656'/epel-release-68!noar&h!rpm rpm -Uvh http://rpms!"amille&ollet!&om/enterprise/remi-release-6!rpm ## Install Remi Repository on R,+-/.ent/0 5!9-5!1 - () 2it ## rpm -Uvh http://dl!"edorapro3e&t!or$/p#%/epel/5/i(86/epel-release-5'!noar&h!rpm rpm -Uvh http://rpms!"amille&ollet!&om/enterprise/remi-release-5!rpm ## Install Remi Repository on R,+-/.ent/0 5!9-5!1 - 6' 2it ##

rpm -Uvh http://dl!"edorapro3e&t!or$/p#%/epel/5/48656'/epel-release-5'!noar&h!rpm rpm -Uvh http://rpms!"amille&ollet!&om/enterprise/remi-release-5!rpm

Step : Installing Apache ! !1"# MySQL "!"!$% & PHP "!"!%


## Installin$ on Fedora 1), 1(, 1', 15, 16, 17, 18, 19 ## # y#m --ena%lerepo6remi install httpd mys7l mys7l-server php php-&ommon ## Installin$ on R,+-/.ent/0 5-6 ## # yum --e a!lerepo"remi#remi-test i stall http$ mys%l mys%l-server php phpcommo

Step $: Installing PHP "!"!% Modules


## Installin$ on Fedora 1), 1(, 1', 15, 16, 17, 18, 19 ## # y#m --ena%lerepo6remi install php-mys7l php-p$s7l php-pe&l-mon$o php-s7lite php-pe&l-mem&a&he php-pe&l-mem&a&hed php-$d php-m%strin$ php-m&rypt php-4ml php-pe&l-ap& php-&li php-pear php-pdo ## Installin$ on R,+-/.ent/0 5-6 ## # y#m --ena%lerepo6remi,remi-test install php-mys7l php-p$s7l php-pe&l-mon$o php-s7lite php-pe&l-mem&a&he php-pe&l-mem&a&hed php-$d php-m%strin$ phpm&rypt php-4ml php-pe&l-ap& php-&li php-pear php-pdo

Step %: Starting'Stopping Apache & MySQL


## +na%le 8pa&he and 9y0:- on R#n--evels ## # &h;&on"i$ --levels )(5 httpd on # &h;&on"i$ --levels )(5 mys7ld on ## 8pa&he .ommands ## # /et&/init!d/httpd start # /et&/init!d/httpd stop # /et&/init!d/httpd stat#s ## 9y0:- .ommands ## # /et&/init!d/mys7ld start # /et&/init!d/mys7ld stop # /et&/init!d/mys7ld stat#s

Step ": (eri)ying Apache ! !1"# MySQL "!"!$% & PHP "!"!%

) 5reate a page called php)n*o.php under your !pache root directory and add the following lines to it 9or e2ample #/+a&/,,,/ht-l/php)n*o.php%
<=php =A phpin"o >?@

' Now access the page via web browser li"e http:;;localhost;phpinfo php <ou will see below screenshot

PHP = = > Preview That+s it? If you are having any trouble installing* let me "now via our comment section

You might also like