DotNetNuke 3.1.0 initial setup

My own experience of setting up DotNetNuke (DNN) 3.1.0. Hopefully somebody will find it useful.

1. Installed a standard Windows 2003 server. Through Manage Your Server wizard, chose custom and installed as an Application Server (IIS and ASP.NET). FrontPage extension and ASP.NET were installed. Install media was required during IIS install;
2. Downloaded DNN 3.1.0. Chose this because the site I volunteered to help out in my spare time is this version. Unzipped to a folder called c:\dnn;
3. Installed Sql Server 2000. I didn’t do Sql Server 2005 install, because I know that Sql Server 2005 needs .Net Framework 2.0. And the site I played with has .Net Framework 1. Since this is my first installation, I did not want to complicate things.
4. Created a database called dnn and created a user. I granted the user db_owner role of the database;
5. Made the mistake of adding ASPNET account to have full access to c:\dnn first initially. Instead, Network Service account should be added and have full access to c:\dnn folder. Just type in Network Service in the lookup box. If the OS is Windows 2000, then ASPNET Account is the right account to add;
6. Ran inetmgr, right click on Default Web Site -> New -> Virtual Directory… Created a virtual directory called DotNetNuke and pointed to c:\dnn;
7. Went to c:\dnn folder. Renamed Release.config file to web.config. Updated database connection setting after the file was renamed;
8. Went to http://localhost/DotNetNuke. Installation started and was successful.

Conceptually, this is actually pretty similar to WordPress’s implementation. Not too bad so far.

In other news, I wanted to create separate feeds for the current categories I have. I made it working but the layout was all messed up, so I need to modify my css style sheet first. I heard there is a style sheet edit plugin for WordPress. Any comments on that?

My WordPress backup and restore process

As I am writing and publishing more and more blog entries, it becomes important that I have good and reliable backups. I know that if something happens and I cannot recover my entries and comments, I would be terribly upset. So I want to share my process here. Please feel free to share your backup methods by commenting. Hopefully somebody will find it useful.

Backup comprises two parts:

1. File backup

On a Linux machine with Apache, the default web files and directories reside in /var/www/html. Yours may be different. This include all php files and sub-directories like wp-content, wp-include, etc.

The easiest way to do it is to use tar command with -z to compress them. My post here gives you a pointer on tar.

These files are fairly static, so you do not need to back them up too often. You want to do file backup after you tried a new theme, installed a new plugin, etc. You should transfer this backup to a different box, in case the web host dies.

2. Database backup

For mysql database backup, you can use mysqldump, a utility that comes with mysql. mysqldump will iterate through all tables within the database, get their ddl, and dump all data in the form of insert statements. Below is the code to dump everything out and compress them using gzip:

mysqldump -q -e -hlocalhost -uLogin -pPassword MyBlogDb | gzip – > ./BlogDbBackup.sql.gz

Once again, gzip can shrink the size down pretty substantially. So do use it, especially if you have space issues.

There is a database backup plugin that comes with WordPress 2, which is the method I use. However, you do need to run chmod 777 on your database backup directory. If not, you will see the warning message of not enough privilege on your WordPress manage page. And you should be able to find out the backup directory name from that page, so you can run chmod.

In addition to the backup plugin, I also installed the wp-cron plugin. With wp-cron, I can schedule daily database backup and send it to an email address I defined. If I have a choice, I’d rather put everything in a shell script that backs everything up, compress them, and email the file to me. I then use cron to schedule it. However, since I am not root on my web host, I have had troubles setting up a smtp client for email, as documented here.

Now backup is done. The next step is to make sure my backup files work. I set up a standalone LAMP (Linux, Apache, MySql, PHP) box, extracted php files, restored the database by running:

mysql -hlocalhost -uLogin -p MyBlogDb < BlogDbBackup.sql I then modified wp-config.php file. And behold, it worked. Even my Chinese entries displayed properly. In a future post, I will share with you some of the lessons I learned in the process. Stay tuned...

Tunneling http traffic through ssh

James Strassburg gave a great tutorial on tunneling http(s) traffic through ssh with your Linksys WRT-54GL router.

