Zem

irods

Database

We use postgres as the database, so lets's install it:

apt install postgresql-12

Create DB and user

psql (12.9 (Ubuntu 12.9-0ubuntu0.20.04.1))
Type "help" for help.

postgres=# CREATE USER irods WITH PASSWORD 'xxxx';
CREATE ROLE
postgres=# CREATE DATABASE "ICAT";
CREATE DATABASE
                                  ^
postgres=# GRANT ALL PRIVILEGES ON DATABASE "ICAT" TO irods;
GRANT
postgres=# \l
                                  List of databases
   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
 ICAT      | postgres | UTF8     | en_GB.UTF-8 | en_GB.UTF-8 | =Tc/postgres         +
           |          |          |             |             | postgres=CTc/postgres+
           |          |          |             |             | irods=CTc/postgres
 postgres  | postgres | UTF8     | en_GB.UTF-8 | en_GB.UTF-8 |
 template0 | postgres | UTF8     | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
 template1 | postgres | UTF8     | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
(4 rows)

Installing

No ubuntu 20.04 packages are available for 4.2.11 (expected in 4.3). But it looks like with a few older depednacies it can work. Taken from:

http://docs.snic.se/wiki/IRODS_iCommands_installation_on_Ubuntu_20.04

dejan@dejan:~$ LSB_RELEASE="bionic" 
dejan@dejan:~$ wget -qO - https://packages.irods.org/irods-signing-key.asc | sudo apt-key add -
OK
dejan@dejan:~$ echo "deb [arch=amd64] https://packages.irods.org/apt/ ${LSB_RELEASE}  main" \
>   | sudo tee /etc/apt/sources.list.d/renci-irods.list
deb [arch=amd64] https://packages.irods.org/apt/ bionic  main
dejan@dejan:~$ sudo apt-get update
Hit:1 http://se.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://se.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://se.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://se.archive.ubuntu.com/ubuntu focal-security InRelease        
Hit:5 https://packages.irods.org/apt bionic InRelease                     
Reading package lists... Done
dejan@dejan:~$
wget -c \
  http://security.ubuntu.com/ubuntu/pool/main/p/python-urllib3/python-urllib3_1.22-1ubuntu0.18.04.2_all.deb \
  http://security.ubuntu.com/ubuntu/pool/main/r/requests/python-requests_2.18.4-2ubuntu0.1_all.deb \
  http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.7_amd64.deb \
  http://security.ubuntu.com/ubuntu/pool/main/p/python-jsonschema/python-jsonschema_2.6.0-2_all.deb \
  http://security.ubuntu.com/ubuntu/pool/main/p/python-functools32/python-functools32_3.2.3.2-3_all.deb 
sudo apt install \
  ./python-urllib3_1.22-1ubuntu0.18.04.2_all.deb \
  ./python-requests_2.18.4-2ubuntu0.1_all.deb \
  ./libssl1.0.0_1.0.2n-1ubuntu5.7_amd64.deb \
  ./python-jsonschema_2.6.0-2_all.deb \
  ./python-functools32_3.2.3.2-3_all.deb
rm -rf \
  ./python-urllib3_1.22-1ubuntu0.18.04.2_all.deb \
  ./python-requests_2.18.4-2ubuntu0.1_all.deb \
  ./libssl1.0.0_1.0.2n-1ubuntu5.7_amd64.deb \
  ./python-jsonschema_2.6.0-2_all.deb \
  ./python-functools32_3.2.3.2-3_all.deb
 $ sudo apt-get install irods-server irods-database-plugin-postgres
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  irods-externals-avro1.9.0-0 irods-externals-boost1.67.0-0 irods-externals-clang-runtime6.0-0 irods-externals-fmt6.1.2-1
  irods-externals-libarchive3.3.2-1 irods-externals-nanodbc2.13.0-1 irods-externals-zeromq4-14.1.6-0 irods-icommands irods-runtime
  libodbc1 odbc-postgresql odbcinst odbcinst1debian2 python-psutil super
Suggested packages:
  libmyodbc tdsodbc unixodbc-bin python-psutil-doc
