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.
because i like the way Hyprland looked
lol
if i don’t like it, i can go back to gnome or kde, i got things backed up in a hard drive.
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 fortrizen
Last Updated: 2022-12-02 10:54 (UTC)
might wanna switch over to
yay
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
First time I hear of trizen. How does it compare to yay or paru?
No idea, sorry. I’ve switched to trizen when lack of development on pacmatic became an issue, few years ago
yep, im gonna try using paru or yay when i install arch tomorrow.
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.
You could use Hyprland over both Ubuntu & Fedora. Nevertheless, all mentioned programs are supported by pacman. Docker is also available.
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.
Then… how did you not know how to get MongoDB?
I know how to get it on Ubuntu and Fedora, just not Arch.
If you know how to use yay, how can you not know how?
searched and now I know how to use it.
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:
- mongodbAUR - builds from source.
- mongodb-binAUR - prebuilt MongoDB binary extracted from official MongoDB Ubuntu repository packages. Compilation options used are unknown.
Alternatively, there are older versions of MongoDB available:
- mongodb50AUR, mongodb50-binAUR
- mongodb44AUR, mongodb44-binAUR
- mongodb42-binAUR
- mongodb40-binAUR
- mongodb36-binAUR
- mongodb34-binAUR
- mongodb32-binAUR
Docker too obvious?
Unrelated but ok.
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.
Agreed, but the post was about helping installing the aforementioned softwares but imma yoink the idea for my future projects.
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.
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.
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.
Install paru and use it to install mongodb from the aur.
Or yay. I’ve found yay to have more intuitive defaults
I used Fedora/Hyprland for a while.
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.