WriteBash - In this article, I will guide you to use the script to install the LAMP on Debian 9. I have successfully tested this script on Debian 9.3 64bit. Just a few lines of code you can install the LAMP stack quickly.
Server resource requirements
Server requirements are as follows:
- OS: Debian 9.x (in my demo, i use 9.3 Stretch) 64 bit.
- RAM: over 1GB memory.
- HDD: Minimum 1-2 GB of free space.
- IP: static IP, for example: 192.168.56.31
- User: root
Script to install LAMP on Debian 9
This script will automatically install the necessary software of the LAMP stack, the software version as follows:
- Apache 2.4.25
- MariaDB 10.1.26
- PHP 7.0.27-0+deb9u1
Steps to use the script to install the LAMP stack are as follows.
Step 1, you download the script from my repository.
wget https://gitlab.com/Danny_Pham/WriteBash.com/raw/master/Install/03-Script_install_LAMP_PHP_7.0_on_Debian_9.sh -O /home/install.sh
Step 2, you have to grant permission 700 for this script.
chmod 700 /home/install.sh
And the last step, execute the script, noting that the script must be executed by the root user. Script will automatically update, add the necessary repository and install the package.
Depending on the speed of your internet connection, you may have to wait 10 to 15 minutes to complete the installation process.
Read more: Script to install LAMP on Debian 8.
Check the LAMP stack after installation
Now, you can open the browser up, visit the page http://your_server_ip/info.php. The result like image below.
To check Apache service, you type the below command.
systemctl status apache2
To check MariaDB service, you type the below command.
systemctl status mysql
And to see PHP version, please type command.
php -vIf you liked this article, then please subscribe to our YouTube Channel for more video tutorials. You can also find us on Twitter and Facebook.
If you appreciate what we share in this blog, you can support us by:
- Stay connected to: Facebook | Twitter | Google Plus | YouTube
- Subscribe email to recieve new posts from us: Sign up now.
- Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
- Become a Supporter - Make a contribution via PayPal.
- Support us by purchasing Ribbon Lite Child theme being using on this website.
We are thankful for your support.