The following NEW packages will be installed:
  irods-database-plugin-postgres irods-externals-avro1.9.0-0 irods-externals-boost1.67.0-0 irods-externals-clang-runtime6.0-0
  irods-externals-fmt6.1.2-1 irods-externals-libarchive3.3.2-1 irods-externals-nanodbc2.13.0-1 irods-externals-zeromq4-14.1.6-0
  irods-icommands irods-runtime irods-server libodbc1 odbc-postgresql odbcinst odbcinst1debian2 python-psutil super
0 upgraded, 17 newly installed, 0 to remove and 0 not upgraded.
Need to get 37.5 MB of archives.
After this operation, 255 MB of additional disk space will be used.
Do you want to continue? [Y/n]

But get this error:

Unpacking irods-icommands (4.2.11-1~bionic) ...
dpkg: error processing archive /tmp/apt-dpkg-install-l8YKdz/14-irods-icommands_4.2.11-1~bionic_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/ils', which is also in package sleuthkit 4.6.7-1build1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Selecting previously unselected package irods-server.
Preparing to unpack .../15-irods-server_4.2.11-1~bionic_amd64.deb ...
Unpacking irods-server (4.2.11-1~bionic) ...
Selecting previously unselected package irods-database-plugin-postgres.
Preparing to unpack .../16-irods-database-plugin-postgres_4.2.11-1~bionic_amd64.deb ...
Unpacking irods-database-plugin-postgres (4.2.11-1~bionic) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-l8YKdz/14-irods-icommands_4.2.11-1~bionic_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Let's overwrite it:

$ sudo apt install --fix-broken -o Dpkg::Options::="--force-overwrite"
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  irods-icommands
The following NEW packages will be installed:
  irods-icommands
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
16 not fully installed or removed.
Need to get 0 B/1,333 kB of archives.
After this operation, 4,573 kB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 513208 files and directories currently installed.)
Preparing to unpack .../irods-icommands_4.2.11-1~bionic_amd64.deb ...
Unpacking irods-icommands (4.2.11-1~bionic) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite '/usr/bin/ils', which is also in package sleuthkit 4.6.7-1build1
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite '/usr/share/man/man1/ils.1.gz', which is also in package sleuthkit 4.6.7-1build1
Setting up irods-externals-avro1.9.0-0 (1.0~bionic) ...
Setting up irods-externals-zeromq4-14.1.6-0 (1.0~bionic) ...
Setting up irods-externals-libarchive3.3.2-1 (1.0~bionic) ...
Setting up irods-externals-clang-runtime6.0-0 (1.0~bionic) ...
Setting up super (3.30.1-1) ...
Setting up libodbc1:amd64 (2.3.6-0.1build1) ...
Setting up python-psutil (5.5.1-1ubuntu4) ...
Setting up irods-externals-fmt6.1.2-1 (1.0~bionic) ...
Setting up irods-externals-boost1.67.0-0 (1.0~bionic) ...
Setting up irods-externals-nanodbc2.13.0-1 (1.0~bionic) ...
Setting up irods-runtime (4.2.11-1~bionic) ...
Setting up irods-icommands (4.2.11-1~bionic) ...
Setting up irods-server (4.2.11-1~bionic) ...
Setting up odbcinst (2.3.6-0.1build1) ...
Setting up odbcinst1debian2:amd64 (2.3.6-0.1build1) ...
Setting up odbc-postgresql:amd64 (1:12.01.0000-1) ...
grep: /etc/odbcinst.ini: No such file or directory
odbcinst: Driver installed. Usage count increased to 1.
    Target directory is /etc
odbcinst: Driver installed. Usage count increased to 1.
    Target directory is /etc
Setting up irods-database-plugin-postgres (4.2.11-1~bionic) ...

=======================================================================

iRODS Database Plugin installation was successful.

To configure this plugin, the following prerequisites need to be met:
 - an existing database user (to be used by the iRODS server)
 - an existing database (to be used as the iCAT catalog)
 - permissions for existing user on existing database

Then run the following setup script:
  sudo python /var/lib/irods/scripts/setup_irods.py

=======================================================================

Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for systemd (245.4-4ubuntu3.15) ...
notes/irods.txt · Last modified: by 127.0.0.1