VOOZH about

URL: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04?comment=47578

โ‡ฑ Install LAMP Stack on Ubuntu: Complete Guide | DigitalOcean


Install LAMP Stack on Ubuntu: Complete Guide

Updated on November 30, 2021
Not using Ubuntu 16.04?
Choose a different version or distribution.
Ubuntu 16.04
๐Ÿ‘ Install LAMP Stack on Ubuntu: Complete Guide

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

Still looking for an answer?

Was this helpful?

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

How to find your droplets IP: type โ€˜ifconfigโ€™ and it should be the top device/interface. inet addr: YOUR_IP

Nice!

How can I restore a Full Backup done with Cpanel, in my new VPS after install wordpress?

Awesome tutorial!

PHP doesnโ€™t seem to work with Apache though.

sudo a2enconf php7.0.conf returns ERROR: Conf php7.0 does not exist!. ls -la | grep php returns:

-rw-r--r-- 1 root root 867 Apr 14 13:13 php7.0.conf
-rw-r--r-- 1 root root 79 Apr 14 13:13 php7.0.load

I also ran sudo a2enmod php7.0, which returned:

Considering conflict php5 for php7.0:
Enabling module php7.0.
To activate the new configuration, you need to run:
 service apache2 restart

However, php5 is not installed. sudo a2dismod php5 returns another error saying it doesnโ€™t exist.

I successfully installed apache2 but there is not in ufw list. Why and how can I configured it?

Thank you, thank you, thank you! i cannot thank you enough. i could fall at your feet and kiss them. this tut saved my life!

Unable to render php code after upgrading the ubuntu 16.04. By following to install the php with above process.

Should this work on 32 bit computers as well? Or do you need php7 in combination with 64 bit computer?

I try to install lamp on ubuntu 16.04 for 2 weeks already and guess that 32 bit will be the reason of my failures?

This comment has been deleted

Step 3: Install PHP $ sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql Reading package listsโ€ฆ Done Building dependency tree Reading state informationโ€ฆ Done E: Unable to locate package php E: Unable to locate package libapache2-mod-php E: Unable to locate package php-mcrypt E: Unable to locate package php-mysql

Yeah, this works. Not.

๐Ÿ‘ Creative Commons
This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 4.0 International License.
  • Deploy on DigitalOcean

    Click below to sign up for DigitalOcean's virtual machines, Databases, and AIML products.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and AI-native businesses

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOceanโ€™s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow โ€” whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

ยฉ 2026 DigitalOcean, LLC.Sitemap.
Dark mode is coming soon.