{"id":380,"date":"2011-11-14T22:55:55","date_gmt":"2011-11-14T22:55:55","guid":{"rendered":"http:\/\/www.andrewjohnson.me.uk\/blog\/?p=380"},"modified":"2011-11-14T22:55:55","modified_gmt":"2011-11-14T22:55:55","slug":"moved","status":"publish","type":"post","link":"https:\/\/andyjohnson.uk\/blog\/2011\/11\/14\/moved\/","title":{"rendered":"Moved"},"content":{"rendered":"<p>A couple of weeks ago I moved this blog from its old home on a Windows-based virtual server at EasyCGI to a dedicated Linux server running as a &#8220;micro instance&#8221; on the Amazon Web Services (AWS) platform. Herein some notes on the move.<\/p>\n<p>Overall I&#8217;m pretty happy with the move. The EasyCGI hosting was cheap but painfully slow and seemingly getting slower. Although I have no illusions that many people read this blog (although it does get some incoming traffic from Google) I do object to paying for a poor service. \u00a0I also needed an excuse to play with AWS.<\/p>\n<p>Since I have never used AWS before, and haven&#8217;t used Unix in any significant way for about fifteen years, I needed some help. I started with <a href=\"http:\/\/www.2bit-coder.com\/2010\/9\/wordpress-in-the-cloud-amazon-ec2\">this<\/a>\u00a0tutorial [1]; which is a good idiot&#8217;s guide to signing-up for AWS, creating an EC2 micro instance, and installing WordPress and its dependencies. The article is a year old, though, and is out of date in several respects. The most important is that AWS no longer provides Fedora-based machine images. They do offer something called Amazon Linux, which did the job for me. There are some minor differences between this and the tutorial, but noting serious.<\/p>\n<p>Signing up for AWS was as smooth as I expected &#8211; kind of like an extended Amazon checkout process.<\/p>\n<p>After I had an instance built and launched, the first problem I encountered was that the default Amazon Linux EC2 image does not allow root user login. This is explained <a href=\"http:\/\/imperialwicket.com\/aws-default-root-password\">here<\/a> [2]. The effect of this is that you login as &#8220;ec2-user&#8221; and is you want to use any\u00a0privileged\u00a0commands then you have to use the sudo command. At this point I discovered <a href=\"http:\/\/calebogden.com\/wordpress-on-linux-in-the-amazon-cloud-with-mac\/\">this<\/a> [3] tutorial, which is a bit more up to date. Despite the title it is not specific to Apple Macs.<\/p>\n<p>Installing Apache and MySQL was easy: just a few simple &#8216;sudo yum install&#8217; commands. I still carry the scars of installing software in SunOS and Solaris back in the early nineties (only if you have to, plenty of coffee, allow a whole day), and this yum stuff impressed me a lot. (Must take a look at <a href=\"http:\/\/nuget.codeplex.com\/\">NuGet<\/a> when I have the time). You can&#8217;t install phpMyAdmin using yum because its not in Amazon&#8217;s yum repository, but the tutorial [3] explains how to do this. There&#8217;s also an informative SuperUser Q&amp;A about it\u00a0<a href=\"http:\/\/superuser.com\/questions\/291230\/how-to-install-phpmyadmin-on-linux-ec2-instance\">here<\/a> [4].<\/p>\n<p>I installed a fresh copy of WordPress as described in the tutorials, then copied over the various config files and a database backup from my old site to the new one (via http using wget). No surprises there, but there are some instructions <a href=\"http:\/\/codex.wordpress.org\/Moving_WordPress#Moving_WordPress_to_a_New_Server\">here<\/a> [5] that might be useful (or at least reassuring). Make sure you have backups! Since I had installed WordPress in a subdirectory below \/var\/www\/html I had to put a php redirection script in that directory.\u00a0There is an example of how to do this <a href=\"http:\/\/php.about.com\/od\/learnphp\/ht\/phpredirection.htm\">here<\/a> [6].\u00a0I found <a href=\"http:\/\/www.cs.colostate.edu\/helpdocs\/vi.html\">this<\/a> [7] cheat-sheet useful throughout when driving the vim text editor.<\/p>\n<p>Finally, I assigned a public &#8220;elastic IP address&#8221; to the instance and changed the DNS for the andrewjohnson.me.uk domain to point to it.<\/p>\n<p>And\u00a0that&#8217;s\u00a0it really. It didn&#8217;t take long, I enjoyed it, and I learned some things. My thanks to those who took the time to write the various tutorials &#8211; it would have been much harder without them.<\/p>\n<p>&nbsp;<\/p>\n<p>[1]\u00a0<a href=\"http:\/\/www.2bit-coder.com\/2010\/9\/wordpress-in-the-cloud-amazon-ec2\">http:\/\/www.2bit-coder.com\/2010\/9\/wordpress-in-the-cloud-amazon-ec2<\/a><\/p>\n<p>[2] <a href=\"http:\/\/imperialwicket.com\/aws-default-root-password\">http:\/\/imperialwicket.com\/aws-default-root-password<\/a><\/p>\n<p>[3]\u00a0<a href=\"http:\/\/calebogden.com\/wordpress-on-linux-in-the-amazon-cloud-with-mac\/\">http:\/\/calebogden.com\/wordpress-on-linux-in-the-amazon-cloud-with-mac\/<\/a><\/p>\n<p>[4] <a href=\"http:\/\/superuser.com\/questions\/291230\/how-to-install-phpmyadmin-on-linux-ec2-instance\">http:\/\/superuser.com\/questions\/291230\/how-to-install-phpmyadmin-on-linux-ec2-instance<\/a><\/p>\n<p>[5]\u00a0<a href=\"http:\/\/codex.wordpress.org\/Moving_WordPress#Moving_WordPress_to_a_New_Server\">http:\/\/codex.wordpress.org\/Moving_WordPress#Moving_WordPress_to_a_New_Server<\/a><\/p>\n<p>[6] <a href=\"http:\/\/php.about.com\/od\/learnphp\/ht\/phpredirection.htm\">http:\/\/php.about.com\/od\/learnphp\/ht\/phpredirection.htm<\/a><\/p>\n<p>[7] <a href=\"http:\/\/www.cs.colostate.edu\/helpdocs\/vi.html\">http:\/\/www.cs.colostate.edu\/helpdocs\/vi.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A couple of weeks ago I moved this blog from its old home on a Windows-based virtual server at EasyCGI to a dedicated Linux server running as a &#8220;micro instance&#8221; on the Amazon Web Services (AWS) platform. Herein some notes on the move. Overall I&#8217;m pretty happy with the move. The EasyCGI hosting was cheap &hellip; <a href=\"https:\/\/andyjohnson.uk\/blog\/2011\/11\/14\/moved\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Moved&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-380","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/posts\/380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/comments?post=380"}],"version-history":[{"count":0,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/posts\/380\/revisions"}],"wp:attachment":[{"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/media?parent=380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/categories?post=380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/tags?post=380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}