Setting up WordPress on Ubuntu
There are a few good blogs so I decided to install/configure WordPress on Ubuntu 7.1 workstation to see what is was all about.
Since I wasn’t using any packaging tools I tried to make it through a terminal window. That wasn’t that easy as I thought so I thought I’d give some documentation about the steps. Most of if was found through “Google”, but some also by reading further into different documentation on each of the websites for each technology.
Installing Ubuntu 7.10 was easy. Inserted the CD booted my laptop answered a few questions and in 20 min I was running my Ubuntu 7.10 workstation. Even gave it a running on the software updates and it was all ready in a few minutes.
First you need to install Apache2 so in a terminal window you need to type
sudo apt-get install apache2
Now when Apache is installed you want to install PHP and other necessary libraries for Apache
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart
When PHP is installed you want to install MySQL and other necessary libraries so that PHP, Apache and MySQL integrates. Notice when you install you will be requested to create a password for user ‘root’. Please remember this password. It is needed later on.
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install php5-mysql
sudo apt-get install libapache2-mod-auth-mysql
WordPress also supports URL-rewriting (a technique that enables friendly URLs instead of cryptic mypage.php?id=298)
sudo a2enmod rewrite
sudo gedit /etc/apache2/sites-enabled/000-default
Change AllowOverride None to AllowOverride All
sudo /etc/init.d/apache2 restart
Now when everything is installed you need to create a database and a database user for WordPress in order to complete the instructions on WordPress website. Notice that when you create a user (with the grant usage command) that you need to do this 3 times (once for localhost, once for IP for localhost and once for the hostname of your computer)
mysql -u root -p’YourpasswordFromInstall’(you are now logged in)
CREATE DATABASE wordpress; ‘wordpressuser’@'yourcomputername’;(you have now created users and given users privileges to wordpress database so you can now try to logon with newly created user)
grant usage on *.* to ‘wordpressuser’@'localhost’ identified by ‘wordpresspassword’;
grant usage on *.* to ‘wordpressuser’@’127.0.0.1′ identified by ‘wordpresspassword’;
grant usage on *.* to ‘wordpressuser’@'yourcomputername’ identified by ‘wordpresspassword’;
grant all privileges on wordpress.* to ‘wordpressuser’@'localhost’;
grant all privileges on wordpress.* to ‘wordpressuser’@’127.0.0.1′;
grant all privileges on wordpress.* to
exit;
mysql -u wordpressuser -p’wordpresspassword’ wordpress(if everything has gone alright, you should now be logged in)
Now your Ubuntu should be ready for the instructions given at WordPress own website
http://codex.wordpress.org/Installing_WordPress#Famous_5-Minute_Install
A tip is that the root for Apache is in folder /var/www and if you wish to use WordPress as a subdirectory you should copy wordpress directory to here.
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.