Difference between revisions of "WebServer - Basic LAMP Stack Install"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
{{{!}} class="wikitable" style="float: right; width: 322px;" border="2" | |||
{{!}}+ Proven on: | |||
{{!}}- | |||
{{!}} style="text-align: center; width: 67.5125px;" {{!}} [[File:Logo Mint.png{{!}}60px{{!}}link=https://linuxmint.com{{!}}center{{!}}middle{{!}}frameless]] | |||
{{!}} style="text-align: center; width: 65.675px;" {{!}} [[File:Logo LMDE.png{{!}}60px{{!}}link=https://linuxmint.com/edition.php?id=279{{!}}center{{!}}middle{{!}}frameless]] | |||
{{!}} style="text-align: center; width: 72.1125px;" {{!}} [[File:Logo Debian.png{{!}}60px{{!}}link=https://www.debian.org/{{!}}center{{!}}middle{{!}}frameless]] | |||
{{!}} style="text-align: center; width: 65.7px;" {{!}} [[File:Logo Sparky.png{{!}}60px{{!}}link=https://sparkylinux.org/{{!}}center{{!}}middle{{!}}frameless]] | |||
{{!}}- | |||
{{!}} style="width: 67.5125px;" {{!}} 19.3 / 20.3 | |||
{{!}} style="width: 65.675px;" {{!}} 4 | |||
{{!}} style="width: 72.1125px;" {{!}} 11 (bullseye) | |||
{{!}} style="width: 65.7px;" {{!}} 5.11 | |||
{{!}}- | |||
{{!}} style="width: 67.5125px;" {{!}} | |||
<br> | |||
{{!}} style="width: 65.675px;" {{!}} | |||
<br> | |||
{{!}} style="width: 72.1125px;" {{!}} ([[#Debian Caveat{{!}}caveat]]) | |||
{{!}} style="width: 65.7px;" {{!}} | |||
<br> | |||
{{!}}} | |||
=== Install the LAMP Stack === | === Install the LAMP Stack === | ||
Line 12: | Line 30: | ||
** You'll need to install: | ** You'll need to install: | ||
*** [[MySQL]] | *** [[MySQL]] | ||
*** & Possibly, [[Fixing vim | *** & Possibly, [[Fixing vim{{!}}vim]] | ||
==== Install the packages ==== | ==== Install the packages ==== | ||
Line 47: | Line 65: | ||
*<code>sudo vi /var/www/html/info.php</code> | *<code>sudo vi /var/www/html/info.php</code> | ||
<!--?php phpinfo(); | <!--?php phpinfo(); | ||
?--> | |||
Browse to http://ServerAddress/ & you should see the default page. | Browse to http://ServerAddress/ & you should see the default page. | ||
Revision as of 16:24, 12 January 2022
19.3 / 20.3 | 4 | 11 (bullseye) | 5.11 |
|
|
(caveat) |
|
Install the LAMP Stack
- If you are running Mint 19.3
- If you are running a Debian based Linux
Install the packages
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 (Doesn't happen on Mint but DOES happen on LMDE)
- 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...)
- root password
- Please set the password for root here.
- Pick a good root password...
- Please set the password for root here.
- or... (depends on install...)
- Using existing password for root.
- Say No
- Using existing password for root.
- 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
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.
Notice that those 2 addresses are HTTP, and NOT HTTPS. This is important and Chrome will mess with you.
Set up at least one user in mysql
sudo mysql -u root -p
CREATE USER 'someone'@'localhost' IDENTIFIED BY 'password'; FLUSH PRIVILEGES; EXIT;
(Hint: This'd be a good time to create yourself as that user with your non-admin password of choice...)