tirsdag den 1. december 2015

Install script for iRODS 4.1.7 on a CentOS7

### Other resource :
## OS : https://www.centos.org/
## https://groups.google.com/forum/#!forum/irod-chat
## https://docs.irods.org/master/
## http://trafficserver.apache.org/
## https://pods.iplantcollaborative.org/wiki/display/DS/Using+the+Data+Store

yum -y update;
yum -y upgrade;
yum -y update;
yum -y install net-tools wget nano mc

##FirewallD  -please Note!  This will open full on public! (we got a filter on front)
##  please note big files need tcp ports : Range (Begin): 20000 (End):20199
firewall-cmd --zone=public --add-port=1248/tcp --permanent
firewall-cmd --zone=public --add-port=1247/tcp --permanent
firewall-cmd --zone=public --add-port=5432/tcp --permanent
firewall-cmd --zone=public --add-service=http --permanent
firewall-cmd --zone=public --add-service=https --permanent
firewall-cmd --reload
##FirewallD

wget ftp://ftp.renci.org/pub/irods/releases/4.1.7/centos7/irods-database-plugin-postgres-1.7-centos7-x86_64.rpm
wget ftp://ftp.renci.org/pub/irods/releases/4.1.7/centos7/irods-database-plugin-postgres93-1.7-centos7-x86_64.rpm
wget ftp://ftp.renci.org/pub/irods/releases/4.1.7/centos7/irods-dev-4.1.7-centos7-x86_64.rpm
wget ftp://ftp.renci.org/pub/irods/releases/4.1.7/centos7/irods-icat-4.1.7-centos7-x86_64.rpm
wget ftp://ftp.renci.org/pub/irods/releases/4.1.7/centos7/irods-icommands-4.1.7-centos7-x86_64.rpm
wget ftp://ftp.renci.org/pub/irods/releases/4.1.7/centos7/irods-resource-4.1.7-centos7-x86_64.rpm
wget ftp://ftp.renci.org/pub/irods/releases/4.1.7/centos7/irods-runtime-4.1.7-centos7-x86_64.rpm

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
yum -y install http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum -y install epel-release

yum -y install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/remi.repo
yum -y install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

yum -y install unixODBC pam-devel openssl-devel wget nano mc tomcat tomcat-webapps
yum -y install tomcat-admin-webapps tomcat-docs-webapp tomcat-javadoc net-tools postgresql postgresql-server
yum -y install postgresql-contrib postgresql-libs postgresql-odbc fuse-libs.x86_64 perl-JSON* python-requests.noarch
yum -y install python-jsonschema python-psutil lsof authd

rpm -ivh irods-dev-4.1.7-centos7-x86_64.rpm
rpm -ivh irods-icat-4.1.7-centos7-x86_64.rpm
rpm -ivh irods-runtime-4.1.7-centos7-x86_64.rpm
rpm -ivh irods-database-plugin-postgres-1.7-centos7-x86_64.rpm

postgresql-setup initdb
systemctl start postgresql
systemctl enable postgresql

## If your webserver are heavy loaded... use : Varnish
#[varnish-4.0]
#name=Varnish 4.0 for Enterprise Linux
#baseurl=https://repo.varnish-cache.org/redhat/varnish-4.0/el7/$basearch
#enabled=1
#gpgcheck=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-VARNISH

############
#su postgres
#psql
#CREATE USER irods WITH PASSWORD 'testpassword';
#CREATE DATABASE "ICAT";
#GRANT ALL PRIVILEGES ON DATABASE "ICAT" TO irods;
#\q
# Do remember : var/lib/pgsql/data/postgresql.conf
# listen_addresses = 'localhost'  to   listen_addresses = '*'
# and  /var/lib/pgsql/data/pg_hba.conf  # IDENT = trust
###########################################################################################
#  Do remember!!!!
#/var/lib/irods/packaging/setup_irods.sh
#iinit
###################Done########################