Comments on Quick 'n' Easy LAMP Server For CentOS/RHEL

Quick 'n' Easy LAMP Server For CentOS/RHEL This tutorial shows a quick way of installing a LAMP server (Linux + Apache + MySQL + PHP/Perl together commonly known as LAMP Server.) on CentOS and RHEL server systems.

27 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Anonymous

Excelent, works fine to me. Thanks a lots !

By: Anonymous

After installing phpmyadmin I received a 404 until restarting apache (httpd). I assume this is because the phpmyadmin file in httpd/conf.d (which contains the alias to the phpmyadmin folder in usr/share/phpmyadmin) is not loaded until apache is restarted? Is this (correct, and if so) also the case for any file in this folder?

By: LAMP newbie.

Sincere thanks for the walk through.  Everything has worked exactly as described and I now have a functioning LAMP server after many previous failed attempts!  Very happy newbie.

By: ccdan

i have some questions below:

Error: Package: phpmyadmin-2.11.11.3-2.el5.rf.noarch (rpmforge) Requires: php-mcrypt You could try using --skip-broken to work around the problem

 what can i do ?thanks!

By: Anonymous

Finally some success! I've been trying to get a funambol server up and running with lamp on the same machine. This tutorial got me through! Just found a minor typo that I'll point out:

nano /usr/share/phpmyadmin/conf.inc.php should be:

nano /usr/share/phpmyadmin/config.inc.php

Great tutorial! Thanks alot. 

By: znif

The system wont open file named "info.*". Just rename it and anything works fine.

By: Nasim

Hi, I tried to install phpmyadmin on my vps following the command you have shown (yum install phpmyadmin), its running on centos. I have also tried with other commands enableing repo. But still no luck. Getting following error:

 

 k
    self.doSetup()
  File "/usr/lib/python2.4/site-packages/yum/repos.py", line 71, in doSetup
    self.ayum.plugins.run('postreposetup')
  File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 176, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/fastestmirror.py", line 181, in postreposetup_hook
    all_urls = FastestMirror(all_urls).get_mirrorlist()
  File "/usr/lib/yum-plugins/fastestmirror.py", line 333, in get_mirrorlist
    self._poll_mirrors()
  File "/usr/lib/yum-plugins/fastestmirror.py", line 376, in _poll_mirrors
    pollThread.start()
  File "/usr/lib/python2.4/threading.py", line 416, in start
    _start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread

 

By: andres

Hi i have a question,

 I have created the test.php file into the html folder but whenever I open the browser it doesn´t show anything the page is in blank....I don´t know if the file is wrong or is there another problem?

 

I created a new document in the html folder by making right click and selecting Create Document then I chose Empty File and then I change the name as "test.php"  and it appears an icon with a symbol of a screwdriver with the .php extension. I open the file and edit it by inserting

<?php phpinfo(); ?> and save it....but when I open the browser with http://localhost/test.php or http://ip of the machine/test.php it just shows the browser in blank.....

 any suggestions?

 Thanks for your help

By: hayson

I had same problem, solved with bash command line: # nano /test.php and used gui to move it to the html folder

By: Anonymous

I could not connect to the apache server remotely to test if php was working. I finally found the problem.

I added this line:

-A RH-Firewall-1-INPUT -m tcp -p tcp --dport 80 -j ACCEPT

 to /etc/sysconfig/iptables ABOVE the REJECT and COMMIT lines:

-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT

This and a 'service iptables restart' fixed my problem.

By: puneetsmail

After editing iptables PHPinfo test works.
But executing service iptables restart ends up with failure.

iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules: iptables-restore: line 7 failed
                                                           [FAILED]
 
 

By: Michael

Great tut, there was the first one to get me started ;-)

By: Anonymous

I follow this instruction step by step.. It goes fine except for

yum install phpmyadmin

did not work in VPS.  I received error that says no package available.

Is there something that I miss?

By: DonO

I am getting the same message regarding "no package available".

 I'm using REL 5.0.

I tried...

yum install phpmyadmin --enablerepo=development

 Which I read in another post, but it also did not work. I also ran

# yum list php*

 To see if it would list phpmyadmin as an option, but it did not.

By: DonO

I am getting the same message regarding "no package available".

 I'm using REL 5.0.

I tried...

yum install phpmyadmin --enablerepo=development

 Which I read in another post, but it also did not work. I also ran

# yum list php*

 To see if it would list phpmyadmin as an option, but it did not.

After some searching, I found this, which worked for me:

# rpm -Uv http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm

