-14
submitted 10 months ago by MrOzwaldMan@lemmy.ml to c/linux@lemmy.ml

Im a MEAN Stack developer and require the following:-

  • MongoDB (with MongoDB Compass)
  • Express
  • Angular
  • NodeJS

I need those for my web development job and projects.

I have experience with Ubuntu and Fedora based distros and wanted to use Arch Linux because i like the way Hyprland looked. Just tell me how to install mongodb, the rest can be done with npm.

top 27 comments
sorted by: hot top controversial new old
[-] const_void@lemmy.ml 29 points 10 months ago

because i like the way Hyprland looked

lol

[-] MrOzwaldMan@lemmy.ml -1 points 10 months ago

if i don't like it, i can go back to gnome or kde, i got things backed up in a hard drive.

[-] INeedMana@lemmy.world 17 points 10 months ago* (last edited 10 months ago)

Are you looking for this?

And sorry but... RTFM ;)

And when you're ready, I suggest trizen for AUR management

EDIT: yeah, you can use npm, rpm, deb, snap, etc. But from my experience using the packages and package manager from the distro you're using breaks less often. Only python packages in a venv I'd consider an exception.
And in case of Arch, if you really can't wait a few days for the newest version of a thing, that's what AUR *-git packages are for

[-] noodlejetski@lemm.ee 13 points 10 months ago

trizen

Last Updated: 2022-12-02 10:54 (UTC)

might wanna switch over to yay

[-] INeedMana@lemmy.world 2 points 10 months ago

That might be a good idea, true. I haven't payed attention to its updates. But then, I also haven't had any issues with trizen last few years

[-] NotATurtle@lemmy.dbzer0.com 4 points 10 months ago

First time I hear of trizen. How does it compare to yay or paru?

[-] INeedMana@lemmy.world 1 points 10 months ago

No idea, sorry. I've switched to trizen when lack of development on pacmatic became an issue, few years ago

[-] MrOzwaldMan@lemmy.ml 2 points 10 months ago

yep, im gonna try using paru or yay when i install arch tomorrow.

[-] lemmyvore@feddit.nl 12 points 10 months ago

Honestly I would say just learn Docker. It only takes a few days, a week tops. You make a container with Mongo and one with Node, network them together, map the Express port and the data volumes for db/code/build to the host machine, and live happily ever after.

Which is super clean, not distro-dependent, reproducible, portable, easy to backup, you can swap Mongo and Node versions or use multiple versions side by side as you please, and you can use whatever features you want from the home distro without impacting anything in your dev stack.

[-] d950@lemmy.world 9 points 10 months ago

You could use Hyprland over both Ubuntu & Fedora. Nevertheless, all mentioned programs are supported by pacman. Docker is also available.

[-] MrOzwaldMan@lemmy.ml 1 points 10 months ago

i know they exist, it's how you install em was the issue. I know I can use yay or paru to get them but don't know unless i try it.

[-] Aatube@kbin.social 3 points 10 months ago

Then… how did you not know how to get MongoDB?

[-] MrOzwaldMan@lemmy.ml 0 points 10 months ago

I know how to get it on Ubuntu and Fedora, just not Arch.

[-] Aatube@kbin.social 2 points 10 months ago

If you know how to use yay, how can you not know how?

[-] MrOzwaldMan@lemmy.ml 2 points 10 months ago

searched and now I know how to use it.

[-] abclop99@beehaw.org 8 points 10 months ago

https://wiki.archlinux.org/title/MongoDB

MongoDB has been removed from the official repositories due to its re-licensing issues [1].

Install one of the following for the latest version available:

  • mongodb^AUR^ - builds from source.
  • mongodb-bin^AUR^ - prebuilt MongoDB binary extracted from official MongoDB Ubuntu repository packages. Compilation options used are unknown.

Alternatively, there are older versions of MongoDB available:

  • mongodb50^AUR^, mongodb50-bin^AUR^
  • mongodb44^AUR^, mongodb44-bin^AUR^
  • mongodb42-bin^AUR^
  • mongodb40-bin^AUR^
  • mongodb36-bin^AUR^
  • mongodb34-bin^AUR^
  • mongodb32-bin^AUR^

https://wiki.archlinux.org/title/Arch_User_Repository

[-] NotATurtle@lemmy.dbzer0.com 5 points 10 months ago

Install paru and use it to install mongodb from the aur.

[-] Aatube@kbin.social 8 points 10 months ago

Or yay. I’ve found yay to have more intuitive defaults

[-] Rade0nfighter@lemmy.world 5 points 10 months ago
[-] MrOzwaldMan@lemmy.ml -2 points 10 months ago
[-] Max_P@lemmy.max-p.me 9 points 10 months ago

