wiki:Csle2022/Agenda/databaseandweb

Version 3 (modified by admin, 19 months ago) ( diff )

--

Apache Web Server Installation

perfSONAR Installation Options

First update the Ubuntu package repository.

sudo apt update

Then install the web server.

sudo apt install apache2

Check the apache version

apache2 -v

Now visit your server through the IP address. http://server_ip_address.

https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/databaseandweb/web1.png

PHP Installation

Then install PHP and related modules for apache server and MariaDB.

sudo apt install php libapache2-mod-php php-mysql

To test that your system is properly configured for PHP, create a PHP script called info.php. Here we will create at the root directory.

sudo nano /var/www/html/info.php

Insert the following command to show the php information.

<?php
phpinfo();
?>

MariaDB DBMS Installation

Here we will choose MariaDB DBMS as our database application. Install this using below command.

sudo apt install mariadb-server mariadb-client

Once installed check the version,

mysql --version

For mysql there is a script that strengthen the mariaDB server security. It is a series of yes no questions which removes initial weaknesses of the server.

To execute the scripts,

sudo mysql_secure_installation

https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/databaseandweb/web2.png

To login MariaDB enter below command and use the password entered above.

sudo mysql -u root -p

https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/databaseandweb/web3.png

To exit type,

exit

Apache Virtual Hosting

Attachments (29)

Note: See TracWiki for help on using the wiki.