Earlier, Chiang shared on the websiteLNMP one button installation packageDeploy PHP+MySQL+Nginx website running environment in Linux server, and I mentioned in the article that the script also supports LAMP installation.The script that Laojiang will introduce today can only be installedLAMP one button installationThe script is lighter than the above script and does not come with too much built-in software.
LAMP one click installation package is a shell script written in Linux shell that can install Linux+Apache+MySQL/MariaDB+PHP production environment for Amazon Linux/CentOS/Debian/Ubuntu VPS or servers.It includes some optional installation components, such as Zend OPcache,ionCube Loader, PDFlib, XCache, APCu, imagick, gmagick, libsodium, memcached, redis, mongodb, swoole, yaf, yar, msgpack, psr, phalcon, grpc, xdebug。Others such as OpenSSL,ImageMagick, GraphicsMagick, Memcached, phpMyAdmin, Adminer, Redis, re2c, KodExplorer。At the same time, there are also some auxiliary scripts, such as virtual host management, Apache, MySQL/MariaDB, PHP, and upgrading of PhpMyAdmin and Administrator.
First, LAMP one click script installation tutorial
LAMP supports most Linux image scripts. The server should be configured with 512MB memory or more, and the memory should be more than 10GB. Mr. Jiang personally suggested that the pure version of the image should be used.This is not easy to make mistakes. Of course, we can check what the problem is if there is an error in the running process. When we install the image, we try to install newer versions, such as CentOS8+and Ubuntu 20+.
1. Script installation
Yum - y install wget git//CentOS image installationApt get - y install wget git//Debian/Ubuntu image installationgit clone https://github.com/teddysun/lamp.gitcd lampchmod 755 *.sh./lamp.sh
Here in the first and second lines of the script, we need to choose the basic software to install according to the actual image.Some servers do not have wget or git installed by default. No matter whether we have installed them or not, we will install them again.
2. Installation process
The installation process is also a process of selecting option configurations.For example, we need to select PHP, MySQL and other software versions.
Parameters:--apache_option [1-2], please select a available Apache version1. httpd-2.4.432. do_not_install--db_option [1-9], please select a available Database version1. mysql-5.6.492. mysql-5.7.313. mysql-8.0.214. mariadb-10.1.455. mariadb-10.2.326. mariadb-10.3.237. mariadb-10.4.138. mariadb-10.5.49. do_not_install--php_option [1-8], please select a available PHP version1. php-5.6.402. php-7.0.333. php-7.1.334. php-7.2.345. php-7.3.256. php-7.4.137. php-8.0.08. do_not_install--kodexplorer_option [1-2], please select a available KodExplorer version1. kodexplorer-4.352. do_not_install
We can choose according to our needs.It should be noted that we need to set the default password of MYSQL by ourselves, and do not use the default password.After the installation is completed, we can add the site with the gadget included in the lamp one click package.
Second, the LAMP one button package comes with a gadget
After installing the LAMP one click package tool, we can use the built-in gadget to create a site.
1. Common gadgets
lamp add Create virtual hostlamp del Delete virtual hostlamp list List Virtual Hostslamp version Show current version
The site directory we added is in the "/data/www/default" default directory.In fact, the domain name of the corresponding site is in www.
2. Upgrade gadget
./upgrade.sh // Select one to upgrade./upgrade.sh apache // Upgrade Apache./upgrade.sh db // Upgrade MySQL or MariaDB./upgrade.sh php // Upgrade PHP./upgrade.sh phpmyadmin // Upgrade phpMyAdmin./upgrade.sh adminer // Upgrade Adminer
3. Program installation directory
MySQL installation directory:/usr/local/mysql
MySQL database directory:/usr/local/mysql/data (default path, which can be changed during installation)
MariaDB installation directory:/usr/local/mariadb
MariaDB database directory:/usr/local/mariadb/data (default path, which can be changed during installation)
In this way, can we learn another open source and free LAMP one click package installation script tool.We have another choice when deploying the Linux server WEB environment.