How is it unrelated? Running MongoDB in a container so that it just works and you have a portable/reproducible dev environment is a perfectly valid approach.

[-] MrOzwaldMan@lemmy.ml -1 points 10 months ago

Agreed, but the post was about helping installing the aforementioned softwares but imma yoink the idea for my future projects.

[-] Max_P@lemmy.max-p.me 4 points 10 months ago

We have to define what installing software even means. If you install a Flatpak, it basically does the same thing as Docker but somewhat differently. Snaps are similar.

"Installing" software generally means any way that gets the software on your computer semi-permanently and run it. You still end up with its files unpacked somewhere, the main difference with Docker is it ships with the whole runtime environment in the form of a copy of a distro's userspace.

But fair enough, sometimes you do want to run things directly. Just pointing out it's not a bad answer, just not the one you wanted due to missing intents from your OP. Some things are so finicky and annoying to get running on the "wrong" distro that Docker is the only sensible way to install it. I run the Unifi controller in a container for example, because I just don't want to deal with Java versions and MongoDB versions. It just comes with everything it needs and I don't need to needlessly keep Java 8 around on my main system potentially breaking things that needs a newer version.

[-] MrOzwaldMan@lemmy.ml 1 points 10 months ago

Basically, I should use docker as a VPS, right? The only thing I was taught in bootcamp was how to use docker to create a setup for a new dev for a specific codebase, i.e. download required packages to work on the codebase through docker and use AWS as a VPS using Elastic and S3 to display the website.

[-] Max_P@lemmy.max-p.me 4 points 10 months ago

Kind of but also not really.

Docker is one kind of container, which itself is a set of kinds of Linux namespaces.

It's possible to run them as if they were a virtual machine with LXC, LXD, systemd-nspawn. Those run an init system and have a whole Linux stack of their own running inside.

Docker/OCI take a different approach: we don't really care about the whole operating system, we just want apps to run in a predictable environment. So while the container does contain a good chuck of a regular Linux installation, it's there so that the application has all the libraries it expects there. Usually network software that runs on a specified port. Basically, "works on my machine" becomes "here's my whole machine with the app on it already configured".

And then we were like well this is nice, but what if we have multiple things that need to talk to eachother to form a bigger application/system? And that's where docker-compose and Kubernetes pods comes in. They describe a set of containers that form a system as a single unit, and links them up together. In the case of Kubernetes, it'll even potentially run many many copies of your pod across multiple servers.

The last one is usually how dev environments go: one of them have all your JS tooling (npm, pnpm, yarn, bun, deno, or all of them even). That's all it does, so you can't possibly have a Python library that conflicts or whatever. And you can't accidentally depend on tools you happen to have installed on your machine because then the container won't have it and it won't work, you're forced to add it to the container. Then that's used to build and run your code, and now you need a database. You add a MongoDB container to your compose, and now your app and your database are managed together and you can even access the other containers by their name! Now you need a web server to run it in a browser? Add NGINX.

All isolated, so you can't be in a situation where one project needs node 16 and an old version of mongo, but another one needs 20 and a newer version of mongo. You don't care, each have a mongo container with the exact version required, no messing around.

Typically you don't want to use Docker as a VPS though. You certainly can, but the overlay filesystems will become inefficient and it will drift very far from the base image. LXC and nspawn are better tools for that and don't use image stacking or anything like that. Just a good ol' folder.

That's just some applications of namespaces. All of process, network, time, users/groups, filesystems/mount can be independently managed so many namespaces can be in the same network namespace, while in different mount namespaces.

And that's how Docker, LXC, nspawn, Flatpak, Snaps are kinda all mostly the same thing under the hood and why it's a very blurry line which ones you consider to be isolation layers, just bundled dependencies, containers, virtual machines. It's got an infinite number of ways you can set up the namespaces the ranges from seeing /tmp as your own personal /tmp to basically a whole VM.

[-] GentooIsBased@lemmy.ml 2 points 10 months ago

I used Fedora/Hyprland for a while.

[-] Certainly_No_Brit@discuss.tchncs.de 1 points 10 months ago* (last edited 10 months ago)

https://wiki.archlinux.org/title/MongoDB

Do you know what the AUR (Arch User Repository) is? You can install MongoDB that way. (This is NOT an official source, all AUR packages are created by users!)

You can install an AUR manager like yay:

git clone https://github.com/Jguer/yay
cd yay
sudo make install

and install (compile) MongoDB:

yay -S mongodb

(or alternatively mongodb-bin for a pre-compiled version)

I apologize if some of the code doesn't work, i can't test it right now.

this post was submitted on 03 Jan 2024
-14 points (33.3% liked)

Linux

48073 readers
745 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS