This tutorial assumes you've already installed and configured your server with Mono 2.4, XSP, Mod_Mono and Apache2. Instructions for doing so can be found at the Installing Mono on Ubuntu page.
We're also assuming that you're installing BlogEngine.NET 1.5 (which was the latest release at time of writing). If you're installing a later release, the instructions should be the same, just adjust the file names used accordingly.
The CodePlex site doesn't allow for downloading BlogEngine.NET releases without being logged in, so we can't easily do the BlogEngine.NET download on the command line. You will need to download the BlogEngine.NET release from this link on your desktop computer and upload it to your server. Download the Web version as sources aren't required to run. For the purposes of this tutorial, we are going to assume that you either saved or uploaded the BlogEngine.NET (web) zip file in your home directory on your Ubuntu box.
Open a terminal window if you're using the Ubuntu GUI or log on using SSH if you're accessing a remote server.
All these instructions assume that you have root privileges, so if you're not logged in as root, enter the following and enter you password when prompted.
$ sudo bash
Next change into the location where you saved the zip file (in our case our home directory) and extract the zip file:
$ cd ~$ unzip "BlogEngine.NET 1.5 (web).zip"
The unzip utility will have created a folder called BlogEngine.Web in your home directory that contains all the BlogEngine.NET files.
Now lets create a hosting directory and then copy the extracted files to the new directory:
$ mkdir /var/www/blog
$ cp -r BlogEngine.Web/* /var/www/blog
Now lets change to the newly copied directory so that we can set the file permissions:
$ cd "/var/www/blog"
Set read/write file permissions for everyone on the App_Data directory:
$ chmod -R 0777 App_Data/*
Update the Apache Virtual Hosts File
The next step involves telling Apache where to find the new web application. For the sake of this tutorial, I am going to assume you're following from the previous tutorial, so we'll use the virtual hosts file we set up there. If you have a different Apache configuration, modify these instructions accordingly.
Lets edit the default virtual hosts file:
$ nano /etc/apache2/sites-enabled/000-default
Update the content so it points to the new BlogEngine.NET 1.5 directory:
<VirtualHost *> ServerName www.local.com ServerAdmin webmaster@localhost DocumentRoot "/var/www/blog" DirectoryIndex index.html index.aspx MonoDocumentRootDir "/var/www/blog" MonoServerPath rootsite "/usr/local/bin/mod-mono-server2" MonoApplications rootsite "/:/var/www/blog" MonoAutoApplication enabled <Directory "/var/www/blog"> MonoSetServerAlias rootsite SetHandler mono AddHandler mod_mono .aspx .ascx .asax .ashx .config .cs .asmx </Directory></VirtualHost>
$ /etc/init.d/apache2 restart
Now you should be able to navigate to http://localhost (or whatever IP address your server is at) and view your new BlogEngine.NET installation! The default administrator username is "Admin" and the password is "admin". This is obviously something you should change as a matter of urgency.
For further reading on using your new blog, see the BlogEngine.NET documentation Wiki at http://razorant.com/blogenginewiki/MainPage.ashx.
Further themes can be downloaded from the main site at http://www.dotnetblogengine.net/page/themes.aspx.
Should you wish to leave a comment regarding this tutorial, please comment on this post.