Tuesday, July 29, 2008

Installing AddressBook

Here we have how to install:


- AddressBook v4.0
- AddressBook v3.1.5


AdressBook v4.0 HOWTO

# Install Apache with it's documentation #####
$ sudo apt-get install apache2 apache2-doc


# Start Apache (it should already be started) #####
$ sudo /etc/init.d/apache2 start


# Test Apache #####

Type in on Mozilla Firefox: http://127.0.0.1/
It should read: It works!

Nota: The page "It works!" is at /var/www,
which is apaches root directory,
so this is where we will put the addressbook.





# Install the needed MySQL e PHP dependencies #####

$ sudo apt-get install mysql-server mysql-client
Type MySQL root password in the upcoming textbox.

$ sudo apt-get install libapache2-mod-php5 libapache2-mod-perl2

$ sudo apt-get install php5 php5-cli php5-common php5-curl php5-dev php5-gd php5-imap php5-ldap

$ sudo apt-get install php5-mhash php5-mysql php5-odbc curl libwww-perl imagemagick


# Download the AdressBook (http://sourceforge.net/projects/php-addressbook/)

$ cd ~/Desktop

$ wget http://downloads.sourceforge.net/php-addressbook/addressbookv4.0.zip?modtime=1212528743&big_mirror=0



# Extrair o AddressBook #####

$ cd ~/Desktop

$ unzip addressbookv4.0.zip



# Install o AdressBook no Apache #####

# Copiar o AdressBook para /var/www (apache root dir)
$ sudo cp -vr addressbookv4.0 /var/www


# Give Apache (apache-user: www-data) permitions over the AddressBook files #####

$ sudo chown www-data -vR /var/www/addressbookv4.0/*



# Configure the AdressBook #####


# Create AddressBook's database #####

$ mysql -u root -p

mysql> create database addressbook_db;

mysql> exit



# Configure AddressBook's connection to the database #####

$ sudo gedit /var/www/addressbookv4.0/config/config.php

No ficheiro:

// Database access definition
// $dbname = "your_database";
// $dbserver = "localhost";
// $dbuser = "username";
// $dbpass = "password";


// Database access definition
$dbname = "addressbook_db";
$dbserver = "localhost";
$dbuser = "root";
$dbpass = "12314467";



# Create the necessary table at the AdressBook's database #####

$ mysql addressbook_db -u root -p < /var/www/addressbookv4.0/addressbook.sql



# Restart Apache #####

$ sudo /etc/init.d/apache2 restart



# Delete the test page #####

$ sudo rm -rf /var/www/index.html



# Configure AdressBook #####

On Mozilla Firefox type in:
http://127.0.0.1/addressbookv4.0 ou http://127.0.0.1/addressbookv4.0/index.php
now just configure addressbook acording to the presented instructions.



AdressBook v3.1.5 HOWTO

# Install Apache with it's documentation #####
$ sudo apt-get install apache2 apache2-doc

# Start Apache (it should already be started) #####
$ sudo /etc/init.d/apache2 start


# Test Apache #####

Type in on Mozilla Firefox: http://127.0.0.1/
It should read: It works!

Nota: The page "It works!" is at /var/www,
which is apaches root directory,
so this is where we will put the addressbook.




#Install the needed MySQL e PHP dependencies #####

$ sudo apt-get install mysql-server mysql-client
Type MySQL root password in the upcoming textbox.

$ sudo apt-get install libapache2-mod-php5 libapache2-mod-perl2

$ sudo apt-get install php5 php5-cli php5-common php5-curl php5-dev php5-gd php5-imap php5-ldap

$ sudo apt-get install php5-mhash php5-mysql php5-odbc curl libwww-perl imagemagick




# Download the AddressBook (http://sourceforge.net/projects/php-addressbook/)

$ cd ~/Desktop

$ wget http://downloads.sourceforge.net/php-addressbook/addressbookv3.1.5.zip?modtime=1212528743&big_mirror=0



# Extract the AddressBook #####

$ cd ~/Desktop

$ unzip addressbookv3.1.5.zip



# Install AddressBook on Apache #####

# Copiar o AdressBook para /var/www (apache root dir)

$ sudo cp -vr addressbookv3.1.5 /var/www


# Give Apache (apache-user: www-data) permitions over the AddressBook files #####

$ sudo chown www-data -vR /var/www/addressbookv4.0/*



# Configure the AdressBook #####

# Create AddressBook's database #####

$ mysql -u root -p

mysql> create database addressbook_db;

mysql> exit



# Configure AddressBook's connection to the database #####

$ sudo gedit /var/www/addressbookv3.1.5/include/config.php

Change the following at the file:

// Database access definition
// $dbname = "your_database";
// $dbserver = "localhost";
// $dbuser = "username";
// $dbpass = "password";


// Database access definition
$dbname = "addressbook_db";
$dbserver = "localhost";
$dbuser = "root";
$dbpass = "12314467";



# Create the necessary table at the AdressBook's database #####

$ mysql addressbook_db -u root -p < /var/www/addressbookv3.1.5/addressbook.sql



# Restart Apache #####

$ sudo /etc/init.d/apache2 restart



# Delete the test page #####

$ sudo rm -rf /var/www/index.html



# Configure AdressBook #####

On Mozilla Firefox type in :

http://127.0.0.1/addressbookv3.1.5
or http://127.0.0.1/addressbookv3.1.5/index.php

now just configure addressbook acording to the presented instructions.