Table of Contents
This article, I will guide you to use the script to install LAMP stack PHP 7.3 in CentOS 6.10.
About lab server and script
I use a test server running CentOS 6.10 (Final) operating system 64bit.
The script I wrote will install the software package as follows.
- Apache: 2.2.15 (Unix).
- MariaDB: 10.3.13
- PHP: 7.3.3 (cli) use Remi’s repository.
Download and use script
First, we will download this script file from my gitlab repository to the server. You type the command below.
yum install wget -y && wget https://gitlab.com/Danny_Pham/WriteBash.com/raw/master/Install/11-Script_install_LAMP_PHP_7.3_in_CentOS_6.sh -O install_lamp.shAssign execution permissions to the script.
chmod 700 install_lamp.shAnd execute the script.
./install_lamp.shCheck the version and service status
You type the following commands to check the version of LAMP stack installed.

Recommended Reading: Script to install LAMP (PHP 7) on CentOS 7
Type to check Apache’s version.
[root@centos6 ~]# apachectl -v
Server version: Apache/2.2.15 (Unix)
Server built: Jun 19 2018 15:45:13And type this command to check MariaDB’s version.
[root@centos6 ~]# mysql -V
mysql Ver 15.1 Distrib 10.3.13-MariaDB, for Linux (x86_64) using readline 5.1Type this to check PHP’s version.
[root@centos6 ~]# php -v
PHP 7.3.3 (cli) (built: Mar 5 2019 18:50:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.3, Copyright (c) 1998-2018 Zend TechnologiesTo check service status, type commands as like below.
[root@centos6 ~]# service httpd status
httpd (pid 742) is running...
[root@centos6 ~]#
[root@centos6 ~]# service mysql status
SUCCESS! MariaDB running (468)Conclusion
The installation of LAMP stack PHP 7.3 has been successful. You have a environment to run your website. Now you need to set up virtualhost for your website.
This script only saves time installing the LAMP stack components, but it doesn’t complete the entire environment for you. You need to edit it manually to fit your website.
(This is an article from my old blog that has been inactive for a long time, I don’t want to throw it away so I will keep it and hope it helps someone).