78 lines
1.4 KiB
Markdown
78 lines
1.4 KiB
Markdown
---
|
|
tags:
|
|
- Server
|
|
title : Server notes
|
|
description : Server notes
|
|
date : 2025-01-01
|
|
author : Nikola Petrov
|
|
---
|
|
|
|
## To prevent updating of a specific package?
|
|
Hold a package:
|
|
|
|
sudo apt-mark hold <package-name>
|
|
|
|
Remove the hold:
|
|
|
|
sudo apt-mark unhold <package-name>
|
|
|
|
Show all packages on hold:
|
|
|
|
sudo apt-mark showhold
|
|
|
|
|
|
### USE APT PURGE TO REMOVE APPS
|
|
|
|
## Dynamic DNS
|
|
DDClient [YouTube](https://www.youtube.com/watch?v=iuDCuUEmKF4) [NameCheap](https://www.namecheap.com/support/knowledgebase/article.aspx/583/11/how-do-i-configure-ddclient/)
|
|
|
|
Install & Setup Instructions:
|
|
sudo apt-get install ddclient
|
|
sudo nano /etc/ddclient.conf
|
|
daemon=3600
|
|
ssl=yes
|
|
protocol=dyndns2
|
|
use=web, web=myip.dnsomatic.com
|
|
server=updates.dnsomatic.com
|
|
login=Your OpenDNS login
|
|
password=Your OpenDNS Password
|
|
all.dnsomatic.com
|
|
|
|
sudo nano /etc/default/ddclient
|
|
run_ipup="false"
|
|
run_daemon="true"
|
|
daemon_interval=3600
|
|
|
|
To run it initially: sudo ddclient -daemon=0 -debug -verbose -noquiet
|
|
|
|
## Shutdown
|
|
```
|
|
systemctl reboot
|
|
systemctl poweroff
|
|
```
|
|
|
|
## Raid
|
|
https://linuxconfig.org/linux-software-raid-1-setup
|
|
|
|
## ssh
|
|
in `~/.ssh/authorized_keys` paste your pub key
|
|
and then disable password login in `/etc/ssh/sshd_config` change `PasswordAuthentication`
|
|
to `no`
|
|
|
|
```
|
|
ssh-keygen -t ed25519
|
|
systemctl reload sshd
|
|
```
|
|
|
|
|
|
## Network monitor tool
|
|
`vnstat --help`
|
|
|
|
## python venv in debian
|
|
```sh
|
|
sudo apt install -y python3-full python3-pip
|
|
python -m venv venv
|
|
```
|
|
|
|
|