# linuxeye/lnmp: Shell Scripts That Build a LEMP or LAMP Stack From Source

> linuxeye/lnmp compiles Nginx, MySQL or MariaDB, PHP and optional Java components from source on RHEL-family and Debian-family servers. It is a maintenance-mode script, and the README now points new users at a docker-compose project instead.

**linuxeye/lnmp** — LEMP stack/LAMP stack/LNMP stack  installation scripts for CentOS/Redhat Debian and Ubuntu

- Repository: https://github.com/linuxeye/lnmp
- Stars: 2,737 · Forks: 761
- Language: Shell
- License: Apache-2.0
- Published: 2026-09-28 · Updated: 2026-09-28 · Language: en
- Canonical page: https://hysenlabs.com/projects/linuxeye-lnmp

## What linuxeye/lnmp actually installs, and for whom

The project is a set of Shell scripts that deploy a web stack by compiling components from source rather than pulling distro packages. The README lists the combinations as LEMP, LAMP, LNMP, LNMPA and LTMP, where the letters stand for Linux plus Nginx, Tengine or OpenResty, MySQL or MariaDB or Percona, PHP, and optionally Apache or Java. It targets 64-bit RHEL 7, 8 and 9 (including CentOS, RedHat, AlmaLinux and Rocky), Debian 9 through 12, Ubuntu 16 through 24, and Fedora 27 and later.

The intended user is an administrator who needs a version combination the distribution does not offer. The README claims MySQL 8.4, 8.0, 5.7 and 5.5, MariaDB 11.8, 11.4, 10.11 and 5.5, Percona 8.4, 8.0, 5.7 and 5.5, plus PostgreSQL and MongoDB, and PHP from 8.5 down to 5.3. Maintaining PHP 5.3 or MySQL 5.5 on a current OS is not something a package manager will do for you, and that range is the reason this repository exists.

The README opens with a notice that the project no longer adds new features and is only for daily maintenance, and it recommends the docker-compose version at linuxeye/bypanel. Treat that as the project's own positioning: the scripts still work, but the direction of travel has moved elsewhere.

## Source compilation, options.conf, and the scripts that follow install.sh

Everything is compiled on the target machine from source downloaded from official sites, which the README describes as the most stable source being the latest version. That choice explains the architecture: install.sh reads options.conf, then builds and installs each component into directories you control, and registers systemd units for the services.

The repository layout supports this. install.sh, addons.sh, upgrade.sh, uninstall.sh, vhost.sh, pureftpd_vhost.sh, backup.sh and backup_setup.sh sit at the top level, with config/, include/, init.d/, src/ and tools/ holding the supporting pieces and versions.txt holding version pins. Each script is a separate entry point rather than a subcommand of one binary, so the mental model is a toolbox of small programs, not a single installer with flags.

After installation the stack is managed through systemd, and the README lists the unit names. Nginx, Tengine and OpenResty share the nginx unit; MySQL, MariaDB and Percona share mysqld; PHP uses php-fpm; Apache uses httpd; Tomcat uses tomcat; Redis uses redis-server; Memcached uses memcached; Pure-FTPd uses pureftpd; PostgreSQL uses postgresql and MongoDB uses mongod. Because the unit names are stable across the variants, a configuration management template written against systemctl does not need to know which web server or database you picked.

The backup subsystem is the most interesting part of the design. backup_setup.sh collects parameters, backup.sh runs a backup on demand, and the README states that destinations include local storage, rsync between servers, Aliyun OSS, Qcloud COS, UPYUN, QINIU, Amazon S3, Google Drive and Dropbox. The README's own cron example writes the job as a backgrounded command rather than a plain script invocation, which is worth noting if you plan to copy it verbatim.

## Installing linuxeye/lnmp and creating a first virtual host

The README's installation path has four stages: install wget and screen, download and unpack the tarball, start a screen session, then run install.sh. On a RHEL-family system the dependency step is a single yum command.

```bash
yum -y install wget screen
```

On Debian or Ubuntu the equivalent uses apt-get.

```bash
apt-get -y install wget screen
```

Then fetch the archive, unpack it and enter the directory. The README gives a SourceForge mirror as a fallback URL in a comment.

```bash
wget http://mirrors.linuxeye.com/lnmp-full.tar.gz
tar xzf lnmp-full.tar.gz
cd lnmp
```

Before running the installer, start a screen session so a dropped SSH connection does not kill a compilation that may take a long time. The README states that `screen -r lnmp` reattaches to the install window.

```bash
screen -S lnmp
```

If you want installation, data or Nginx logs somewhere other than the defaults, edit options.conf before invoking the installer. The README is explicit that this must happen before install.sh runs.

```bash
./install.sh
```

Once the stack is up, the first real task is usually a site. The repository ships vhost.sh for this, and it includes a Let's Encrypt SSL certificate according to the README. Deleting a host is the same script with a flag.

```bash
~/lnmp/vhost.sh
~/lnmp/vhost.sh --del
```

Additional PHP versions are installed through install.sh with the --mphp_ver flag, and the README's example uses 54 for PHP 5.4.

```bash
~/lnmp/install.sh --mphp_ver 54
```

PHP extensions, Node.js, Pureftpd and phpMyAdmin are added through addons.sh, which the README presents as an interactive script rather than a flag-driven one.

## Where linuxeye/lnmp is the wrong tool

The most direct limitation is stated by the project itself. The README says it no longer adds new features and is only for daily maintenance, and it recommends the docker-compose version at linuxeye/bypanel. If you are starting a new deployment and have no requirement that forces source compilation, the project's own advice is to look elsewhere first.

