Code Monkey home page Code Monkey logo

debian-setup's Introduction

1. Aim of this repo

Aim of this repo is to keep track of various Linux Debian settings files, shell scripts, and more.

Various tools are used to help reach that goal, for example the cloud-based IDE Codeanywhere with which it is possible to ssh to the server, and also the IDE Visual Studio Code for easily editing Markdown (with the Markdown All in One extension from Yu Zhang). Therefore Powershell will also be used and customized, for example for adding useful aliases and functions.

Table of Contents:

2. Debian

The aim of the corresponding Linux Debian machine should be to try to reach and maintain a good security level, for example by:

  1. automating security updates of the Linux Debian OS (eventually with e-mail reports to root)
  2. automating back-up processes of the Filesystem, or at least first of the /home directory
  3. automating monitoring
    • of installed packages: how many packages are installed, when have they been installed and updated last, have they already been scanned / parsed by automated security monitoring tools, are they mandatory / required for the operational purpose of the server, or are they mandatory dependency of such packages
    • of configuration files:

2.1. Automatic security updates

see: https://wiki.debian.org/UnattendedUpgrades

Getting advised about security problems:

https://lists.debian.org/debian-security-announce/

#Installing required packages
~$ apt-get install unattended-upgrades apt-listchanges

#Symlinking config files into home directory, for easier Git tracking
#and back-up
~$ mkdir etc/
~$ mkdir etc/apt/
~$ mkdir etc/apt/apt.conf.d/

#50unattended-upgrades
~$ sudo mv /etc/apt/apt.conf.d/50unattended-upgrades etc/apt/apt.conf.d/
~$ sudo ln -s ~/debian-setup/etc/apt/apt.conf.d/50unattended-upgrades /etc/apt/apt.conf.d/50unattended-upgrades

#20auto-upgrades
~$ sudo dpkg-reconfigure -plow unattended-upgrades
~$ sudo mv /etc/apt/apt.conf.d/20auto-upgrades etc/apt/apt.conf.d/
~$ sudo ln -s ~/debian-setup/etc/apt/apt.conf.d/20auto-upgrades /etc/apt/apt.conf.d/20auto-upgrades

#100update
#see check_config.sh

2.2. Automating back-up processes

The private Github repository "debian-setup" will also probably be used to analyse the needs and elaborate a global back-up strategy.

2.3. Automating monitoring

Installed packages

A private Github repository will be used to monitor installed packages, and changes made to the installed packages, for example through automatic updates.

Configuration files integrity

Could be achieved with a bash shell script. see: check_config.sh

2.4. Reinstallation procedure

see: https://github.com/thomashuber/debian-setup-private

3. Other interesting Linux distributions

3.1. Alpine Linux

https://alpinelinux.org/

"Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox."

4. Useful commands / Miscellaneous

ID Command Description
1 sudo apt list --installed lists all packages installed on your system, including information about the package versions and architecture.
2 sudo apt list --installed | less Same as above, but piped to less for making it easier to read.
3 sudo dpkg-query -l | less lists all installed packages, with a short description. Not sure if it may gives different results from Command ID 1
4 sudo dpkg-query -f '${binary:Package}\n' -W > packages_list.txt store the list of all installed packages on your Debian system to a file called packages_list.txt
5 sudo xargs -a packages_list.txt apt install install the same packages on a new server (can be useful for restoring or duplicating a production server maybe)
6 sudo dpkg-query -f '${binary:Package}\n' -W | wc -l Count the Number of Installed Packages

debian-setup's People

Contributors

thomas-z8 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.