How do you create a sudo mkdir for installing mongodb? - mongodb

Whenever i try to mkdir i get no such file or directory

Related

Installing MongoDB 2022

I downloaded mongoDB and I try to use brew, it didn't work.
I try bunch of commands such as:
$ curl -O https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.4.6.tgz
$ tar -zxvf mongodb-osx-x86_64-3.4.6.tgz
$ mkdir -p mongodb
$ cp -R -n mongodb-osx-x86_64-3.4.6/ mongodb
$ sudo mv mongodb /usr/local
Didn't work
Step 5: it says the directory is not empty or is not exist. I try to empty the directory didn't work and I try to create a different one, it didn't work.
I can't find any solution. Can someone help me, please?
I think your /usr/local folder already contains a non-empty folder named mongodb.
Refer this for details.
You can confirm it by listing out the files in it
ls /usr/local/mongodb
Maybe, you can try removing that directory as a superuser if it doesn't have any important files and continue with the installation

Linux Mint 20 Ulyana - Cannot Remove Directory that exists but doesn't exist

1:Cannot Delete Directory
I'm using Linux Mint 20 Ulyana. I created a directory:
mkdir ./VM_Shared
It won't allow me to access or even see the directory in file explorer.
I can see it with:
ls -al
But it won't allow me to remove it:
sudo rm -dir VM_Shared - directory doesn't exist
sudo rm -dir ./VM_Shared - directory doesn't exist
sudo rm ./VM_Shared - is a directory
I also tried them without sudo.
I'm at a loss here. I cannot figure out why it won't let me delete it or access it.

I can't locate my pid file to delete it so that I can start postgresql again?

Long story short my db didn't get shutdown correctly and I am trying to get it back up and running
I have run a
sudo find / -name postmaster.pid
to locate the file.
but when I run
sudo rm /Users/cward/Library/Application Support/Postgres/var-10/postmaster.pid
I get the following
rm: /Users/cward/Library/Application: No such file or directory
rm: Support/Postgres/var-10/postmaster.pid: No such file or directory
Your folder name contain space. You should quote the full path like this:
sudo rm "/Users/cward/Library/Application Support/Postgres/var-10/postmaster.pid"

How to install Robomongo from tar.gz file as a program in Ubuntu 15.10

