Difference between revisions of "WebServer - Basic LAMP Stack Install"

From The TinkerNet Wiki
Jump to navigation Jump to search
Line 3: Line 3:
 
*<code>apt install apache2 mysql-server mysql-client php php-mysql libapache2-mod-php php-xml php-mbstring php-apcu php-intl imagemagick inkscape php-gd php-cli php-cgi</code>
 
*<code>apt install apache2 mysql-server mysql-client php php-mysql libapache2-mod-php php-xml php-mbstring php-apcu php-intl imagemagick inkscape php-gd php-cli php-cgi</code>
  
==== Configure MySQL ====
+
====Configure MySQL====
  
 
*<code>sudo mysql_secure_installation</code>
 
*<code>sudo mysql_secure_installation</code>
Line 25: Line 25:
 
  CREATE USER 'someone'@'localhost' IDENTIFIED BY 'password';
 
  CREATE USER 'someone'@'localhost' IDENTIFIED BY 'password';
 
  EXIT;
 
  EXIT;
 +
('''Hint:'''  This'd be a good time to create yourself as that user with your non-admin password of choice...)

Revision as of 01:41, 26 June 2020

Install the LAMP Stack

  • apt install apache2 mysql-server mysql-client php php-mysql libapache2-mod-php php-xml php-mbstring php-apcu php-intl imagemagick inkscape php-gd php-cli php-cgi

Configure MySQL

& Test it

  • sudo vi /var/www/html/info.php
<?php 
phpinfo();
?>

Browse to http://ServerAddress/ & you should see the default page.

Browse to http://ServerAddress/info.php & you should see a whole bunch of info about your PHP subsystem.

Set up at least one user in mysql

  • sudo mysql -u root -p
CREATE USER 'someone'@'localhost' IDENTIFIED BY 'password';
EXIT;

(Hint: This'd be a good time to create yourself as that user with your non-admin password of choice...)