Verify that the service is enabled mongoĬommon Commands // 1. Check whether the MongoDB port is enabled netstat -natp | grep 27017Ĭheck whether the database is installed successfully Ps - aux | grep mongod # to check the database process exists Copy the codeĤ. Starting the MongoDB Service systemctl start rvice Verify the installation rpm -qa |grep mongodb
YUM INSTALL MONGODB CENTOS 7 INSTALL
Install the mongo sudo yum install -y mongodb-orgĢ.
![yum install mongodb centos 7 yum install mongodb centos 7](https://www.tuxtips.net/wp-content/uploads/2020/03/How-to-install-MongoDB-on-CentOS-7-linux.jpg)
Save the Settings and exit Wq # Exit and save the configuration Copy the code Install MongoDB using yum 1. Add the following configuration information: name = directing a Repository baseurl= gpgcheck = 1 enabled = 1 gpgkey= Copy the codeĪ: Name # baseurl # gpkCheck =1 # Enable =1 # enables the source. Repo file to generate the mongodb source Vi/etc/yum. Yum clean, yum clean all // (= yum clean packages Yum clean oldheaders) clears packages and oldheaders in the cache directory Copy the code Install the mongo Configure the system yum source 1. Yum clean oldheaders // Clear the old headers from the cache directory
![yum install mongodb centos 7 yum install mongodb centos 7](https://computingforgeeks.com/wp-content/uploads/2021/08/Install-MongoDB-5-CentOS-8-7-rhel-8-7.png)
Yum clean headers // Clear headers from the cache directory Yum clean packages // Clear the software package in the cache directory Yum deplist package // Check program package dependencies // 5 Clear the cache Yum remove | erase package // Delete the package package Yum search package // Searches for details of packages that match specific characters // 4 Delete the program Yum list package // Displays the installation status of the specified package package Yum list // Displays all installed and installable packages Yum info package // Displays installation package information package Yum info // Lists all packages that can be installed or updated Yum upgrade package // Upgrade the specified package package // 3 Find and display Yum check-update // Check for updatable programs Yum update package // Update the specified package package
![yum install mongodb centos 7 yum install mongodb centos 7](https://i.ytimg.com/vi/nPQwNNc-gpE/hqdefault.jpg)
Yum install package // Install the specified installation package package // 2 Updates and upgrades Use to summarize a few common ones: / / 1 installation This installation is based on Linux Centos 7, using Yum to install MongoDB Yum source