K3i

                  ..
                  It's just the beginning it's not the end
                  Things will never be the same again.

                  Melanie Chisholm, Northern Star, 2000, 
                                    Never Be the Same Again

# ALPINE INSTALL WITH POWERSHELL-7
==================================

Download latest Alpine Linux Standard 
(start from distrowatch.com (20200318):

  alpine-standard-3.11.3-x86_64.iso
  
Install it on some virtual machine

  https://wiki.alpinelinux.org/wiki/Installation

  https://wiki.alpinelinux.org/wiki
    /Alpine_newbie_install_manual
    #Ways_to_install_Alpine_into_machines_or_virtuals
    
1. Send me a report for installed system (based on script):

  #!/bin/sh
  echo -e '\n===[ dmesg ]===\n'
  dmesg
  echo -e '\n===[ free ]===\n'
  free
  echo -e '\n===[ fdisk -l /dev/sda ]===\n'
  fdisk -l /dev/sda
  echo -e '\n===[ df ]===\n'
  df
  echo -e '\n===[ apk list ]===\n'
  apk list
  echo -e '\n===[ tree -d / ]===\n'
  tree -d /

2. To allow ssh: made following modifications in configuration file:
(openssh selected during install)

  # cat /etc/ssh/sshd_config | grep '^[^#]'
  Port 22
  PermitRootLogin yes
  ..
  
3. Install powershell-7 release, use putty to do this, send me your session, mine is in Annex A:

# ANNEX A. INSTALL POWERSHELL-7.0.0 ON ALPINE

  https://docs.microsoft.com/en-us/powershell/scripting/install
  /installing-powershell-core-on-linux?view=powershell-7

login as: root
root@127.0.0.1's password:
Welcome to Alpine!

The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org/>.

You can setup the system with the command: setup-alpine

You may change this message by editing /etc/motd.

foo:~# cat /etc/ssh/sshd_config | grep '^[^#]'
Port 22
PermitRootLogin yes
AuthorizedKeysFile      .ssh/authorized_keys
AllowTcpForwarding no
GatewayPorts no
X11Forwarding no
Subsystem       sftp    /usr/lib/ssh/sftp-server
foo:~# apk add --no-cache \
>     ca-certificates \
>     less \
>     ncurses-terminfo-base \
>     krb5-libs \
>     libgcc \
>     libintl \
>     libssl1.1 \
>     libstdc++ \
>     tzdata \
>     userspace-rcu \
>     zlib \
>     icu-libs \
>     curl
fetch http://ftp.acc.umu.se/mirror/alpinelinux.org/v3.11/main/x86_64/APKINDEX.tar.gz
(1/15) Installing ca-certificates (20191127-r1)
(2/15) Installing nghttp2-libs (1.40.0-r0)
(3/15) Installing libcurl (7.67.0-r0)
(4/15) Installing curl (7.67.0-r0)
(5/15) Installing libgcc (9.2.0-r3)
(6/15) Installing libstdc++ (9.2.0-r3)
(7/15) Installing icu-libs (64.2-r0)
(8/15) Installing krb5-conf (1.0-r1)
(9/15) Installing keyutils-libs (1.6.1-r0)
(10/15) Installing libverto (0.3.1-r1)
(11/15) Installing krb5-libs (1.17.1-r0)
(12/15) Installing less (551-r0)
(13/15) Installing libintl (0.20.1-r2)
(14/15) Installing tzdata (2019c-r0)
(15/15) Installing userspace-rcu (0.11.1-r0)
Executing busybox-1.31.1-r9.trigger
Executing ca-certificates-20191127-r1.trigger
OK: 815 MiB in 152 packages
foo:~# apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
SSL certificate subject doesn't match host dl-cdn.alpinelinux.org
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz: Permission denied
fetch http://ftp.acc.umu.se/mirror/alpinelinux.org/v3.11/main/x86_64/APKINDEX.tar.gz
(1/1) Installing lttng-ust (2.10.4-r0)
Executing busybox-1.31.1-r9.trigger
OK: 816 MiB in 153 packages
foo:~# URL="https://github.com/PowerShell/PowerShell/releases/download/v7.0.0"
foo:~# URL+="/powershell-7.0.0-linux-alpine-x64.tar.gz"
foo:~# curl -L $URL -o /tmp/powershell.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   630  100   630    0     0   1666      0 --:--:-- --:--:-- --:--:--  1662
100 44.6M  100 44.6M    0     0   916k      0  0:00:49  0:00:49 --:--:-- 1184k
foo:~# mkdir -p /opt/microsoft/powershell/7
foo:~# tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7
foo:~# chmod +x /opt/microsoft/powershell/7/pwsh
foo:~# ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh
foo:~# pwsh
PowerShell 7.0.0
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/powershell
Type 'help' to get help.

PS /root>
