Read only Solution

Admin,MPDL

=Set a solution read only=

SRV01

 * copy user database and change login data


 * console:

psql -U postgres

\c escidoc-core select * into aa.user_account_bak from aa.user_account; update aa.user_account set password = 'write what you like' where loginname != 'sysadmin'; delete from aa.user_login_data where expiryts != '1999999999999';
 * psql:


 * I would not modify the password, would rather set the status "active" to false for all user accounts in the real table (except for root). This indeed makes certain that no logins are possible. --Natasa 07:50, 25 January 2011 (UTC)

e.g.   update aa.user_account set active= false where loginname != 'sysadmin';


 * copy fedora directory on running system

nice -19 rsync -a --delete /X/fedora3.3/ /fedora-bak/


 * adapt configuration for read only:


 * escidoc-core

run.conf escidoc-core.properties esciodc-core.custom.properties

auth.properties cone.properties pubman.properties conf.xml
 * PubMan

coreservice.conf pubman.conf
 * Apache

On srv01 these property files are already prepared the filename ending on the suffix srv01.

SRV02

 * change (copy) new login site to Coreservice

mv /usr/share/jboss/server/default/tmp/deploy/tmp(NUMBER)_escidoc-core-exp.war/aa/login/login.html /usr/share/jboss/server/default/tmp/deploy/tmp(NUMBER)_escidoc-core-exp.war/aa/login/login.html_bak cp login2.html /usr/share/jboss/server/default/tmp/deploy/tmp(NUMBER)_escidoc-core-exp.war/aa/login/login.html


 * if the login page is moved, does one indeed need to make modifications in the escidoc-core database ? --Natasa 07:53, 25 January 2011 (UTC)

SRV01

 * shutdown Fedora

/X/fedora/tomcat/bin/shutdown.sh


 * copy fedora directory on the stopped system again

rsync -a --delete /X/fedora3.3/ /fedora-bak/


 * umount Data backup

umount /fedora-bak/


 * Fedora-Backup mount for original Fedora

mount /dev/mapper/l2-fedora—data /X/fedora3.3


 * Fedora start

/X/fedora/tomcat/bin/startup.sh

=set DB back and the solution back to write=

SRV01

 * copy old user database back


 * Konsole:

psql -U postgres


 * psql:

\c escidoc-core update aa.user_account u1 set password = (select password from aa.user_account_bak u2 where u2.id = u1.id );


 * see remark from above, in this case, no pulling back the password, but only re-setting the active status. --Natasa 07:51, 25 January 2011 (UTC)

e.g. update aa.user_account u1 set active= (select active from aa.user_account_bak u2 where u2.id = u1.id );

SRV01
/X/fedora/tomcat/bin/shutdown.sh
 * Fedora stop


 * Umount Backup from Fedora-Backup

umount /X/fedora3.3/


 * start Fedora

/X/fedora/tomcat/bin/startup.sh

SRV02

 * copy login site back on coreservice

cd /usr/share/jboss/server/default/tmp/deploy/tmp(NUMBER)escidoc-core.ear-contents/escidoc-core-exp.war/aa/login mv login.html-bak  login.html


 * if the login page is moved, does one indeed need to make modifications in the escidoc-core database ? --Natasa 07:53, 25 January 2011 (UTC)

=read only tip for fedora=


 * For a real read only fedora you can only set the data directory in fedora to read only. If you set other directories on fedora read only the system won't be work correctly.