close
安裝參考:https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
1.新增mongoD公開金鑰
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
2.新增MongoDB的.list檔案到 sources.list.d
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
3.sudo apt-get update
4.安裝MongoDB
sudo apt-get install -y mongodb-org使
啟動MongoDB功能
sudo systemctl start mongod
確認MongoDB正在運作
sudo systemctl status mongod
重開機後還能自動開啟MongoDB
sudo systemctl enable mongod
進入Mongo介面
mongo
離開Mongo介面
exit
文章標籤
全站熱搜
留言列表