Difference between revisions of "WebServer - Basic LAMP Stack Install"
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
*<code>sudo apt install apache2 libapache2-mod-php php-xml php-mbstring php-apcu php-intl imagemagick inkscape php-gd php-cli php-cgi php mysql-server mysql-client php-mysql</code> | *<code>sudo apt install apache2 libapache2-mod-php php-xml php-mbstring php-apcu php-intl imagemagick inkscape php-gd php-cli php-cgi php mysql-server mysql-client php-mysql</code> | ||
**Say Yes to Continue | **Say Yes to Continue | ||
+ | **<u>Configuring mysql-community-server</u> | ||
+ | ***Pick a good '''root''' password... | ||
+ | ***I tend to select '''Use Legacy Authentication Method''' because '''Use Strong Password Encryption''' is annoying as hell. (Your choice here...) | ||
====Configure MySQL==== | ====Configure MySQL==== | ||
*<code>sudo mysql_secure_installation</code> | *<code>sudo mysql_secure_installation</code> | ||
− | ** | + | **<u>Would you like to setup VALIDATE PASSWORD component?</u> |
− | *** | + | ***I select No (because I'd rather manage my own password policies, thanks...) |
+ | **<u>Using existing password for root.</u> | ||
+ | ***Say No | ||
+ | **<u>Remove anonymous users?</u> | ||
+ | ***Duh... Yes | ||
+ | **<u>Disallow root login remotely?</u> | ||
+ | ***Your choice, but I tend to say No. | ||
+ | **<u>Remove test database and access to it?</u> | ||
+ | ***Duh... Yes again. | ||
+ | **<u>Reload privilege tables now?</u> | ||
+ | ***Yes | ||
*([[WebServer - MySQL Notes|Extra Instructions if you've never configured MySQL before]]) | *([[WebServer - MySQL Notes|Extra Instructions if you've never configured MySQL before]]) | ||
Revision as of 17:11, 13 July 2020
- Proven on Mint 19.3
- Proven on SparkyLinux 5.11 ... (You'll have to fix the missing MySQL thing & install vim first)
Contents
Install the LAMP Stack
sudo apt install apache2 libapache2-mod-php php-xml php-mbstring php-apcu php-intl imagemagick inkscape php-gd php-cli php-cgi php mysql-server mysql-client php-mysql
- Say Yes to Continue
- Configuring mysql-community-server
- Pick a good root password...
- I tend to select Use Legacy Authentication Method because Use Strong Password Encryption is annoying as hell. (Your choice here...)
Configure MySQL
sudo mysql_secure_installation
- Would you like to setup VALIDATE PASSWORD component?
- I select No (because I'd rather manage my own password policies, thanks...)
- Using existing password for root.
- Say No
- Remove anonymous users?
- Duh... Yes
- Disallow root login remotely?
- Your choice, but I tend to say No.
- Remove test database and access to it?
- Duh... Yes again.
- Reload privilege tables now?
- Yes
- Would you like to setup VALIDATE PASSWORD component?
- (Extra Instructions if you've never configured MySQL before)
& 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...)