Free Alpine Linux Shell Accounts

1568101117

Comments

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    Hi @Nubuki!

    I am guessing the above quoted line might be adjusted to

    http://mirror.fcix.net/alpine/edge/main
    

    because it might be best to match as closely as possible what the server node is running. There are differences in Alpine between "latest-stable/main" and "edge."

    fmt:/etc/apk# cat repositories
    http://mirror.fcix.net/alpine/edge/main
    #http://mirror.fcix.net/alpine/edge/community
    #http://mirror.fcix.net/alpine/edge/testing
    
    fmt:/etc/apk# 
    

    Hopefully more software packages will be installed on the node before too long. As you know, this is the first time that I have touched Alpine. I have noob questions such as

    • Can I install all the software packages in the edge repository?

    • What would be the packages reasonably needed from the edge repository?

    • Can I also install everything in the community and the testing repositories?

    • What would be the packages reasonably needed from the community and testing repositories?

    @Nubuki said: # realised logname and normally present dependencies weren't installed so here we go

    It seems fine to me that you are trying to install additional software and trying to make Alpine more "normal." I hope you are having fun with and learning from these tricky installs!

    Friendly greetings! :)

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @tssz2022 said: How to install nginx php8?

    Does apk have a way to work for unprivileged installs?

    Why can't an unprivileged user do something like:

    $ apk add nginx php8
      [ . . . ]
    $
    

    I can imagine an answer like, "These installs require writing files to privilege protected locations. Besides that, there isn't enough demand to support the complexity underlying both privileged and unprivileged installs."

    But I suppose an unprivileged user might be able to configure and compile?

    @tssz2022 How about trying something really much smaller and lighter than nginx and php8?

    Friendly greetings! :)

    I hope everyone gets the servers they want!

  • @Not_Oles said:

    @tssz2022 said: How to install nginx php8?

    Does apk have a way to work for unprivileged installs?

    Why can't an unprivileged user do something like:

    $ apk add nginx php8
      [ . . . ]
    $
    

    I can imagine an answer like, "These installs require writing files to privilege protected locations. Besides that, there isn't enough demand to support the complexity underlying both privileged and unprivileged installs."

    But I suppose an unprivileged user might be able to configure and compile?

    @tssz2022 How about trying something really much smaller and lighter than nginx and php8?

    Friendly greetings! :)

    The apk command installs files to/usr/bin, which is the shared directory for all users. This violates the permissions of ordinary users

    Thanked by (1)Not_Oles
  • Not_OlesNot_Oles Hosting ProviderContent Writer
    edited December 2022

    @terrorgen said:

    @Not_Oles said:

    @terrorgen said:
    Sounds like i don't need sudo to install my nix anymore :wink:

    Yes, but could you please answer these two questions if you have time? Thanks!

    @Not_Oles said: I don't know much about nix.

    How does nix handle Alpine's musl libc?

    How would nix prevent interference with the packages installed by the Alpine package manager?

    1. Nix will being in all glibc dependencies where needed, and keep them in a store organized per user. Other users may not run anything I have installed through nix, for example.
    2. Nix packages are stored in a different location (/nix) so it won't disrupt the packages installed by apk. Nix will modify $PATH so its packages can be run without referencing the absolute path.

    Hope this answers your question?

    Can Nix work for an unprivileged user? Could Nix work from ~/nix?

    What about, for example, pkgsrc? If any packaging system would work for unprivileged users, I can imagine at least pkgsrc would work. FWIW, I've successfully used pkgsrc on CentOS and installed lots of stuff.

    As another alternative, could we make something like a /usr/share/nix directory into which unprivileged users could write? Would /usr/share/nix get /usr/share/nix/bin,etc,lib, and would everything work with just a $PATH adjustment?

    Maybe /nix with unprivileged users being able to write to it's user separate subdirectories might "just work?"

    I know a lot of people like Nix a lot! :)

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @host4cheap said:

    @Not_Oles said:

    @yoursunny said:
    I notice that @Cloudie AS924 is an upstream of this server.
    Is it possible to obtain a (free) BGP session with AS924?
    I recently acquired a LowEndASN and RIPE says it cannot be idle.
    I'd like an LXC container, with its Ethernet adapter bridged to the physical port, to run a BGP daemon.

    Hi @yoursunny! I don't know if it is possible to obtain a free BGP session with AS924. I am delighted to ask @Cloudie for you if you would like me to do so. He's pretty good about getting back to me. Would you like me to ask him? Best wishes! Tom

    Hello @Not_Oles

    I have pretty much the same requirement - Did you hear back from Cloudie ?

    ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM5/s1rTn6HWwbCONhDEbekjWHQAXBIPkKMcQT3JK3Yx Host4Cheap

    Hi @host4cheap!

    Yes, I heard back from @Cloudie.

    Thanks for requesting a MetalVPS account! Your support is much appreciated!

    I haven't seen you around too much here at LES. Would you like to introduce yourself? Maybe share a bit about who and where you are, your experience, and what you want to do on the server?

    Thanks again! Best wishes! :)

    Tom

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @rcdfrd said: The apk command installs files to/usr/bin, which is the shared directory for all users. This violates the permissions of ordinary users

    /usr/bin always and forever? apk can't be asked to write to /home/user/bin?

    I hope everyone gets the servers they want!

  • @Not_Oles said:

    @rcdfrd said: The apk command installs files to/usr/bin, which is the shared directory for all users. This violates the permissions of ordinary users

    /usr/bin always and forever? apk can't be asked to write to /home/user/bin?

    Apk is similar to yum , apt and pacman , they all cannot use without administrator privileges.
    It seems that the package management installation software on most Linux distributions requires administrator privileges.

  • @Not_Oles said:

    @tssz2022 said: How to install nginx php8?

    Does apk have a way to work for unprivileged installs?

    Why can't an unprivileged user do something like:

    $ apk add nginx php8
      [ . . . ]
    $
    

    I can imagine an answer like, "These installs require writing files to privilege protected locations. Besides that, there isn't enough demand to support the complexity underlying both privileged and unprivileged installs."

    But I suppose an unprivileged user might be able to configure and compile?

    @tssz2022 How about trying something really much smaller and lighter than nginx and php8?

    Friendly greetings! :)

    Caddy?

    Thanked by (1)Not_Oles
  • edited December 2022

    @Not_Oles said:

    @host4cheap said:

    @Not_Oles said:

    @yoursunny said:
    I notice that @Cloudie AS924 is an upstream of this server.
    Is it possible to obtain a (free) BGP session with AS924?
    I recently acquired a LowEndASN and RIPE says it cannot be idle.
    I'd like an LXC container, with its Ethernet adapter bridged to the physical port, to run a BGP daemon.

    Hi @yoursunny! I don't know if it is possible to obtain a free BGP session with AS924. I am delighted to ask @Cloudie for you if you would like me to do so. He's pretty good about getting back to me. Would you like me to ask him? Best wishes! Tom

    Hello @Not_Oles

    I have pretty much the same requirement - Did you hear back from Cloudie ?

    ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM5/s1rTn6HWwbCONhDEbekjWHQAXBIPkKMcQT3JK3Yx Host4Cheap

    Hi @host4cheap!

    Yes, I heard back from @Cloudie.

    Thanks for requesting a MetalVPS account! Your support is much appreciated!

    I haven't seen you around too much here at LES. Would you like to introduce yourself? Maybe share a bit about who and where you are, your experience, and what you want to do on the server?

    Thanks again! Best wishes! :)

    Tom

    Thank you @Not_Oles. I am more of a "viewer" on this forum and visit the other green forum more. Mainly a hobbyist who used to run a small hosting website back in College to pay the fees. I now work as a SRE in US at a Tier 2 Org and the reason of this VPS would be to learn BGP/ASN which I bought from Cloudie.

    Thanks
    You

  • @Not_Oles said:

    @rcdfrd said: The apk command installs files to/usr/bin, which is the shared directory for all users. This violates the permissions of ordinary users

    /usr/bin always and forever? apk can't be asked to write to /home/user/bin?

    I have changed a lot in my srcipt.
    Though I don't know if the modification has become better.

    mkdir -p ~/pri ~/pri ~/tmp
    cat > ~/.ashrc << 'EOF'
    export LD_LIBRARY_PATH="$HOME/pri/usr/lib:$LD_LIBRARY_PATH"
    export PATH="$HOME/pri/bin:$HOME/pri/usr/bin:$PATH"
    EOF
    
    cat > ~/.profile << 'EOF'
    source ~/.ashrc
    EOF
    
    cd ~/tmp
    cat > install.sh << 'EOF'
    
    install() {
        apk fetch $1
        tar -vxf $1-*.apk -C ~/pri
        rm -f ~/pri/.SIGN.*
        rm -f ~/pri/.PKGINFO
    }
    install python3
    # install musl
    install libbz2
    install libexpat
    install gdbm
    install libstdc++
    install mpdecimal
    install readline
    install sqlite-libs
    EOF
    ash install.sh
    cd ~ && rm -rf ~/tmp
    source ~/.profile
    python3 --version
    python3 -m ensurepip
    pip3 --version
    
  • fmt:~/tmp$ gcc --version
    gcc (Alpine 12.2.1_git20220924-r5) 12.2.1 20220924
    Copyright (C) 2022 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    

    And I have successfully run gcc.

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    Hi!

    Last night, logged in as unprivileged user notoles, I couldn't resist trying @rcfrd's python install scripts, which went through several versions as I was trying them.

    It was so much fun! <3 Maybe I haven't had that much fun since @uptime 🙏 was active at MetalVPS! <3

    Eventually, after changing the script to substitute full file paths instead of ./ I might have succeeded in getting python3 and and pip3 to tell me their versions. If interested, please check lines 3211 through 3222 of the numbered transcript.

    One thing I noticed was that the script seemed to start two additional shells at lines 42 and 54.

    I apologize for lines 2926 through 3207. I expected ps to return only my processes. I wanted to see how many shells were running.

    I had been trying various other versions of the script. I think I cleaned up /home/notoles and logged out and back in again before running the transcript.

    It might be important that the script seems to use the main repository from the latest version rather than the edge repository. Using a different repository from the node could cause tricky problems.

    The default for $LD_LIBRARY_PATH seems to be empty.

    I had trouble getting that binary and the library paths correct. I thought that trouble might have been due to the multiple shells or to something residual from my previous testing.

    Hopefully all this will be fun for everyone! :) Best wishes! :)

    I hope everyone gets the servers they want!

  • edited December 2022

    @Not_Oles said:
    Hi!

    Last night, logged in as unprivileged user notoles, I couldn't resist trying @rcfrd's python install scripts, which went through several versions as I was trying them.

    It was so much fun! <3 Maybe I haven't had that much fun since @uptime 🙏 was active at MetalVPS! <3

    Eventually, after changing the script to substitute full file paths instead of ./ I might have succeeded in getting python3 and and pip3 to tell me their versions. If interested, please check lines 3211 through 3222 of the numbered transcript.

    One thing I noticed was that the script seemed to start two additional shells at lines 42 and 54.

    I apologize for lines 2926 through 3207. I expected ps to return only my processes. I wanted to see how many shells were running.

    I had been trying various other versions of the script. I think I cleaned up /home/notoles and logged out and back in again before running the transcript.

    It might be important that the script seems to use the main repository from the latest version rather than the edge repository. Using a different repository from the node could cause tricky problems.

    The default for $LD_LIBRARY_PATH seems to be empty.

    I had trouble getting that binary and the library paths correct. I thought that trouble might have been due to the multiple shells or to something residual from my previous testing.

    Hopefully all this will be fun for everyone! :) Best wishes! :)

    cd tmp
    cat > install.sh << 'EOF'
    install() {
        apk fetch $1
        tar -vxf $1-*.apk -C ~/pri
        rm -f ~/pri/.SIGN.*
        rm -f ~/pri/.PKGINFO
    }
    install binutils
    install libgcc
    install libstdc++
    install zlib
    install gmp
    install isl24
    install libatomic
    install libgomp
    install mpc1
    install mpfr4
    install gcc
    install musl-dev
    EOF
    ash install.sh
    

    This is the script I use to install gcc. It is worth mentioning that the apk fetch is used to obtain the package here, so that the repository is consistent with the system.
    $LD_ LIBRARY_ PATH is the designation of a custom software library, and its default value is null.

    Thanked by (2)Not_Oles raveen2k3
  • fmt:~$ cat 1.c
    #include <stdio.h>
    
    int main()
    {
    printf("HELLO METALVPS!\n");
    return 0;
    }
    fmt:~$ gcc 1.c && ./a.out
    HELLO METALVPS!
    
    

    I have successfully run gcc in metalvps

    Note that you need to add the C_ INCLUDE_ PATH to ~/.ashrc

    cat > ~/.ashrc << 'EOF'
    export C_INCLUDE_PATH="$HOME/pri/usr/include:$C_INCLUDE_PATH"
    export LD_LIBRARY_PATH="$HOME/pri/lib:$HOME/pri/usr/lib:$LD_LIBRARY_PATH"
    export PATH="$HOME/pri/bin:$HOME/pri/usr/bin:$PATH"
    EOF
    
    Thanked by (2)bibble Not_Oles
  • @Not_Oles said:

    @terrorgen said:

    @Not_Oles said:

    @terrorgen said:
    Sounds like i don't need sudo to install my nix anymore :wink:

    Yes, but could you please answer these two questions if you have time? Thanks!

    @Not_Oles said: I don't know much about nix.

    How does nix handle Alpine's musl libc?

    How would nix prevent interference with the packages installed by the Alpine package manager?

    1. Nix will being in all glibc dependencies where needed, and keep them in a store organized per user. Other users may not run anything I have installed through nix, for example.
    2. Nix packages are stored in a different location (/nix) so it won't disrupt the packages installed by apk. Nix will modify $PATH so its packages can be run without referencing the absolute path.

    Hope this answers your question?

    Can Nix work for an unprivileged user? Could Nix work from ~/nix?

    What about, for example, pkgsrc? If any packaging system would work for unprivileged users, I can imagine at least pkgsrc would work. FWIW, I've successfully used pkgsrc on CentOS and installed lots of stuff.

    As another alternative, could we make something like a /usr/share/nix directory into which unprivileged users could write? Would /usr/share/nix get /usr/share/nix/bin,etc,lib, and would everything work with just a $PATH adjustment?

    Maybe /nix with unprivileged users being able to write to it's user separate subdirectories might "just work?"

    I know a lot of people like Nix a lot! :)

    During installation, Nix will create a system user called "nix".

    When a user calls nix to install a package, the user does not run any nix tools themselves, but through the system user 'nix'.

    nix creates a profile for the user under /nix/var/nix/profiles/user and symlinks to ~/.nix-profile.

    so everyone in MetalVPS running nix will get their own profile.

    This is how I understood how nix works. There are a lot of symlink magic happening in the background that I don't claim I am an expert of.

    The all seeing eye sees everything...

  • I'd also love to try one of the accounts. Thank you!!!

    Thanked by (1)Not_Oles
  • @kaysin said:
    I'd also love to try one of the accounts. Thank you!!!

    Congratulations on your first post.

    Thanked by (1)Not_Oles

    The all seeing eye sees everything...

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @kaysin said:
    I'd also love to try one of the accounts. Thank you!!!

    Hi @kaysin!

    Welcome to LES! We're glad to have you!

    Probably you read enough of this thread to know what I'm going to ask, right? :) How about introducing yourself, please? I'm sure everybody would love to hear about who / where you are, your experience, and what you want to do on the server. I'm looking forward to hearing everything you want to share!

    Best wishes, and thank you!

    Tom

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @terrorgen said:

    @Not_Oles said:

    @terrorgen said:

    @Not_Oles said:

    @terrorgen said:
    Sounds like i don't need sudo to install my nix anymore :wink:

    Yes, but could you please answer these two questions if you have time? Thanks!

    @Not_Oles said: I don't know much about nix.

    How does nix handle Alpine's musl libc?

    How would nix prevent interference with the packages installed by the Alpine package manager?

    1. Nix will being in all glibc dependencies where needed, and keep them in a store organized per user. Other users may not run anything I have installed through nix, for example.
    2. Nix packages are stored in a different location (/nix) so it won't disrupt the packages installed by apk. Nix will modify $PATH so its packages can be run without referencing the absolute path.

    Hope this answers your question?

    Can Nix work for an unprivileged user? Could Nix work from ~/nix?

    What about, for example, pkgsrc? If any packaging system would work for unprivileged users, I can imagine at least pkgsrc would work. FWIW, I've successfully used pkgsrc on CentOS and installed lots of stuff.

    As another alternative, could we make something like a /usr/share/nix directory into which unprivileged users could write? Would /usr/share/nix get /usr/share/nix/bin,etc,lib, and would everything work with just a $PATH adjustment?

    Maybe /nix with unprivileged users being able to write to it's user separate subdirectories might "just work?"

    I know a lot of people like Nix a lot! :)

    During installation, Nix will create a system user called "nix".

    When a user calls nix to install a package, the user does not run any nix tools themselves, but through the system user 'nix'.

    nix creates a profile for the user under /nix/var/nix/profiles/user and symlinks to ~/.nix-profile.

    so everyone in MetalVPS running nix will get their own profile.

    This is how I understood how nix works. There are a lot of symlink magic happening in the background that I don't claim I am an expert of.

    Can you please check:

    These are the first four hits in my Google search for "alpine nix" (without the quotes). Suppose I go ahead, enable the testing repository, and add that first hit, the testing Nix package. Do you think the install might work? Do you see any suggestion that it would not work? :) Thanks for checking! :)

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    I got a chance to invest some time today looking at installing development tools in Alpine Linux using apk. More on this probably tomorrow.

    I hope everyone gets the servers they want!

  • The issue in the second link is closed and someone mentioned that they are able to run sh <(curl -L https://nixos.org/nix/install to install nix on their alpine box. However, I am sure you need sudo and the person who installed it would own /nix so it may not work for metalvps if more than one user wants to use it.

    Installing nix using the apk method would end up with an older version of it and I am unsure if it can be upgraded to the latest version.

    The 3rd link hosts a dockerfile to create a docker container of alpine+nix.

    The forth link may be dated since it says it is not possible to run nix in alpine. However, it is dated 2021 and there are at least two instances where nix has successfully worked in Alpine Linux.

    Thanked by (1)Not_Oles

    The all seeing eye sees everything...

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @rcdfrd said: This is the script I use to install gcc.

    Thanks for the script! Super great!

    @rcdfrd said: I have successfully run gcc in metalvps

    Supercalifragilisticexpialidocious! ⭐⭐⭐⭐⭐

    Quoting from K&R 1.1:

    "This is a big hurdle; to leap over it you have to be able to create the program text somewhere, compile it successfully, load it, run it, and find out where your output went. With these mechanical details mastered, everything else is comparatively easy."

    @rcdfrd I think it's super great that you got this going as an unprivileged user! Congrats on your excellent hack!

    What will you do next? 🤩

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @terrorgen said:
    The issue in the second link is closed and someone mentioned that they are able to run sh <(curl -L https://nixos.org/nix/install to install nix on their alpine box. However, I am sure you need sudo and the person who installed it would own /nix so it may not work for metalvps if more than one user wants to use it.

    Installing nix using the apk method would end up with an older version of it and I am unsure if it can be upgraded to the latest version.

    The 3rd link hosts a dockerfile to create a docker container of alpine+nix.

    The forth link may be dated since it says it is not possible to run nix in alpine. However, it is dated 2021 and there are at least two instances where nix has successfully worked in Alpine Linux.

    What's your recommendation about what we should do at this time to enable Nix for everyone?

    I hope everyone gets the servers they want!

  • @Not_Oles said:

    @rcdfrd said: This is the script I use to install gcc.

    Thanks for the script! Super great!

    @rcdfrd said: I have successfully run gcc in metalvps

    Supercalifragilisticexpialidocious! ⭐⭐⭐⭐⭐

    Quoting from K&R 1.1:

    "This is a big hurdle; to leap over it you have to be able to create the program text somewhere, compile it successfully, load it, run it, and find out where your output went. With these mechanical details mastered, everything else is comparatively easy."

    @rcdfrd I think it's super great that you got this going as an unprivileged user! Congrats on your excellent hack!

    What will you do next? 🤩

    I don't have much in particular in mind for now, and it seems that I can use it as normal linux for now, except for programs that require administrator privileges. That's even better than it sounds.
    Do you have any good advice?

    Thanked by (1)Not_Oles
  • @Not_Oles said:

    @terrorgen said:
    The issue in the second link is closed and someone mentioned that they are able to run sh <(curl -L https://nixos.org/nix/install to install nix on their alpine box. However, I am sure you need sudo and the person who installed it would own /nix so it may not work for metalvps if more than one user wants to use it.

    Installing nix using the apk method would end up with an older version of it and I am unsure if it can be upgraded to the latest version.

    The 3rd link hosts a dockerfile to create a docker container of alpine+nix.

    The forth link may be dated since it says it is not possible to run nix in alpine. However, it is dated 2021 and there are at least two instances where nix has successfully worked in Alpine Linux.

    What's your recommendation about what we should do at this time to enable Nix for everyone?

    sudo apk add nix 😝

    Thanked by (1)Not_Oles

    The all seeing eye sees everything...

  • I received the account three days ago, but was on a trip.
    Now I've logged in.

    Instead of typing the full SSH command, I make an entry in $HOME/.ssh/config for each server I regularly access.
    The entry for this server is like this:

    Host fmt
      User yoursunny
      HostName fmt.metalvps.com
      Port 42365
    

    With that, I can simply type:

    ssh fmt
    

    The parameters would apply from the config file.

    @yoursunny said:
    I'd like an LXC container, with its Ethernet adapter bridged to the physical port, to run a BGP daemon.

    There's no LXC or KVM or Docker on the server :'(

    Thanked by (1)Not_Oles

    HostBrr aff best VPS; VirmAche aff worst VPS.
    Unable to push-up due to shoulder injury 😣

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @yoursunny said: Now I've logged in.

    Thanks for your report! Glad to have you with us!

    @yoursunny said: entry in $HOME/.ssh/config

    Thanks for the .ssh/config tip!

    There's no LXC or KVM or Docker on the server :'(

    Do you need all three, and, if not, which would be your first preference, and why?

    Could your use case work with any of the following (with needed updates / modifications) or with something else that's more simple than full LXC, KVM, or Docker?

    Thanks very much! Best wishes!

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @rcdfrd said: I don't have much in particular in mind for now, and it seems that I can use it as normal linux for now, except for programs that require administrator privileges.
    That's even better than it sounds.
    Do you have any good advice?

    Sorry, I am not qualified to decide whether my advice is / would be good. :)

    What are your interests? If I knew more about your interests, maybe I could make suggestions more worthy of your consideration.

    Here are a few conveniently available ideas, not necessarily good and not necessarily aligned with your interests.

    If you want or need something that requires administrator privileges, please post here to let me and everyone know.

    Have fun! :)

    Tom

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @terrorgen said:

    @Not_Oles said:

    @terrorgen said:
    The issue in the second link is closed and someone mentioned that they are able to run sh <(curl -L https://nixos.org/nix/install to install nix on their alpine box. However, I am sure you need sudo and the person who installed it would own /nix so it may not work for metalvps if more than one user wants to use it.

    Installing nix using the apk method would end up with an older version of it and I am unsure if it can be upgraded to the latest version.

    The 3rd link hosts a dockerfile to create a docker container of alpine+nix.

    The forth link may be dated since it says it is not possible to run nix in alpine. However, it is dated 2021 and there are at least two instances where nix has successfully worked in Alpine Linux.

    What's your recommendation about what we should do at this time to enable Nix for everyone?

    sudo apk add nix 😝

    Hi @terrorgen!

    Please let us know how well nix works for you.

    According to https://nixos.org/download.html the current version is 2.12.0.

    Here's a link to the Alpine Package Details.

    Everyone please note that I added the community and the testing repositories to /etc/alpine/repositories, which now looks like:

    fmt:~# cat /etc/apk/repositories
    http://mirror.fcix.net/alpine/edge/main
    http://mirror.fcix.net/alpine/edge/community
    http://mirror.fcix.net/alpine/edge/testing
    
    fmt:~# 
    

    Upon logging in again after installing Nix I saw this message:

    Nix: creating /root/.nix-profile
    fmt:~# nix --version
    nix (Nix) 2.11.0
    fmt:~# 
    

    Here is a transcript of the install:

    fmt:~# apk update
    fetch http://mirror.fcix.net/alpine/edge/main/x86_64/APKINDEX.tar.gz
    fetch http://mirror.fcix.net/alpine/edge/community/x86_64/APKINDEX.tar.gz
    fetch http://mirror.fcix.net/alpine/edge/testing/x86_64/APKINDEX.tar.gz
    v3.17.0-1944-g134785e067 [http://mirror.fcix.net/alpine/edge/main]
    v3.17.0-1970-g085f00dedd [http://mirror.fcix.net/alpine/edge/community]
    v3.17.0-1970-g085f00dedd [http://mirror.fcix.net/alpine/edge/testing]
    OK: 24027 distinct packages available
    fmt:~# apk upgrade
    (1/4) Upgrading ca-certificates-bundle (20221203-r0 -> 20221203-r1)
    (2/4) Upgrading ca-certificates (20221203-r0 -> 20221203-r1)
    (3/4) Upgrading ncurses-terminfo-base (6.3_p20221210-r0 -> 6.3_p20221217-r0)
    (4/4) Upgrading ncurses-libs (6.3_p20221210-r0 -> 6.3_p20221217-r0)
    Executing busybox-1.35.0-r29.trigger
    Executing ca-certificates-20221203-r1.trigger
    OK: 150 MiB in 91 packages
    fmt:~# apk add nix
    (1/16) Installing libacl (2.3.1-r1)
    (2/16) Installing libbz2 (1.0.8-r4)
    (3/16) Installing libexpat (2.5.0-r0)
    (4/16) Installing lz4-libs (1.9.4-r1)
    (5/16) Installing libarchive (3.6.2-r1)
    (6/16) Installing boost1.80-context (1.80.0-r4)
    (7/16) Installing libcpuid (0.6.2-r0)
    (8/16) Installing editline (1.17.1-r1)
    (9/16) Installing libgcc (12.2.1_git20220924-r5)
    (10/16) Installing libstdc++ (12.2.1_git20220924-r5)
    (11/16) Installing gc (8.2.2-r0)
    (12/16) Installing libseccomp (2.5.4-r1)
    (13/16) Installing libsodium (1.0.18-r2)
    (14/16) Installing sqlite-libs (3.40.0-r0)
    (15/16) Installing nix (2.11.0-r1)
    Executing nix-2.11.0-r1.pre-install
    (16/16) Installing nix-openrc (2.11.0-r1)
    Executing busybox-1.35.0-r29.trigger
    OK: 168 MiB in 107 packages
    fmt:~# which nix
    /usr/bin/nix
    fmt:~# ls -l /usr/bin/nix
    -rwxr-xr-x    1 root     root       3292400 Oct  9 14:45 /usr/bin/nix
    fmt:~# ls -l / | grep nix
    drwxr-xr-x    4 root     root          4096 Dec 20 22:40 nix
    fmt:~# 
    

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @tssz2022 said:

    @Not_Oles said:

    @tssz2022 said: How to install nginx php8?

    Does apk have a way to work for unprivileged installs?

    Why can't an unprivileged user do something like:

    $ apk add nginx php8
      [ . . . ]
    $
    

    I can imagine an answer like, "These installs require writing files to privilege protected locations. Besides that, there isn't enough demand to support the complexity underlying both privileged and unprivileged installs."

    But I suppose an unprivileged user might be able to configure and compile?

    @tssz2022 How about trying something really much smaller and lighter than nginx and php8?

    Friendly greetings! :)

    Caddy?

    How does caddy replace the php8 function? Thanks! :)

    I hope everyone gets the servers they want!

Sign In or Register to comment.