LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 06-17-2013, 06:05 PM   #1
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 385

Rep: Reputation: Disabled
Best way to install Apache on Centos 6


I am installing MySQL, Apache, and PHP on a new Centos 6.4 server.

For MySQL, you have three choices. Using "yum install mysql" along with Centos's repository is the simplest, but installs a very old version. Or you can go with "official" documentation at MySQL.com, but it has a few gotchas. The following seems like the best of both worlds.
Code:
# yum install MySQL-shared-5.6.11-2.el6.x86_64.rpm
# yum install MySQL-shared-compat-5.6.11-2.el6.x86_64.rpm
# yum install MySQL-server-5.6.11-2.el6.x86_64.rpm 
# yum install MySQL-client-5.6.11-2.el.x86_64.rpm
As for PHP, I think compiling from source is the way to go as it allows for flexibility.

In regards to Apache, I would like your opinions which way would be best, and why:
  1. Use yum along with Cento's repository.
  2. Install using rmp. If so, will the way I did MySQL work?
  3. Install by source.

Thanks
 
Old 06-17-2013, 06:36 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,805

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
Quote:
As for PHP, I think compiling from source is the way to go as it allows for flexibility.
Be advised that neither rpm nor yum will be able to update PHP if you install from source. The same applies to any package installed from source on an rpm based system.

Quote:
In regards to Apache, I would like your opinions which way would be best, and why:
1. Use yum along with Cento's repository.
2. Install using rmp. If so, will the way I did MySQL work?
3. Install by source.
Use yum to install from the CentOS repo. If you want to upgrade to a later version, which is also in the repo, you can specify the version number in your yum command.

This example for MySQL also applies to Apache:
Quote:
Use yum to upgrade to the version number you want.

yum upgrade mysql-14.14

Check the dependencies list before hitting Y. You might need to add other packages to the upgrade list
 
Old 06-17-2013, 06:51 PM   #3
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 385

Original Poster
Rep: Reputation: Disabled
Thanks bigrigdriver,

The problem as I see it is Centos is not very diligent on upgrading their servers. It appears that the latest versions are PHP 5.3.3.22, MySQL 5.1.69, and Apache 2.2.155. I suppose I can start seaching for other repos, but don't know if I am confortable doing so.

Am I missing something?

