User Tools

Site Tools


guides:webserver:part2

This is an old revision of the document!


Guides: Web server: Part 2

Installing Web/DB/PHP

  • Now we'll install the web server (Apache), the database (MySQL) and PHP:
sudo apt update
sudo apt install apache2 php php-mysql mysql-server
  • Connect to the database as the root (admin) user:
sudo mysql -u root
  • Then, inside the mysql client, we created the database and created a user called ‘coding_username’, with the password ‘cheese’ and gave it access to the newly created ‘coding’ database:
CREATE DATABASE coding;
GRANT ALL ON coding.* TO coding_username@localhost IDENTIFIED BY 'cheese';
quit;
  • Then we downloaded the Adminer software (https://www.adminer.org/) using the command line downloader on the Amazon instance (i.e. do this in putty on your server, don't download it to your laptop):
wget https://github.com/vrana/adminer/releases/download/v4.7.3/adminer-4.7.3.php
  • Then copy the file we downloaded to the web directory:
sudo cp adminer-4.7.3.php /var/www/html/adminer.php
  • Now we could access the Adminer program by adding /adminer.php to your public Amazon EC ip address
guides/webserver/part2.1570193181.txt.gz · Last modified: 2019/10/04 13:46 by admin