Compile Mongodb for Raspberry Pi 32bit: Difference between revisions

From EggeWiki
(Created page with "<verbatim> 365 wget https://fastdl.mongodb.org/src/mongodb-src-r3.2.12.tar.gz 366 tar xvf mongodb-src-r3.2.12.tar.gz 367 cd mongodb-src-r3.2.12 368 cat docs/buildi...")
 
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<verbatim>
Based on https://koenaerts.ca/compile-and-install-mongodb-on-raspberry-pi/
 
Precompiled binaries for the impatient and trusting:
 
  * https://www.theeggeadventure.com/wp-content/uploads/2021/06/mongo (a1f3564cc3d7119f6609280525f12d0d)
  * https://www.theeggeadventure.com/wp-content/uploads/2021/06/mongod (8d971b27033fe72b7209873752856d0a)
 
<syntaxhighlight lang="bash" source="file">
   365  wget https://fastdl.mongodb.org/src/mongodb-src-r3.2.12.tar.gz
   365  wget https://fastdl.mongodb.org/src/mongodb-src-r3.2.12.tar.gz
   366  tar xvf mongodb-src-r3.2.12.tar.gz
   366  tar xvf mongodb-src-r3.2.12.tar.gz
Line 25: Line 32:
   382  cd -
   382  cd -
   438  vi src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
   438  vi src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
# insert include <sys/macros.h>
# insert include %lt;sys/macros.h>
   446  scons mongo mongod --wiredtiger=off --mmapv1=on --disable-warnings-as-errors=true
   446  scons mongo mongod --wiredtiger=off --mmapv1=on --disable-warnings-as-errors=true
   449  ls -l build/opt/mongo/
   449  ls -l build/opt/mongo/
Line 39: Line 46:
   468  sudo cp ~/mongodb-src-r3.2.12/build/opt/mongo/mongo .
   468  sudo cp ~/mongodb-src-r3.2.12/build/opt/mongo/mongo .
   463  sudo service unifi restart
   463  sudo service unifi restart
</verbatim>
</syntaxhighlight>

Latest revision as of 22:46, 15 June 2021

Based on https://koenaerts.ca/compile-and-install-mongodb-on-raspberry-pi/

Precompiled binaries for the impatient and trusting:

  * https://www.theeggeadventure.com/wp-content/uploads/2021/06/mongo (a1f3564cc3d7119f6609280525f12d0d)
  * https://www.theeggeadventure.com/wp-content/uploads/2021/06/mongod (8d971b27033fe72b7209873752856d0a)
  365  wget https://fastdl.mongodb.org/src/mongodb-src-r3.2.12.tar.gz
  366  tar xvf mongodb-src-r3.2.12.tar.gz
  367  cd mongodb-src-r3.2.12
  368  cat docs/building.md
  369  gcc --version
  370  python --version
  371  scons --version
  372  sudo aptitude install scons build-essential
  373  sudo aptitude install libboost-filesystem-dev libboost-program-options-dev libboost-system-dev
  374  sudo aptitude install python-pymongo
  375  sudo dd if=/dev/zero of=/mytempswapfile bs=1024 count=524288
  376  sudo chmod 0600 /mytempswapfile
  377  sudo mkswap /mytempswapfile
  378  sudo swapon /mytempswapfile
  413  sudo dd if=/dev/zero of=/mytempswapfile2 bs=1024 count=524288
  414  sudo mkswap /mytempswapfile2
  415  sudo swapon /mytempswapfile2
  416  sudo chmod 0600 /mytempswapfile2
  417  sudo swapon /mytempswapfile2
  418  free -m
  379  cd src/third_party/mozjs-38/
  380  ./get_sources.sh
  381  ./gen-config.sh arm linux
  382  cd -
  438  vi src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
# insert include %lt;sys/macros.h>
  446  scons mongo mongod --wiredtiger=off --mmapv1=on --disable-warnings-as-errors=true
  449  ls -l build/opt/mongo/
  451  strip -s build/opt/mongo/mongo
  452  strip -s build/opt/mongo/mongod
  454  ll /usr/bin/mongo
  457  ls -ltr /usr/bin/mongo
  463  sudo service unifi stop
  464  cd /usr/bin/
  465  sudo mv mongod mongod-2.3
  466  sudo cp ~/mongodb-src-r3.2.12/build/opt/mongo/mongod .
  467  sudo mv mongo mongo-2.3
  468  sudo cp ~/mongodb-src-r3.2.12/build/opt/mongo/mongo .
  463  sudo service unifi restart