LAMP 一键安装脚本(2024 年新版)
LAMP 一键安装脚本(2024 年新版)是一个用 Bash Shell 编写的,安装 LAMP (Linux + Apache + MariaDB + PHP) 生产环境的 Shell 脚本。本脚本不再使用编译安装,而是全部采用 rpm 或 deb 包(二进制)安装的方式来安装 LAMP 环境。
Apache 由 Teddysun Repository 提供。MariaDB 由 MariaDB Repository 提供。PHP 由 Remi Repository 提供。
你甚至可以在执行完本脚本后继续使用 yum 或 dnf 命令直接安装各种插件。比如 Apache 插件:mod_jk,mod_cluster,mod_security,mod_perl,python3-mod_wsgi 等。
dnf install -y 插件名
Apache 支持的额外插件列表:
mod_auth_casmod_auth_gssapimod_auth_mellonmod_authnz_externalmod_authnz_jwtmod_authnz_pammod_auth_openidcmod_authz_unixgroupmod_bwmod_clustermod_dav_svnmod_fcgidmod_gnutlsmod_h264_streamingmod_jkmod_ldapmod_log_postmod_maxminddbmod_mdmod_monomod_perlmod_proxy_clustermod_qosmod_securitymod_security_crspython3-mod_wsgi比如 PHP 插件:php-pecl-mongodb,php-pecl-grpc,php-pecl-zip,php-pecl-yac,php-pecl-protobuf,php-pecl-yaml 等。更多详情见此处。
系统需求
硬盘空间: 5 GiB内存空间: 512 MiB连接互联网使用 root 用户
支持软件列表
Apache 2.4MariaDB 10.11, 11.4, 11.8PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5
支持系统架构
x86_64 (amd64)aarch64 (arm64)
适用系统
Enterprise Linux 8 (RHEL 8, Rocky Linux 8, AlmaLinux 8, Oracle Linux 8)Enterprise Linux 9 (CentOS Stream 9, RHEL 9, Rocky Linux 9, AlmaLinux 9, Oracle Linux 9)Enterprise Linux 10 (CentOS Stream 10, RHEL 10, Rocky Linux 10, AlmaLinux 10, Oracle Linux 10)
如何安装
dnf -y install wget git
git clone -b rpm https://github.com/teddysun/lamp.git
cd lamp
chmod 755 *.sh
./lamp.sh 2>&1 | tee lamp.log
更多用法,请参考链接:https://github.com/teddysun/lamp/tree/rpm
适用系统
Debian 11Debian 12Debian 13Ubuntu 20.04Ubuntu 22.04Ubuntu 24.04
如何安装
apt-get -y install wget git
git clone -b deb https://github.com/teddysun/lamp.git
cd lamp
chmod 755 *.sh
./lamp.sh 2>&1 | tee lamp.log
更多用法,请参考链接:https://github.com/teddysun/lamp/tree/deb

