File tree Expand file tree Collapse file tree 7 files changed +68
-2
lines changed
Expand file tree Collapse file tree 7 files changed +68
-2
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ to install and build app before run it
3636
3737to run production app version
3838
39+ ## MongoDb
40+
41+ [ Instruction for Windows] ( ./installMongo/Windows/Readme.txt )
42+
43+ [ Instruction for Ubuntu] ( ./installMongo/Ubuntu/Readme.txt )
44+
3945## Deployment on Ubuntu LVS
4046
4147- Clone from GitHub
Original file line number Diff line number Diff line change 1+ Mongo installation on Ubuntu 20.04
2+
3+ 1) To prepare and setup mongo
4+ run next in bash:
5+ sudo apt update && sudo apt upgrade
6+ cd && cd react-notes/installMongo/Ubuntu && chmod +x mongo_ubuntu_setup.sh && chmod +x mongo_ubuntu_install.sh && cd
7+ cd && ./react-notes/installMongo/Ubuntu/mongo_ubuntu_setup.sh
8+ or run next with npm:
9+ npm run mongo-ubuntu:full-setup
10+
11+ 2) To start Mongo database
12+ run next in bash:
13+ cd && ./react-notes/installMongo/Ubuntu/mongo_ubuntu_install.sh
14+ or run next with npm:
15+ npm run mongo-ubuntu:start
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ echo " Mongo Install On Ubntu 20.04"
4+
5+ sudo systemctl start mongod
6+ sudo systemctl status mongod
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ echo " Mongo Setup On Ubntu 20.04"
4+
5+ sudo apt-get install gnupg
6+ wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
7+ touch /etc/apt/sources.list.d/mongodb-org-4.4.list
8+ 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
9+ sudo apt-get update
10+ sudo apt-get install -y mongodb-org
11+ echo " mongodb-org hold" | sudo dpkg --set-selections
12+ echo " mongodb-org-server hold" | sudo dpkg --set-selections
13+ echo " mongodb-org-shell hold" | sudo dpkg --set-selections
14+ echo " mongodb-org-mongos hold" | sudo dpkg --set-selections
15+ echo " mongodb-org-tools hold" | sudo dpkg --set-selections
Original file line number Diff line number Diff line change 1+ Mongo installation on Windows 10
2+
3+ 1) Download and install MongoDb server from https://www.mongodb.com/try/download/community
4+
5+ 2) Edit mongo_win_install.bat file and fix next variables (dont use spaces around "="):
6+ set MongoDb_ExePath - path to mongod.exe
7+ set MongoDb_DataFolderPath - path to db folder
8+
9+ 3) To start Mongo database
10+ Run mongo_win_install.bat to start Mongo Database
11+ Or run next with npm:
12+ npm run mongo-windows:start
Original file line number Diff line number Diff line change 1+ @ echo " Installing MongoDB on Windows"
2+
3+ set MongoDb_ExePath = D:\Program Files\MongoDB\Server\4.4\bin\mongod.exe
4+ set MongoDb_DataFolderPath = d:\data\db
5+
6+ " %MongoDb_ExePath% " --dbpath=" %MongoDb_DataFolderPath% "
Original file line number Diff line number Diff line change 2121 "prod:predeploy" : " npm run deploy && npm run prod" ,
2222 "deploy" : " npm run full-install && npm run client:build" ,
2323 "test" : " echo \" Error: no test specified\" && exit 1" ,
24- "heroku-postbuild" : " npm run client:install && npm run client:build"
24+ "heroku-postbuild" : " npm run client:install && npm run client:build" ,
25+ "mongo-ubuntu:update" : " (sudo apt update && sudo apt upgrade)" ,
26+ "mongo-ubuntu:prepare" : " (cd installMongo/Ubuntu && chmod +x mongo_ubuntu_setup.sh && chmod +x mongo_ubuntu_install.sh)" ,
27+ "mongo-ubuntu:setup" : " (cd installMongo/Ubuntu && ./mongo_ubuntu_setup.sh)" ,
28+ "mongo-ubuntu:full-setup" : " npm run mongo-ubuntu:update && npm run mongo-ubuntu:prepare && npm run mongo-ubuntu:setup" ,
29+ "mongo-ubuntu:start" : " (cd installMongo/Ubuntu && ./mongo_ubuntu_install.sh)" ,
30+ "mongo-windows:start" : " (cd installMongo/Windows && start mongo_win_install.bat)"
2531 },
2632 "repository" : {
2733 "type" : " git" ,
4854 "cross-env" : " ^7.0.3" ,
4955 "nodemon" : " ^2.0.7"
5056 }
51- }
57+ }
You can’t perform that action at this time.
0 commit comments