Last update at :2024-07-07,Edit by888u
Today I met a netizen who mentioned the need to install a LAMP (Apache/MySQL/PHP) website environment in a Linux VPS server and asked which one-click package or WEB panel can be used. Among the panels I came into contact with, the WDCP panel is It can support the Apache environment, but considering security factors, it is recommended to use one-click package or compile the script environment yourself.
Snail has also introduced the compiled script method to install the LAMP environment many times in previous articles. Among them, Jun Ge’s LNMP and OneInstack can also choose to install the LAMP environment, especially the OneInstack function and version update that has been highly popular among users recently. Quick, we can choose the LAMP environment during the installation process.
When I was looking through the one-click package installation LAMP script on the Internet, I saw that Teddysun also has a LAMP one-click package (https://lamp.sh). I have not installed it before. I am going to do an experiment to see this script. How, if possible, can you help this friend install and use it? At least we have an alternative.
Snail has also shared articles related to LAMP:
1. One-click installation of LNMP/LAMP/LNMPA website environment on CentOS/Debian/Ubuntu system
2. Complete Debian7 configuration LAMP (Apache/MySQL/PHP) environment and build website
3. OneinStack installs JAVA/Tomcat/Nginx/MySQL website environment with one click
First, LAMP one-click package installation environment preparation
The current LAMP script environment supports installation in CentOS/Debian/Ubuntu distributions. The memory requires more than 512MB of memory. It is recommended to use a clean system and do not bring your own WEB environment.
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 lamp.zip https://github.com/teddysun/lamp/archive/master.zipunzip lamp.zipcd lamp-master/chmod +x *.sh
3. Installation environment
screen -S lamp./lamp.sh
Third, the process of installing and setting the program version
Here you can follow the prompts to install the httpd, MYSQL, and PHP versions (supports PHP7). After the settings are completed, press any key to install. Everything is automatic.
After waiting for about half an hour, I saw the installation complete as shown above. 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 website
Snail (laozuo.org) waited and waited. Finally, when the LAMP environment package has been installed, we will definitely use it for website building. Different one-click packages have different website building short command files, which we only need to master. Generally, we can use mature one-click packages to build websites, because the deployment process such as website building is more convenient. If compilation requires some components, deployment directories, permissions, etc. Manual setting, although showing excellent skills, is a waste of time.
1. Add a site
lamp (add,del,list)
Can be used as information for adding sites, deleting sites, and expanding all sites
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
./uninstall.sh
If we don’t want the current LAMP, we can uninstall it. If it’s more thorough, we can reinstall the system directly. Because I'm worried about bad residue.
3. Site Directory
/data/www/
In the current directory, we can see the directory where we added the site, which is usually a folder named after the domain name.
4. Commonly used 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
Apache:/usr/local/apache
PHP:/usr/local/php
MySQL:/usr/local/mysql
MariaDB:/usr/local/mariadb
Fifth, summary of LAMP one-click installation command environment
1. Through Teddysun’s one-click installation of the LAMP environment, it is relatively easy to quickly deploy Apache, MySQL, and PHP environments. There is also a PHP7 version, which can be used by students who like the Apache Web environment.
2. The process of adding a site and site management is also relatively easy. Generally, PHP+MYSQL or mariadb database production environment can be used.
Recommended site search: overseas server, IP address, dynamic IP vps, free external network server, what is the server, which high-defense game server is the best, which high-defense game server is the best, free US host, virtual host trial 30 days, Korean cheap server,
发表评论