Nowadays robomongo developers releasing the new versions of robomongo as tar.gz not in .deb packages that was easy for double click installations. But that option is no longer available. So how to install it as a program in Ubuntu. I have tried extracting the package and install but failed.
admin#admin-lenovo:~$ cd Downloads/
admin#admin-lenovo:~/Downloads$ tar -xzf robomongo-0.9.0-rc4-linux-x86_64-8c830b6.tar.gz
admin#admin-lenovo:~/Downloads$ cd robomongo-0.9.0-rc4-linux-x86_64-8c830b6/
admin#admin-lenovo:~/Downloads/robomongo-0.9.0-rc4-linux-x86_64-8c830b6$ ./configure
bash: ./configure: No such file or directory
Also .make and ./install failed as no files found. How to install it as a program?
Robomongo is now Robo 3T. Following are the updated steps:
Download the tar file from robomongo site. The current file is robo3t-1.1.1-linux-x86_64-c93c6b0.tar.gz, but yours could be different.
Open up the terminal, switch to download directory and run the following commands:
$ tar -xvzf robo3t-1.1.1-linux-x86_64-c93c6b0.tar.gz
$ sudo mkdir /usr/local/bin/robomongo
$ sudo mv robo3t-1.1.1-linux-x86_64-c93c6b0/* /usr/local/bin/robomongo
$ cd /usr/local/bin/robomongo/bin
$ sudo chmod +x robo3t
$ sudo gedit ~/.bashrc
Add the following line to the end of .bashrc file:
alias robomongo='/usr/local/bin/robomongo/bin/robo3t'
Save and close the file. Now reload it using the following command:
$ source ~/.bashrc
Then you can run robomongo from your terminal and it will work:
$ robomongo
You can also put the robomongo into /usr/bin like I do:
tar xf robomongo-0.9.0-rc8-linux-x86_64-c113244.tar.gz
sudo mv robomongo-0.9.0-rc8-linux-x86_64-c113244/ /usr/bin/robomongo
export PATH=/usr/bin/robomongo/bin:$PATH
If you are using fish shell, you need to change the last line to:
set PATH $PATH /usr/bin/robomongo/bin
Now you can start it with command:
robomongo
Pulled this from my dotfiles. It's ugly but it works... and it's a bit more verbose so it should be understandable to most:
# Pull down and install Robomongo by copying files
cd /tmp
wget https://download.robomongo.org/0.9.0/linux/robomongo-0.9.0-linux-x86_64-0786489.tar.gz
tar xf robomongo-0.9.0-linux-x86_64-0786489.tar.gz
sudo mv ./robomongo-0.9.0-linux-x86_64-0786489 /opt/robomongo
cd /usr/sbin
sudo ln -s /opt/robomongo/bin/robomongo
# Grab image to use for icon
cd /opt/robomongo
wget http://mongodb-tools.com/img/robomongo.png
# Create desktop entry
touch /tmp/robomongo.txt
echo "[Desktop Entry]" >> /tmp/robomongo.txt
echo "Encoding=UTF-8" >> /tmp/robomongo.txt
echo "Name=Robomongo" >> /tmp/robomongo.txt
echo "Comment=Launch Robomongo" >> /tmp/robomongo.txt
echo "Icon=/opt/robomongo/robomongo.png" >> /tmp/robomongo.txt
echo "Exec=/usr/sbin/robomono" >> /tmp/robomongo.txt
echo "Terminal=false" >> /tmp/robomongo.txt
echo "Type=Application" >> /tmp/robomongo.txt
echo "Categories=Developer;" >> /tmp/robomongo.txt
echo "StartupNotify=true" >> /tmp/robomongo.txt
mv /tmp/robomongo.txt ~/.local/share/applications/robomongo.desktop
1. First Download the version from the official Robomongo website bellow:
Download Robomongo From Official website using this link
2.Then extract the downloaded tar.gz file in your downloads folder.
3. Copy and paste the extracted folder into your opt folder
/opt
NB: If you don't have permission to paste in this folder use the bellow command in terminal to access the folder.
$ sudo chmod -R 777 /opt
4. Open the opt/robomongo/bin folder and launch Robomongo by clicking the executable icon.
opt/robomongo/bin
5. Simply Create a database and right click on the Robomongo icon and select the lock to launcher option. This will create a shortcut t launch the Robomongo application at any time you need.
You can first extract the package:
cd ~/Downloads
tar -xzf robo3t-x.x.x-linux-x86_64-xxxxxxx.tar.gz
You can rename the folder to something simpler
mv robo3t-x.x.x-linux-x86_64-xxxxxxx robo3t
Dowload any images with format .png [click here][1]
(For whatever reason, the Robo3T package itself does not contain any png file for the icon)
Save the image like robo3t.png and move this image to folder robo3t and then, instead of dumping the whole thing in /usr you can transfer this directory to /opt directory and symlink the binary file to /usr/bin or /usr/local/bin. This makes for a better way of organising your applications, and keeping such add-on packages is what /opt is for.
So first move the directory
sudo mv robo3t /opt
and then symlink it like so
sudo ln -s /opt/robo3t/bin/robo3t /usr/bin/robo3t
then you can create an Unity desktop file for your launcher
nano ~/.local/share/applications/robo3t.desktop
and finally; paste the next code in the file newly created
[Desktop Entry]
Encoding=UTF-8
Name=Robo 3T
Exec=robo3t
Icon=/opt/robo3t/robo3t.png
Terminal=false
Type=Application
Categories=Development;
And Happy coding!
Currently there is no installer for robomongo-0.9.0-rc4. you can create a desktop shortcut to robomongo-0.9.0-rc4-linux-x86_64-8c830b6/bin/robomongo file and use it just like any other Ubuntu app. Take a look at this tutorial https://askubuntu.com/a/142197/71544
Wathc this Video
How to install robomongo on ubuntu 16.4
OR
Follow Below Steps
Open Terminal and run the below command
wget https://download.robomongo.org/0.9.0/linux/robomongo-0.9.0-linux-x86_64-0786489.tar.gz
Extract the tar.gz file to enter below command
tar -xvzf robomongo-0.9.0-linux-x86_64-0786489.tar.gz
create a dir /usr/local/bin dir name directory name robomongo and move it to extract file into robomongo directory
sudo mkdir /usr/local/bin/robomongo
sudo mv robomongo-0.9.0-linux-x86_64-0786489/* /usr/local/bin/robomongo
run command only if robomongo isn't executable file
cd /usr/local/bin/robomongo/bin
sudo chmod +x robomongo
./robomongo
Don't worry about how to install Robo-3T on your Linux machine, follow these simple steps:
Download script from Robo3T-Installation-With-Desktop Entry
Open terminal in directory where above file is downloaded and run below command
sudo chmod +x ./Robo3T-Installation-Menu.sh
Then type below command and hit enter
./Robo3T-Installation-Menu.sh
Just wait to complete it, once completed enjoy RoboMongo. Search in menu with name "Robo 3T".
Well, I do not know if it might still help, but one efficient way to install Robomongo from tar.gz file is the following:
Go to https://robomongo.org/download to grab the tar.gz file,
After download,
cd Downloads/*
and then type in the terminal:
$ sudo tar xzf robo3t-1.3.1-linux-x86_64-7419c406.tar.gz -C /opt/
Make sure your file has been unzipped in the /opt directory by checking:
$ ls -lh /opt/
Next, install it by doing:
$ sudo /opt/robo3t-1.3.1-linux-x86_64-7419c406/bin/robo3t
The installation wizard pops up and accept the terms and continue installation. Then Enjoy
NB: You will not see the robot3t icon in the start menu. So to start robot3t, always
/opt/robo3t-1.3.1-linux-x86_64-7419c406/bin/robo3t to launch robo3T.
Hope it helps ;)

Mongodb on Mavericks

I just updated to Mavericks and trying to get all my required tools and software in place.
My mongodb is not working after installing mongodb through brew.
I did: brew install mongodb --devel
Then, I ran mongod& on terminal. This gives me:
ERROR: dbpath (/data/db) does not exist.
Create this directory or give existing directory in --dbpath.
I tried creating a directory: mkdir -p /data/db and I got permission denied as the error.
I am referring to this website "http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/" and installing Mongo using Homebrew.
Has anyone faced this issue before? Where do I actually find /data/db directory to give permissions to it? I tried ls -la in my home folder, but couldn't find this directory.
Please ignore. Here is what helped me to solve the problem:
$ sudo mkdir -p /data/db/
$ sudo chown `id -u` /data/db