(replace the x86_64 with i386 if it's a 32bit system)

# yum install phpMyAdmin

By: Ahmed Alzayani

I wnated newer ver of php,mysql with latest phpmyadmin 3.3.4, turn out you need to use remi repro

 this work for me:

 == httpd server ==
yum install httpd httpd-devel
/etc/init.d/httpd start

==Add Remi Repo==
wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
wget http://rpms.famillecollet.com/el5.i386/remi-release-5-7.el5.remi.noarch.rpm
rpm -Uvh remi-release-5-7.el5.remi.noarch.rpm epel-release-5.3.noarch.rpm

==install mysql===
yum --enablerepo remi install mysql mysql-server mysql-devel
/etc/init.d/mysqld start


==config mysql==
mysql

mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('newpassword') WHERE user='root';
mysql> FLUSH PRIVILEGES;

mysql -u root -p
Enter Password: <your new password>

==Install PHP==
yum --enablerepo
remi install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml

/etc/init.d/httpd restart

==Install PHPmyadmin (http://www.phpmyadmin.net/documentation/)==
cd /var/www/html/
wget http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.4/phpMyAdmin-3.3.4-all-languages.tar.gz?use_mirror=internode&ts=1279443739
tar -xzvf phpMyAdmin-3.3.4-english
mv phpMyAdmin-3.3.4-english phpmyadmin

configtr as per http://www.phpmyadmin.net/documentation/

==Last==
chkconfig httpd on
chkconfig mysqld on

By: joelski

php needs update from 5.1 to 5.2 for latest phpmyadmin, this link is very helpful

http://wiki.centos.org/HowTos/PHP_5.1_To_5.2

By: Gautam

Brilliant tutorial !!!

By: Anonymous

Still quite useful!  Thanks!

By: Allan Anderson

I am once again using your blog on installing lamp on Centos5 which works great and I really appreciate you putting it up for us newbies.  Unfortunately Your install for Webmin and Phpmyadmin do not work for Centos5 on your blog.

I then have to go to Matts  Blog to install Webmin and

Then I go to Khattam's Blog   To install PHPmyadmin.

I have told many newbies to see your Lamp  install and If you would have time I would love to see it updated.

Im not Complaining about anything but it would be good to send a newbie to your blog and not have them come back and say they can not get it all to work.

Just a FYI

Allan

By: Dan

I am using CentOS 5 in one of my Virtual Servers and I wanted it to have phpMyAdmin. I tried installing it by doing yum install phpmyadmin but it said No package phpmyadmin available. So I add to add a repo. I discovered that rpmforge repo had this package. To add it, I executed the following commands:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
rpm -Uhv rpmforge-release-0.5.1-1.el5.rf.i386.rpm

If you have 64-bit version installed, you should try this one out:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
rpm -Uhv rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm

If you get a 404 Not Found, then you will need to figure out the latest updated version of repo url from rpmforge usage page.

After that, you may like to update your packages by doing this:

yum update

and then continue installing phpmyadmin

yum install phpmyadmin

It should ask you for confirmation and you can continue installing phpMyAdmin with dependencies.

By: geo

I have used this several times a do appreciate it.  It makes things so simple.  I found one problem this time that I think is likely due to a change in PHPMyAdmin.  In the blowfish secret you suggest editing the password in /usr/share/phpmyadmin/conf.inc.php.  It appears that there is a slight change in the file name.  It seems to now be /usr/share/phpmyadmin/config.inc.php.  Looks like conf.inc.php has changed to config.inc.php.   Everything else worked like a charm.

 I have set a LAMP server up from time to time when trying to expeirement with different things.  And I think this is my 3rd or 4th time using this step by step.  Each time it has worked great.  This is the first time I have ran into even the slightest glitch - and that is a pretty minor one. 

 

Thanks for a great step-by-step. 

Geo

By: Anonymous

Hi,

 PhpMyAdmin no longer ships with RHEL6.  Sadly RedHatNetwork does not have it in their repo.  ( Wonders why we pay for this...)

# yum install phpmyadmin
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
No package phpmyadmin available.
Error: Nothing to do
# yum repolist
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
repo id                                                repo name                                                                                   status
rhel-x86_64-server-6                                   Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64)                                    5,557
repolist: 5,557
 

By: Michael Reed

Very concise and easy.  I wish I had this the first time I created a LAMP server!

By: Anonymous

This helped me out a lot. Thank you!

By: Anonymous

If you can't find this with yum, consider adding epel to your repolist.

 # find and download the latest rpm from: http://fedoraproject.org/wiki/EPEL

su -

wget http://mirrors.ukfast.co.uk/sites/dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm

# install it..

rpm -ivh epel-release-6-7.noarch.rpm

# and check it is there..

yum repolist


By: Kazi

Getting this error message

 

An Error Occurred Undefined index: mail

If you believe this is an error that shouldn't happen, please send this error report to Gurock Software. You can optionally enter your email address below and a Gurock Software support engineer will contact you shortly.