Install LAMPP on CentOS 7 via Command Line

Posted on

To solve a problem which is caused by the unsupported version of PHP toward an old web-based application built on Code Igniter version 1.7.1 besides the alternatives of using docker to provide application container running Apache Webserver that utilize PHP library which support Code Igniter version 1.7.1 is using a portable LAMPP.

Using LAMPP with the suitable PHP version will permit Apache Webserver to render the web-based application powered by Code Igniter version 1.7.1 properly. Below are the steps of doing it :

1. ┬áBefore the installation of LAMPP is started, it can be retrieved by downloading the installer package in below in XAMPP Linux version’s official download page :

The chosen file of LAMPP is xampp-linux-x64-1.8.3-5-installer.run. After successfully finished downloading the file, execute the following command to modify it so that it is executable :

cmod +x file_name
[root@hostname opt]# chmod +x xampp-linux-x64-1.8.3-5-installer.run
[root@hostname opt]#

2. Execute the file to begin the installation process with the following execution command :

[root@hostname opt]# ./xampp-linux-x64-1.8.3-5-installer.run
-----------------------------------------------------------------------
Welcome to the XAMPP Setup Wizard.
-----------------------------------------------------------------------
Select the components you want to install; clear the components you do not want to install. Click Next when you are ready to continue. 
XAMPP Core Files : Y (Cannot be edited) 
XAMPP Developer Files [Y/n] :Y

Just type ‘Y’ since it is on the stage of development for trial-and-error.

Is the selection above correct? [Y/n]: Y

Please type Y to initiate the installation process.

-----------------------------------------------------------------------
Installation Directory

XAMPP will be installed to /opt/lampp
Press [Enter] to continue:

Just type enter, so that the installation folder of LAMPP will be specified in the default location which is in /opt/lampp :

-----------------------------------------------------------------------
Setup is now ready to begin installing XAMPP on your computer.

Do you want to continue? [Y/n]: Y

Just type ‘Y’ to begin the installation process as shown below :

-----------------------------------------------------------------------
Please wait while Setup installs XAMPP on your computer.
Installing
0% ______________ 50% ______________ 100%
#########################################

-----------------------------------------------------------------------
Setup has finished installing XAMPP on your computer.

[root@hostname opt]# cd lampp/

To be able to check whether LAMPP can be used or not, below is the step of the execution for preparation:

[root@hostname lampp]# ls
[root@hostname lampp]# lamp security
-bash: lamp: command not found
[root@hostname lampp]# sh lampp security
XAMPP: Quick security check...
XAMPP: Your XAMPP pages are NOT secured by a password.
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Password protection active. Please use 'xampp' as user name!
XAMPP: MySQL is accessable via network.
XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] yes
XAMPP: Turned off.
XAMPP: MySQL has to run before I can check the security.
XAMPP: MySQL has to run before I can check the security.
XAMPP: MySQL has a root passwort set. Fine! :)
XAMPP: The FTP password for user 'daemon' is still set to 'xampp'.
XAMPP: Do you want to change the password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Passwords doen't match. Please try again.
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Reload ProFTPD...not running.
XAMPP: Done.
[root@hostname lampp]#

To start LAMPP, below is the command which is needed to be executed :

[root@hostname lampp]# /opt/lampp/lampp start
Starting XAMPP for Linux 1.8.3-5...
XAMPP: Starting Apache...already running.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...already running.
[root@hostname lampp]#

As shown in the above command execution, the process of starting LAMPP has already success.

One thought on “Install LAMPP on CentOS 7 via Command Line

Leave a Reply