Tuesday, August 21, 2007

Host Wordpress Blog on Ubuntu Server

Install Ubuntu LAMP Server

I will assume that if you are trying this you have installed Linux before or are at least comfortable enough with the install process of different OS's

After reboot you will come to command prompt

Login in with Username and Password

Enable use of the 'root' account by typing: sudo passwd root

Login as 'root' by typing: su

Edit the sources list

To edit the sources.list you type: nano /etc/apt/sources.list

Comment out (#) the CD and uncomment all others - F2 to save

To update the source list you type: apt-get update

Updating System

To upgrade your system type: apt-get upgrade

Once all that is completed it is time to install a graphical desktop, this is done by typing the following:

apt-get install gdm gnome-applets gnome-control-center gnome-icon-theme gnome-menus gnome-panel gnome-session gnome-terminal menu metacity nautilus synaptic x-window-system-core firefox mysql-admin gedit

Once all packages are downloaded and installed you will be back at the command prompt.

To start the desktop type: startx

Configure 'Root' Login

Click on System / Quit / Restart.

When Ubuntu restarts log on with 'normal' user account.

This time go to System / Administration / Login Window

Select Security tab and check the 'Allow Local System Administrator Login'

Log out and log back in as 'root'

Create a database in mysql

Open a terminal (Applications / Accessories / Terminal) and type: mysqladmin -u root password ‘password

To open mysql type: mysql -u root -p

Create a database for WordPress

Type: mysql> CREATE DATABASE wordpress;

Followed by: mysql> GRANT ALL PRIVILEGES ON wordpress.* TO 'root'@'localhost' IDENTIFIED BY 'password here' WITH GRANT OPTION;

Confirm changes by typing: mysql> FLUSH PRIVILEGES;

That's it for mysql so type: mysql> quit;

Download and configure Wordpress

Now fire up firefox and browse to 'localhost' – you should see something like;

Index of /

Name Last modified Size Description

apache2-default/ 20-Nov-2004 15:16

Browse to wordpress and download the latest tar.gz and save to wherever you want.

Open up a terminal at that location and type: tar -xvzf wordpress-2.2.1.tar.gz -C /var/www/

Open up your browser and type: localhost/wordpress – you should see a web interface for wordpress.

We have to configure our database for wordpress. Browse to /var/www/wordpress/ there is a file there called wp-config-sample.php, right click on this and open with text editor. It should look like the following;

<?php

// ** MySQL settings ** //

define('DB_NAME', 'putyourdbnamehere'); // The name of the database

define('DB_USER', 'usernamehere'); // Your MySQL username

define('DB_PASSWORD', 'yourpasswordhere'); // ...and password

define('DB_HOST', 'localhost'); // 99% chance you won't need to change

Enter your details and 'save as' wp-config.php in the same directory.

Open firefox and type: localhost/wordpress you should now be able to complete the installation of wordpress. Remember to note down the password as it is only presented once, this can be changed from within the wordpress interface.

Access Blog from Internet

You should now be up and running. The only thing left is to have web access to your blog. To do this you need to set up DNS forwarding.

Head over to DynaDNS and sign up for a free account. It is best to use a legitimate email account as they will email you to confirm that you want to continue with service.

Now log into your account and go to 'My Services', then under “Host Level Services' click on 'Add Host Service' and then “Add Dyamic DNS Host'. Choose from the list for a domain.

Now head over to your firewall/router, address should be 192.168.0.1 and log in. Look for the DNS service and enter the required details. Every time your ISP changes your IP address it lets DynDNS know about it.

You should now be able to browse to your wordpress blog at the host and domain name you specified.

Once this is done you can log out of the 'root' account, then is no need to log back into Ubuntu, just let it sit at the logon screen. You can do all your blogging from your web browser.

Thats it.

I hope that this has been helpful, if you feel that I have left something out or that this is helpful please leave comments.

1 comment:

Anonymous said...

Who knows where to download XRumer 5.0 Palladium?
Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!