<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tech Trivia &#187; PHP</title>
	<atom:link href="http://www.alethe.com/brad/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alethe.com/brad</link>
	<description>For those who know just enough to be dangerous</description>
	<lastBuildDate>Sun, 28 Feb 2010 04:45:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Install phpMyAdmin</title>
		<link>http://www.alethe.com/brad/2008/02/install-phpmyadmin/</link>
		<comments>http://www.alethe.com/brad/2008/02/install-phpmyadmin/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 03:01:13 +0000</pubDate>
		<dc:creator>Brad</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.alethe.com/brad/?p=38</guid>
		<description><![CDATA[phpMyAdmin is web-based PHP application for managing MySQL databases. It is fairly easy to install and configure. Download the latest stable version from the phpMyAdmin web site, and extract it to a location of your choice. I prefer to keep the installation outside of the web root and use an apache alias to reference it. [...]]]></description>
			<content:encoded><![CDATA[<p>phpMyAdmin is web-based PHP application for managing MySQL databases.  It is fairly easy to install and configure.</p>
<p>Download the latest stable version from the <a href="http://www.phpmyadmin.net">phpMyAdmin web site</a>, and extract it to a location of your choice.  I prefer to keep the installation outside of the web root and use an apache alias to reference it.<br />
<span id="more-38"></span><br />
<code>[root@app3 ~]# cd /var/www<br />
[root@app3 ~]# wget http://superb-west.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.11.5.2-all-languages-utf-8-only.tar.gz<br />
[root@app3 ~]# tar xzf phpMyAdmin-2.11.5.2-all-languages-utf-8-only.tar.gz<br />
</code><br />
Now that&#8217;s a lengthy directory name!  Let&#8217;s create a link to that directory with a more friendly name.<br />
<code><br />
[root@app3 ~]# ln -s phpMyAdmin-2.11.5.2-all-languages-utf-8-only phpMyAdmin<br />
</code></p>
<p>SELinux may generate a number of errors regarding this new directory that will be referenced by the apache web server.  Let&#8217;s correct the security context of the entire phpMyAdmin directory structure.<br />
<code><br />
[root@app3 ~]# chcon -R -h -t httpd_sys_content_t \<br />
> phpMyAdmin-2.11.5.2-all-languages-utf-8-only<br />
</code></p>
<p>Configure the phpMyAdmin installation to use http authentication.  We&#8217;ll make sure it is secure by forcing SSL encryption using apache directives in a later step.<br />
<code><br />
[root@app3 ~]# cd phpMyAdmin<br />
[root@app3 ~]# cp config.sample.inc.php config.inc.php<br />
[root@app3 ~]# vi config.inc.php<br />
</code></p>
<p>Change the line:<br />
<code>$cfg['Servers'][$i]['auth_type'] = 'cookie';</code><br />
to:<br />
<code>$cfg['Servers'][$i]['auth_type'] = 'http';</code></p>
<p>Now we need to configure the apache web server.  To keep things modular, create a file <code>phpmyadmin.conf</code> in <code>/etc/httpd/conf.d</code>.  Any configuration directives in this file will automatically be loaded into the main apache configuration when the daemon is restarted.<br />
<code><br />
[root@app3 ~]# vi /etc/httpd/conf.d/phpmyadmin.conf<br />
</code></p>
<p>The <code>phpmyadmin.conf</code> file should contain the following directives.  Just modify the paths to suit your installation.<br />
<code></p>
<pre>
Alias /phpmyadmin /var/www/phpMyAdmin
&lt;Directory "/var/www/phpMyAdmin"&gt;
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    SSLRequireSSL
&lt;/Directory&gt;
</pre>
<p></code></p>
<p>Restart apache and see if your installation works.<br />
<code><br />
[root@app3 ~]# service httpd restart<br />
</code></p>
<p>If there are problems, check your logs.  It is possible that SELinux may be complaining about something.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alethe.com/brad/2008/02/install-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
