LAMP (software bundle): Difference between revisions
Created page with "How to setup a lamp stack using Ubuntu.<br> Linux, Apache, MariaDB, PHP<br> ==Setup== ===Install Ubuntu=== Just download and install ===Install Apache=== ===Installing PHP=..." |
|||
Line 29: | Line 29: | ||
* Always use a version when installing things if you don't want things to break when you do updates | * Always use a version when installing things if you don't want things to break when you do updates | ||
** I.e. <code>php7.3-common</code> instead of <code>php-common</code> | ** I.e. <code>php7.3-common</code> instead of <code>php-common</code> | ||
===Installing MariaDB=== | |||
====Securing for Production==== | |||
MariaDB and MySQL provide a bash command [https://mariadb.com/kb/en/mysql_secure_installation/ <code>mysql_secure_installation</code>].<br> | |||
This command does the following: | |||
* Sets a root password | |||
* Remove anonymous users | |||
* Disallow root login remotely | |||
* Removes test databases | |||
<syntaxhighlight lang="bash"> | |||
sudo mysql_secure_installation | |||
</syntaxhighlight> |
Revision as of 20:33, 5 February 2020
How to setup a lamp stack using Ubuntu.
Linux, Apache, MariaDB, PHP
Setup
Install Ubuntu
Just download and install
Install Apache
Installing PHP
Reference
Installing PHP 7.3 on Ubuntu 16.04
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.3
# Install apache module for php
sudo apt install libapache2-mod-php7.3
sudo a2enmod php7.3
# Install some common extensions
sudo apt install php7.3-common php7.3-mysql php7.3-xml php7.3-xmlrpc php7.3-curl php7.3-gd php7.3-imagick php7.3-cli php7.3-dev php7.3-imap php7.3-mbstring php7.3-opcache php7.3-soap php7.3-zip php7.3-intl -y
# Restart apache2
sudo service apache2 restart
- Important Notes
- Always use a version when installing things if you don't want things to break when you do updates
- I.e.
php7.3-common
instead ofphp-common
- I.e.
Installing MariaDB
Securing for Production
MariaDB and MySQL provide a bash command mysql_secure_installation
.
This command does the following:
- Sets a root password
- Remove anonymous users
- Disallow root login remotely
- Removes test databases
sudo mysql_secure_installation