Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Sep 12, 2017 7:15 pm 
Offline
User avatar

Joined: Sun Sep 10, 2017 4:44 pm
Posts: 1
Website: https://neurobin.org
Just finished writing my startup StackScript in Bash. It uses expect to automate some tasks like system upgrade (to bypass 'keep existing configuration file' prompt), mysql_secure_installation, and thus the whole process can be unattended.

It can do the following:

1. update (only package list) or upgrade (full upgrade) system
2.1. set hostname
2.2. add host entry with hostname to address 127.0.1.1
3. set up colorful bash prompt
4. set up a standard user with sudo privilege using a user defined login shell
5.1. set up SSH public key for a specified user
5.2. disable password login for SSH
5.3. disable root login for SSH
5.4. restrict SSH access to only IPV4 or IPV6
6. set up some common packages (git, wget, tar, gzip, lzip, bc, inxi, build-essential)
7. set up fail2ban
8.1 set up ufw
8.2 ufw: allow ftp, ssh, http, https and mail server ports
8.3 ufw: deny all incoming
8.4 ufw: allow all outgoing
9. set up sendmail
10.1 set up apache2
10.2 apache2 tuning for low memory
11.1 set up mysql
11.2 mysql tuning for security
11.3 mysql tuning for low memory

The logs are saved in /var/cache/initserver.sh.log file

_________________
Jahid


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group