2019-01-09 03:13:27 -07:00
|
|
|
# My standard configuration files for Debian and basic services
|
|
|
|
|
|
|
|
This is a collection of several configuration files that I use when setting up a
|
|
|
|
BASIC bare-bones Debian system. Quite often, such a system will become
|
|
|
|
something else like a webserver, git-server, cloud platform, programming
|
|
|
|
workstation, etc. Therefore, only a few core files applicable to nearly every
|
|
|
|
conceivable installation are included here.
|
|
|
|
|
2019-01-09 04:17:35 -07:00
|
|
|
This archive and included script are meant to supplement my article on setting
|
2019-01-09 04:43:27 -07:00
|
|
|
up a Debian base-system found at my blog: [My
|
2019-03-06 22:19:32 -07:00
|
|
|
Techie-Thoughts](https://mytechiethoughts.com/setting-up-a-debian-base-system/)
|
2019-01-09 04:17:35 -07:00
|
|
|
|
2019-01-09 03:13:27 -07:00
|
|
|
## Included files
|
|
|
|
|
2019-01-09 04:43:27 -07:00
|
|
|
Please refer to the `readme.md` in each subdirectory for a list and description of
|
2019-01-09 04:17:35 -07:00
|
|
|
each included file.
|
|
|
|
|
2019-03-06 18:27:38 -07:00
|
|
|
Presently, configurations are included for:
|
|
|
|
|
|
|
|
- BASH profiles (including aliases and custom prompt)
|
|
|
|
- SSHd (OpenSSH server)
|
|
|
|
- timesyncd (systemd-timesyncd configuration)
|
|
|
|
|
2019-01-09 04:17:35 -07:00
|
|
|
## The script file (customize.sh)
|
|
|
|
|
|
|
|
The included script file copies all the files in this archive to the proper
|
2019-03-06 18:27:38 -07:00
|
|
|
locations on a **default** Debian Stretch system. It makes backups of your
|
|
|
|
existing files in-place with the extension *.original*. This simply saves you
|
|
|
|
time and possible errors copying the files manually. The structure of this
|
|
|
|
archive exactly mirrors a default Debian installation, so you can use that as a
|
|
|
|
guide if you choose not to use the script.
|
2019-01-09 04:17:35 -07:00
|
|
|
|
|
|
|
### Running the script
|
|
|
|
|
|
|
|
Please note you must either make the script executable or call it explicitly via
|
|
|
|
BASH. In the latter case, you'd run the script as follows:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
/bin/bash ./customize.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
If you want to make the script executable:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
chmod +x customize.sh
|
|
|
|
./customize.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
Due to location of the files being replaced, **you MUST run this script as ROOT**
|
|
|
|
(the script will exit if you run as a different user) or run it via sudo like
|
|
|
|
this (assuming you made it executable):
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo ./customize.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
### Passing a custom path to the script
|
|
|
|
|
|
|
|
If you want to test out the script before having it update your actual system
|
|
|
|
configuration, you can supply an alternate destination path. This is referred
|
|
|
|
to as a 'Base Path' by the script and it will show a warning if this option is
|
|
|
|
used. Please note, your 'Base Path' MUST have the same directory structure as
|
2019-01-09 04:43:27 -07:00
|
|
|
an actual system. The expected directories must already exist or the script
|
2019-01-09 04:17:35 -07:00
|
|
|
will just throw errors and not actually copy files.
|
|
|
|
|
|
|
|
Let's assume you wanted to test the script and copy files to */testdir*. You
|
2019-01-09 04:43:27 -07:00
|
|
|
would do the following to prepare the directory with the expected structure:
|
2019-01-09 04:17:35 -07:00
|
|
|
|
|
|
|
```bash
|
|
|
|
mkdir -p /testdir/root
|
|
|
|
mkdir -p /testdir/etc/{skel,ssh,systemd}
|
|
|
|
```
|
|
|
|
|
2019-01-09 04:43:27 -07:00
|
|
|
Then you could invoke the script as follows (assuming you made it executable as
|
|
|
|
described above):
|
2019-01-09 04:17:35 -07:00
|
|
|
|
|
|
|
```bash
|
2019-01-09 04:43:27 -07:00
|
|
|
./customize.sh /testdir
|
2019-01-09 04:17:35 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
The script would then copy all files into */testdir* while mirroring the
|
|
|
|
structure of a live system beneath that. Again, this is useful only for testing
|
|
|
|
and will NOT update your actual system!
|
2018-07-21 16:57:17 -06:00
|
|
|
|
2019-01-09 04:43:27 -07:00
|
|
|
## Final thoughts
|
|
|
|
|
2019-03-06 18:27:38 -07:00
|
|
|
Hopefully this saves you some time and helps you standardize your new system setups
|
2019-01-09 04:43:27 -07:00
|
|
|
with a few useful defaults. As always, if you have suggestions or want to leave
|
|
|
|
feedback for me, please do so on my [blog
|
2019-03-06 22:19:32 -07:00
|
|
|
post](https://mytechiethoughts.com/setting-up-a-debian-base-system/) related to this script!
|