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:
If you have 64-bit version installed, you should try this one out:
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:
and then continue installing phpmyadmin
It should ask you for confirmation and you can continue installing phpMyAdmin with dependencies.
When installation is done, you can edit /etc/httpd/conf.d/phpmyadmin.conf and allow it to be opened from anywhere and not just the same computer. You are going to need this if you have installed it in a remote virtual server.
To do so, open up /etc/httpd/conf.d/phpmyadmin.conf using:
You will see:
Just change the line “Allow from 127.0.0.1″ to “Allow from [yourip]“, where [yourip] is IP address of your computer if you have public static IP. Otherwise, you can also set it to “Allow from all”.
Press Ctrl+O followed by Enter to save and Ctrl+X to exit nano.
Now, you must restart apache. To do so, run
Now, you can access phpMyAdmin by visiting http://vps_server_IP_or_domain/phpmyadmin. But you will get the following error:
Find a line saying:
Fill in any secret keyword there, eg mysecretpassphrase, so that it looks like:
and then save it.
If you don’t have mysql server installed, you will get the following error:
and then start it:
Then change the root password:
Now, you will have to remove phpmyadmin:
and reinstall it again:
Then you will need to edit the config.inc.php again to enter blowfish secret (see above). Then, you can login.
If however, you want phpMyAdmin to connect to a remote server, you can change the line by replacing localhost with your server IP:
Hope this helps.
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
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
After that, you may like to update your packages by doing this:
yum update
yum install phpmyadmin
When installation is done, you can edit /etc/httpd/conf.d/phpmyadmin.conf and allow it to be opened from anywhere and not just the same computer. You are going to need this if you have installed it in a remote virtual server.
To do so, open up /etc/httpd/conf.d/phpmyadmin.conf using:
nano /etc/httpd/conf.d/phpmyadmin.conf
<Directory "/usr/share/phpmyadmin"> Order Deny,Allow Deny from all Allow from 127.0.0.1 </Directory>
Press Ctrl+O followed by Enter to save and Ctrl+X to exit nano.
Now, you must restart apache. To do so, run
service httpd restart
ErrorTo make it work, you will need to edit config.inc.php. To do so, type in:
The configuration file now needs a secret passphrase (blowfish_secret).
nano /usr/share/phpmyadmin/config.inc.php
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
$cfg['blowfish_secret'] = 'mysecretpassphrase'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
If you don’t have mysql server installed, you will get the following error:
ErrorTo install mysql-server, just run:
#2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)
yum install mysql-server
service mysqld start
mysqladmin -u root password PASSWORD_HERE
yum remove phpmyadmin
yum install phpmyadmin
If however, you want phpMyAdmin to connect to a remote server, you can change the line by replacing localhost with your server IP:
$cfg['Servers'][$i]['host'] = 'localhost';
No comments:
Post a Comment