Thanks Terrell. With some additional help from Adil (thanks Adil), we now have this building and running OK and I thought I'd post the steps we used to do this. Please let me know if I missed anything.
Thanks,
- Wayne -
These are based on Adil's notes, irods4-install.txt, and an updated
one (2), a recent irod-chat post of Adil's (Feb 9) describing how to
get the 4.0.3 source code from git, the manual irods-manual-4.0.3.pdf
from RENCI's
irods.org web site, and some additional advice from Adil
and Terrell.
Since I had to backup and retry a few times, I'm not sure I have
everything correct here, but I believe these are the steps that were
needed to install irods 4.0.3, from source, on the VM under my
user id.
Note that we are installing from source so that we can run more than
one iRODS instance on the host. This also makes it easy to update the
source if needed and gives us assurance that this source matches the
binaries. iRODS is middleware in this application and we are building
from source for a number of components. But a binary install should
be somewhat easier.
There was in issue for which we were advised to try build the
components in the external tree, and then there were some workarounds
for dealing with issues in that, but it should no longer be necessary
to build this. But those steps (done after 7 or so) would be:
$ cd external
$ make clean
$ make generate
1) Install postgresql
sudo apt-get install postgresql
2) Create the irods user in Postgres
sudo su - postgres
psql
create user irods with password '[password selected]';
create database ICAT;
grant all privileges on database ICAT to irods;
\q
3) Check and update (if needed) Postgres authentication settings.
edit: /etc/postgresql/9.1/main/pg_hba.conf
and change the METHOD on one type (one line) from peer to md5.
The revised file has this change:
wayne@li889-20:/etc/postgresql/9.1/main$ sudo diff pg_hba.conf pg_hba.conf.orig
90c90
< local all all md5
---
> local all all peer
Then restart the postgres server for these setting to take effect:
sudo /etc/init.d/postgresql restart
Verify that you can login as user postgres without a password and as
user 'irods' with its password (set above):
$ sudo su - postgres
postgres@li889-20:~$ psql
psql (9.1.15)
Type "help" for help.
postgres=# \q
postgres@li889-20:~$ exit
logout
wayne@li889-20:~$ psql -U irods -d icat -W
Password for user irods:
(login/connect succeeded)
4) Get the iRODS 4.0.3 source tree.
First, get git:
sudo apt-get install git
One of these (the first two are equivalent as far as what's created in
the tree, I believe).
git checkout 4.0.3-with-v1.4-database-plugins
This was recommended by Terrell so it will get the new 1.4 database
plugins so should be the one used. In general though, one could
use one of these alternatives:
git clone
https://github.com/irods/irods.git irods6
cd irods6
git checkout tags/4.0.3
or
git clean -xffd
git checkout 4.0.3
5) Update the script packaging/server_config.py with a bug fix that Adil
made: the username was omitted from the psql command. Once updated it
will look like this:
wayne@li889-20:~/irods6/packaging$ diff server_config.py server_config.py.orig
88d87
< db_user = self.values['DBUsername']
92d90
< " -U " + db_user + \
99d96
< " -U " + db_user + \
wayne@li889-20:~/irods6/packaging$
Without this, a finishing script in step 11 will fail. I believe this
fix is integrated into 4.1 now, but we need to back port it to 4.0.3.
6) Install Boost
sudo apt-get install libboost-all-dev
7) Install unixodbc-dev and odbc-postgresql:
sudo apt-get install unixodbc-dev
sudo apt-get install odbc-postgresql
I'm not sure unixodbc-dev is needed but perhaps so.
8) Do a test build of iRODS 4.0.3 with the --run-in-place option, to
get a list of packages we need to install. This does not find the
Boost and odbc requirement (steps 6 and 7 above) but does find others.
./packaging/build.sh --run-in-place icat postgres
This produced:
ERROR :: build.sh requires some software to be installed
:: try: sudo apt-get install g++ make python-dev help2man unixodbc libfuse-dev libcurl4-gnutls-dev libbz2-dev zlib1g-dev libpam0g-dev libssl-dev libxml2-dev libkrb5-dev
9) Install the needed packages:
sudo apt-get install g++ make python-dev help2man unixodbc libfuse-dev libcurl4-gnutls-dev libbz2-dev zlib1g-dev libpam0g-dev libssl-dev libxml2-dev libkrb5-dev
10) Build iRODS 4.0.3 with the --run-in-place option.
./packaging/build.sh --run-in-place icat postgres
11) Run the setup script to complete the setup.
This is similar to the 3.x
irodssetup.pl script in that it prompts for
values, suggesting some defaults, and then sets up what's needed.
./plugins/database/packaging/setup_irods_database.sh
I used 'localhost' as the host name for the postgres server.
Be sure to set a vault path in a directory that the current user has
write access to.