HRMS APPLICATION with JBOSS and PostgreSQL at AIMIL
HRMS APPLICATION with JBOSS and PostgreSQL at AIMIL[edit]
by Rajneesh Lamba
1)Ist install java,php,php-pgsql,phpPgadmin,httpd
2)If phpPgAdmin not installed from base repo you can configure epel repo for that.
3)install jboss final(ot transfer from other place where jboss run)
4)path of jboss /usr/bin/jboss_6.0___
5)also transfer jboss start/stop script from /etc/init.d/jboss
6)Now after all this install postgresql
INSTALL THESE PACKAGES
# yum install postgresql*
It install following packages
postgresql-server postgresql-libs postgresql84-contrib
NOW RUN THIS COMMAND TO CREATE DATA DIR IN /var/lib/pgsql/
- service postgresql initdb
AFTER RUNNING ABOVE COMMAND YOU GET A DIR /var/lib/pgsql/data
Now Start Postgresql
#/etc/init.d/postgresql start #chkconfig postgresql on #chkconfig httpd on
Login in Postgresql
#su - postgres
-bash-3.2$ psql postgres
postgres=#CREATE DATABASE aimil WITH TEMPLATE = template0 OWNER = postgres
ENCODING = 'UTF8';
ABOVE COMMAND CREATES A DATABASE OF NAME(WHATEVER YOU GIVE "HERE i GIVE DATABASE NAME aimil") WITH UNICODE UTF8
postgres=#ALTER USER postgres with PASSWORD 'password'; (HERE GIVE PASSWORD TO USER POSTGRES)
postgres=#quit (to logout) -bash-3.2$psql -l (to check database list)
logout and come back on root prompt
#vim /var/lib/pgsql/data/pg_hba.conf
go in last and add global ip of tetra there with md5 encription
local all all md5 host all all 127.0.0.1/32 md5 host all all 122.160.21.105/24 md5 (tetra global IP) host all all 203.122.16.189/32 md5 (postgresql server global IP) host all all 192.168.0.0/24 md5 (local network range of client network)
save and quit
#vim /var/lib/pgsql/data/postgresql.conf
listen_addresses = '*' put * in place of 'localhost' port = 5432 remove # max_connections = 100 remove #
save and quit
#vim /etc/httpd/conf.d/phpPgAdmin.conf
Allow from all (allow all here)
#vim /etc/phpPgAdmin/config.inc.php
change true in false here
$conf['extra_login_security'] = false;
#/etc/init.d/postgresql restart #/etc/init.d/httpd restart
enjoy:)
NOW IF YOU HAVE TO TAKE ANY DUMP OF OTHER POSTGRESQL DATABASE
go to that server
#su - postgres
pg_dump databaseName > databaseName.sql
make tar of databaseName.sql and transfer on new postgresql server.
On new server where you install new postgresql or where you want to upload this database type
#su - postgres
#psql -d databasename -f databaseName.sql ( to upload database in postgresql)
#psql_dump database > database.sql ( to take dump of DB )
THATS IT