<?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>Fried Pancakes &#187; mysql</title>
	<atom:link href="http://blog.friedpancakes.com/index.php/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.friedpancakes.com</link>
	<description>A pancake approach to computers and technology</description>
	<lastBuildDate>Thu, 03 Dec 2009 19:20:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting up WordPress on FreeBSD with lighttpd</title>
		<link>http://blog.friedpancakes.com/index.php/2009/06/28/setting-up-wordpress-on-freebsd-with-lighttpd/</link>
		<comments>http://blog.friedpancakes.com/index.php/2009/06/28/setting-up-wordpress-on-freebsd-with-lighttpd/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 23:03:16 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.friedpancakes.com/?p=8</guid>
		<description><![CDATA[I would first like to start off by thanking Mark at RootBSD for hooking me up with a sweet FreeBSD VPS!  Their customer service is top-notch.  Prices are unbeatable.  And best of all&#8230; I get an clean untouched installation of FreeBSD.
Please note these instructions are only validated under FreeBSD 7.0-RELEASE and PHP5.
Grabbing [...]]]></description>
			<content:encoded><![CDATA[<p>I would first like to start off by thanking Mark at <a href="http://www.rootbsd.net">RootBSD</a> for hooking me up with a sweet FreeBSD VPS!  Their customer service is top-notch.  Prices are unbeatable.  And best of all&#8230; I get an clean untouched installation of FreeBSD.</p>
<p>Please note these instructions are only validated under FreeBSD 7.0-RELEASE and PHP5.</p>
<p><strong>Grabbing the right packages</strong></p>
<p>Install lighttpd:</p>
<pre># cd /usr/ports/www/lighttpd/ &amp;&amp; make install clean</pre>
<p>Install mysql51-server</p>
<pre># cd /usr/ports/databases/mysql51-server/ &#038;&#038; make install clean</pre>
<p>Install PHP5</p>
<pre># cd /usr/ports/lang/php5 &#038;&#038; make install clean</pre>
<p>Install PHP5-MySQL</p>
<pre># cd /usr/ports/databases/php5-mysql &#038;&#038; make install clean</pre>
<p><strong>Configuring lighttpd</strong></p>
<p>Make changes <code>/usr/local/etc/lighttpd.conf</code> with your favorite editor</p>
<p>Setup your lighttpd configuration as you like; I created a virtual host so I could have blog.friedpancakes.com:</p>
<pre>
$HTTP["host"] == "blog.friedpancakes.com" {</br>
        server.document-root = "/var/www/data/blog.friedpancakes.com"
}
</pre>
<p>That&#8217;s not all.  In order for lighttpd to handle PHP properly, fastcgi needs to be configured properly.</p>
<p>Continue editing lighttpd.conf:</p>
<p>Enable <code>mod_fastcgi</code> at the top by uncommenting the line at the top of the lighttpd configuration file.</p>
<p>Before you continue, make sure that you compiled PHP with CGI.</p>
<pre># php-cgi -v</pre>
<p>You should get some feedback from that.  Now if that&#8217;s setup properly, you can continue.</p>
<p>Find the section in the lighttpd configuration file where it says <code>fastcgi.server</code>.  Since WordPress uses PHP, this step is required for lighttpd to handle PHP properly. </p>
<pre>
fastcgi.server             = ( ".php" =>
                              ( "localhost" =>
                                (
                                   "socket" => "/tmp/php-fastcgi.socket",
                                   "bin-path" => "/usr/local/bin/php-cgi"
                                 )
                               )
                            )
</pre>
<p>Ensure that the binary path above is where you have php-cgi.</p>
<p><strong>Setting up MySQL</strong><br />
Open <code>/etc/rc.conf</code> with your preferred editor.  Add the following line:</p>
<pre>mysql_enable="YES"</pre>
<p>This is required to start MySQL.  Now start it up!</p>
<pre># /usr/local/etc/rc.d/mysql-server start</pre>
<p>Proceed to create the database WordPress will use</p>
<pre># mysql -u root</pre>
<pre>
mysql> create database wordpress;
mysql> grant all privileges on wordpress.* to "wordpress"@"localhost" identified by "your password";
mysql> flush privileges;
mysql> exit;
</pre>
<p><strong>WordPress</strong></p>
<p>Now that you have your database setup.  Let&#8217;s get WordPress on the system.  Obviously, make the directories specific to how you configured lighttpd.</p>
<pre>
# cd /var/www
# fetch http://wordpress.org/latest.tar.gz
# tar -xzf latest.tar.gz
# cp -r wordpress/* /var/www/data/blog.friedpancakes.com/
# mv wp-config-sample.php wp-config.php
</pre>
<p><strong>PHP</strong></p>
<p>One last thing needs to be done to get PHP to work.  When you install PHP from the FreeBSD ports tree, you really are getting PHP at its most pure form.  While PCRE is included by default with PHP5, it&#8217;s not in FreeBSD.  So you must install this part separately.</p>
<pre># cd /usr/ports/devel/php5-pcre/ &#038;&#038; make install clean</pre>
<p>And that&#8217;s it!  You should now be able to begin blogging away.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.friedpancakes.com/index.php/2009/06/28/setting-up-wordpress-on-freebsd-with-lighttpd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
