Update docs/tech_docs/OpenWrt.md

This commit is contained in:
2024-04-19 22:33:52 +00:00
parent 7748fa0ed0
commit 175a3a9ec7

View File

@@ -157,11 +157,128 @@ service networking restart
```
```bash
apk add bash curl wget vim htop
apk add bash curl wget vim htop qemu-guest-agent
```
```bash
apk add build-base gcc abuild binutils binutils-doc gcc-doc
```
## Notes
## Notes
```bash
passwd
```
```bash
apk update
```
```bash
apk add vim
```
```bash
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.
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.
3. Install the required packages:
```
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
visudo
```
Add the following line to the sudoers file:
```
myuser ALL=(ALL) ALL
```
Save and exit.
5. Start and enable the Docker service:
```
rc-update add docker default
service docker start
```
6. Install and configure SSH:
```
apk add openssh
rc-update add sshd
service sshd start
vi /etc/ssh/sshd_config
```
Uncomment and modify the following lines:
```
PermitRootLogin no
PasswordAuthentication yes
```
Save and exit.
7. Restart the SSH service:
```
service sshd restart
```
8. Log in as the newly created user:
```
su - myuser
```
9. Test Docker functionality:
```
docker run hello-world
```
10. Test sudo privileges:
```
sudo apk update
```
11. Connect to the system via SSH:
```
ssh myuser@<server-ip>
```
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.
```
ip ad
setup-interfaces
ping 1.1.1.1
traceroute 1.1.1.1
service docker start
rc-update add cgroups
history
```