Install LAMP Stack on Ubuntu 16.04 Xenial Xerus
Build notes for installing Apache, MariaDB, PHP.
Install Apache
Install PHP
Install PHP with extra modules.
Install Maria DB
Use the online respository configuration tool. Select a local mirror.
Based on Ubuntu Xenial, stable release:
Secure MariaDB by removing anonymous users, removing the test database and disallowing external access:
Install PHP Extras
For extensions available, enable with phpenmod
:
Extra extensions may be required. For example, if multibyte functions are used in apps, you will need php-mbstring
:
Install PHPMyAdmin
Install phpMyAdmin:
An ncurses window will open that enables phpMyAdmin to be configured.
- To select a server, hit space then tab/return
- Choose “yes” when asked “Configure database for phpmyadmin with dbconfig-common?”
- Enter a password for phpMyAdmin when prompted
Once installed, PHPMyAdmin needs to be added to the Apache config file:
Restart apache:
When installing phpMyAdmin on Xenial Xerus, you may encounter a blank white screen of death. Try checking the Apache error log to determine the problem:
tail -f /var/log/apache2/error.log
In my case, the relevant error was:
[Fri Jun 17 20:04:50.205836 2016] [:error] [pid 8089] [client 127.0.0.1:34540] PHP Fatal error: require_once(): Failed opening required '/usr/share/php/php-gettext/gettext.inc' (include_path='.:/usr/share/php') in /usr/share/phpmyadmin/libraries/select_lang.lib.php on line 477
This means that the php-gettext extension is required. Install this and restart Apache to fix:
sudo apt-get install php-gettext
sudo service apache2 restart
comments powered by Disqus