Code:
[root@centosBox Downloads]# yum list available | grep httpd
httpd-devel.i686                           2.2.15-28.el6.centos         updates 
httpd-manual.noarch                        2.2.15-28.el6.centos         updates 
lighttpd.x86_64                            1.4.28-2.el6.rf              rpmforge
lighttpd-fastcgi.x86_64                    1.4.28-2.el6.rf              rpmforge
lighttpd-mod_mysql_vhost.x86_64            1.4.28-2.el6.rf              rpmforge
[root@centosBox Downloads]# yum list available | grep mysql
apr-util-mysql.x86_64                      1.3.9-3.el6_0.1              base    
bacula-director-mysql.x86_64               5.0.0-12.el6                 base    
bacula-storage-mysql.x86_64                5.0.0-12.el6                 base    
dovecot-mysql.x86_64                       1:2.0.9-5.el6                base    
freeradius-mysql.x86_64                    2.1.12-4.el6_3               base    
icinga-idoutils-libdbi-mysql.x86_64        1.8.4-4.el6.rf               rpmforge
libdbi-dbd-mysql.x86_64                    0.8.3-5.1.el6                base    
lighttpd-mod_mysql_vhost.x86_64            1.4.28-2.el6.rf              rpmforge
mod_auth_mysql.x86_64                      1:3.0.0-11.el6_0.1           base    
mysql.x86_64                               5.1.69-1.el6_4               updates 
mysql-bench.x86_64                         5.1.69-1.el6_4               updates 
mysql-connector-java.noarch                1:5.1.17-6.el6               base    
mysql-connector-odbc.x86_64                5.1.5r1144-7.el6             base    
mysql-devel.i686                           5.1.69-1.el6_4               updates 
mysql-devel.x86_64                         5.1.69-1.el6_4               updates 
mysql-embedded.i686                        5.1.69-1.el6_4               updates 
mysql-embedded.x86_64                      5.1.69-1.el6_4               updates 
mysql-embedded-devel.i686                  5.1.69-1.el6_4               updates 
mysql-embedded-devel.x86_64                5.1.69-1.el6_4               updates 
mysql-libs.i686                            5.1.69-1.el6_4               updates 
mysql-libs.x86_64                          5.1.69-1.el6_4               updates 
mysql-server.x86_64                        5.1.69-1.el6_4               updates 
mysql-test.x86_64                          5.1.69-1.el6_4               updates 
perl-Class-DBI-mysql.noarch                1.00-1.el6.rf                rpmforge
php-mysql.x86_64                           5.3.3-22.el6                 base    
php-pecl-session_mysql.x86_64              1.9-2.el6.rf                 rpmforge
proftpd-mysql.x86_64                       1.3.4a-1.el6.rf              rpmforge
qt-mysql.i686                              1:4.6.2-26.el6_4             updates 
qt-mysql.x86_64                            1:4.6.2-26.el6_4             updates 
rsyslog-mysql.x86_64                       5.8.10-6.el6                 base    
[root@centosBox Downloads]# yum list available | grep php
cups-php.x86_64                            1:1.4.2-50.el6_4.4           updates 
graphviz-php.x86_64                        2.26.0-10.el6                base    
mod_suphp.x86_64                           0.7.1-1.el6.rf               rpmforge
php.x86_64                                 5.3.3-22.el6                 base    
php-acid.noarch                            0.9.6b22-1.2.el6.rf          rpmforge
php-adodb.noarch                           4.81-1.el6.rf                rpmforge
php-bcmath.x86_64                          5.3.3-22.el6                 base    
php-cli.x86_64                             5.3.3-22.el6                 base    
php-common.x86_64                          5.3.3-22.el6                 base    
php-dba.x86_64                             5.3.3-22.el6                 base    
php-devel.x86_64                           5.3.3-22.el6                 base    
php-embedded.x86_64                        5.3.3-22.el6                 base    
php-enchant.x86_64                         5.3.3-22.el6                 base    
php-fpm.x86_64                             5.3.3-22.el6                 base    
php-gd.x86_64                              5.3.3-22.el6                 base    
php-imap.x86_64                            5.3.3-22.el6                 base    
php-intl.x86_64                            5.3.3-22.el6                 base    
php-jpgraph.noarch                         1.19-1.2.el6.rf              rpmforge
php-jpgraph-docs.noarch                    1.19-1.2.el6.rf              rpmforge
php-ldap.x86_64                            5.3.3-22.el6                 base    
php-mbstring.x86_64                        5.3.3-22.el6                 base    
php-mcrypt.x86_64                          5.3.3-1.el6.rf               rpmforge
php-mysql.x86_64                           5.3.3-22.el6                 base    
php-odbc.x86_64                            5.3.3-22.el6                 base    
php-pdo.x86_64                             5.3.3-22.el6                 base    
php-pear.noarch                            1:1.9.4-4.el6                base    
php-pear-db.noarch                         1.7.13-2.el6.rf              rpmforge
php-pecl-apc.x86_64                        3.1.9-2.el6                  base    
php-pecl-apc-devel.x86_64                  3.1.9-2.el6                  base    
php-pecl-fileinfo.x86_64                   1.0.4-2.el6.rf               rpmforge
php-pecl-http.x86_64                       1.6.5-2.el6.rf               rpmforge
php-pecl-mailparse.x86_64                  2.1.5-2.el6.rf               rpmforge
php-pecl-memcache.x86_64                   3.0.5-4.el6                  base    
php-pecl-session_mysql.x86_64              1.9-2.el6.rf                 rpmforge
php-pgsql.x86_64                           5.3.3-22.el6                 base    
php-process.x86_64                         5.3.3-22.el6                 base    
php-pspell.x86_64                          5.3.3-22.el6                 base    
php-recode.x86_64                          5.3.3-22.el6                 base    
php-snmp.x86_64                            5.3.3-22.el6                 base    
php-soap.x86_64                            5.3.3-22.el6                 base    
php-tidy.x86_64                            5.3.3-22.el6                 base    
php-xcache.x86_64                          1.3.2-1.el6.rf               rpmforge
php-xml.x86_64                             5.3.3-22.el6                 base    
php-xmlrpc.x86_64                          5.3.3-22.el6                 base    
php-zts.x86_64                             5.3.3-22.el6                 base    
phpMyAdmin.noarch                          3.5.7-1.el6.rf               rpmforge
phpmyadmin.noarch                          2.11.11.3-2.el6.rf           rpmforge
rrdtool-php.x86_64                         1.3.8-6.el6                  base    
uuid-php.x86_64                            1.6.1-10.el6                 base    
[root@centosBox Downloads]#
 
Old 06-17-2013, 07:17 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Unless you NEED (not want) the absolute latest, go with the Centos repo versions.
Otherwise you risk breaking dependencies & other issues.
Note that RedHat (Centos is a free rebuild) does actually backport fixes from newer versions, hence the long version strings.
You can always check the release notes if you absolutely require something you think isn't there in the base version.
 
Old 06-17-2013, 07:36 PM   #5
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 385

Original Poster
Rep: Reputation: Disabled
Thanks chrism01,

