<?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>Kleinsch &#187; wordpress</title>
	<atom:link href="http://kleinsch.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://kleinsch.com</link>
	<description>Nick Kleinschmidt&#039;s Blog</description>
	<lastBuildDate>Wed, 14 Jul 2010 13:19:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting up WordPress on Debian 5.0</title>
		<link>http://kleinsch.com/2009/08/01/setting-up-wordpress-on-debian-5-0/</link>
		<comments>http://kleinsch.com/2009/08/01/setting-up-wordpress-on-debian-5-0/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 16:07:45 +0000</pubDate>
		<dc:creator>Nick Kleinschmidt</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://kleinsch.com/?p=6</guid>
		<description><![CDATA[I'll assume you're starting with a stock Debian 5.0 system and have set up sudo access for your account. I'll be using the user nick as my personal user for this setup.

First we need install the prerequisites: Apache, PHP, and MySQL. It'll ask you for a root password for MySQL, make sure you hold onto that. We'll need it later.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll assume you&#8217;re starting with a stock Debian 5.0 system and have set up sudo access for your account. I&#8217;ll be using the user nick as my personal user for this setup.</p>
<p>First we need install the prerequisites: Apache, PHP, and MySQL. It&#8217;ll ask you for a root password for MySQL, make sure you hold onto that. We&#8217;ll need it later.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apache2 mysql-server php5 php5-mysql</pre></div></div>

<p>Now we need to make sure that Apache is configured with the modules needed for Wordpress.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> a2enmod rewrite
<span style="color: #c20cb9; font-weight: bold;">sudo</span> a2enmod php5</pre></div></div>

<p>WordPress uses a MySQL database to store your blog posts and comments, so we need to create a MySQL database for wordpress. MySQL will ask you for the root password you created before. Make sure to save the password you set up for the wordpress user, as this is what WordPress will use to connect to the database.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;">mysql <span style="color: #CC0099;">-</span>u root <span style="color: #CC0099;">-</span>p
<span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">DATABASE</span> <span style="color: #008000;">`wordpress`</span><span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">grant</span> <span style="color: #990099; font-weight: bold;">all</span> <span style="color: #990099; font-weight: bold;">privileges</span> <span style="color: #990099; font-weight: bold;">on</span> <span style="color: #008000;">`wordpress`</span>.<span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">to</span> <span style="color: #008000;">'wordpress'</span>@localhost identified by <span style="color: #008000;">'ANOTHER-PASSWORD'</span><span style="color: #000033;">;</span> 
flush <span style="color: #990099; font-weight: bold;">privileges</span><span style="color: #000033;">;</span></pre></div></div>

<p>Need to set up WordPress with a directory so we can use it. Download WordPress from their <a href="http://wordpress.org/download/">site</a> and stick it in your home directory.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> sites <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> sites
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> ~nick<span style="color: #000000; font-weight: bold;">/</span>wordpress-2.8.2.tar.gz .
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> xzvf wordpress-2.8.2.tar.gz
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">touch</span> wordpress<span style="color: #000000; font-weight: bold;">/</span>.htaccess
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> nick:www-data wordpress
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> g+<span style="color: #c20cb9; font-weight: bold;">w</span> wordpress</pre></div></div>

<p>We changed the group and gave write permissions so WordPress will be able to set up its own config files. We set up the .htaccess file in advance because it&#8217;s easier to let WordPress change it based on the URL settings.</p>
<p>In order to serve the website, we need to set up an Apache Virtual Host. Create a file in /etc/apache/sites-available (mine is kleinsch.com) for your site and add the following code.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VirtualHost</span> *:80<span style="color: #000000; font-weight: bold;">&gt;</span></span>
        ServerName kleinsch.com
        ServerAlias www.kleinsch.com
        ServerAdmin youremail@yourhost.com
        DocumentRoot /var/www/sites/wordpress
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Directory</span> /var/www/sites/wordpress<span style="color: #000000; font-weight: bold;">&gt;</span></span>
                Options FollowSymLinks
                AllowOverride All
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Enable the site within Apache and restart:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> a2ensite kleinsch.com
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache restart</pre></div></div>

<p>You should see no warnings. Open up your browser and navigate to &#8216;http://yoursite.com/wp-admin/install.php&#8217;.</p>
<p>The first page will tell you WordPress needs to create a config file, we want it to do that. On the next page, enter the database information you set up above. Leave the defaults for the encoding and table prefix. Enter a title for your blog, and you&#8217;re up and running!</p>
]]></content:encoded>
			<wfw:commentRss>http://kleinsch.com/2009/08/01/setting-up-wordpress-on-debian-5-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
