Since a while I am contemplating to move away from Bluehosst.com because of various issues but mostly because I am having issues with connecting to the Mail Server from time to time and this is plain annoying. A little bit of an effort on their site would made have stayed but I got more or less no help.
A New Web Site Host
Since I started looking I never found a good host. Next week my hosting at Bluehost.com was up for renewal and so I was finally forced to act. Initially I tried out Squarespace.com but their support of handling Source Code was not really good and neither Markdown nor BlogText was really supported and I was not inclined to use a special text component to display source code.
So last Week I got a notice from my registrar Register4Less that they offer Web Hosting that would fit my need. Because time was of the essence I ordered their hosting for a year. Then I wrote down what had to be done to move:
- Backup WordPress using the Dropbox backup
- Upgrade WordPress to the latest version
- Download the WordPress files from Bluehost
- Export the DB using phpAdmin
- Uploading the WordPress files to Register4Less
- Create the MySQL DB
- MySQL Admin and WordPress User and give them the right permissions
- Import the WordPress Export
- Change my local /etc/hosts to test
- Test the WordPress Site
- Undo the /etc/hosts changes
- Create the Email Accounts
- Transfer the Emails using imapsync using MacPorts
- Testing the Emails on the new Server
- Create / Adjust the DNS Settings at Register4Less
- Change the DNS Name Servers at Register4Less for my Domain
- Test the Life WordPress Site and Email Server
I expected that this would take the entire weekend to accomplish. But because the setup at Bluehost and Register4Less are so similar (both use Linux, cPanel, FTP etc) I was done within about 9 hours which is lightning fast.
The first problem I caused myself was when I through that I had to change the Domain Name inside the WordPress DB records until I realized that using /etc/hosts was much easier. Then I had some issues with imapsync and because I did not want to pollute my Mac Box I used a VMware Fusion virtual machine to install MacPort and imapsync. It was slower but if anything went wrong because of the MacPorts etc I could just ditch the virtual machine. At the end everything ran smoothly and straight forward. Finally the change of the DNS entries took some time because of an initial misconfiguration and then I had to wait until the previous settings finally expired (3h TTL).
Best result is if nobody would notice and so far I looks good based on my initial smoke screen tests. I am still expecting some issues but so far I was impressed how easy and fast it was. WordPress, MySQL / phpAdmin and cPanel are really easy to do a move like that. Let’s cross our fingers that the Mail Server problems are a thing of the past to make the effort worthwhile.
At the end I want to thank Dough from the Register4Less Support team for his help otherwise this would have been a way longer story.
— Andy Schaefer
Lately Bluehost.com gives me some grief and so I am thinking about changing my provider.
So I started to think that maybe this would be a good opportunity to also switch from WordPress to an easier setup.
What I would like to do is to use Markup to write by posts and pages but also wanted to see
if it is possible to avoid having to deal with a DB. Not that I hate to use a DB but backing
up the data and exporting the content is not that simple. But then again what should I use and is it ready worth the effort.
Then I found this page from [http://www.macdrifter.com/2012/08/pelican-guide-moving-from-wordpress-and-initial-setup.html|Macdrifter] talking about Pelican which would just do that.
But instead of plunging right into it I wanted to do an intermediary step by having the Site
first running on my local Mac (Apache, Python already there) and when it is working as expected
I will go ahead and push the content from my Mac to the ISP.
First step was to just get Pelican installed and up and running before going ahead.
Afterwards I would recreate Madplanet.com’s website on my local Mac so that I don’t have
to bother my ISP or damage the installation. From there I will migrate the content over
and when it is done I will push the content out and pull the plug on the old site.
Pelican Installation ∞
To my surprise the installation and configuration of Pelican was straight forward:
sudo -s easy_install markdown easy_install pelican easy_install pygments mkdir /Library/WebServer/Documents/pelican pelican-quickstart
Now don’t waste too much time on the questions. Just answer what you can and leave the rest
blank or accept the defaults. It is only generating a configuration file for most parts.
The only important thing is that the location for pelican is at the previously created
directory (/Library/WebServer/Documents/pelican). You can select any directory you
like but this is the default given by Apple and so I used this.
Apache configuration ∞
The Apache Configuration can be different on every computer and so here I only describe
the simplest solution to set Pelican to be the root document root. For that I just set
the Apache Document Root to the Pelican’s Output directory:
# # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/Library/WebServer/Documents/pelican/output"
and then define that Directory:
<Directory "/Library/WebServer/Documents/pelican/output"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks MultiViews # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All # # Controls who can get stuff from this server. # Order allow,deny Allow from all </Directory>
Last two steps are to check if the configuration is OK and then restart the Apache server:
sudo apachectl -t sudo apachectl restart
See Pelican in Action ∞
Before we can go ahead we need to generate the site in Pelican. For that we go to the
project’s home directory (/Library/WebServer/Documents/pelican) and use make to generate
cd /Library/WebServer/Documents/pelican make pelican
Finally we can open the site with this url: localhost.
I am not done here by a long shot. First I need to have both the WordPress and the Pelican
site running on my Apache Server and then I need to export my WordPress site and install it
locally. But for now that’s all.
I know you only want to make easy money by piggy backing on other peoples work without actually have to work but as might noticed by now I monitor the comments and only approve them when they are valuable to my readers.
If you think that just by flattering me you would get passed by me then you are mistaken.
So if you want to make money without working for it then look for another victim and get off my lawn. Otherwise I strongly recommend that you use your computer skills for something good rather than annoy me and my readers.
Kind Regards – The Blog Master
Today was the day where I finally pulled the plug on our Snow Leopard Server and moved to Lion. I planned this all along as discussed in my other blog post but it took longer than expected and some pieces like the company website and the wiki pages are still down.
As usual the big problem was DNS and Mail as it ever was and so no surprise here. Having these problems I am happy that we did a fresh re-install because I don’t want to imagine what happened when the upgrade goes bad.
Tomorrow everything should be back to normal – Andy
Lately I write a continuing blog post about my endeavor to migrate my Snow Leopard Server to Lion. Because I am going to update it multiple times until I am done I want the post to appear on the top of the list after I updated it. It took some time to accomplish it but that is how you can do it:
- Open the index.php page of your theme in the Editor of your choice
- Look for the line with the function query_posts
- Add this text to the query orderly=modified and you might need to add an Ampersand if there are more arguments
- This was my original text: <?php query_posts($query_string.’order=DESC’);
- Now it looks like this: <?php query_posts($query_string.’orderby=modified&order=DESC’);
- Save the file
- Reload the page multiple time to make the cache to catch up (my main page remained all white in the first few requests)
Now you should have the post ordered by the modified date and whenever you do update a post it will be listed at the top. Just keep in mind any update no matter how small will do that.
Attention: this blog entry is in reverse order meaning the task started at the bottom and I’ll add updates on top of it
Fri Aug 12: Today wa the day where I pulled the plug from our Snow Leopard server taking it from the Internet. I did that to make sure that any new mails sent will not be received until the migration is done otherwise I might loose some of the emails. Then I also wanted to make sure that I don’t loose any changes to the web sites like comments etc.
So after the Server was taken from the Internet I exported the Mail DBs, the MySQl (WordPress) and PostgreSQL (XWiki) DBs and copied them onto another drive. The last step of the preparation was to make a SuperDuper copy and test the copy by booting from it. This way I was sure that I could recover the server in case of big problems and or if I needed to export more data. After I rebooted into the SuperDuper copy I also used it to reformat the original server disk by earsing it with the Disk Utility and then start the Lion installation. It turned out that I still needed an Internet connection but because I have a strange double router setup for the server I was able to connect the server to the Verizon router which prevented the Mac Mini to be identified as server. So I could install Lion and after that was finished the Lion Server and Lion Server Administration tools. After I installed some necessary programs like Dropbox, 1Password, pgAdmin3, MySQL and MySQL Workbench as some others and added the localhost as interface to the embedded PostgreSQL I restarted the box the first time.
The first problems I encountered was some issues with the SSL certificates but eventually I could generated a self-signed certificate and import it to the server. Then I ran into issues with Mail and DNS. Eventually I had to setup DNS step by step. First the local server definition, then the machine, than the aliases etc. And between each step using nslookup to verify everything fine. After all was setup I went ahead and setup the Mail server. Copy over the original Mail DB was that difficult after I figured out that I had to take about all the “.” directories by copying with “cp .*” because a “cp *” would not find and copy the “.” directories. Then I also had to make sure that all files had the ownership “_dovecot:mail” otherwise mail would ignore them. Eventually I got Mail up and running and the old mailboxes copied over. Still there is one thing that doesn’t work. I cannot use SSL with the Mail server and so I can only use Mail inside our home to prevent people from snooping on our mails.
Copying, installing and configuring the web sites was a breeze including the import of the MySQL and PostgreSQL DBs. This was done in less than 2 hours.
There are few things to do like installing Subversion and Subersion server, Gitolite server, Time Machine drive and some file shares but that is purely internal stuff and can be done when needed. Good thing there is that I have a life copy of the server on the SuperDuper backup and so I can check how it was done then and copy necessary files over.
I guess that concludes this post except I ran into some important issues or when I could figure out why Mail doesn’t support SSL for now
Tues Aug 9: Yesterday I manage to migrate over my Snow Leopard Mail DBes. It seems that the data structure is compatible and the only thing that I had to adjust is the user (moved to ‘_dovecot’). The rest was just sending one email to myself to create the user DB, then shutdown the mail service and copy over the data. After a restart the mail was available. There was one little thing where sub mail boxes where not handled properly but a many copy of these directories did fix the issue.
Today then I was able to install MySQL (just use 5.5.1 for Snow Leopard) and export / import the PostgreSQL and MySQL databases without any problems. Finally the website were easy as pie. Just tar up the directories in question (Jetty and wordpress), install on Lion Server and restart.
Next step is to actually do the migration. So first take it from the Net (not to loose any mails etc), then backup with SuperDuper, export the Mail DBs and regular Databases and export them onto an external drive. After reformatting the server’s drive I can install Lion, Lion Server, Lion Server Admin tools and the additional programs like Dropbox, 1Password, PathFinder, SuperDuper, MySQL, MySQL Workbench, PgAdmin3 and Java (triggering with ‘java -version’ on command line). After that I need to setup DNS, Mail and Web Sites, import the data and test it. I expect that DNS / Mail to give me some grief (as it always did) but on a late evening / nite shift that should be done. So see you on there other side.
Sun Aug 7: I came up with a plan to test the migration and to make sure that I can export / import the DB and Mail data before doing the actual upgrade. So I am taking my laptop, install OS X Lion Server on it and start the migration process. This includes the setup of the server so that it works the same way as my current Snow Leopard server. The only thing that I am going to drop is to use managed clients feature because that wasn’t worth the time I invested into.
I did figure out how to use the embedded PostgreSQL server of the Lion Server and it turned out that I cannot use the installation from Enterprise DB because it doesn’t work and the uninstallation does corrupt the internal PostgreSQL DB. Not good.
This will be a post in progress because the upgrade of the server will take a week or two. As soon as I learned how the OS X Lion Server was distributed I bought the Server App from the App Store. Compared to the original $1,000 (for Leopard) and $500 (for Snow Leopard) this time the server was cheap around $50. So I was ready to test it on one of my developer partion.
The first thing that I saw when I fired up the Sever is that the list of services where limited:
For me the most important thing was the missing DNS and Open Directory service and the limited functionality for the Web and Mail. So I went on the Internet to see if I missed some settings or flags but it turned out that one can download the good old OS X Server Admin tools which provides the missing services and the Mail configuration. Still need to figure out how to setup Apache sites I did on Snow Leopard Server. Because I don’t want the server to be down for too long I probably go ahead and use my Laptop and an external drive to create a server clone. When this one is up and running as expected I know what to do. Then I will shutdown the server, install Lion OS and the Server, copy over the necessary data (PostgreSQl DBs, Mail, Web Applications etc) and finally bring the server back to life.
GitoLite is a simple Git server that can handle user authentication per project / branch. Even though I don’t mind too much to shell out $300 bucks for a simple business plan with GitHub I want to keep my code closer to my heart that anything else. Even though I don’t think that my server is tightly protected it is at least my fault when something goes wrong. Lately there have been reports of nasty security breaches on user data servers and even Dropbox had their account unprotected for a few hours.
The first thing I was surprised of was the fact that there is no out-of-the-box git server available as it is with Subversion. Then I tried Gitosis but ran into issues with Python and abandoned that. Later I heard about GitoLite which gave me some grief at the beginning but eventually I could make it work out. The trick was to make sure that I was focuses on the task and made sure only to proceed if the previous step worked out.
Update: I copied this documentation to my XWiki.
This week I am in the North East in Queensbury to give a class about Swing and Design Patterns. As much as I enjoy giving classes as much as I hate to be in the cold snowy weather far away from home.
Back when I lived in Switzerland it wasn’t that bad because I knew how to live through the cold season. But this is a rural area which I hardly know anything about it I am at. Zagat to Go for example only had my hotel listed in a radius of 20 miles. Today I am tired all day because I just slept a few hours on the plane to Boston. In addition I skipped lunch because there was nothing around here that would be inviting.
So for tonight I will eat room service and hope that tomorrow I learn about some places where I could go eat beside the usual chain restaurants like Olive Garden and Red Lobster.
I didn’t mind to be in Boston during the winter of 07 where there was a bunch of great restaurants in walking distance and I never needed a car. That said on Friday evening I am heading back into the warm (relatively speaking) SoCal.
Cheers – Andy
After finishing such a high-power project like the iOS app like the last one I have a hard time to settle down. But maybe it is a good idea not to relax too much and stay current with iOS technology.
I still have another app that I would love to finish but it turned out that there is more work necessary than planned. The app does not work well with a few things and the most important one is that it does not work when people want to share their data on multiple iOS devices. The solution would be to sync that data with a central place like a web server, a Mac desktop application or device to device synchronization. Each of these solution has its advantages and disadvantages.
That said I need to figure out if the remaining work is worth the effort or if I should scrap it and do something else. It would be definitively interesting to create a Mac application but that would not be usable for people without a Mac. I am not really inclined to create a web server even though doing something with Sling would be nice or to do device to device synchronization would be a challenge just to get it working.
As you can see I am already back in a heightened attention level (maybe I am a professional ADD guy) ready to tackle the next challenge.
For this weekend though I am doing not much and go away one day to visit SeaWorld (at least that is planned).
Cheers – Andy
It starts to become a reoccurring theme that I need to look for a new contracting gig at the end of the year. In my business I am used to being let got with no or nearly no notice period but having to do that at the end of the year is a little bit of a bummer. Well, it is a chance to spread my newly acquired knowledge of:
- Groovy / Grails together with Spring, Transactions and RESTful WS
- Apache CXF, Camel and ServiceMix
- Apache Sling / JCR
- Ibatis OR Mapper
- TestNG and jUnit 4
- DbUnit and UnitIls
- and much more …
In case you need help my any of these topics or in general with Java / Java EE then drop me a note to: email@example.com
Cheers and have a Happy New Year