lamp-mngr

LAMP Manager Script

Version Tested on Licenza GitHub last commit

   ██▓    ▄▄▄       ███▄ ▄███▓ ██▓███   ███▄ ▄███▓ ███▄    █   ▄████  ██▀███
  ▓██▒   ▒████▄    ▓██▒▀█▀ ██▒▓██░  ██▒▓██▒▀█▀ ██▒ ██ ▀█   █  ██▒ ▀█▒▓██ ▒ ██▒
  ▒██░   ▒██  ▀█▄  ▓██    ▓██░▓██░ ██▓▒▓██    ▓██░▓██  ▀█ ██▒▒██░▄▄▄░▓██ ░▄█ ▒
  ▒██░   ░██▄▄▄▄██ ▒██    ▒██ ▒██▄█▓▒ ▒▒██    ▒██ ▓██▒  ▐▌██▒░▓█  ██▓▒██▀▀█▄
  ░██████▒▓█   ▓██▒▒██▒   ░██▒▒██▒ ░  ░▒██▒   ░██▒▒██░   ▓██░░▒▓███▀▒░██▓ ▒██▒
  ░ ▒░▓  ░▒▒   ▓▒█░░ ▒░   ░  ░▒▓▒░ ░  ░░ ▒░   ░  ░░ ▒░   ▒ ▒  ░▒   ▒ ░ ▒▓ ░▒▓░
  ░ ░ ▒  ░ ▒   ▒▒ ░░  ░      ░░▒ ░     ░  ░      ░░ ░░   ░ ▒░  ░   ░   ░▒ ░ ▒░
    ░ ░    ░   ▒   ░      ░   ░░       ░      ░      ░   ░ ░ ░ ░   ░   ░░   ░
      ░  ░     ░  ░       ░                   ░            ░       ░    ░

Bash script to automate the installation and configuration of a LAMP server (Linux, Apache, MySQL, PHP) on Ubuntu. It allows for quickly setting up a complete hosting environment with support for WordPress sites, permission management, basic MySQL security, and SSL certificate generation using Certbot.

Warning:

The script is in Beta phase and may contain errors or bugs. It is recommended to run it in a testing environment before using it in production!

Features

Requirements

Usage Instructions

  1. Download the script to your Ubuntu server:

    wget https://raw.githubusercontent.com/enricomarogna/lamp-mngr/refs/heads/main/lamp-mngr.sh
    
  2. Assign execution and security permissions to the script:

    chmod +x lamp-mngr.sh
    sudo chown root:root lamp-mngr.sh
    sudo chmod 700 lamp-mngr.sh
    
  3. Run the script:

    sudo ./lamp-mngr.sh
    

The script provides a menu interface with the following options:

# Option Description
1 Install LAMP Server Installs Apache, MySQL, PHP, and Certbot
2 Create a Site Creates an Apache VirtualHost and a MySQL database for a site (with an option for WordPress)
3 Uninstall Site Removes a specific site, including files, database, Apache VirtualHost, and log files
4 Set WP Permissions Configures security permissions for a WordPress site
5 Generate SSL Certificate Installs and configures an SSL certificate for a domain
6 List Installed Sites Displays a list of installed sites
7 Exit Exits the script

Technical Details

Security

Important Notes

Contributing

If you’d like to help improve this script, feel free to create a fork of the project and submit a pull request. Any feedback and suggestions are welcome!

Author

Created by Enrico Marogna

License

Distributed under the MIT License. See the LICENSE file for more details.

Support Development

You can support the development of this project with a donation on Ko-fi.

ko-fi