WordPress Quickstart Guide

, No Comments »

WordPress is an open source blog publishing system written in PHP with a MySQL database.

Installing WordPress

Download and the latest release of WordPress.

$ wget http://wordpress.org/latest.tar.gz

Extracting the file will create a new directory wordpress, move all the files into the a web server’s public HTML directory.

$ tar -zxvf latest.tar.gz
$ mv wordpress/* /var/www/wordpress

Create a MySQL database and user for Wordpress

mysql> CREATE DATABASE databasename;
mysql> GRANT ALL PRIVILEGES ON databasename.* TO 'username'@'localhost' IDENTIFIED BY 'password';

Create a wp-config.php file and modify it to specific your WordPress settings.

$ cp wp-config-sample.php wp-config.php
$ nano wp-config.php

define('DB_NAME', 'putyourdbnamehere');
define('DB_USER', 'usernamehere');
define('DB_PASSWORD', 'yourpasswordhere');
define('DB_HOST', 'localhost');

The database character set, normally should not be changed.
define('DB_CHARSET', 'utf8');

The database collation should normally be left blank.
define('DB_COLLATE', '');

In version 2.5 WordPress introduced a new optional entry called SECRET_KEY, which enables better encryption of information stored in the user’s cookies.

define('SECRET_KEY', 'put your unique phrase here');

It’s recommend to change the value of the SECRET_KEY to a unique phrase. To help generate a unique phrase visit the WordPress secret key generation site. For more information on the SECRET_KEY refer to the Editing wp-config.php page.

Run the install script by pointing your browser to the URL of your website (e.g http://www.vincentkong.com).

WordPress Welcome

After the installation has been successful, it’s recommend that you immediately login and change the randomly generated password.

WordPress Success

Creating a favicon for Your Webpage

, No Comments »

A favicon is a little custom icon that appears next to a website’s URL in the address bar of a web browser. The easily way to create a favicon is to take an image with the same dimension and reduce the size to 16 pixel by 16 pixel, then save it as an Windows Icon Format. Of course if your image is too big or too complex then the results might not be appealing. I recommend that you use a 64 pixel by 64 pixel image for best results.

GIMP is a free software which allows you to do this. If you like to use Photoshop you can download a plugin from Telegraphics.

If you don’t want to go through the hassle of using graphics software to create your favicon there are website available which can do the work for you. One that I find works well is Dynamic Drive FavIcon Generator.

The easily way to install the favicon is to name the file favicon.ico and upload it to the root directory of your website. Another option is to embed your favicon with HTML code similar to the following:

<link rel="shortcut icon" href="http://www.yourwebsite.com/image/favicon.ico" type="image/x-icon"/>

AWStats Quickstart Guide

, No Comments »

AWStats is a free web analytics reporting tool, suitable for analyzing data from Internet services such as web, mail and FTP servers. AWStats parses and analyzes server log files, producing html reports. Data is visually presented within reports by tables and bar graphs.

Installing AWStats

To install AWStats I chose to download the package from the http://awstats.sourceforge.net/ website instead of installing it through the Ubuntu package manager. The reason behind this was because I felt the directory structure created by the Ubuntu package manager was too messy. AWStats recommend to install the package inside the /usr/local/awstats directory, however I decided to put it in /opt and create a symbolic link instead.

$ cd /opt
$ wget http://prdownloads.sourceforge.net/awstats/awstats-6.6.tar.gz
$ tar -zxvf awstats-6.6.tar.gz
$ ln -s awstats-6.6 awstats

Configuring AWStats

AWStats can be configuring using an automated script or manually. To configure AWStats using the automated script using the following command:

$ /opt/awstats/tools/awstats_configure.pl

The following are the steps to configure AWStats manually:

Setup Virtual Host for Apache

<VirtualHost>
    DocumentRoot /opt/awstats/wwwroot
    #
    # Directives to allow use of AWStats as a CGI
    #
    Alias /awstatsclasses "/opt/awstats/wwwroot/classes/"
    Alias /awstatscss "/opt/awstats/wwwroot/css/"
    Alias /awstatsicons "/opt/awstats/wwwroot/icon/"
    ScriptAlias /awstats/ "/opt/awstats/wwwroot/cgi-bin/"
    #
    # This is to permit URL access to scripts/files in AWStats directory.
    #
    <Directory>
        Options None
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

Creating a Config/Profile for AWStats

Creating a new configuration file in /etc/awstats by copying the template awstats.model.conf. Where mysite is the profile name.

$ cp /opt/awstats/wwwroot/cgi-bin/awstats.model.conf /etc/awstats/awstats.mysite.conf

The configuration file awstats.mysite.conf contains numerous parameters. To have AWStats configured correctly for your profile the following parameters must be verify correctly.

  • LogFile The path to the server log file.
  • LogType The log file type “W” is for web log file.
  • LogFormat The log format “1″ is for Apache combined log format.
  • SiteDomain The domain name of the website.

Other useful parameters are:

  • DNSLookup Make reverse DNS lookups, “1″ DNS Lookup is fully enabled
  • SkipHosts Do not include access from clients that match following criteria

For more information on all the parameters refer to http://awstats.sourceforge.net/docs/awstats_config.html

Running/Building Statistic Database

It’s recommend to run/build the statistic database from the command line:

$ /opt/awstats/wwwroot/cgi-bin/awstats.pl -config=mysite -update

By default the statistic database is located in the directory /var/lib/awstats, but can be changed with the DirData parameter in the configuration file.

If log file rotation is implemented for your server, for example on a monthly basis, then there is a chance the last couple of visits from the preivous log file might not be included during the database update. You can run AWStats to override the log file that is defined configuration file.

$ /opt/awstats/wwwroot/cgi-bin/awstats.pl -config=mysite -LogFile=/path/to/previous/month/logfile

The update process can only accept files in chronological order, so if you have already processed a recent file, you must delete all the statistics database in /var/lib/awstats that is newer than the log file specified in the above command.

Viewing AWStats Reports

AWStats can generate static HTML reports or dynamically with their CGI program. To view reports dynamically, point your browser to http://www.example.com/awstats/awstats.pl?config=mysite

For more information refer to the AWStats documentation.

Google Bookmarks

, No Comments »

A couple of days ago I mentioned about Google Notebook. A couple of days later, I found another useful service by Google: Google Bookmarks. If you are like me, and use multiple computers on a daily basis (work, home, laptop), then you’ll probably end up with different sets of bookmarks for each computer. Google Bookmarks let you organize all this bookmarks so you can access them online from any computer by signing in. Google also lets you add labels and notes to your bookmarks as well.

Google Notebook

, No Comments »

Occasionally, I find myself sending email to myself. The email could be information that I got from a website I want to read later, or URLs that I found in my office hours that I want to visit when I get home. By doing this, it just floods my inbox more.

A couple days ago, I found a new service from Google: Google Notebook. This service basically lets you write notes to yourself. You can have more than one notebook, and in each notebook you can organizes your notes into different section. It’s definitely worth a try.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in