# teddysun/lamp: a bash installer for Apache, MariaDB and PHP on RHEL and Debian systems

> The teddysun/lamp script installs Apache 2.4, MariaDB and PHP on Enterprise Linux, Debian and Ubuntu using the system package manager, and wraps the result in a single lamp command. It is a package-manager installer, not a container or a control panel.

**teddysun/lamp** — Install LAMP (Linux + Apache + MariaDB + PHP) for AlmaLinux/RockyLinux/CentOS/Debian/Ubuntu

- Repository: https://github.com/teddysun/lamp
- Website: https://lamp.sh
- Stars: 2,917 · Forks: 1,040
- Language: Shell
- License: GPL-3.0
- Published: 2026-09-24 · Updated: 2026-09-24 · Language: en
- Canonical page: https://hysenlabs.com/projects/teddysun-lamp

## What teddysun/lamp is for, and who should run it

The repository is a bash installer for a LAMP stack: Linux plus Apache plus MariaDB plus PHP. It is aimed at people who have a fresh VPS or dedicated server with a supported distribution and want the stack installed from packages rather than compiled from source. The README states that you need root, an internet connection, at least 5 GiB of disk space and 512 MiB of RAM, and that installation is driven by package manager commands, dnf on Enterprise Linux and apt-get on Debian and Ubuntu. The pitch is that a small-memory VPS is enough.

The supported system list is narrow and explicit: Enterprise Linux 8, 9 and 10 (CentOS Stream, RHEL, Rocky Linux, AlmaLinux, Oracle Linux), Debian 11, 12 and 13, and Ubuntu 22.04 and 24.04. Both x86_64 and aarch64 are supported. If your distribution is not on that list, this is not the tool for you, and there is no documented fallback path for unsupported releases.

The audience is closer to a solo operator or a small team running a handful of PHP sites than to a platform group. There is no clustering, no configuration management integration, and no web UI. Everything is a shell script and a command named lamp.

## How the installer and the lamp command actually work

The repository is small at the top level: LICENSE, README.md, conf/, and lamp.sh. That layout tells you most of the design. lamp.sh is the entry point, and conf/ holds the configuration templates the script copies into place. The README describes the flow as interactive: you input numbers to choose what you want to install before installation begins.

The packages come from different sources depending on the distribution. On RPM systems, Apache comes from the Teddysun repository at dl.lamp.sh, MariaDB from the MariaDB repository, and PHP from the Remi repository. On DEB systems, Apache comes from the official distribution repository, MariaDB from the MariaDB repository, and PHP from deb.sury.org. That split is the central mechanism: the script is mostly repository configuration plus package installation, not a build system.

Once installed, the lamp command is the management surface. The README documents lamp start, stop, restart, status and version for services, and lamp vhost add, list and del for Apache virtual hosts, plus lamp db add for creating a MariaDB database. Underneath, services are ordinary systemd units: httpd, mariadb and php-fpm on Enterprise Linux, and apache2, mariadb and php8.4-fpm (with your version substituted) on Debian and Ubuntu.

The default paths are worth reading before you install, because they differ from a stock distribution layout. The web root is /data/www/default on both families rather than /var/www. Apache configuration lives at /etc/httpd/conf/httpd.conf on Enterprise Linux and /etc/apache2/apache2.conf on Debian and Ubuntu, with site configuration under /etc/httpd/conf.d/vhost or /etc/apache2/sites-enabled respectively. MariaDB data sits at /var/lib/mysql either way, with /etc/my.cnf or /etc/mysql/my.cnf as the configuration file. PHP-FPM pool configuration is /etc/php-fpm.d/www.conf on RPM systems and /etc/php/${php_ver}/fpm/pool.d/www.conf on DEB systems.

## Installing teddysun/lamp on Ubuntu, Debian or Enterprise Linux

The README gives two install paths that differ only in the dependency step. On Enterprise Linux 8, 9 or 10, install wget and git with dnf, clone the repository, make the scripts executable, and run lamp.sh. The script is interactive, so expect prompts asking you to choose components and versions rather than a silent unattended run.

```bash
dnf -y install wget git
git clone https://github.com/teddysun/lamp.git
cd lamp
chmod 755 *.sh
./lamp.sh
```

On Debian 11 through 13 and Ubuntu 22.04 through 24.04, the same sequence uses apt-get for the dependencies. Everything after that is identical, which is the point of the script: one workflow across two package families.

```bash
apt-get -y install wget git
git clone https://github.com/teddysun/lamp.git
cd lamp
chmod 755 *.sh
./lamp.sh
```

After the script finishes, verify the stack before you point a domain at it. The lamp command reports what is installed and whether the services are running, which is the fastest check available from the project itself.

```bash
lamp status
lamp version
```

If you want to confirm the web server responds, the default document root is /data/www/default, not the distribution default. A request to the server should return whatever the script placed there. Creating a site afterwards goes through the same command rather than by hand-editing Apache configuration.

```bash
lamp vhost add
lamp vhost list
```

## Where teddysun/lamp stops being the right choice

The first limitation is the supported system list. There is no Windows or macOS path, despite what search traffic around this project suggests, and no documentation for distributions outside Enterprise Linux 8 to 10, Debian 11 to 13 and Ubuntu 22.04 to 24.04. On anything else the script has no documented behaviour.

