acCrocRadio/setup-01.md

94 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

2020-12-10 23:57:17 +01:00
# acCrocRadio setup Sistema
## DNS
2020-12-11 00:04:44 +01:00
DNS-zone presso il registrar, esempio: accroc.radio
2020-12-10 23:57:17 +01:00
```
* 10800 IN A 10.000.00.001
@ 10800 IN A 10.000.00.001
wiki 10800 IN CNAME accroc.radio.
ac 10800 IN CNAME accroc.radio.
wp 10800 IN CNAME accroc.radio.
www 10800 IN CNAME accroc.radio.
```
## Installazione
Debian 10
2020-12-11 00:04:44 +01:00
apt update ; apt upgrade ; apt clean
2020-12-10 23:57:17 +01:00
2020-12-11 00:04:44 +01:00
apt install sudo ssh screen net-tools htop strace ntp ufw figlet apg wipe
apt install curl git apt-transport-https tmux byobu man elinks grc dnsutils
apt install fish tree zip nmap rsync mutt logwatch rkhunter
2020-12-10 23:57:17 +01:00
## Hostname
2020-12-11 00:04:44 +01:00
hostnamectl set-hostname croco
2020-12-10 23:57:17 +01:00
2020-12-11 00:04:44 +01:00
figlet: figlet cRoc > /etc/motd
2020-12-10 23:57:17 +01:00
## Firewall
2020-12-11 00:04:44 +01:00
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
ufw allow 80 (e 443, 2022, 8000, 8005)
ufw enable
2020-12-10 23:57:17 +01:00
2020-12-11 00:04:44 +01:00
Consigliato cambiare porta sshd, abilitare ssh login passwordless
2020-12-10 23:57:17 +01:00
## Time
2020-12-11 00:04:44 +01:00
dpkg-reconfigure tzdata
2020-12-10 23:57:17 +01:00
Europe/Rome
## Dotfiles
~/.bashrc
```
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias docker='grc docker'
```
~/.nanorc
```
syntax "all" "[\.]*$"
color green "^#.*$"
set tabsize 4
set tabstospaces
```
## Mailserver
Posta solo locale.
2020-12-11 00:04:44 +01:00
apt install postfix
2020-12-10 23:57:17 +01:00
Per riconfigurare:
2020-12-11 00:04:44 +01:00
dpkg-reconfigure postfix
2020-12-10 23:57:17 +01:00
## SWAP
2020-12-11 00:04:44 +01:00
free -h
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
swapon --show
sudo cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
cat /proc/sys/vm/swappiness
sysctl vm.swappiness=10
echo vm.swappiness=10 >> /etc/sysctl.conf
cat /proc/sys/vm/vfs_cache_pressure
sysctl vm.vfs_cache_pressure=50
echo vm.vfs_cache_pressure=50 >> /etc/sysctl.conf