Alpine

字数 502 · 2020-10-19

#linux

ABOUT

Alpine Linux is an independent, non-commercial, general purpose Linux distribution designed for power users who appreciate security, simplicity and resource efficiency.

SMALL
Alpine Linux is built around musl libc and busybox.
A container requires no more than 8 MB and a minimal installation to disk requires around 130 MB of storage.
SIMPLE

SECURE

https://alpinelinux.org/

env

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# zsh
apk add curl git zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# python
apk add bash vim
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
# build base
apk add build-base dumb-init musl libc6-compat linux-headers ca-certificates libressl-dev libffi-dev tzdata
# PACKAGES needed to built python
apk add bzip2-dev coreutils dpkg dpkg-dev expat-dev findutils gcc gdbm-dev libc-dev libffi-dev libnsl-dev libtirpc-dev linux-headers make ncurses-dev libressl-dev pax-utils readline-dev sqlite-dev tcl-dev tk tk-dev util-linux-dev xz-dev zlib-dev
pyenv install 3.8.6
pyenv global 3.8.6
pip install ipython
#misc
apk add htop 
# scp
apk add openssh-client
1
2
chmod +x /etc/sudoers
chmod 755 /
1
sudo usermod -a -G aid_everybody android

Jekyll

1
2
apk add ruby build-base ruby-dev libffi-dev
gem install bundler jekyll

rc

1
vim /etc/rc.local
1
~/.pyenv/shims/hass

aria

1
2
3
4
5
sudo apk add aria2 nodejs 
aria2c --enable-rpc --rpc-listen-all --daemon=true
https://github.com/ziahamza/webui-aria2.git
cd webui-aria2
node node-server.js
1
2
3
4
5
6
7
8
9
daemon=true
enable-rpc=true
rpc-listen-all=true
rpc-listen-port=6800
rpc-user=android
rpc-passwd=123456
continue=true
dir=/mnt/sdcard/Download
log=${HOME}/.aria2.log
1
2
# rc.local
aria2c --conf-path=/home/android/.config/aria2.conf

https://play.google.com/store/apps/details?id=com.gianlu.aria2app

transmission

1
sudo apk add transmission

samba

1
sudo apk add samba
1
2
3
4
5
6
7
# /etc/samba/smb.conf

[storage]
  browseable = yes
  writeable = yes
  path = /mnt/sdcard/Download

1
sudo smbpasswd -a username
1
sudo smbd