centos mongodb client
时间: 2023-09-14 11:02:33 浏览: 81
To install the MongoDB client on CentOS, follow these steps:
1. Update your system:
```
sudo yum update -y
```
2. Add the MongoDB repository:
```
sudo vi /etc/yum.repos.d/mongodb.repo
```
3. Add the following lines to the file:
```
[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
```
4. Save and exit the file.
5. Install the MongoDB client:
```
sudo yum install -y mongodb-org-shell
```
6. Verify the installation:
```
mongo --version
```
You should see the version number of the MongoDB client installed on your system.
阅读全文