Skip to content

A set of shell scripts to automate the setup of an Ubuntu 20.04.0x and above server.

License

Notifications You must be signed in to change notification settings

papalozarou/linux-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux setup scripts

A set of shell scripts to automate the setup of an Ubuntu 20.04.0x and above server, by:

  1. Updating and upgrading the fresh install;
  2. changing the default user's password;
  3. changing the default user's name;
  4. setting up ssh keys for remote connection;
  5. configuring the ssh server;
  6. configuring ufw;
  7. configuring fail2ban;
  8. configuring the timezone;
  9. configuring git;
  10. installing docker; and
  11. setting some environment variables for docker usage.

Usage

Clone the repository, and submodules, then switch to the repository directory with:

git clone --recursive https://github.com/papalozarou/linux-setup.git && \
cd ~/linux-setup

Run the first script:

sudo ./01-initialise-setup.sh

Once completed, run subsequent scripts following instructions and prompts.

When all scripts have been executed, it's safe to delete the repo with:

sudo rm -R ~/linux-setup

This leaves the .config/linux-setup directory in place for reference.

N.B.

Script change-username.sh kills all processes and requires logging in with a temporary user which is set up as part of the script.

The scripts are not particularly robust in terms of error handling. Soz like.

Todo

  • Fix docker validation
  • Move all service installs to using installRemovePackage function
  • Add timezone and NTP setup
  • Robust error handling

About

A set of shell scripts to automate the setup of an Ubuntu 20.04.0x and above server.

Resources

License

Stars

Watchers

Forks

Languages