Skip to content

Latest commit

 

History

History
76 lines (70 loc) · 2.49 KB

install-alpine.md

File metadata and controls

76 lines (70 loc) · 2.49 KB

add dependencies

build dependency.

apk add go protoc utmps-dev ncurses musl-locales ncurses-terminfo protoc-gen-go

run dependency.

apk add musl-locales utmps ncurses logrotate ncurses-terminfo openssh-server

build from source

git clone https://github.com/ericwq/aprilsh.git
cd aprilsh
./build.sh    # build client and server, then run the test, only works on linux

# or you can build them separately.
cd frontend/server
./build.sh    # build server, only works on linux
cd frontend/client
./build.sh    # build client, works on linux and macOS

install for alpine

add testing repositories to your alpine system, you need the root privilege to do that.

echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
apk update

test source code:

APRILSH_APSHD_PATH="/home/ide/.local/bin/apshd" \
go test -tags=utmps $(go list ./... | grep -Ev '(data|protobufs)')

add aprilsh, which includes aprilsh-server, aprilsh-client, aprilsh-openrc:

apk add aprilsh

run apshd (aprilsh server) as openrc service.

rc-service apshd start

or run apshd (aprilsh server) manually.

apshd 2>/var/log/apshd &

by default apshd listen on udp localhost:8100.

openrc-nvide:~# netstat -lup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 localhost:8100          0.0.0.0:*                           45561/apshd
openrc-nvide:~#

now login to the system with apsh (aprilsh client), note the motd(welcome message) depends on you alpine system config.

qiwang@Qi15Pro client % apsh ide@localhost
openrc-nvide:0.10.2

Lua, C/C++ and Golang Integrated Development Environment.
Powered by neovim, luals, gopls and clangd.
ide@openrc-nvide:~ $

if you login on two terminals, on the server, there will be two server processes serve the clients. the following shows apshd serve two clients. one is:8101, the other is ':8102'

openrc-nvide:~# netstat -lup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 localhost:8100          0.0.0.0:*                           45561/apshd
udp        0      0 :::8101                 :::*                                45647/apshd
udp        0      0 :::8102                 :::*                                45612/apshd
openrc-nvide:~#

enjoy the early access for aprilsh.