Project

General

Profile

Install phpMyAdmin shared » History » Version 1

Anchi Cheng, 02/06/2014 02:03 PM

1 1 Anchi Cheng
h1. Install phpMyAdmin
2
3
4
You are not required to install phpMyAdmin for Appion or Leginon, however, it is a useful tool for interfacing with the mysql databases. 
5
6
h2. Install supporting packages
7
8
|_.Name:|_.Download site:|_.yum package name|_.SuSE rpm name|
9
|PHP|http://php.net/downloads.php |php||
10
|php-mysql| |php-mysql||
11
12
h2. Install phpMyAdmin
13
14
If you have not already installed phpMyAdmin, do so. The yum installation is:
15
<pre>
16
sudo yum -y install phpMyAdmin
17
</pre>
18
19
h2. Configure phpMyAdmin
20
21
Edit the phpMyAdmin config file @/etc/phpMyAdmin/config.inc.php@ and change the following lines:
22
23
<pre>
24
sudo nano /etc/phpMyAdmin/config.inc.php
25
</pre>
26
27
<pre>
28
$cfg['Servers'][$i]['AllowRoot']     = FALSE;
29
$cfg['Servers'][$i]['host']          = 'mysqlserver.INSTITUTE.EDU';
30
</pre>
31
32
Edit the phpMyAdmin apache config file @/etc/httpd/conf.d/phpMyAdmin.conf@ and change the following lines:
33
34
<pre>
35
sudo nano /etc/httpd/conf.d/phpMyAdmin.conf
36
</pre>
37
38
<pre>
39
<Directory /usr/share/phpMyAdmin/>
40
   order deny,allow
41
   deny from all
42
   allow from 127.0.0.1
43
   allow from YOUR_IP_ADDRESS
44
</Directory>
45
</pre>
46
47
*Note:* If you want to access phpMyAdmin from another computer, you can also add it to this config file with an @allow from@ tag
48
49
h2. Restart Web Server
50
51
Next restart the web server to take on the new setting
52
<pre>
53
sudo /sbin/service httpd restart
54
</pre>
55
56
h2. Test the configuration
57
58
To test the phpMyAdmin configuration, point your browser to http://YOUR_IP_ADDRESS/phpMyAdmin or http://localhost/phpMyAdmin and login with the usr_object user.
59
60
!http://emg.nysbc.org/attachments/177/phpMyAdmin.png!
61
62
A common problem is that the firewall may be blocking access to the web server and mysql server. On CentOS/Fedora you can configure this with the system config:
63
64
<pre>
65
system-config-securitylevel
66
</pre>
67
68
Firewall configuration is specific to different Unix distributions, so consult a guide on how to do this on non-RedHat machines.