Update docs/tech_docs/OpenWrt.md
This commit is contained in:
@@ -170,8 +170,9 @@ apk add build-base gcc abuild binutils binutils-doc gcc-doc
|
|||||||
passwd
|
passwd
|
||||||
```
|
```
|
||||||
```bash
|
```bash
|
||||||
apk update
|
apk update && apk upgrade
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
apk add vim
|
apk add vim
|
||||||
```
|
```
|
||||||
@@ -180,43 +181,38 @@ apk add vim
|
|||||||
cat /etc/apk/repositories
|
cat /etc/apk/repositories
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
|
||||||
sed -i '/^#.*community/s/^#//' /etc/apk/repositories
|
|
||||||
```
|
|
||||||
## Build Tools
|
## Build Tools
|
||||||
```bash
|
```bash
|
||||||
apk add build-base gcc abuild binutils binutils-doc gcc-doc
|
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:
|
```bash
|
||||||
- Download the Alpine Linux ISO from the official website.
|
sed -i '/^#.*community/s/^#//' /etc/apk/repositories
|
||||||
- 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:
|
or
|
||||||
```
|
|
||||||
apk update
|
```bash
|
||||||
apk add vim
|
vim /etc/apk/repositories
|
||||||
vi /etc/apk/repositories
|
```
|
||||||
```
|
|
||||||
Uncomment the line for the community repository, then save and exit.
|
Uncomment the line for the community repository, then save and exit.
|
||||||
|
|
||||||
3. Install the required packages:
|
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:
|
4. Create a system user and add them to the docker group and sudoers:
|
||||||
```
|
```
|
||||||
adduser -s /bin/ash myuser
|
adduser -s /bin/ash medusa
|
||||||
addgroup myuser docker
|
addgroup medusa docker
|
||||||
visudo
|
visudo
|
||||||
```
|
```
|
||||||
Add the following line to the sudoers file:
|
Add the following line to the sudoers file:
|
||||||
```
|
```
|
||||||
myuser ALL=(ALL) ALL
|
medusa ALL=(ALL) ALL
|
||||||
```
|
```
|
||||||
Save and exit.
|
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
|
apk add openssh
|
||||||
rc-update add sshd
|
rc-update add sshd
|
||||||
service sshd start
|
service sshd start
|
||||||
vi /etc/ssh/sshd_config
|
vim /etc/ssh/sshd_config
|
||||||
```
|
```
|
||||||
Uncomment and modify the following lines:
|
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:
|
8. Log in as the newly created user:
|
||||||
```
|
```
|
||||||
su - myuser
|
su - medusa
|
||||||
```
|
```
|
||||||
|
|
||||||
9. Test Docker functionality:
|
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:
|
11. Connect to the system via SSH:
|
||||||
```
|
```
|
||||||
ssh myuser@<server-ip>
|
ssh medusa@<server-ip>
|
||||||
```
|
```
|
||||||
|
---
|
||||||
|
|
||||||
Additional notes:
|
```bash
|
||||||
- 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
|
ip ad
|
||||||
setup-interfaces
|
setup-interfaces
|
||||||
ping 1.1.1.1
|
ping 1.1.1.1
|
||||||
traceroute 1.1.1.1
|
traceroute 1.1.1.1
|
||||||
|
```
|
||||||
|
```bash
|
||||||
service docker start
|
service docker start
|
||||||
rc-update add cgroups
|
rc-update add cgroups
|
||||||
history
|
history
|
||||||
|
|||||||
Reference in New Issue
Block a user