LAMP 一键安装脚本(2024 年新版)

LAMP

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_cas
mod_auth_gssapi
mod_auth_mellon
mod_authnz_external
mod_authnz_jwt
mod_authnz_pam
mod_auth_openidc
mod_authz_unixgroup
mod_bw
mod_cluster
mod_dav_svn
mod_fcgid
mod_gnutls
mod_h264_streaming
mod_jk
mod_ldap
mod_log_post
mod_maxminddb
mod_md
mod_mono
mod_perl
mod_proxy_cluster
mod_qos
mod_security
mod_security_crs
python3-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.4
MariaDB 10.11, 11.4, 11.8
PHP 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 11
Debian 12
Debian 13
Ubuntu 20.04
Ubuntu 22.04
Ubuntu 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

标签: LAMP

评论已关闭