Lab 3

Post on 28-Nov-2014

151 views 2 download

Tags:

Transcript of Lab 3

CSCI322 System Administration

Lab IIITran Thai Nguyen 3681877 BSSF

Login with root account and install apache2 from apt-get

Install MySQL-server-5.1 from apt-get

Install MySQL (contd’)

Install php5

Install all the necessary php extensions that needed by drupal

Download drupal using command “wget http://ftp.drupal.org/files/projects/drupal-7.7.tar.gz”

Edit the apache2.conf so that apache can interpret php pages and make drupal function properly

Open apache2.conf file using command “pico /etc/apache2/apache2.conf”

Add 2 lines to the end of apache2.conf file:

“AddType application/x-httpd-php .php .htm .html

AddHandler x-httpd-php .php .htm .html”

Prepare MySQL for user with drupal by running the install script, commands:

“mysql_install_db

mysql_secure_installation”

Prepare MySQL for user with drupal by running the install script, commands (contd’):

“mysql_install_db

mysql_secure_installation”

Prepare MySQL for user with drupal by running the install script, commands (contd’):

“mysql_install_db

mysql_secure_installation”

Creat a database and user account for drupal in MySQL, commands:

“mysql – u root –p

CREATE DATABASE drupal;

CREATE USER nguyentran;

SET PASSWORD FOR nguyentran = PASSWORD(“tran522”);

GRANT ALL PRIVILEGES ON drupal.* TO nguyentran@localhost IDENTIFIED BY ‘tran522’;”

Create a folder named drupal to store all the files for the installation process, command “mkdir /var/www/drupal”

Extract the contents of drupal-7.7.tar.gz using command “tar –zxvf drupal-7.7.tar.gz”

move all the file in drupal-7.7 to /var/www/drupal for installation, command: “mv drupal-7.7/* /var/www/drupal”

Create a new file called settings.php for installation by copy the contens of the file default.settings.php, commands:

“sudo cp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.phpsudo chmod 666 /var/www/drupal/sites/default/settings.php

sudo mkdir /var/www/drupal/sites/default/files

sudo chmod 666 /var/www/drupal/sites/default/files”

Open the drupal page to start installation using command “w3m localhost/drupal”

Go with the default profile for installation

Starting installation progress of drupal

Configuration for MySQL database

Configuration for MySQL database

Install profile

Confirgurations for drupal installation

Confirgurations for drupal installation (contd’)

Confirgurations for drupal installation (contd’)

Hightlight the “Visit your new site.” to go to localhost website

The localhost website after installing drupal

Make the file settings.php no longer writeable to prevent unwanted change from other users