From f0f521546adea742d4c474c2dc2dca347d0b930b Mon Sep 17 00:00:00 2001 From: medusa Date: Sat, 20 Apr 2024 00:23:57 +0000 Subject: [PATCH] Update docs/tech_docs/OpenWrt.md --- docs/tech_docs/OpenWrt.md | 61 +++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 35 deletions(-) diff --git a/docs/tech_docs/OpenWrt.md b/docs/tech_docs/OpenWrt.md index 3f30964..4843ef1 100644 --- a/docs/tech_docs/OpenWrt.md +++ b/docs/tech_docs/OpenWrt.md @@ -170,8 +170,9 @@ apk add build-base gcc abuild binutils binutils-doc gcc-doc passwd ``` ```bash -apk update +apk update && apk upgrade ``` + ```bash apk add vim ``` @@ -180,43 +181,38 @@ apk add vim cat /etc/apk/repositories ``` -```bash -sed -i '/^#.*community/s/^#//' /etc/apk/repositories -``` ## Build Tools ```bash apk add build-base gcc abuild binutils binutils-doc gcc-doc ``` -```markdown -Here's a concise guide to set up a minimal Alpine Linux system with the specified packages and configurations: -1. Install Alpine Linux: - - Download the Alpine Linux ISO from the official website. - - Create a bootable USB drive or use a virtual machine. - - Boot from the installation media and follow the installation wizard. +```bash +sed -i '/^#.*community/s/^#//' /etc/apk/repositories +``` -2. Update the system and add the community repository: - ``` - apk update - apk add vim - vi /etc/apk/repositories - ``` - Uncomment the line for the community repository, then save and exit. +or + +```bash +vim /etc/apk/repositories +``` + +Uncomment the line for the community repository, then save and exit. 3. Install the required packages: - ``` - apk add qemu-guest-agent htop docker curl wget iperf3 sudo - ``` + +```bash +apk add qemu-guest-agent htop docker curl wget iperf3 sudo +``` 4. Create a system user and add them to the docker group and sudoers: ``` - adduser -s /bin/ash myuser - addgroup myuser docker + adduser -s /bin/ash medusa + addgroup medusa docker visudo ``` Add the following line to the sudoers file: ``` - myuser ALL=(ALL) ALL + medusa ALL=(ALL) ALL ``` Save and exit. @@ -231,7 +227,7 @@ Here's a concise guide to set up a minimal Alpine Linux system with the specifie apk add openssh rc-update add sshd service sshd start - vi /etc/ssh/sshd_config + vim /etc/ssh/sshd_config ``` Uncomment and modify the following lines: ``` @@ -247,7 +243,7 @@ Here's a concise guide to set up a minimal Alpine Linux system with the specifie 8. Log in as the newly created user: ``` - su - myuser + su - medusa ``` 9. Test Docker functionality: @@ -262,22 +258,17 @@ Here's a concise guide to set up a minimal Alpine Linux system with the specifie 11. Connect to the system via SSH: ``` - ssh myuser@ + ssh medusa@ ``` +--- -Additional notes: -- Make sure to set a strong password for the user account. -- Consider using SSH key-based authentication for enhanced security. -- Regularly update the system and installed packages using `apk update` and `apk upgrade`. -- Configure the system as per your specific requirements and security best practices. - -This guide provides a basic setup for a minimal Alpine Linux system with the requested packages and configurations. Feel free to customize it further based on your needs. -``` +```bash ip ad setup-interfaces ping 1.1.1.1 traceroute 1.1.1.1 - +``` +```bash service docker start rc-update add cgroups history