Actually, if you have a server that you can ssh to that has web access, like your web host, you can tunnel all your http(s) traffic through that server from your Windows workstation. It is pretty simple to do:
1. Ignore James’ discussion on how to setup Linksys, unless that is what you want;
2. Download PuTTY client for Windows. PuTTY is a stand-alone Win32 executable. As such, it has no registry change, separate directory creation, and all other garbage associated with a typical Windows application. Get PuTTY.exe and it just works;
3. Follow the rest of James’ instruction on creating a SOCKS proxy (here entering the IP address of your web host), changing your connection setting in Firefox. And you are all set.

I found this to be extremely valuable. Thanks a lot James.

PS. I normally don’t look at calendars at home. But today I happened to look at our Swedish calendar, and noticed tomorrow, 2006/03/15 is the name day for Kristoffer. So happy name day to my Swedish friend Christoffer Hedgate. Somehow picture of tranorna kommer till Hornborgasjön, Västergötland on the calendar caught my attention.

64-bit, virturalization, and their impact

VMWare recently released a freeware called VMWare Player that can play a pre-built virtual machine file. A virtual machine is an OS bundled with whatever the virtual machine creator put there. This is perfect for people to test-drive various operating systems and software, without going through the hassle of installing themselves. VMWare currently provides virtual machines preloaded with RedHat, Novell Suse, ubuntu, Oracle, MySql, and Bea, among others.

Memory used to be a bottleneck for virtualization software to take off. However, on the hardware side of things, both Intel and AMD are pushing 64-bit processors pretty aggressively now. With 64-bit architecture, the memory space the operating system can access increases exponentially (from 2^32 to 2^64). With the push towards 64-bit and the emergence of virtualization technology, I wonder what kind of impact this will have on the software landscape, like operating systems, database software, web server, and application server, etc..

Linux, MySql, Apache and other open source software have made great headway in enterprise server market, especially for large financial firms. I do believe there are still a big learning curve and intimidating factor at play for mid-size to smaller firms when it comes to learning and evaluating alternative software products like Linux. Maybe the combination of 64-bit and virtualization software will help. Using the cliche popularized by the book The World Is Flat, 64-bit and virtualization will help bring down barrier of entry and flatten the competitive landscape. With more memory and more powerful processor, virtualization software helps people test things out that they may not able to or too difficult for them to try otherwise. And that will be a good thing.

The current market leader in this arena seems to be VMWare, since it works on both Windows and Linux platforms. Microsoft’s Virtual PC and Virtual Server only works on Windows, and my limited testing in installing Fedora Core 2 on Virtual PC didn’t work out very well.

Software vendors, jump on the wagon. Oracle, MySql, IBM, Bea have created and provided virtual machine files for downloading at VMWare’s Virtual Machine Center. I think that is a smart move. Even Microsoft has something to gain in doing so. For example, it can team up with VMWare and distribute Sql Server 2005 for a wider testing via their distributing channels.

I have personally tried ubuntu Linux distro on my laptop and it worked pretty well. My laptop is Acer Aspire 3500 with Celeron processor and 512M of memory.

Pointers on WordPress customization please

I’ve had my blog for a couple of weeks by now. It was hosted by MidPhase. I used it because it had good reviews and a colleague recommended it. Based on my experience so far, I am not too happy with it. I will leave that for another post.

Anyway, I am actually pretty happy with WordPress so far. The installation and initial configuration was not bad. I’ve downloaded a few themes to play with. I’ve settled on this Almost Spring theme from Becca. I did some tweaking myself, mainly on sidebar.php and style.css files. I am a newbie in both PHP and CSS.

I also studied some other people’s blogs for ideas and inspirations, mainly from Chris Hedgate and Danny Howard. That is a big help for me. Thanks guys.

I want advice on 2 issues below:
1. I thought it would be neat to create a table that stores all books that I have read. I can use that to create a WordPress page for those books. Do you know if there is a plugin just for that? I know there is a plugin for you to create tables in MySql. That is no big deal, as I can do that easily using mysql command line. The challenge for me is to write the PHP code and integrate that on the sidebar.

BTW, thanks Danny for this post, I’ve read the book. Wow, it really changed my thinking on a lot of things after reading it.

2. What tools do you use for trackbacks and ego search? I’ve used, but it would be nice to have a tool or plugin to do that work.

If you have some other cool tips and pointers that you can share, that will be greatly appreciated.