Here I am going to give detailed steps. Most of the steps copied from the wiki page.
1) The prerequisites are
ubuntu machine with following softwares installed
vim
unzip
tar
You require "root" user access. Run all commands in the installation instructions using root-level permission.
2) Install Java
Openclinica is based on Java.
#Create folder if it doesn't exist
mkdir -p /usr/local/oc/install
#Change to this folder: cd /usr/local/oc/install
#Download jdk into the above folder #find the 32-bit version here: https://openclinica.app.box.com/oc-downloads/1/2186650849 #find the 64-bit version here: https://openclinica.app.box.com/oc-downloads/1/2186651363
#Install Java by running: tar -zxvf jdk-7*
#Install Java in the operating system by running: mv jdk1* /usr/local/ ln -s /usr/local/jdk1* /usr/local/java
After above steps test java installed by typing java and javac. If the command not found error occurs.
Then you need to update the alternatives by following commands
#To update java command alternatives
update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/bin/java" 1
#To update javac command alternatives
update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/bin/javac" 1
#To udate javaws command alternatives
update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/bin/javaws" 1
3) Install tomcat
#Create folder if it doesn't exist
mkdir -p /usr/local/oc/install
#Change to this folder:
cd /usr/local/oc/install
#Download tomcat into the above folder
wget https://dev.openclinica.com/oc/software/OpenClinica-3.2/linux/apache-tomcat-7.0.52.tar.gz
#Install Tomcat by running the following:
tar -zxvf apache-tomcat-*
mv apache-tomcat-* /usr/local/
ln -s /usr/local/apache-tomcat-7.0.52 /usr/local/tomcat
/usr/sbin/adduser tomcat
#Update the File Path parameter to the correct value
chown -R tomcat /usr/local/tomcat/*
chown -R tomcat /usr/local/apache-*
4) Install PostgreSql
We have installed postgresql 9.3. Observed that 8.4 does not work with OpenClinica 3.8.
#Install postgresql
apt-get install postgresql
Then enter into the database to create a role and database for the openclinica.
# to connect to the localhost psql
psql -U postgres
If you get following error
psql: FATAL: Peer authentication failed for user "postgres"
then
#Edit the /etc/postgresql/9.1/main/pg_hba.conf
local all postgres peer
Should be
local all postgres md5
And restart the postgresql service
service postgresql restart
sudo -i -u postgres
psql
If you get following error
psql: FATAL: Peer authentication failed for user "postgres"
then
#Edit the /etc/postgresql/9.1/main/pg_hba.conf
local all postgres peer
Should be
local all postgres md5
And restart the postgresql service
service postgresql restart
sudo -i -u postgres
psql
#Enter the password that is given at the time of installation
#Create role clinica with password clinica
CREATE ROLE clinica LOGIN ENCRYPTED PASSWORD 'clinica' SUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
#Create database openclinica
CREATE DATABASE openclinica WITH ENCODING='UTF8' OWNER=clinica;
#Create database openclinica
CREATE DATABASE openclinica WITH ENCODING='UTF8' OWNER=clinica;
#To change the password of 'clinica' role
ALTER USER clinica WITH PASSWORD 'newpassword';
#Exit the psql command prompt by typing
#Exit the psql command prompt by typing
\q
5) Deploying OpenClinica within tomcat
#Create folder if it doesn't exist
mkdir -p /usr/local/oc/install
#Change to this folder:
cd /usr/local/oc/install
# Download the OpenClinica software from the OpenClinica
# website: https://community.openclinica.com/project/openclinica.
# To download the software, you need an OpenClinica community user account,
# which is free to create; you will be required to log in to the account to download the
# OpenClinica software.
#Run the following commands. In the commands, v.x is your version of OpenClinica:
unzip OpenClinica-v.x*
cd OpenClinica-v.x*/distribution
unzip OpenClinica.war -d OpenClinica
cp -rf OpenClinica* /usr/local/tomcat/webapps
6) Configure the Openclinica application
If you followed all the previous instructions exactly, there is only
one property in the configuration file, datainfo.properties, that you
may need to change in order for OpenClinica to start. There are other
properties in the configuration file you will probably want to modify
for your system.
The first time you install OpenClinica you will configure datainfo.properties here:
8) Go to http://{ubuntu-server-ip}:8080/OpenClinica/
default username : root
default password : 12345678
After creating a user the password is shown under alerts&messages left panel.
The first time you install OpenClinica you will configure datainfo.properties here:
/usr/local/tomcat/webapps/OpenClinica/WEB-INF/classes/datainfo.properties.
Consequent configuration changes SHOULD be made here /usr/local/tomcat/webapps/openclinica.config.- Open the configuration file: /usr/local/tomcat/webapps/OpenClinica/WEB-INF/classes/datainfo.properties
- Edit values for the properties in the datainfo.properties file. You must change the value for dbPass to the password you selected in Set Up the PostgreSQL Database. Change the values for any other properties, then save the file.
- Update the filePath parameter to the right value.
- Run the following commands:
#To set Tomcat to start automatically on system startup, run the following:
cp /usr/local/oc/install/OpenClinica-v.x*/install-docs/linux/tomcat /etc/init.d/
cd /etc/init.d
chmod a+x /etc/init.d/tomcat
#update the rc.d
update-rc.d tomcat defaults
service tomcat start
8) Go to http://{ubuntu-server-ip}:8080/OpenClinica/
default username : root
default password : 12345678
After creating a user the password is shown under alerts&messages left panel.

