System Requirements
- Supported systems: CentOS 6+/Debian 7+/Ubuntu 12+
- Memory requirement: ≥ 512MB
- Disk requirement: at least 3GB of free space
- The server must have software repositories configured and be able to connect to the public Internet
- Root privileges are required
- Strongly recommended to use a fresh system for installation
Supported Components
- Supports almost all built-in PHP components
- Supports MySQL, MariaDB, and Percona Server databases
- Supports Redis (optional installation)
- Supports XCache (optional installation)
- Supports Swoole (optional installation)
- Supports Memcached (optional installation)
- Supports ImageMagick (optional installation)
- Supports GraphicsMagick (optional installation)
- Supports ZendGuardLoader (optional installation)
- Supports ionCube Loader (optional installation)
-
Self-service upgrades for Apache, PHP, phpMyAdmin, and MySQL/MariaDB/Percona
Server to the latest versions - Add virtual hosts via the command line (using the lamp command), simple and convenient
- Supports one-click uninstall
Installation Steps
- Preparation (install wget, screen, git, and create a screen session)
Note: Do not copy or enter the content after the double slashes //
yum -y install wget screen git // for CentOS
apt-get -y install wget screen git // for Debian/Ubuntu
- Run git clone and grant execute permission to the scripts
git clone https://github.com/teddysun/lamp.git
cd lamp
chmod +x *.sh
- Start the installation
screen -S lamp
./lamp.sh
Component Installation
All components supported by this script can be optionally installed through the script’s interactive menu.
Usage Tips
lamp add Create a virtual host
lamp del Delete a virtual host
lamp list List virtual hosts
How to Upgrade
Note: Do not copy or enter the content after the double slashes //
./upgrade.sh // Select one to upgrade
./upgrade.sh apache // Upgrade Apache
./upgrade.sh db // Upgrade MySQL/MariaDB/Percona
./upgrade.sh php // Upgrade PHP
./upgrade.sh phpmyadmin // Upgrade phpMyAdmin
How to Uninstall
./uninstall.sh
Program Directories
- MySQL installation directory: /usr/local/mysql
-
MySQL
database directory: /usr/local/mysql/data (default, path can be changed during installation) - MariaDB installation directory: /usr/local/mariadb
-
MariaDB
database directory: /usr/local/mariadb/data (default, path can be changed during installation) - Percona installation directory: /usr/local/percona
-
Percona
database directory: /usr/local/percona/data (default, path can be changed during installation) - PHP installation directory: /usr/local/php
- Apache installation directory: /usr/local/apache
Command Overview
- MySQL or MariaDB or Percona commands
/etc/init.d/mysqld (start|stop|restart|status)
- Apache commands
/etc/init.d/httpd (start|stop|restart|status)
- Memcached commands (optional installation)
/etc/init.d/memcached (start|stop|restart|status)
- Redis commands (optional installation)
/etc/init.d/redis-server (start|stop|restart|status)
Website Root Directory
Default website root directory: /data/www/default