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."
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!
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?
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
How would nix prevent interference with the packages installed by the Alpine package manager?
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.
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?"
@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
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?
@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.
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?
@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
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.
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.
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! Maybe I haven't had that much fun since @uptime 🙏 was active at MetalVPS!
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!
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! Maybe I haven't had that much fun since @uptime 🙏 was active at MetalVPS!
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!
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.
How would nix prevent interference with the packages installed by the Alpine package manager?
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.
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.
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!
How would nix prevent interference with the packages installed by the Alpine package manager?
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.
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.
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!
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.
"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!
@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?
"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?
@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 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.
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?
@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.
@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?
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?
Comments
Hi @Nubuki!
I am guessing the above quoted line might be adjusted to
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."
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?
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!
Does
apk
have a way to work for unprivileged installs?Why can't an unprivileged user do something like:
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!
The apk command installs files to/usr/bin, which is the shared directory for all users. This violates the permissions of ordinary users
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!
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!
/usr/bin
always and forever?apk
can't be asked to write to /home/user/bin?I hope everyone gets the servers they want!
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.
Caddy?
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
I have changed a lot in my srcipt.
Though I don't know if the modification has become better.
And I have successfully run gcc.
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! Maybe I haven't had that much fun since @uptime 🙏 was active at MetalVPS!
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!
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.
I have successfully run gcc in metalvps
Note that you need to add the C_ INCLUDE_ PATH to ~/.ashrc
During installation, Nix will create a system user called "nix".
When a user calls
nix
to install a package, the user does not run anynix
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!!!
Congratulations on your first post.
The all seeing eye sees everything...
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!
Can you please check:
https://pkgs.alpinelinux.org/package/edge/testing/x86/nix
https://github.com/NixOS/nix/issues/6751
https://github.com/redoracle/nixos
https://discourse.nixos.org/t/how-to-install-multi-user-nix-on-alpine/13909
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!
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 installnix
on their alpine box. However, I am sure you needsudo
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 theapk
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.
The all seeing eye sees everything...
Thanks for the script! Super great!
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!
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!
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?
sudo apk add nix
😝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:
With that, I can simply type:
The parameters would apply from the config file.
There's no LXC or KVM or Docker on the server
Accepting submissions for IPv6 less than /64 Hall of Incompetence.
Thanks for your report! Glad to have you with us!
Thanks for the .ssh/config tip!
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?
Linux containers in 500 lines of code (2016) | Hacker News
Subject of above HN link
GOTO 2018 • Containers From Scratch • Liz Rice
Containers from Scratch -- The Sequel
Build Your Own Container Using Less than 100 Lines of Go
Thanks very much! Best wishes!
I hope everyone gets the servers they want!
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.
Xv6?
a simple container implementation like those listed above?
assembly language programming?
Sourcehut
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!
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:
Upon logging in again after installing Nix I saw this message:
Here is a transcript of the install:
I hope everyone gets the servers they want!
How does caddy replace the php8 function? Thanks!
I hope everyone gets the servers they want!