Installing WordPress Locally on Gentoo

There are already a couple of informative articles on this. Good as they are, I managed to run into a couple of problems that are not detailed on these articles possibly due to the fact that they were written a long time ago. Therefore this article, to help others (and me) who in the future wish to achieve the same that I did.

USE Flags

  • dev-lang/php apache2 mysql (in addition to ones already enabled by default)
  • www-apps/wordpress vhosts

Emerge WordPress

  • emerge -av wordpress

Install WordPress using webapp-config

  • webapp-config -I wordpress 2.9 -d wordpress

Configure the MySql database

  • mysql -u root -p (login to MySql)
  • CREATE DATABASE databasename; (create a database, replacing databasename with the name that you wish to choose)
  • GRANT ALL PRIVILEGES ON databasename.* TO username@localhost IDENTIFIED by ‘password’; (Create a user for the above database, replacing username with the name that you intend to use. Similarly with password)
  • FLUSH PRIVILEGES;
  • exit

Configure WordPress

  • vi /var/www/localhost/htdocs/wordpress/wp-config.php (and verify the following settings)

 

// ** MySQL settings ** //
define('DB_NAME', 'wordpress');     // The name of the database
define('DB_USER', 'username');     // Your MySQL username
define('DB_PASSWORD', 'password'); // ...and password
define('DB_HOST', 'localhost');

Configure apache2

  • vi /etc/apache2/httpd.conf
  • Comment out the following line: LoadModule unique_id_module modules/mod_unique_id.so
  • Add the following to the end: ServerName localhost
  • vi /etc/conf.d/apache2
  • Add the “-D PHP5” to the options passed in APACHE2_OPTS

You are set to go

  • Start apache2: /etc/init.d/apache2 start
  • Point your browser to http://localhost/wordpress
  • Have fun

Did @ Home

So, in view of the last post here is what I did manage to miss out on at home:

Movies

Yes, I missed out on 3 Idiots and Avatar.

Food

OK, there was no way I was missing out anything food related, was I? I gobbled lots of it. Should last me for a long time – till I go home again, that is.

Travel

Couldn’t get to Mahavirji – the train was delayed by more than 6 hours thanks to the legendary Delhi fog. Andaman, however was everything that I had imagined it to be and a lot more. Paradise on earth.

Watch

Yeah, I enjoyed lots of senseless TV, managed to catch cricket on TV (why did India have to lose that damned final to Sri Lanka?).

Enjoy

I enjoyed every day of my stay at home. There is no other place like it …