Focus on cloud service provider activities
Notes on website operation and maintenance

CentOS/Debian/Ubuntu one click installation of LAMP (Apache/MySQL/PHP) environment

Today, a netizen mentioned that LAMP (Apache/MySQL/PHP) website environment needs to be installed in the Linux VPS server. He asked what kind of one click package or WEB panel can be used. Among the panels I contacted, the WDCP panel can support the Apache environment. However, considering the security factors, it is recommended to use one click package or self compiled script environment.

Lao Zuo has repeatedly introduced the compiling script method to install the LAMP environment in his previous articles. Among them, the military brother's LNMP and OneInstack can also choose to install the LAMP environment, especially in the recent high demand of users OneInstack The function and version are updated quickly. We can choose LAMP environment during installation.

Check the one button package installation on the Internet LAMP script When I saw that Teddysun also had a LAMP one button package( ), has not been installed before. We are going to do a test to see how this script works. If possible, we can help this friend install and use it. At least we have an alternative solution.

Lao Zuo once shared articles related to LAMP:

1、 One click installation of LNMP/LAMP/LNMPA website environment for CentOS/Debian/Ubuntu system

2、 Complete Debian7 configuration, LAMP (Apache/MySQL/PHP) environment, and station building

3、 OneinStack One click installation of JAVA/Tomcat/Nginx/MySQL website environment

First, LAMP one click package installation environment preparation

The current LAMP script environment supports installation in the CentOS/Debian/Ubuntu distribution. The memory needs more than 512MB. It is recommended to use a clean system and not bring some WEB environments.

Second, LAMP one click installation script

1. Prepare software support

yum -y install wget screen unzip // for CentOS/Redhat System
apt-get -y install wget screen unzip // for Debian/Ubuntu System

2. Download, unzip, and grant permissions

wget -O
cd lamp-master/
chmod +x *.sh

3. Installation environment

screen -S lamp

Third, the process of installing and setting the program version

 Install Setup Version Procedure

Here, you can install httpd, MYSQL, and PHP versions (supporting PHP 7) according to the prompts. After setting, press any key to install. Everything is automatic.

 LAMP environment installation completed

After waiting about half an hour, I saw that the installation of the above figure was completed. We can see the PHPMYADMIN directory, MYSQL path and other information, including the database password we set.

Fourth, how to use the LAMP environment to build a station

Lao Zuo (laozuo. org) waited and waited until the LAMP environment package was installed. Then we must use it to build a website. Different one click packages have different short command files for building a website. We can only master them. Generally, we can use mature one click packages for building a website, because the deployment process such as building a website is convenient. If you need to set some components, deployment directories, permissions, etc. manually for compilation, it will waste time even though we have advanced human technology.

1. Add Site

lamp (add,del,list)

It can be used as information for adding sites, deleting sites, and expanding all sites

 How to use the LAMP environment to build a station

According to the wizard, we enter the domain name that needs to be bound. The www and non www or other domain names are bound together and separated by spaces, and then the database can be created together.

2. Uninstall LAMP


If we do not want the current LAMP to be uninstalled, we can directly reinstall the system if it is more thorough. Because I was worried about the bad residue.

3. Site Directory


In the current directory, we can see the directory of the site we added, which is usually a folder named after the domain name.

4. Common commands

Apache:/etc/init.d/httpd (start|stop|restart|status)

MySQL/MariaDB:/etc/init.d/mysqld (start|stop|restart|status)

Memcached:/etc/init.d/memcached (start|stop|restart)

Redis-server:/etc/init.d/redis-server (start|stop|restart)

5. Program installation directory





V. Summary of LAMP One click Installation Command Environment

1. It is easier to quickly deploy Apache, MySQL, and PHP environments by installing the LAMP environment with one click by Teddysun students. There is also a PHP 7 version, which can be used by students who like the Apache Web environment.

2. It is also easy to add sites and site management processes. Generally, PHP+MYSQL or mariadb database production environments can be used.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » CentOS/Debian/Ubuntu one click installation of LAMP (Apache/MySQL/PHP) environment

Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge