§2024-04-28
試作機器: n2128gNoble.yushei.net
$ wget https://repo.mongodb.org/apt/ubuntu/dists/noble/mongodb-org/8.0/multiverse/binary-arm64/mongodb-org-server_8.0.8_arm64.deb
$ sudo dpkg -i mongodb-org-server_8.0.8_arm64.deb
[sudo] password for alexlai:
Selecting previously unselected package mongodb-org-server.
(Reading database ... 29057 files and directories currently installed.)
Preparing to unpack mongodb-org-server_8.0.8_arm64.deb ...
Unpacking mongodb-org-server (8.0.8) ...
Setting up mongodb-org-server (8.0.8) ...
info: Selecting UID from range 100 to 999 ...
info: Adding system user `mongodb' (UID 106) ...
info: Adding new user `mongodb' (UID 106) with group `nogroup' ...
info: Not creating `/nonexistent'.
info: Selecting GID from range 100 to 999 ...
info: Adding group `mongodb' (GID 109) ...
info: Adding user `mongodb' to group `mongodb' ...
Processing triggers for man-db (2.12.0-4build2) ...
$ which mongod
/usr/bin/mongod
$ mongod --version
Illegal instruction
- cp a mongod-7.1.0-alpha
$ sudo cp -v mongod-7.1.0-alpha /usr/bin/mongod
$ wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2404-arm64-100.12.0.tgz
$ cd ..
$ tar xvf src/mongodb-database-tools-ubuntu2404-arm64-100.12.0.tgz
$ change into directoryu
$ sudo cp -v * /usr/local/bin
$ wget https://downloads.mongodb.com/compass/mongosh-2.5.0-linux-arm64.tgz
$ cd ../ && tar xvf src/mongosh-2.5.0-linux-arm64.tgz
$ cd mongosh-2.5.0-linux-arm64/bin
alexlai@n2126GNoble:~/build/mongosh-2.5.0-linux-arm64/bin$ ls
mongosh mongosh_crypt_v1.so
alexlai@n2126GNoble:~/build/mongosh-2.5.0-linux-arm64/bin$ ./mongosh
Current Mongosh Log ID: 680f0e5e72e2614c1d65d0fa
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.5.0
Using MongoDB: 7.1.0-alpha
Using Mongosh: 2.5.0
For mongosh info see: https://www.mongodb.com/docs/mongodb-shell/
To help improve our products, anonymous usage data is collected and sent to MongoDB periodically (https://www.mongodb.com/legal/privacy-policy).
You can opt-out by running the disableTelemetry() command.
------
The server generated these startup warnings when booting
2025-04-28T13:00:35.694+08:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
2025-04-28T13:00:35.694+08:00: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never'
------
test>
$ cat /etc/default/grub ## <-- edit this file
GRUB_CMDLINE_LINUX="console=tty1 clk_ignore_unused console=ttyS0,115200n8 net.ifnames=0"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash transparent_hugepage=never"
$ sudo update-grub
$ sudo reboot now
- fix
vm.max_map_count is too low
sudo nano /etc/sysctl.conf
add
vm.max_map_count=262144 at the end
sudo sysctl -p
$