Today, a netizen mentioned the need to install LAMP (Apache/MySQL/PHP) on the Linux VPS server to ask which one-click package or WEB panel can be used, the WDCP panel I have come across can support the Apache environment, but we recommend that you use a one-click package or compile your own script environment for security reasons.
In previous articles, Lao Zuo also introduced the script-based installation of the LAMP environment multiple times. The LNMP and OneInstack of June can also be used to install the LAMP environment, in particular, the OneInstack features and version updates that have been highly popular recently are faster. We can select the LAMP environment during the installation process.
Look at the online one-click package install LAMP script, see Teddysun also has a LAMP one-click package (https://lamp.sh), has not been installed before, prepare a test to see how this script, if possible, we can help this friend install and use it. At least we have an alternative.
First, prepare the LAMP one-click package installation environment
Currently, this LAMP script environment can be installed in CentOS, Debian, and Ubuntu distributions. The memory size must be MB or more. We recommend that you use a clean system instead of some WEB environments.
Second, one-click LAMP installation script
1. Prepare Software support
The code is as follows: |
Copy code |
Yum-y install wget screen unzip // for CentOS/Redhat System
Apt-get-y install wget screen unzip // for Debian/Ubuntu System
|
2. Download, decompress, and grant permissions
The code is as follows: |
Copy code |
Wget-O lamp.zip https://github.com/teddysun/lamp/archive/master.zip
Unzip lamp.zip
Cd lamp-master/
Chmod + x *. sh
|
3. Installation environment
The code is as follows: |
Copy code |
Screen-S lamp
./Lamp. sh
|
3. Install and set the program version
You can install httpd, MYSQL, and PHP (PHP7 is supported) as Prompted. After the settings are complete, press any key to install. Everything is automatic.
Wait about half an hour. 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 site
Laozuo.org and so on. Finally, when the LAMP environment package has been installed, we will definitely use it for site building purposes. Different one-click packages have different short command files for website construction. We only need to master them. Generally, we can use mature One-Click packages for website construction and other deployment processes, if compilation requires manual settings for some components, deployment directories, permissions, and so on, it is a waste of time even though the technology is already mentioned.
1. Add a site
The code is as follows: |
Copy code |
Lamp (add, del, list)
|
You can add, delete, and expand the information of all sites.
According to the Wizard, enter the domain name to be bound. www and non-www domain names are bound together with spaces, and then you can create a database together.
2. Uninstall LAMP
The code is as follows: |
Copy code |
./Uninstall. sh
|
If we do not want the current LAMP to be uninstalled, if it is thorough, directly reinstall the system. This is because of worries about potential defects.
3. Site Directory
The code is as follows: |
Copy code |
/Data/www/
|
In the current directory, we can see the Directory of the site we have added, usually the folder named after the domain name.
4. Common commands
The code is as follows: |
Copy code |
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
The code is as follows: |
Copy code |
Apache:/usr/local/apache
PHP:/usr/local/php
MySQL:/usr/local/mysql
MariaDB:/usr/local/mariadb
|
Fifth, LAMP one-click installation command environment summary
1. One-click installation of the LAMP environment by Teddysun makes it easier to quickly deploy the Apache, MySQL, and PHP environments, and PHP7 is available for users who like the Apache Web environment.
2. The process of adding sites and site management is also relatively easy. Generally, PHP + MYSQL or mariadb database production environments can be used.