Initial Server Setup Script for Ubuntu 18.04

Daripada berulang-ulang melakukan hal yang sama saat melakukan setup server berbasis Ubuntu, lebih baik dibuat script untuk otomatisasinya. Saat ini masih berbasis Ubuntu 18.04 karena kebetulan paling sering pakai versi tersebut. Butuh sedikit tweak lagi agar bisa juga digunakan pada Ubuntu 16.04 atau Ubuntu 20.04 (yang akan rilis menjelang akhir April 2020)

https://github.com/zezevavai/ubuntu-server-initial-setup

Based on https://github.com/jasonheecs/ubuntu-server-setup with minor changes for Indonesian local repositoy

This is a setup script to automate the setup and provisioning of Ubuntu servers. It does the following:

  • Change default repository to Indonesian Ubuntu Mirror
  • Setup the timezone for the server (Default to “Asia/Jakarta”)
  • Update and upgrade server for first time
  • Adds a new user account with sudo access
  • Adds a public ssh key for the new user account
  • Disables password authentication to the server
  • Deny root login to the server
  • Setup Uncomplicated Firewall
  • Create Swap file based on machine’s installed memory
  • Install Network Time Protocol

Installation
SSH into your server and install git if it is not installed:

sudo apt-get update
sudo apt-get install git

Clone this repository into your home directory:

cd ~
git clone https://github.com/zezevavai/ubuntu-server-initial-setup.git

Run the setup script

cd ubuntu-server-initial-setup
./setup.sh

Script diatas bisa disesuaikan lagi agar bisa mendapatkan basis OS siap pakai sesuai kebutuhan masing-masing. Untuk todo list saya sendiri, saya upayakan bisa fleksibel saat menambahkan repository lokal Indonesia, jadi bisa dilengkapi dengan versi Ubuntu yang lain.

Untuk simulasi via video bisa merujuk ke link dibawah ini :

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.