Please help installing Apache to CentOs 5.7

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
C_S_Putra
Posts: 7
Joined: 2012/01/16 05:54:37

Please help installing Apache to CentOs 5.7

Post by C_S_Putra » 2012/01/16 06:26:21

Hi everyone. I am very new to Linux, so please help me solve this simple problem.

I'm installing Apache on CentOs 5.7, I followed instructions here : [url=http://www.if-not-true-then-false.com/2010/install-apache-php-on-fedora-centos-red-hat-rhel/]Install Apache on CentOS[/url]

I've installed this also :

## Remi Dependency on CentOS 5 and Red Hat (RHEL) 5 ##
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm

When I install this, there's warning : /var/tmp/rpm-xfer.Bqu2xo: Header V3 DSA signature: NOKEY, key ID 217521f6

But it says that the package is alread installed.

Then I move on to 3rd steps : yum --enablerepo=remi install httpd php php-common

But it says : error getting repository data for remi, repository not found.

Why is it like that ? Please help. Thanks

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Please help installing Apache to CentOs 5.7

Post by TrevorH » 2012/01/16 08:25:13

That guide is meant for people that require a more recent version of the software than ships out of the box with a CentOS system. For most people this is not required and should not be used. Redhat backport all security fixes from the current releases of the packages to the versions shipped with CentOS and you will obtain those security fixes automatically if you run `yum update` on a regular basis. If you go outside the main software repositories that ship with CentOS and start installing alternative versions of the packages from there then you may not get important security updates when they're made available.

I would be tempted to recommend that you remove any third party repository RPMs that you've added and then just run
[code]
yum install httpd php php-common
[/code]

and you will end up with the latest CentOS versions of those packages - httpd 2.2.3 and php 5.1.6.

C_S_Putra
Posts: 7
Joined: 2012/01/16 05:54:37

Re: Please help installing Apache to CentOs 5.7

Post by C_S_Putra » 2012/01/16 09:05:45

Thanks for the feedback. I've tried yum install httpd php php-common before, but it said :

Setting Up Install Process
No package httpd available
No package php available
No package php-common available
Nothing to do

After trying several times the result was still the same. That's why I decided to follow through that guide though it would be more risky. Do you know why there were no package available ? I'm still very new to Linux and intending to use it in my dedicated server. Thanks

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Please help installing Apache to CentOs 5.7

Post by gerald_clark » 2012/01/16 14:27:48

They are probably already installed.
rpm -q httpd

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Please help installing Apache to CentOs 5.7

Post by pschaff » 2012/01/16 16:36:40

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

If the packages were installed one would expect something like:[code]# yum install httpd php php-common
Loaded plugins: fastestmirror, priorities
...
Setting up Install Process
Package httpd-2.2.3-53.el5.centos.3.x86_64 already installed and latest version
Package php-5.1.6-27.el5_5.3.x86_64 already installed and latest version
Package php-common-5.1.6-27.el5_5.3.x86_64 already installed and latest version
Nothing to do
[/code]

There is a apparently problem with the repository configuration. If more help is needed then, in addition the the information Gerald requested, please [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=28723&forum=54]provide more information about your system[/url] by running "./getinfo.sh package" and showing us the output file.

C_S_Putra
Posts: 7
Joined: 2012/01/16 05:54:37

Re: Please help installing Apache to CentOs 5.7

Post by C_S_Putra » 2012/01/17 02:41:25

Sorry for the late reply. After googling for some time, i found out that there is a file named yum.conf. There is a line written :

exclude = httpd* mysql* php* .. .. .. ..

Then I deleted the http, mysql and php from that exclude line then i run yum install php53

It said error installing httpd because there were file named httpd.conf and magic. So I deleted those two file using rm -f.
Is it harmful to do that manually ?

Then I run yum install httpd and it said :

Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : httpd 1/1
Error unpacking rpm package httpd-2.2.3-53.el5.centos.3.x86_64
error: unpacking of archive failed on file /etc/httpd/logs: cpio: rename

Failed:
httpd.x86_64 0:2.2.3-53.el5.centos.3

Is the error caused by me deleting the files : httpd.conf and magic ? Please advice. Thanks

C_S_Putra
Posts: 7
Joined: 2012/01/16 05:54:37

Re: Please help installing Apache to CentOs 5.7

Post by C_S_Putra » 2012/01/17 02:49:08

And this is the result of getinfo.sh : [url=http://pastebin.centos.org/38271]getinfo.sh result[/url]

C_S_Putra
Posts: 7
Joined: 2012/01/16 05:54:37

Re: Please help installing Apache to CentOs 5.7

Post by C_S_Putra » 2012/01/17 04:19:22

I managed to solve the issue now. And Now I want to install LAMP to my another server. But the other server already has the cPanel installed. Do I still need to install LAMP again ? Will something bad happen if I install the LAMP again though I already have cPanel installed ? Please advice since this is my first experience using linux. Thanks :-)

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Please help installing Apache to CentOs 5.7

Post by gerald_clark » 2012/01/17 14:28:16

Cpanel machines are not supported here. They replace core components with their own.
Since you have edited the repo file and removed the excludes, Cpanel is now broken on that machine also.

Cpanel has its own support channels.

shanna_doll
Posts: 2
Joined: 2012/03/23 09:31:46
Contact:

Re: Please help installing Apache to CentOs 5.7

Post by shanna_doll » 2012/03/23 09:34:02

This is step by step how to install it on CentOS:

webmagz.net/2012/03/how-to-install-webmin-on-vps/

and here are reason for possible httpd errors:

http://webmagz.net/2012/03/php-showing-source-code-instead-rendering-page-fix/

So basically just use yum and don't forget to restart httpd.

Good luck.

Post Reply