Lab 3

28
CSCI322 System Administration Lab III Tran Thai Nguyen 3681877 BSSF

Transcript of Lab 3

Page 1: Lab 3

CSCI322 System Administration

Lab IIITran Thai Nguyen 3681877 BSSF

Page 2: Lab 3

Login with root account and install apache2 from apt-get

Page 3: Lab 3

Install MySQL-server-5.1 from apt-get

Page 4: Lab 3

Install MySQL (contd’)

Page 5: Lab 3

Install php5

Page 6: Lab 3

Install all the necessary php extensions that needed by drupal

Page 7: Lab 3

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

Page 8: Lab 3

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

Page 9: Lab 3

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”

Page 10: Lab 3

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

“mysql_install_db

mysql_secure_installation”

Page 11: Lab 3

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

“mysql_install_db

mysql_secure_installation”

Page 12: Lab 3

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

“mysql_install_db

mysql_secure_installation”

Page 13: Lab 3

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’;”

Page 14: Lab 3

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”

Page 15: Lab 3

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

Page 16: Lab 3

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”

Page 17: Lab 3

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

Page 18: Lab 3

Go with the default profile for installation

Page 19: Lab 3

Starting installation progress of drupal

Page 20: Lab 3

Configuration for MySQL database

Page 21: Lab 3

Configuration for MySQL database

Page 22: Lab 3

Install profile

Page 23: Lab 3

Confirgurations for drupal installation

Page 24: Lab 3

Confirgurations for drupal installation (contd’)

Page 25: Lab 3

Confirgurations for drupal installation (contd’)

Page 26: Lab 3

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

Page 27: Lab 3

The localhost website after installing drupal

Page 28: Lab 3

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