Skip to content
/ SLEMP Public
forked from docgonzo2015/SLEMP

Setup a LAMP or LEMP server automatically on CentOS or Debian

License

Notifications You must be signed in to change notification settings

nenoken/SLEMP

 
 

Repository files navigation

SL(A)EMP

Attention! 2019-05-29

I've started working on a rewrite version. This will include some breaking changes. In the future only Debian will be supported!

If you need CentOS support please fork this project asap for your own.

More details soon.

Attention! 2019-05-29

SL(A)EMP stands for Secure L(A)EMP. It will install all necessary binaries for a secure LAMP or LEMP server automatically. Supported are the latest versions of Debian (Stretch) and CentOS (7.x).

Features

  • Setup a secure webserver config
  • nginx OR Apache Support (HTTP2 is not supported by Apache on CentOS)
  • Secure your host with a Let's Encrypt certificate
  • Subdomain support
  • Domain Redirects and Alias support
  • Multiple PHP versions (7.1, 7.2, 7.3) running as FPM service
  • MariaDB databases with random generated passwords
  • Install Nextcloud or Wordpress with an optimized configuration for Apache and Nginx
  • Redis support (optional, but recommended if you are using Nextcloud)
  • Fail2ban support (optional)
  • UFW (uncomplicated firewall) support (Debian only, optional)

Requirements

  • OS: Debian 9 (Stretch) or CentOS 7.x, clean install!

Installation

Important: SL(A)EMP makes use of various open-source software. Please assure you agree with their license before using it. Any part of SL(A)EMP itself is released under GNU General Public License, Version 3.

git clone https://github.com/timscha/SLEMP SLEMP
chmod +x installer.sh add_domain.sh
./installer.sh

The setup script will add the following repositories, dependent on your OS:

After the installer is finished, CentOS user have to restart there system, because SELinux will be disabled during the installation. Also save your MySQL root password on a secure place! You will see the password at the end of the installation.

If something goes wrong there is an installer log available at /tmp/slemp_install.txt

Usage

./add_domain.sh

The script will guide you through the setup. Be sure to point your domain to the IP of your server (www and non-www dns record)

You will find the config and files at the following paths:

Apache

CentOS: /etc/httpd/conf.d/ Debian: /etc/apache2/sites-enabled/

nginx

  • /etc/nginx/conf.d/

PHP

  • CentOS: /etc/opt/remi/php7x/php-fpm.d/
  • Debian: /etc/php/7.x/fpm/pool.d/

Web

  • /var/www/YOUR-DOMAIN/

How I upload files?

  • Set a password to your location user
  • Connect over SCP with your server (Windows: WinSCP, macOS: Transmit)

What's next

  • Cleanup the script
  • Option to anonymize IPs
  • Advices to secure the server in general

About

Setup a LAMP or LEMP server automatically on CentOS or Debian

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%