The second is the coupling to the host. Because installation goes through dnf or apt-get, the resulting stack is part of the operating system's package state. Upgrades follow the same route: dnf update -y httpd, dnf update -y MariaDB-*, dnf update -y php-* on RPM systems, and apt-get install --only-upgrade with apache2, mariadb-* or php${php_ver}-* on DEB systems. Major PHP version changes on RPM go through dnf module switch-to php:remi-8.4. That means a distribution upgrade or a repository change can affect the stack, and there is no container boundary to absorb it.

The README documents removal as package removal: dnf remove -y httpd, MariaDB-* and php-*, or apt-get remove -y apache2, mariadb-* and php${php_ver}-*. What it does not document is what happens to your data and configuration during removal, or whether the web root under /data/www and the databases under /var/lib/mysql survive. Treat uninstall as a destructive operation whose data behaviour you should confirm yourself before running it on anything that matters.

If your requirement is reproducible builds, immutable hosts, horizontal scaling, or a stack you can tear down and recreate on demand, a host-level package installer is the wrong shape of tool. That is not a flaw in the script; it is a mismatch.

## Alternatives and the real difference in approach

The obvious alternative is a container-based LAMP stack. Docker Compose with separate Apache, MariaDB and PHP images gives you a stack defined in a file that can be rebuilt identically on any host and thrown away without touching the operating system's package database. The trade-off is operational: you now manage images, volumes and networking, and you cannot use the lamp command or the systemd units the README documents. Search traffic asking how to create a Docker LAMP stack is asking for exactly this, and it is a different product from teddysun/lamp, not a replacement for it.

The second alternative is a control panel that installs and manages the same components with a web interface and per-site isolation. That adds a large management layer and its own upgrade cycle. teddysun/lamp deliberately does not have one; the README's management surface is a shell command and systemd.

The third alternative is doing it yourself: enable the Remi or deb.sury.org repositories, install httpd or apache2, MariaDB and PHP-FPM, and write the virtual host configuration by hand. That is what teddysun/lamp automates, and it is the honest comparison. If you already know those steps, the script saves you the repository setup and the initial configuration templates in conf/. If you do not, the script is a shortcut that leaves you with a conventional stack you can inspect afterwards.

## Maintenance, upgrades and licence

The repository is not archived, and the last push was on 2026-05-21. The most recent releases listed are 20241215_2 for the Debian series and 20241215_1 for the RHEL series, both dated 2024-12-15, with an earlier 20230615 release from 2023-06-15. The gap between the December 2024 release tags and the May 2026 push is worth noting: the repository has received commits more recently than its last tagged release, so if you track releases rather than the master branch, you may be running code that predates the current state of the script.

Upgrade cost is mostly the cost of the underlying packages. The README gives the exact commands for updating Apache, MariaDB and PHP, and for switching PHP major versions on RPM systems with dnf module switch-to. There is no separate upgrade tool for the script itself; you update the packages it installed. That keeps the maintenance model simple but means you inherit whatever the upstream repositories ship.

The project is licensed GPL-3.0. If you redistribute a modified version of the script, the licence's terms apply to that distribution. Running the script on your own servers is a different situation from shipping it inside a product, and the README does not discuss either case. This is a description of what the licence file states, not legal advice; if redistribution matters to you, read the LICENSE file in the repository and take your own advice.

## Conclusion

Adopt teddysun/lamp if you run a small VPS on a supported Enterprise Linux, Debian or Ubuntu release and want Apache, MariaDB and PHP-FPM installed from the distribution or vendor package managers with a single management command. Do not adopt it if you need Windows support, containers, or a distribution outside the supported list, because the project targets Linux only and drives dnf or apt-get directly. Before committing, verify on a scratch host that your exact distribution version is listed in the README, that your repository configuration resolves the Apache, MariaDB and PHP packages, and that your PHP version is available from Remi or deb.sury.org if the distribution does not ship it.

## FAQ

### How do I install a LAMP stack on a Linux system with teddysun/lamp?

Install wget and git with dnf or apt-get, clone https://github.com/teddysun/lamp.git, run chmod 755 *.sh in the cloned directory, and execute ./lamp.sh as root. The script then asks you to choose components by entering numbers.

### Is the LAMP stack still relevant?

The README does not argue the case either way; it presents teddysun/lamp as a way to install Apache 2.4, MariaDB 10.11, 11.4 or 11.8 and PHP 7.4 through 8.5 on Enterprise Linux, Debian and Ubuntu. Whether that stack fits your project depends on your application, not on this script.

### What does LAMP mean in Linux?

The README expands it as Linux plus Apache plus MariaDB plus PHP, and the script installs those three server components on a Linux host.

### Can I create a Docker LAMP stack with teddysun/lamp?

No. teddysun/lamp installs packages on the host through dnf or apt-get and manages them with systemd units, so it does not produce containers. A Docker-based LAMP stack is a separate approach the README does not cover.

## Sources

- [License: GPL-3.0](https://github.com/teddysun/lamp/blob/master/LICENSE)
- [Project website](https://lamp.sh)
- [README](https://github.com/teddysun/lamp/blob/master/README.md)
- [Releases](https://github.com/teddysun/lamp/releases)
- [teddysun/lamp on GitHub](https://github.com/teddysun/lamp)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/teddysun-lamp
