Script to install LAMP stack PHP 7.3 in CentOS 6

by Daniel Pham
Published: Updated:

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.sh

Assign execution permissions to the script.

chmod 700 install_lamp.sh

And execute the script.

./install_lamp.sh

Check the version and service status

You type the following commands to check the version of LAMP stack installed.

install lamp stack php 7.3 in centos 6.10
Install LAMP stack PHP 7.3 in CentOS 6.10.

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:13

And 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.1

Type 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 Technologies

To 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).

0 0 votes
Article Rating

You may also like

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

DevOps Lite is a personal blog specializing in technology with main topics about DevOps, DevSecOps, SRE and System Administrator. Articles are shared for free and contributed to the community.

SUPPORT US

FOLLOW US

Subscribe my Newsletter for new blog posts. Stay updated from your inbox!

© 2021-2024 DevOpsLite.com – All rights reserved.

Please write sources “DevOpsLite.com” when using articles from this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

2
0
Would love your thoughts, please comment.x
()
x

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.