> For the complete documentation index, see [llms.txt](https://kawsing.gitbook.io/opensystem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kawsing.gitbook.io/opensystem/andoid-shou-ji/termux/an-zhuang-linux-zhuo-mian/mongodb.md).

# MongoDB

{% embed url="<https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/>" %}

{% embed url="<https://coder.tw/?p=805>" %}

目前ubuntu才有支援arm64

cd /etc/apt/sources.list.d

```
deb [ arch=arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse
```

apt update

```
apt install mongodb-org-server mongodb-org-shell
```

## 簡易又安全的使用

```
pm2 start "mongod --bind_ip 127.0.0.1 --dbpath=mongodb --logpath=/var/log/mongodb/db.log"
```
