Keep an eye on version numbers and remember to update them if you use another version!
- Familiarize yourself with the very basics of the Windows command line1 (5'): https://www.makeuseof.com/tag/a-beginners-guide-to-the-windows-command-line/
- Don't forget to re-open your shell whenever you update any system environment variables.
- Keep in mind to change the
/
in file paths to\
accordingly
1. You might want to use a better console emulator at some point (e.g., cmder or Hyper).
-
Install PostgreSQL: Tutorial or Video
-
Add
C:\Program Files\PostgreSQL\13\bin;
to the PATH (computer => properties => advanced system settings=> Environment Variables => System Variables) as described here -
Run
setx PGCLIENTENCODING UTF8
in your command line -
Start psql shell:
psql postgres postgres
(psql dbname username
) -
Check for any startup warnings. If you see a warning that the console code page differs from Windows code page:
psql (10.2) WARNING: Console code page (437) differs from Windows code page (1252) 8-bit characters might not work correctly. See psql reference page "Notes for Windows users" for details. Type "help" for help. postgres=#
- Change the active console code page respectively using
chcp 1252
(or 65001 for UTF-8)
- Change the active console code page respectively using
-
Check whether
\l
lists all your current databases
How do I start the PostgreSQL server (e.g., after re-booting)?
set PGDATA=C:\Program Files\PostgreSQL\13\data
pg_ctl start
How can I create a postgres superuser if none exists?
- [psql]
CREATE USER postgres WITH SUPERUSER PASSWORD 'postgres'
- Install MongoDB: short (4') or long (12') tutorial
- Download the Community Server: https://www.mongodb.com/download-center/community
- Run the installer (choose Complete, you can uncheck the Compass GUI if you wanna speed up installation)
- Setup system variable
MONGO_HOME
pointing to your installation (e.g.,C:\Program Files\MongoDB\Server\4.4
) - Add
%MONGO_HOME%\bin
to your Path (don't forget to click OK, OK)
- Create a data directory:
mkdir -p C:\data\db
- Run the daemon
mongod
and keep this shell open (it should finally showNETWORK [initandlisten] waiting for connections on port 27017
) - Start the mongo shell in a new shell:
mongo
- Check whether
show dbs
lists all your current databases (should list admin and local)
- Download and run the "Database Tools" installer: https://www.mongodb.com/try/download/database-tools
- Add the installed binary directory to your Path (e.g. by default this would be
C:\Program Files\MongoDB\Tools\100\bin
) - Open a new command prompt and call
mongoimport --version
, if it returns no errors installation was succesful
Detailed steps on how to add a directory to your PATH can be found here.