Sometimes with PHP I need some new feature. As for the other two, I don't necessarily need the latest, but don't want any security holes either.

Apache httpd 2.2.15 was released on 2010-03-07 15:08. There appears to be a whole string of patches to address security concerns. I am new to all this, but have some concerns of using such an old platform. Should I not be?

As for MySQL, does my use of yum on the rpm package not protect against breaking dependencies & other issues? Probably not, but you can't blame for for hoping!

Also, back to Apache, will creating an RPM as described below and using yum to install provide any advantages?

Thanks

Quote:
While many distributions make Apache httpd available as operating system supported packages, it can sometimes be desirable to install and use the canonical version of Apache httpd on these systems, replacing the natively provided versions of the packages.

While the Apache httpd project does not currently create binary RPMs for the various distributions out there, it is easy to build your own binary RPMs from the canonical Apache httpd tarball.

This document explains how to build, install, configure and run Apache httpd 2.4 under Unix systems supporting the RPM packaging format.
Source:http://httpd.apache.org/docs/2.4/platform/rpm.html
 
Old 06-18-2013, 12:03 PM   #6
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,411
Blog Entries: 1

Rep: Reputation: 1115Reputation: 1115Reputation: 1115Reputation: 1115Reputation: 1115Reputation: 1115Reputation: 1115Reputation: 1115Reputation: 1115
Ah. The thing here is that all those security fixes you mentioned are backported to the latest EL httpd package. So, if you have 2.2.15 from RHEL, SL or CENTOS you will find it already has those patches in it.

Proof:

Code:
rpm -q --changelog httpd|head

Last edited by szboardstretcher; 06-18-2013 at 12:05 PM.
 
Old 06-18-2013, 12:41 PM   #7
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 3,229

Rep: Reputation: 825Reputation: 825Reputation: 825Reputation: 825Reputation: 825Reputation: 825Reputation: 825
Quote:
Originally Posted by NotionCommotion View Post
The problem as I see it is Centos is not very diligent on upgrading their servers. It appears that the latest versions are PHP 5.3.3.22, MySQL 5.1.69, and Apache 2.2.155. I suppose I can start seaching for other repos, but don't know if I am confortable doing so.

Am I missing something?
Yes! The whole point of Red Hat (and hence CentOS) is stability. It's not lack of diligence, but deliberate policy: let other people (millions of them) use the software first to make sure it's sound.
 
Old 06-18-2013, 03:07 PM   #8
John VV
Guru
 
Registered: Aug 2005
Posts: 13,531

Rep: Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807
CentOS is a rebuild of RHEL

the major version numbers of programs will NEVER change in the lifetime of RHEL6

NOW red hat is VERY diligent on installing backported SECURITY fixes to updates

though the version of MySQL and Apache and Php might be a bit old ,they DO have the current security and bug fixes applied to them .

Also these versions are VERY well tested !!!
in over 5 years i have only had ONE crash on rhel/cent/sl
and that was 100% MY FAULT !
 
Old 06-18-2013, 11:39 PM   #9
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 385

Original Poster
Rep: Reputation: Disabled
Thanks szboardstretcher, I did find it odd how Apache was such an old version. I am curious on who takes the time applying fixes to older software versions (I assume that is what backported means?), but will take your word on it.

Thanks DavidMcCann and John VV, I was not saying CentOS is not concerned about security, only my limited view (which is undoubtedly wrong) implied they were.
 
Old 06-18-2013, 11:47 PM   #10
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,591

Rep: Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244
Hi,
Quote:
Originally Posted by NotionCommotion View Post
I am curious on who takes the time applying fixes to older software versions
RedHat does for RHEL, and the packages then end up in CentOS. The Debian devs do the same thing for Debian stable.
Quote:
(I assume that is what backported means?),
Yes!
Quote:
but will take your word on it.
No need to: you can read the change logs as shown by szboardstretcher.

If you really do need to use newer versions on some things (eg php), it is worth checking the 3rd party repositories listed at
http://wiki.centos.org/AdditionalResources/Repositories

Cheers,

Evo2.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dokeos install on Centos/apache php problem TheQuicken Linux - Software 3 01-29-2013 03:25 AM
Apache AD/ldap worked with centos 5.6 not with centos 5.8 cnelson Linux - Server 1 07-12-2012 07:47 AM
SSL Apache client certificate - CentOS 5 - How to install ? dlugasx Linux - Server 1 09-23-2010 11:11 AM
How to install kde ,apache mysql php and qt4 in centos krmkrishnan Linux - Newbie 3 07-06-2009 07:46 AM
Apache Error 403 - CentOS 5.2 with Apache 2.2.3 gordymann Linux - Newbie 2 04-08-2009 09:57 AM


All times are GMT -5. The time now is 01:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration