mirror of
https://github.com/netdata/netdata.git
synced 2025-04-13 01:08:11 +00:00
Improve installation method for Alpine (#11035)
- the `python` package doesn't exist since Alpine 3.5 (dec 2016), use `python3` instead - create a proper start stript instead of using `/etc/local.d`
This commit is contained in:
parent
1b819afdbb
commit
aa42f9eecd
1 changed files with 13 additions and 9 deletions
|
@ -9,7 +9,7 @@ Execute these commands to install Netdata in Alpine Linux 3.x:
|
|||
|
||||
```sh
|
||||
# install required packages
|
||||
apk add alpine-sdk bash curl libuv-dev zlib-dev util-linux-dev libmnl-dev gcc make git autoconf automake pkgconfig python logrotate
|
||||
apk add alpine-sdk bash curl libuv-dev zlib-dev util-linux-dev libmnl-dev gcc make git autoconf automake pkgconfig python3 logrotate
|
||||
|
||||
# if you plan to run node.js Netdata plugins
|
||||
apk add nodejs
|
||||
|
@ -21,16 +21,20 @@ cd netdata
|
|||
# build it, install it, start it
|
||||
./netdata-installer.sh
|
||||
|
||||
# make Netdata start at boot
|
||||
echo -e "#!/usr/bin/env bash\n/usr/sbin/netdata" >/etc/local.d/netdata.start
|
||||
chmod 755 /etc/local.d/netdata.start
|
||||
# make Netdata start at boot and stop at shutdown
|
||||
cat > /etc/init.d/netdata << EOF
|
||||
#!/sbin/openrc-run
|
||||
|
||||
# make Netdata stop at shutdown
|
||||
echo -e "#!/usr/bin/env bash\nkillall netdata" >/etc/local.d/netdata.stop
|
||||
chmod 755 /etc/local.d/netdata.stop
|
||||
name="netdata"
|
||||
command="/usr/sbin/$SVCNAME"
|
||||
|
||||
# enable the local service to start automatically
|
||||
rc-update add local
|
||||
depend() {
|
||||
need net localmount
|
||||
after firewall
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
If you have installed Netdata in another directory, you have to change the content of the `command` variable in that script.
|
||||
|
||||
[](<>)
|
||||
|
|
Loading…
Add table
Reference in a new issue