Source compilation has costs the README does not enumerate. Building PHP and MySQL from source on the target machine is slow and depends on the build toolchain that the OS release provides, which is why the supported OS list is a hard boundary rather than a suggestion. A distribution version outside that list is not covered by the project's testing.

The version range is a double-edged property. Offering PHP 5.3 through 8.5 means the scripts carry logic for releases that upstream stopped supporting years ago. Choosing an old version to match a legacy application also means you own the security updates for that version, because no distribution is patching it.

Finally, the README does not document rollback. There is upgrade.sh and uninstall.sh, but nothing describing how to return to a previous component version after an upgrade goes wrong. If you need reversible upgrades as a first-class feature, this repository does not advertise one.

## How this differs from a package manager or a container stack

The obvious alternative on the same servers is the distribution's own packages: dnf module streams on RHEL-family systems, or apt on Debian and Ubuntu. The difference is version control. A package manager gives you the versions the distribution decided to support, patched by the distribution, with a well-defined upgrade path. linuxeye/lnmp gives you the version you name, compiled from the official source, with upgrade.sh as the update mechanism and no distribution backporting fixes for you.

On the container side, the README points at linuxeye/bypanel, described as the docker-compose version of the same idea. That is a different set of trade-offs: components ship as images, the host stays clean, and rebuilding a stack means pulling images rather than compiling. The cost is a container runtime and a different operational model for logs, data volumes and networking. The README does not compare the two beyond the recommendation, so the choice comes down to whether you want the stack installed on the host or run as containers.

A third option is a control panel that manages the same components. The scripts here are not a panel: they are one-shot installers plus per-task scripts for virtual hosts, FTP users and backups. If you want a web interface for day-to-day site management, this repository does not provide one, though it does install phpMyAdmin when you ask addons.sh for it.

## Maintenance, upgrades and the Apache-2.0 licence

The repository is not archived, and the last push was on 2026-03-17. The README's own framing matters more than the push date: new features are closed, and the remaining work is maintenance. Plan for a project that fixes things rather than one that grows.

Upgrade cost is concentrated in upgrade.sh, which the README lists as covering Nginx, Tengine, OpenResty, Apache, Tomcat, MySQL, MariaDB, Percona, PHP, Redis, Memcached and phpMyAdmin. Because components are compiled from source, an upgrade means a rebuild on the host, and the README does not describe downtime, rollback or version-pinning behaviour during that rebuild. Test on a staging server that mirrors the target OS release before touching production.

Backups are the part of the lifecycle the repository supports most concretely: backup_setup.sh for parameters, backup.sh to run one immediately, and the README's cron line for a daily job at 01:00. Whatever else you change, wire this up before the first upgrade.

The licence is Apache-2.0. That is a permissive licence, but the scripts download and compile third-party components, and each of those carries its own licence: PHP, MySQL, MariaDB, Percona, Nginx, OpenResty, Apache, Tomcat and the rest are not covered by this repository's licence. If you redistribute a built stack, check the terms of every component you enabled. This is a description of the licence file in the repository, not legal advice.

Uninstall is handled by uninstall.sh, which the README lists without describing what it removes. On a server where data directories were moved via options.conf, read the script before running it.

## Conclusion

Adopt linuxeye/lnmp when you need a source-compiled LEMP or LAMP stack on a specific RHEL or Debian release and you want PHP or database versions the distro repositories do not ship, and when you accept that the README declares the project closed to new features. Do not adopt it for a new greenfield deployment: the README itself recommends the docker-compose version at linuxeye/bypanel. Before committing, read options.conf to see where installation, data and Nginx logs will land, confirm your OS release is in the supported list, and decide whether you can live with upgrade.sh and uninstall.sh as the only lifecycle tools the repository provides.

## FAQ

### Is the LAMP stack still relevant?

For this project the question is answered by the README itself: it states that no new features are being added and recommends the docker-compose version at linuxeye/bypanel instead. The scripts still install LEMP, LAMP, LNMP, LNMPA and LTMP stacks on the supported OS releases, so the stack remains usable even though the repository is in maintenance mode.

### Which operating systems does linuxeye/lnmp support?

The README lists 64-bit RHEL 7, 8 and 9, including CentOS, RedHat, AlmaLinux and Rocky, Debian 9 through 12, Ubuntu 16 through 24, and Fedora 27 and later. Anything outside that list is not covered by the project's documentation.

### How do I install a second PHP version with linuxeye/lnmp?

The README shows install.sh with the --mphp_ver flag, for example `~/lnmp/install.sh --mphp_ver 54` for PHP 5.4. The main installer must have been run first, since the additional version is added to an existing installation.

### How do I upgrade the components in linuxeye/lnmp?

The README lists upgrade.sh at `~/lnmp/upgrade.sh` as the upgrade entry point and states that it covers Nginx, Tengine, OpenResty, Apache, Tomcat, MySQL, MariaDB, Percona, PHP, Redis, Memcached and phpMyAdmin. The README does not document rollback if an upgrade fails.

## Sources

- [Issues](https://github.com/linuxeye/lnmp/issues)
- [License: Apache-2.0](https://github.com/linuxeye/lnmp/blob/main/LICENSE)
- [linuxeye/lnmp on GitHub](https://github.com/linuxeye/lnmp)
- [README](https://github.com/linuxeye/lnmp/blob/main/README.md)

---

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