<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=InstallDcache195scratch</id>
	<title>InstallDcache195scratch - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=InstallDcache195scratch"/>
	<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=InstallDcache195scratch&amp;action=history"/>
	<updated>2026-05-16T06:23:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://t2bwiki.iihe.ac.be/index.php?title=InstallDcache195scratch&amp;diff=135&amp;oldid=prev</id>
		<title>Maintenance script: Created page with &quot; === Installing dCache 1.9.5 from scratch ===  ==== Virtual machine ==== *Installed a base machine **It is a virtual machine on dom04.wn.iihe.ac.be with 2 CPUs and 2GB of ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=InstallDcache195scratch&amp;diff=135&amp;oldid=prev"/>
		<updated>2015-08-26T12:28:38Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; === Installing dCache 1.9.5 from scratch ===  ==== Virtual machine ==== *Installed a base machine **It is a virtual machine on dom04.wn.iihe.ac.be with 2 CPUs and 2GB of ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
=== Installing dCache 1.9.5 from scratch ===&lt;br /&gt;
&lt;br /&gt;
==== Virtual machine ====&lt;br /&gt;
*Installed a base machine&lt;br /&gt;
**It is a virtual machine on dom04.wn.iihe.ac.be with 2 CPUs and 2GB of RAM &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dcache2-shadow.iihe.ac.be&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Installation and setup ====&lt;br /&gt;
*The dCache 1.9.5 manual http://www.dcache.org/manuals/Book-1.9.5/&lt;br /&gt;
**The steps below follow basically what is described in the manual&lt;br /&gt;
&lt;br /&gt;
*Remark: [[InstalldCacheHeadnode]] gives the instructions to reinstall the 1.8.0 dCache version on maite&lt;br /&gt;
&lt;br /&gt;
*Get latest release:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.dcache.org/downloads/1.9/dcache-server-1.9.5-29.noarch.rpm&lt;br /&gt;
rpm -ivh dcache-server-1.9.5-29.noarch.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Install PostgreSQL&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install -y postgresql postgresql-devel postgresql-jdbc postgresql-libs postgresql-python postgresql-server postgresql-contrib&lt;br /&gt;
/etc/init.d/postgresql start&lt;br /&gt;
chkconfig postgresql on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*In /var/lib/pgsql/data/pg_hba.conf add&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local   all         all                        trust&lt;br /&gt;
host    all         all         127.0.0.1/32   trust&lt;br /&gt;
host    all         all         ::1/128        trust&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*and restart&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/init.d/postgresql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Create db and user&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
createuser -U postgres --no-superuser --no-createrole --createdb --pwprompt srmdcache&lt;br /&gt;
createdb -U srmdcache dcache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Generate keys&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh-keygen -b 768 -t rsa1 -f /opt/d-cache//etc/server_key -N &amp;quot;&amp;quot;&lt;br /&gt;
ssh-keygen -b 1024 -t rsa1 -f /opt/d-cache//etc/host_key -N &amp;quot;&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Install pnfs&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.dcache.org/downloads/pnfs/RPMs/pnfs-postgresql-3.1.18-1-SL5x.x86_64.rpm&lt;br /&gt;
rpm -ivh pnfs-postgresql-3.1.18-1-SL5x.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A whole set of config files need to be adapter [[InstallDcache195scratchConfigFiles]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Import pnfs database:&lt;br /&gt;
**go to jefke.wn and in /storage/userbackup/Maite_Db_backup/ find a file with pnfsdb.tar (any will do). &lt;br /&gt;
**Untar it in the correct location. &amp;#039;&amp;#039;Hint:&amp;#039;&amp;#039; tar -tf to see where the tree structure of the tarball. &lt;br /&gt;
**This configures contains the metadata for the pnfs database&lt;br /&gt;
**Also copy the last file full_*.gz, which contains the full pnfs database.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
su - postgres&lt;br /&gt;
zcat &amp;lt;path to gzipped full database&amp;gt; | psql postgres&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Run install script of dcache.&lt;br /&gt;
**Needed a little hack in the script to mount fs from localhost&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/d-cache/install/install.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
**with line 260 replace &amp;#039;&amp;#039;RET=${RET:-localhost}&amp;#039;&amp;#039; by &amp;#039;&amp;#039;RET=&amp;quot;localhost&amp;quot;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*The poolmanager.conf was adapted by Olivier and is here [[InstallDcache_PoolManagerConf]]&lt;br /&gt;
&lt;br /&gt;
*Copy all files from maite ~/.ssh to new machine&lt;br /&gt;
**make sure permissions are 700&lt;br /&gt;
**import keys in dcache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat ~/.ssh/dcache_admin_key.pub &amp;gt;&amp;gt; /opt/d-cache/config/authorized_keys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Change the following files&lt;br /&gt;
**/pnfs/fs/admin/etc/config/serverName&lt;br /&gt;
**/pnfs/fs/admin/etc/config/dCache/dcache.conf&lt;br /&gt;
**vi  &amp;quot;/pnfs/iihe/cms/store/user/odevroed/.(config)(dCache)/dcache.conf&amp;quot;&lt;br /&gt;
**more info in the dcache book in the section &amp;#039;&amp;#039;Global Configuration with Wormholes&amp;#039;&amp;#039;&lt;br /&gt;
*Run this&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
touch /pnfs/fs/admin/etc/config/dCache/&amp;#039;.(fset)(dcache.conf)(io)(on)&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*Copy files from /etc/grid-security (not the keys)&lt;br /&gt;
&lt;br /&gt;
*Install lcg-CA repo&lt;br /&gt;
**Link: https://twiki.cern.ch/twiki/bin/view/LCG/GenericInstallGuide310&lt;br /&gt;
**Link: https://wiki.egi.eu/wiki/EGI_IGTF_Release&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://repository.egi.eu/sw/production/cas/1/current/repo-files/EGI-trustanchors.repo&lt;br /&gt;
mv EGI-trustanchors.repo /etc/yum.repos.d/&lt;br /&gt;
yum install ca-policy-egi-core&lt;br /&gt;
yum install lcg-CA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*This machine was installed as a base machine. Therefore the user and groups were not present. They have been created (only the relevant ones) by hand to be able to test the machine.&lt;br /&gt;
 &lt;br /&gt;
*The way dCache is handling the authorisation changed; in case /Role= and /Capability= are null they are ommited. This means that the entries in /etc/grid-security/grid-vorolemap should not be&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;/C=BE/O=BEGRID/OU=ELEM/OU=VUB/CN=Joris Maes&amp;quot; &amp;quot;/cms/becms/Role=NULL/Capability=NULL&amp;quot; jmmaes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
but it should be &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;/C=BE/O=BEGRID/OU=ELEM/OU=VUB/CN=Joris Maes&amp;quot; &amp;quot;/cms/becms&amp;quot; jmmaes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Operation ====&lt;br /&gt;
&lt;br /&gt;
*Fire up the server &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/d-cache/bin/dcache start|restart|stop|status&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Go into admin mode&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh -F /root/.ssh/dcache_admin_config admin@localhost&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== GUI ====&lt;br /&gt;
&lt;br /&gt;
*Installation &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TracNotice|{{PAGENAME}}}}&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>