XNAT Virtual Machine Installation Notes
Date: October 20, 2011
VM Username: vmuser
Password: xnat
XNAT Username: admin
Password: admin
Notes:
- This XNAT installation contains numerous patches developed by the NRG for the Cognitive Neuroscience Lab at Harvard University.
- Please do not forget to start Tomcat: sudo /etc/init.d/tomcat start
- To enable https, please remove the current certificate from the keystore and generate a new SSL certificate, using the commands below.
XNAT Quick How To:
General Help:
- cd ~/xnat-install
- ./setup.py --help
Remove current installation:
- cd ~/xnat-install
- ./setup.py -a clean -i /XNAT/Source
Reinstall XNAT (see ~/.xnat_install):
- cd ~/xnat-install
- ./setup.py -i /XNAT/Source
Update XNAT with the latest patches:
- cd /XNAT/Source/.hg/patches
- hg pull -u
- cd ~/xnat-install
- ./setup.py -a update -i /XNAT/Source
SSL How To:
1. Create a new SSL certificate (set the password to 'changeme' when prompted and "Your Name" to the NAME OF THE HOST, otherwise Java XNAT tools won't work [see the highlighted string below]):
openssl genrsa -passout pass:changeme -des3 -out tomcat.pem 2048
echo '[ req ]
default_bits = 2048
default_keyfile = tomcat.pem
distinguished_name = req_distinguished_name
attributes = req_attributes
prompt = no
output_password = changeme
[ req_distinguished_name ]
C = US
ST = MA
L = Cambridge
O = Organization
OU = Group
CN = HOSTNAME
emailAddress = your@email.com
[ req_attributes ]
challengePassword = changeme
' > ~/.openssl_config
openssl req -config /home/vmuser/.openssl_config -passin pass:changeme -new -x509 -key tomcat.pem -out tomcatcert.pem -days 1095
cp tomcat.pem tomcatcert.pem /NRG/Applications/tomcat/conf/
2. Import Tomcat's SSL certificate into the JRE trusted CA store (as root)
keytool -import -trustcacerts -keystore /usr/lib/jvm/java-6-sun/jre/lib/security/cacerts -storepass changeit -no-prompt -alias tomcatcert.pem -file /NRG/Applications/tomcat/conf/tomcatcert.pem
2.a. To delete an old SSL certificate from the JRE trusted CA store, run the following command (as root):
keytool -delete -trustcacerts -keystore /usr/lib/jvm/java-6-sun/jre/lib/security/cacerts -storepass changeit -alias tomcatcert.pem
Send questions and comments to help@neuroinfo.org