in Web and Tech, Work

AMP setup on Ubuntu Focal Fossa (20.04 LTS)

#go root
sudo -s

#install mysql
apt-get -y install mysql-server mysql-client

#secure mysql 
mysql_secure_installation

#test mysql installation success
mysql -u root -p

#install apache
apt-get -y install apache2

#install php and apache php module
sudo apt update
sudo apt install php libapache2-mod-php 

#restart apache
systemctl restart apache2

#test php 
nano /var/www/html/info.php
# <?php phpinfo();
chown www-data:www-data /var/www/html/info.php

#search for additional and available support packages; including mysql
apt-cache search php7.4
apt-cache search php-

#install other support packages
apt-get -y install php7.4-mysql php7.4-curl php7.4-gd php7.4-gmp php7.4-json php7.4-ldap php7.4-odbc php7.4-opcache php7.4-sqlite3 php7.4-tidy php7.4-xml php-geoip php7.4-imap php7.4-intl php7.4-mbstring php7.4-soap php-xdebug php-oauth php-memcache php-mongodb php-mailparse php-imagick php7.4-opcache php-codesniffer php-pear php7.4-xmlrpc php7.4-xsl php7.4-zip php-mime-type php-mail 

#restart apache
systemctl restart apache2

#enable SSL
a2enmod ssl
a2ensite default-ssl

#reload apache
systemctl reload apache2

References:
https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-on-ubuntu-18-04-lamp/
https://websiteforstudents.com/how-to-install-php-on-ubuntu-20-04-18-04/

Write a Comment

Comment

Webmentions

  • LAMP setup on development server running Ubuntu Desktop 13.04 – The infraGrey Journal

    […] UPDATE (June 2020): Ubuntu has certainly come a long way. Today I bid my Trusty Tahr (14.04)  install goodbye and said hello to Focal Fossa (20.04 LTS). Details on the process are here: http://infragrey.com/notes/archives/1022. […]