initial commit

This commit is contained in:
yqlbu 2023-02-19 15:54:44 +08:00
parent d182acaf9d
commit 3ee62cd697
No known key found for this signature in database
GPG Key ID: B94F394B72884017
2 changed files with 124 additions and 0 deletions

View File

@ -0,0 +1,66 @@
# Quick Start Guide
## Linux Kernel Requirement
### Kernel Version
Use `uname -r` to check the kernel version on your machine.
> **Notes**
> If you find your kernel version is `< 5.8`, follow the guide [HERE](./kernel-upgrade.md) to upgrade the kernel to the minimum required version.
**Bind to LAN: >= 5.8**
You need bind dae to LAN interface, if you want to provide network service for LAN as an intermediate device.
This feature requires the kernel version of machine on which dae install >= 5.8.
Note that if you bind dae to LAN only, dae only provide network service for traffic from LAN, and not impact local programs.
**Bind to WAN: >= 5.8**
You need bind dae to WAN interface, if you want dae to provide network service for local programs.
This feature requires kernel version of the machine >= 5.8.
Note that if you bind dae to WAN only, dae only provide network service for local programs and not impact traffic coming in from other interfaces.
### Kernel Configuration Item
Usually, mainstream desktop distributions have these items turned on. But in order to reduce kernel size, some items are turned off by default on embedded device distributions like OpenWRT, Armbian, etc.
Use following command to show kernel configuration items on your machine.
```shell
zcat /proc/config.gz || cat /boot/{config,config-$(uname -r)}
```
**Bind to LAN**
```
CONFIG_DEBUG_INFO_BTF
```
**Bind to WAN**
```
CONFIG_DEBUG_INFO_BTF
```
Check them using command like:
```shell
(zcat /proc/config.gz || cat /boot/{config,config-$(uname -r)}) | grep 'CONFIG_DEBUG_INFO_BTF='
```
### Enable IP Forwarding
By default, any latest Linux distributions will have IP Forwarding `disabled`. In the case where we need to up a Linux router/gateway or a VPN server or simply a plain dial-in server, then we must need to enable forwarding. Do the followings to have `ip-forwarding` feature enabled:
```shell
sudo tee /etc/sysctl.d/dae.conf<<EOF
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1
EOF
sudo sysctl --system
```

View File

@ -0,0 +1,58 @@
# Kernel Upgrade Guide
A `kernel` is the core of any operating system. Before you start calling Linux an operating system, you need to know the basic concept and Linuxs birth history. **_Linux is not an operating system; mainly, Linux is a kernel_**.
## Upgrade Guide
### Disclaimer
Upgrading the Linux kernel is not easy; you must do this only if you find security errors or hardware interaction issues. If your system crashes, you might have to recover the whole system. Mostly, Linux distributions come with the most upgraded kernel. Upgrading the Linux kernel doesnt delete or remove the previous kernel; it is kept inside the system.
> **Notes**
> You should not upgrade your kernel manually unless you want some specific driver support. You can roll back to the older kernel from the recovery menu of your Linux system. However, you may need to upgrade the kernel for hardware issues or security issues.
### Preparation
Before you start upgrading your Linux kernel, you must know the Kernels `current version` running inside your host machine. You may do so by `uname -r`. In case of `eBPF`, the minimum required version is `>= 5.8`
Various Linux distributions have different methods to upgrade the Linux kernel. This guide convers ways to upgrade the kernel to a desired version for most `Debian-based Linux`, `RedHar, Fedora based Linux`, and `Arch-based Linux` distributions.
> **Notes**
> Since `Dae` is builts with `eBPF`, your host must meet the minimum Kernel version, `>= 5.8` for dae to properly running.
### Upgrade Kernel on Debian-based Linux
```bash
sudo apt search linux-image
```
### Upgrade kernel on RedHat and Fedora Linux
Fedora, RedHat, and RedHat-based Linux distribution users can upgrade their Linux kernel manually by downloading the kernel from the repository.
Fedora and RedHat Linux users can install a specific version of Kernel on their system. You can run the following command-line on your Linux terminal to install any specific version kernel on your Linux system. After the installation is done, reboot your system to get the desired kernel on your Linux system.
```bash
sudo yum update kernel
sudo yum install kernel-{version}
sudo reboot
uname -r
```
### Upgrade kernel on Arch-based Linux
Arch and Arch-based Linux distributions have a `dynamic` variety of Linux kernel. Arch Linux updates its security patch regularly; thats why you will see notable kernel and patch updates are available on Arch Linux. Here, I will describe two methods to upgrade the kernel on Arch Linux.
Manjaro and other Arch Linux distributions often offer kernel updates and upgrades via the conventional update manager. When you run the system updater on the Linux system, it checks for the latest kernels. You can use the following `pacman` command to check for the latest kernel on Arch Linux distributions.
```bash
sudo pacman -Syu
```
If it finds a new kernel, it will notify you to download and install it. You can choose whether you want to get the latest kernel or not. Once you agree to install, reboot your system after the installation is finished. Then, you can check the kernel version to ensure whether the kernel is upgraded or not.
```bash
sudo reboot
uname -r
```