WriteBash - How to install LAMP on CentOS 7 quickly? This article will guide you to use script to install LAMP (PHP 7) on CentOS 7 quickly. With just a few commands you have already installed the LAMP stack for yourself.
Please recheck your server resources before installation, here are the minimum recommend resources.
- OS: CentOS 7.4.1708 (Core) 64bit
- CPU: 1 vCPU
- RAM: over 1 GB memory
- HDD: over 5 GB free space
- User: root
- IP: set static ip, ex: 192.168.56.4
About script use to install LAMP
This script is used to install LAMP stack on CentOS 7 as quickly as possible. Normally, you will have to execute a lot of commands to install the LAMP stack successfully.
With this script, you only need to execute some short commands to install the LAMP stack on CentOS 7. This script will install the following software versions:
- Apache: Apache/2.4.6 (CentOS)
- MariaDB: 10.2.13
- PHP 7: PHP 7.2.3
Use script to install LAMP on CentOS 7
First, you need to download the script from my public repository.
wget https://gitlab.com/Danny_Pham/WriteBash.com/raw/master/Install/06-Script_install_LAMP_PHP_7.2_on_CentOS_7.sh -O /home/install.sh
Next, you grant 700 permissions for the downloaded script.
chmod 700 /home/install.sh
And finally you execute the script with the command below. At first run, the script will check the SELinux status on the server and disable if status is enforcing.
After the server reboot, run the executable commands script again to proceed with the installation.
If your installation is complete, the results shown in the image above, you have successfully installed the LAMP stack.
Check the LAMP stack
First, you visit the info.php page to see if PHP and Apache are working.
Next, you can type the commands below to check the status of each service.
Check out the Apache service.
systemctl status httpd
To check the MariaDB service.
systemctl status mariadb
And you can type the commands below to check the currently running version of the software.
Check Apache version.
And check MariaDB version.
To see PHP version.
I have tested the script on success with a CentOS 7 virtual machine, hope you use the script and install successfully.If 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.