<?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>All Things Wright</title>
	<atom:link href="http://sbwright.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://sbwright.com</link>
	<description>I&#039;m happy and Wright.</description>
	<lastBuildDate>Wed, 25 Jan 2012 00:39:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Protected: ssh tunneling, mac osx</title>
		<link>http://sbwright.com/?p=187</link>
		<comments>http://sbwright.com/?p=187#comments</comments>
		<pubDate>Tue, 06 Dec 2011 06:30:44 +0000</pubDate>
		<dc:creator>Steven Wright</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sbwright.com/?p=187</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://sbwright.com/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-187">Password:<br />
<input name="post_password" id="pwbox-187" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://sbwright.com/?feed=rss2&#038;p=187</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website Downtime</title>
		<link>http://sbwright.com/?p=185</link>
		<comments>http://sbwright.com/?p=185#comments</comments>
		<pubDate>Tue, 06 Dec 2011 05:44:58 +0000</pubDate>
		<dc:creator>Steven Wright</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sbwright.com/?p=185</guid>
		<description><![CDATA[For some reason my site went down recently and I didn&#8217;t notice till I was unable to connect. When I ssh&#8217;d in I quickly noticed that my EBS volume had been unmounted. I remounted them and restarted the services and &#8230; <a href="http://sbwright.com/?p=185">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For some reason my site went down recently and I didn&#8217;t notice till I was unable to connect. When I ssh&#8217;d in I quickly noticed that my EBS volume had been unmounted. I remounted them and restarted the services and everything came back. I&#8217;ll be sift through the logs to try and get to the bottom of this.</p>
<p>I finally found an email that amazon sent me telling me they where going to restart my instance. I forgot to mount the EBS volume in my startup script. Problem has been resolved.</p>
]]></content:encoded>
			<wfw:commentRss>http://sbwright.com/?feed=rss2&#038;p=185</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hourly Class Checking</title>
		<link>http://sbwright.com/?p=164</link>
		<comments>http://sbwright.com/?p=164#comments</comments>
		<pubDate>Fri, 25 Nov 2011 19:46:41 +0000</pubDate>
		<dc:creator>Steven Wright</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://sbwright.com/?p=164</guid>
		<description><![CDATA[I have been super busy with college apps lately so this blog has been kinda dead. One of my teachers has the bad habit of updating the class webpage with homework without telling the students and holding us accountable for the work. &#8230; <a href="http://sbwright.com/?p=164">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been super busy with college apps lately so this blog has been kinda dead.</p>
<p>One of my teachers has the bad habit of updating the class webpage with homework without telling the students and holding us accountable for the work. This has caused me frustration in past weeks and I decided I would put it to an end.</p>
<p>I created a little PHP script that would check to see if the site had changed and if so send me an email. There are probably better ways of going about this. What my script does is download the site, compute a hash, and compare it to the hash of the page on file.</p>
<p><a href="http://bit.ly/tvNoaK">Check it out</a>!</p>
<p>Right now it runs hourly on EC2 and should keep me posted on my classes.</p>
]]></content:encoded>
			<wfw:commentRss>http://sbwright.com/?feed=rss2&#038;p=164</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Running WordPress on EC2 (nginx + php-fpm + APC + mysql)</title>
		<link>http://sbwright.com/?p=123</link>
		<comments>http://sbwright.com/?p=123#comments</comments>
		<pubDate>Sun, 30 Oct 2011 22:46:08 +0000</pubDate>
		<dc:creator>Steven Wright</dc:creator>
				<category><![CDATA[*nix]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://sbwright.com/?p=123</guid>
		<description><![CDATA[Wildwood&#8217;s Digital Portfolio project requires building a website to post my work for public consumption. Most students use iweb or HTML/CSS to create their web pages. I chose to use WordPress. Although WordPress is more complex, it allowed me to &#8230; <a href="http://sbwright.com/?p=123">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Wildwood&#8217;s Digital Portfolio project requires building a website to post my work for public consumption. Most students use iweb or HTML/CSS to create their web pages. I chose to use WordPress. Although WordPress is more complex, it allowed me to create a rich user experience.</p>
<p>WordPress requires MySQL and PHP so I chose to host my web-server on Amazon&#8217;s EC2 hosting free tier. Here is a <a href="http://interfacelab.com/nginx-php-fpm-apc-awesome/">post</a> I used to learn about the WordPress installation for which I used used the package manager.</p>
<p>After starting my instance using AWS console, I created and attached a 10 gb volume to <code>/dev/sdf</code>. I use the volume to store the wordpress &amp; MySQL files allowing me to make snapshot backups and quickly launch new instances.</p>
<p>The first step was to install the following packages:</p>
<pre>sudo yum -y install mysql-server php-fpm php-mysql php-pecl-apc nginx</pre>
<p>Next, I formated and mounted the volume to <code>/srv/wordpress/</code>. When restoring from backup formatting isn&#8217;t necessary.</p>
<pre>sudo mkfs.ext4 /dev/sdf
sudo mount /dev/sdf /srv/wordpress/</pre>
<p>In order to keep my files in the same place, I moved the MySQL data directory and  symlinked onto the volume.</p>
<p>Finally, I started MySQL.</p>
<pre>sudo mv /var/lib/mysql /srv/wordpress/</pre>
<pre>sudo /etc/init.d/mysqld start</pre>
<p>With a working installation of MySQL, I downloaded WordPress. There are detailed instructions <a href="http://codex.wordpress.org/Installing_WordPress#Using_the_MySQL_Client">here</a>. I put my wordpress files in <code>/srv/wordpress/www</code>.</p>
<p>Next I set up nginx and php-fpm. I followed <a href="http://blog.digitalstruct.com/2010/07/12/getting-started-with-nginx-and-php-fpm/">these</a> instructions and set the root to <code>/srv/wordpress/www</code>. Okay it is time to start everything up&#8230;</p>
<pre>sudo /etc/init.d/nginx start
sudo /etc/init.d/php-fpm start</pre>
<p>After these two commands complete, everything is up and running. I made a patch for <code>/etc/nginx</code> so I can install and configure the server by attaching a snapshot and running a simple shell script. The basics of diff and patch are available <a href="http://jungels.net/articles/diff-patch-ten-minutes.html">here</a>.</p>
<pre>sudo yum -y install mysql-server php-fpm php-mysql php-pecl-apc nginx patch
sudo mkdir /srv/wordpress/
sudo mount /dev/sdf /srv/wordpress/
sudo rm -rf /var/lib/mysql
sudo ln -s /srv/wordpress/mysql /var/lib/
sudo /etc/init.d/mysqld start
wget http://&lt;somewhere&gt;/nginx-php.patch
cd /etc/nginx
sudo patch -Nlp 1 &lt; /home/ec2-user/nginx.patch
sudo /etc/init.d/php-fpm start
sudo /etc/init.d/nginx start</pre>
]]></content:encoded>
			<wfw:commentRss>http://sbwright.com/?feed=rss2&#038;p=123</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

