
 ===================================
 Bookmark4U Installation Instruction
 ===================================

 -=-=-=-
 Notice!
 -=-=-=-
   If you want to upgrage Bookmark4U from the previous version,
   you should upgrade your database, too.
   Please read the file UPGRADE.txt to upgrade your database structure.


 Step 0. Requirements
 -=-=-=-=-=-=-=-=-=-=
 Install MySQL.
 Install Apache and PHP.
   The following PHP configure options are required:
     --with-apache=../apache_1.3.xx/
     --enable-track-vars 
     --with-mysql=/your/path/to/mysql

 Step 1. Extracting the package
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

  Extract the tar ball by typing in your command line as follow:

  $ cd /usr/local/apache/htdocs (extract in the apache html document directory)
  $ tar zxvf bookmark4u-x.x.x.tar.gz
  $ cd bookmark4u-x.x.x/

  where x.x.x is the version of bookmark4u.


 Step 2. Creating a database
 -=-=-=-=-=-=-=-=-=-=-=-=-=-

  Create a database for Bookmark4U.
  For example, create a database named 'bookmark4u'.

  $ mysql [-u user] [-p]
  mysql> create database bookmark4u;
  mysql> quit

  or alternatively

  $ mysqladmin [-u user] [-p] create bookmark4u


 Step 3. Editing configuration
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Edit config.php in the inc/ directory. (inc/config.php)
  To connect your mysql server, check the following variables in config.php:

    $conf[dbhost]   = "localhost";  # database server
    $conf[dbuser]   = "root";       # database user
    $conf[dbpasswd] = "";           # database user's password
    $conf[dbname]   = "bookmark4u"; # database name (created in Step 2)

  For other configure options, refer to the file CONFIG.txt


 Step 4. Creating tables
 -=-=-=-=-=-=-=-=-=-=-=-
  There are two ways to create basic tables for Bookmark4U.
  One is to use mysql command line tool, and the other is to use database
  configuration tool included in Bookmark4U. The latter is more convenient
  for beginners.

  = Note =
  An administrator account(admin) is created during this step.
  The initial password for admin is 'test'. Please change this password
  after configuration.
  =

  (Manually)

  To create basic tables for Bookmark4U type in your commend line as follow:

  $ mysql bookmark4u [-u user] [-p] < sql/db.mysql.sql

  The following basic tables are generated in the database.
  The table 'PASSWD' is used to store the login informatin of all users.
  The table 'PASSWD_TEMP' is used to store informatin of temporary users.
  The table 'CONFIG' is for user configuration and memo data.
  The table 'TRASH' is trashcan for all users.
  The table 'CALENDAR' is for schedules of all users.


  (Using database configuration tool)

  Database configuration tool is used not only to create basic tables
  but also to upgrade existing tables of Bookmark4U.

  To create basic tables for Bookmark4U open URL
   http://yourhost/path/to/bookmark4u/admin/config.php

  This script checks if required tables exist and if the structure of
  each table is correct.

  If step 1 or step 2 is failed, you should edit your inc/config.php correctly.

    $conf[dbhost]   = "localhost";  # database server
    $conf[dbuser]   = "root";       # database user
    $conf[dbpasswd] = "";           # database user's password
    $conf[dbname]   = "bookmark4u"; # database name

  If step 1 and step 2 success, the following messages are printed.

    Step 1. Testing database connection ... Success.
    Step 2. Testing database selection ... Success.

  If your database is empty (no table exists in the database), a few error
  messages are printed

    Step 3. Checking basic tables in the database ... 
    Error ... table 'PASSWD' does not exist in the database!! 
    Error ... table 'PASSWD_TEMP' does not exist in the database!! 
    Error ... table 'CONFIG' does not exist in the database!! 
    Error ... table 'TRASH' does not exist in the database!! 
    Error ... table 'CALENDAR' does not exist in the database!! 
    You have problems in the database tables 

  followed by SQL command execution blocks.
    +------------------------------+
    | SQL commands                 +
    +------------------------------+
          [[ Execute Above ]]

  Click the 'Execute Above' button one after another.

  After creating all required basic tables, you can see the followin message.

    Step 3. Checking basic tables in the database ... Success.

  Next step, tool checks if an admin account exists.
  Click the 'Execute Above', too.

  After successfully configuring your database, you can see success message.

    Congratulation!! You have successfully configured Bookmark4U!!


 Step 5. Browsing your Bookmark4U
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

  Execute your favorite browser, and open the bookmark4u-x.x.x directory :

  http://host.domain/path/to/bookmark4u-x.x.x/

  If it works, you are lucky! Otherwise, check error messages and try again.
  Enjoy it. Thank you.

-- INSTALL.txt
