- 1. Download and Install Virtual Box.
- 2. Install Cent OS VM set up
- 3. Install Maven on Cent OS
- 4. Install Tomcat on CentOS
- 5. Install Postgres on the VM
- 6. Install pgAdmin III (optional, Desktop CentOS only)
- 7. Share Windows Folder
- 8. Setup Port Forwarding (optional for Desktop)
- 9. Start Developing
Jive 5 is not supported in a Windows environment. The best way to set up a developer environment for Windows users is to create a local Virtual Box VM with Cent OS. This allows you to build and run the app from Linux while developing on your Windows machine.
1. Download and Install Virtual Box.
b. After installing virtual box, create the VM with 800 MB system memory and virtual hard disk for 8 GB.
2. Install Cent OS VM set up
Install Cent OS with the default settings. Install either the Desktop or Server configuration of CentOS. If you are proficient in Linux, you may want to use the Server version as it will use less memory. Installing the Server version will require you to perform step 8.
3. Install Maven on Cent OS
b. Change permission to 700:
- # chmod 700 apache-maven-2.2.1-bin.tar.gz
c. Extract the files from above archive. Below command will create a apache-maven-2.2.1 directory in your current directory.
- # tar xzf apache-maven-2.2.1-bin.tar.gz
d. Move the above directory /usr/local directory by command:
- # mv ../apache-maven-2.2.1 /usr/local
e. Create Symbolic link for maven by :
f. Now you need to add maven your system path, so that you call it from anywhere. Open .bashrc file :
g. Add following to the end of file
Save the changes by pressing escape key and then :wq!. h. Source the .bashrc file to load your changes.
i. Confirm your maven version by running the following command
Now you are ready to compile and build your maven projects.
4. Install Tomcat on CentOS
Download this file and extract it to /opt/.
- wget http://mirror.uoregon.edu/apache/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.tar.gz
- tar -xzf apache-tomcat-6.0.32.tar.gz
- sudo mv apache-tomcat-6.0.32 /opt/
5. Install Postgres on the VM
I faced auth failed problem while creating database : followed this link to fix the problem- http://www.cyberciti.biz/faq/psql-fatal-ident-authentication-failed-for-user/ Following are the steps from the above mentioned link to fix this problem. It gives me an error that read as follows:
psql: FATAL: Ident authentication failed for user "username"
To fix this error open PostgreSQL client authentication configuration file /var/lib/pgsql/data/pg_hba.conf :
- # vi /var/lib/pgsql/data/pg_hba.conf
This file controls:
- Which hosts are allowed to connect.
- How clients are authenticated.
- Which PostgreSQL user names they can use.
- Which databases they can access .
By default Postgresql uses IDENT-based authentication. All you have to do is allow username and password based authentication for your network or webserver.
IDENT will never allow you to login via -U and -W options. Append following to allow login via localhost only:
local all all trust
host all 127.0.0.1/32 trust
6. Install pgAdmin III (optional, Desktop CentOS only)
pgAdmin III is a Desktop application which allows you to easily acces and manipulate your Postgres database.
Alternatively, you can use the Postgres terminal commands: psql, createdb, dropdb, pg_dump, and pg_restore
7. Share Windows Folder
b. In the shared folders add the Windows folder name and location that is to be shared with centos VM.
c. Mount the shared folder in centos using the command
- mount -t vboxsf sharename mountpoint
• sharename – Name of the shared folder mentioned in the Virtual Box shared folder settings.
• mountpoint – directory where you want your shared folder contents to appear.
Since the files are in the windows shared folder those can be edited in Windows using any IDE of your choice.
8. Setup Port Forwarding (optional for Desktop)
Set up Port Forwarding for port 80 and 22. To do this, select your VM while it is stopped, then Settings > Network > Advanced > Port Forwarding. You will need to stop your VM to access this. Under Port Fowarding Rules create the following rules:
- Tomcat Forarding: Host Port: 8081, Guest Port: 8080, Protocol: TCP
- SSH Forwarding: Host Port: 2222, Guest Port: 22, Protocol: TCP
This will allow you to SSH into your VM via your Windows Machine by SSH'ing into localhost over port 2222.You will also be able to access your test environment in your web browser by visiting http://localhost:8081/ If you choose to not set up port forwarding, you will need to access your instance via the web browser available in Cent OS.
9. Start Developing
Reference source:- https://community.jivesoftware.com/docs/DOC-46147