L2MP web stack (Linux, LiteSpeed, MariaDB, PHP) for Centos 6
ZIP file L2MP.zip is script shell based command line control panel to setup LiteSpeed server on Centos Linux distribution
for HTML, PHP, MySQL, WordPress, Joomla, etc sites.
L2MP is a Linux, LiteSpeed, MariaDB MySQL and PHP (LSAPI) web stack for CentOS, it's a shell menu based installer that allows LiteSpeed and PHP version management setting up LiteSpeed vhosts etc.
LiteSpeed
LiteSpeed Web Server (LSWS) is a high-performance Apache drop-in replacement. LSWS is the 4th most popular web server on the internet and the #1 commercial web server. Upgrading your web server to LiteSpeed Web Server will improve your performance and lower operating costs.
MySQL or MariaDB
MySQL is the world's most popular open source database. With its proven performance, reliability and ease-of-use, MySQL has become the leading database choice for web-based applications, used by high profile web properties including Facebook, Twitter, YouTube, Yahoo! and many more.
Oracle drives MySQL innovation, delivering new capabilities to power next generation web, cloud, mobile and embedded applications.
MariaDB is a drop-in replacement for MySQL.
MariaDB strives to be the logical choice for database professionals looking for a robust, scalable, and reliable SQL server. To accomplish this, the MariaDB Foundation work closely and cooperatively with the larger community of users and developers in the true spirit of Free and open source software, and release software in a manner that balances predictability with reliability.
PHP (LSAPI)
PHP LiteSpeed SAPI has been developed to push PHP performance to next level, giving LiteSpeed Web Server better PHP performance than any other popular web server.
CSF Firewall script
CSF is ConfigServer Firewall, an SPI iptables firewall that is straight-forward, easy and
flexible to configure and secure with extra checks to ensure smooth operation.
Installing and Using:
Install:
yum -y install zip unzip wget
wget https://dl.l2mp.ml/L2MP.zip
unzip L2MP.zip
cd L2MP/
bash install-L2MP.sh
Welcome to L2MP, Thank you for using!
We will install L2MP stack on Linux CentOS 6.x 64bit:
+LiteSpeed Web Server Enterprise Edition 4.0.1
+PHP 5.3 (or 5.4, 5.5, 5.6)
+MySQL 5.1 (or 5.5, MariaDB 5.5, 10.0)
Please press Enter to install L2MP: <== Enter
I. Install LiteSpeed Web Server Enterprise Edition 4.0.1
CentOS release 6.7 (Final) x86_64
We will install LiteSpeed Web Server Enterprise Edition 4.0.1
WARNING: Please install LiteSpeed into /usr/local/lsws
Please press Enter to install L2MP: <== Enter
Do you agree with above license? <== Enter
Destination [/opt/lsws]: /usr/local/lsws <== Enter
[OK] Your trial license key will expire in 0 days!
User name [admin]: <== Enter
Password:123456 <== Enter
Retype password:123456 <== Enter
Email addresses [root@localhost]: <== Enter
Will you use LiteSpeed Web Server with a hosting contorl panel?
0. NONE
1. cPanel
2. DirectAdmin
3. Plesk
Please select (0-3) [0]? <== Enter
User [nobody]: <== Enter
Group [nobody]: <== Enter
HTTP port [8088]: 80 <== Enter
Admin HTTP port [7080]: <== Enter
Setup up PHP [Y/n]: <== Enter
Suffix for PHP script(comma separated list) [php]: <== Enter
Enable chroot [y/N]: <== Enter
Would you like to install AWStats Add-on module [y/N]? <== Enter
Would you like to have LiteSpeed Web Server started automatically
when the server restarts [Y/n]? <== Enter
[OK] The startup script has been successfully installed!
Would you like to start it right now [Y/n]? <== Enter
[OK] lshttpd: pid=217.
LiteSpeed Web Server started successfully! Have fun!
II. Install PHP - LSAPI
We will install PHP:
1. PHP 5.3
2. PHP 5.4
3. PHP 5.5
4. PHP 5.6
5. PHP 5.4 (with ImageMagick+Memcached+Opcache)
6. PHP 5.5 (with ImageMagick+Memcached+Opcache)
7. PHP 5.6 (with ImageMagick+Memcached+Opcache)
Please Enter your answer [1,2,3,4,5,6,7]:7 <== Enter
III. Install MySQL Database Server
We will install MySQL Database Server:
1. MySQL 5.1
2. MySQL 5.5
3. MariaDB 5.5
4. MariaDB 10.0
Please Enter your answer [1,2,3,4]:4 <== Enter
Enter current password for root (enter for none): <== Enter
Set root password? [Y/n] <== Enter
New password:123456 <== Enter
Re-enter new password:123456 <== Enter
Remove anonymous users? [Y/n] <== Enter
Disallow root login remotely? [Y/n] <== Enter
Remove test database and access to it? [Y/n] <== Enter
Reload privilege tables now? [Y/n] <== Enter
IV. Install CSF Firewall
We will install CSF Firewall:
1. AUTO config RULE CSF
2. NOT config RULE CSF
Please Enter your answer [1,2]:1 <== Enter
Successfully Install L2MP stack!
Auto Add Website and Database command:
[root@104.24.120.238]# ADDWEB domain.com
+LiteSpeed link: http://104.24.120.238:7080
+PHP INFO link: http://104.24.120.238/info.php
+PhpMyAdmin link: http://104.24.120.238/phpmyadmin/index.php
+SFTP link: sftp://104.24.120.238 Port SSH
Thank you for using!
Using:
Add more a website: ADDWEB domain.com
Fix permission homedir: FIXHOME
Backup full data /home and MySQL: MOVEFULL backupnow
Restore full data /home and MySQL: MOVEFULL restorenow
-Add a website:
[root@104.24.120.238]# ADDWEB domain.com
Please Enter Root Admin Database Server Username:root <== Enter
Please Enter Root Admin Database Server Password:123456 <== Enter
Successfully Auto Add Website domain.com
+LiteSpeed link: http://domain.com:7080
+PHP INFO link: http://domain.com/info.php
+PhpMyAdmin link: http://104.24.120.238/phpmyadmin
Database name: domaimtuad
Database user: domaimtuad
Database pass: jn3d4pWsGP
+SFTP link: sftp://domain.com Port 22
SFTP user: domain.com
SFTP pass: eoxzdo6CZt
Website homedir: /home/domain.com/public_html
Thank you for using!
[root@domain ~]# MOVEFULL backupnow
ERROR: Cannot Login to Database Server: root|
Please input password root MySQL into file /usr/local/lsws/MOVEFULL.sh!
[root@domain ~]# nano /usr/local/lsws/MOVEFULL.sh
#!/bin/bash
################################### Please Add User Root MySQL:
#'Please Enter Root Admin Database Server Username:'
usernameroot='root'
#'Please Enter Root Admin Database Server Password:'
passwordroot='123456'
#Ctrl+X Save and Run Again:
[root@domain ~]# MOVEFULL backupnow
Backup all data L2MP to a backup file: /backup/movefull-[DATE=02-09-2015_TIME=08h52].zip
Backup Done!
-Restore full data /home and MySQL:
[root@domain ~]# MOVEFULL restorenow
ERROR: Cannot Login to Database Server: root|
Please input password root MySQL into file /usr/local/lsws/MOVEFULL.sh!
[root@domain ~]# nano /usr/local/lsws/MOVEFULL.sh
#!/bin/bash
################################### Please Add User Root MySQL:
#'Please Enter Root Admin Database Server Username:'
usernameroot='root'
#'Please Enter Root Admin Database Server Password:'
passwordroot='123456'
#Ctrl+X Save and Run Again:
[root@domain ~]# MOVEFULL restorenow
Restore all data L2MP from a backup file
Please Enter filename [Ex: /backup/movefull-[DATE=02-09-2015_TIME=08h5].zip]:/backup/movefull-[DATE=02-09-2015_TIME=08h52].zip |== Enter
Restore all data L2MP from a backup file: /backup/movefull-[DATE=02-09-2015_TIME=08h52].zip
Restore Done!