LinuxServerSetup

by tirsvad
8 deployments · 1 still active · last rev. 2 hours ago

LinuxServerSetupScript

This script aimed goal is to set up a complete web server environment. Optional Nginx with SSL (Letsencrypt), Database (postgresql or mysql), Cpanel (ajenti)

Debian, ubuntu or compatible distribution

Features
Optional add Ajenti control panel
Optional add NGINX webserver (LEMP)
Create a privileged user
Sshd
option ssh-key for passwordless connection
option disable root login
Firewall
Automatic configure based on choices made
Setting hostname
Update system software

RUN IT
cd ~/LinuxServerSetup
bash setup/start.sh

Development
Want to contribute? Great!
Find us [here](https://github.com/TirsvadCMS/LinuxServerSetupScript/)

Compatible with: CentOS 7, Debian 9, Ubuntu 18.04 LTS, Ubuntu 18.10
						#!/bin/bash

# if first time run!
if [ ! -d "LinuxServerSetup" ]; then
        [[ $( which git ) ]] || {
                if [ -f /etc/os-release ]; then
                        # freedesktop.org and systemd
                        . /etc/os-release
                        OS=$NAME
                        OS_VER=$VERSION_ID
                else
                        # Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
                        OS=$(uname -s)
                        OS_VER=$(uname -r)
                fi                
        }

        case $OS in
                "Debian GNU/Linux"|"Ubuntu")
                        apt-get -qq install git
                        ;;
                "CentOS Linux")
                        yum -y install git
                        ;;
        esac
        git clone https://github.com/TirsvadCMS/LinuxServerSetup.git
else
        cd LinuxServerSetup
        bash setup/start.sh
fi