Create a file /etc/apt/sources.list.d/monetdb.list
with the following contents (replacing "suite
" with your system's code name which you may be able to get by running the command lsb_release -cs
):
deb https://dev.monetdb.org/downloads/deb/ suite monetdb deb-src https://dev.monetdb.org/downloads/deb/ suite monetdb
Then issue the following command to install the MonetDB GPG public key:
sudo wget --output-document=/etc/apt/trusted.gpg.d/monetdb.gpg https://dev.monetdb.org/downloads/MonetDB-GPG-KEY.gpg
Check that you installed the correct file by using
sudo apt-key finger
Check that the output for the file /etc/apt/trusted.gpg.d/monetdb.gpg
contains the correct fingerprint:
8289 A5F5 75C4 9F50 22F8 EE20 F654 63E2 DF0E 54F3
.
After this, you can use apt
to install the MonetDB packages. First run:
sudo apt update
To install MonetDB/SQL, use the command:
sudo apt install monetdb5-sql monetdb-client
If you wish (and your system uses it), you can have
systemd
manage the MonetDB service. If you do, the databases will be in /var/monetdb5/dbfarm
:
sudo systemctl enable monetdbd sudo systemctl start monetdbd
Add any users who are allowed to run a database server to the
monetdb
group, which was automatically created in the previous step. This command does that for the current user:
sudo usermod -a -G monetdb $USER
Then log out and back in again to activate this change. After this you can run monetdbd
or mserver5
.
Verify the correct installation of MonetDB.
Create and start a new farm where you can store different databases.
shell> monetdbd create /path/to/mydbfarm shell> monetdbd start /path/to/mydbfarm
Create and release a Database (default in maintenance mode)
shell> monetdb create mydb shell> monetdb release mydb
Connect to the database with the following credentials:
default user: monetdb
default password: monetdb
shell> mclient -u monetdb -d mydb
Perform the first query
sql> SELECT 'hello world'; +---------------+ | single_value | +===============+ | hello world | +---------------+ 1 tuple
Remember to close the query with semicolon
Terminate the connection with the server
sql> \q
Now it's time to discover some more advanced features of MonetDB. Go to see our Introduction to MonetDB in the documentation section to discover, among others: