Google Search

Google
 

Wednesday, August 25, 2010

How to install Adempiere (PostgreSQL) on Fresh Ubuntu 9.10 Server Edition without XWindows


I will try my best to share this How-To that may be many people already know how to install it.

In this tutorial, I assume we already have Fresh Ubuntu 9.10 Server Edition with OpenSSH installed (for remote).

Before we start everything, what we must do is to update the repository and upgrade the current installed package.

$ sudo apt-get update && sudo apt-get upgrade

After the repository updated and we have upgrade our package, we need to install new package that required to run Adempiere.

$ sudo apt-get install sun-java6-jdk postgresql-8.3 postgresql-server-dev-8.3 postgresql-8.3-pljava

Well, after the database & java installed. We need to setting it’s environment and configuration files.

$ sudo vi /etc/environments

add :

JAVA_HOME=”/usr/lib/jvm/java-6-sun”

Check the java platform (u should see i386 for intel processor or other might be AMD)

$ sudo find /usr/lib/jvm/java-6-sun/jre/lib -type d

Add the java platform to the configuration files.

$ sudo vi /etc/ld.so.conf.d/jvm.conf

add :

/usr/lib/jvm/java-6-sun/jre/lib/i386
/usr/lib/jvm/java-6-sun/jre/lib/i386/client
/usr/lib/jvm/java-6-sun/jre/lib/i386/server
/usr/lib/jvm/java-6-sun/jre/lib/i386/native_threads

Next, we configure the database to allow access.

$ sudo vi /etc/postgresql/8.3/main/postgresql.conf

change to :

listen_addresses = ‘*’ # what IP address(es) to listen on;

Configure and add permission to access the postgreSQL

$ sudo vi /etc/postgresql/8.3/main/pg_hba.conf

add :

local all postgres md5
local all adempiere md5
host all postgres 192.168.111.0/24 md5
host all adempiere 192.168.111.0/24 md5

Restart the database server.

$ sudo /etc/init.d/postgresql-8.3 restart

After we set the environment and configure the database, we will create database user and database for Adempiere installation.

$ sudo su -
# su – postgres
postgres:~$ createuser -P -E -d adempiere
postgres:~$ createdb -E UTF8 -O adempiere adempiere
postgres:~$ /etc/init.d/postgresql-8.3 restart
postgres:~$ exit

Now, we create adempiere user and adempiere home.

# adduser adempiere
# su – adempiere
adempiere:~$ vi .bashrc

add :

ADEMPIERE_HOME=/home/adempiere/Adempiere

refresh the profile

adempiere:~$ source .bashrc

Well … until this step, we already 80% to accomplish this installation. Now we need Adempiere installation files for the next step.

adempiere:~$ wget http://downloads.sourceforge.net/adempiere/Adempiere_342s.zip
adempiere:~$ unzip Adempiere_342s.zip
adempiere:~$ exit

Importing the Dump Database

# su – postgres
postgres:~$ psql -d adempiere < /home/adempiere/Adempiere/data/Adempiere_pg.dmp postgres:~$ exit

For installation on XWindows, we just run “RUN_Setup.sh” then fill the required setting on the pop-up windows. But now we are installing without GUI / XWindows, what we must do is edit the Environment files and fill according to our setting.

# su – adempiere
adempiere:~$ cd Adempiere
adempiere:~$ cp AdempiereEnvTemplate.properties AdempiereEnv.properties
adempiere:~$ vi AdempiereEnv.properties

here are my Env files :

ADEMPIERE_HOME=/home/adempiere/Adempiere
JAVA_HOME=/usr/lib/jvm/java-6-sun
ADEMPIERE_DB_TYPE=postgresql
ADEMPIERE_DB_SERVER=erp.yourdomain.com
ADEMPIERE_DB_PORT=5432
ADEMPIERE_DB_NAME=adempiere
ADEMPIERE_DB_SYSTEM=postgres
ADEMPIERE_DB_USER=adempiere
#Database user password
ADEMPIERE_DB_PASSWORD=xxxx <<<< YOUR PASSWORD
ADEMPIERE_APPS_TYPE=jboss
ADEMPIERE_APPS_SERVER=erp.yourdomain.com
ADEMPIERE_JNP_PORT=1099
ADEMPIERE_WEB_PORT=8088
ADEMPIERE_SSL_PORT=4443
ADEMPIERE_KEYSTORE=/home/adempiere/Adempiere/keystore/myKeystore
ADEMPIERE_KEYSTOREWEBALIAS=adempiere
ADEMPIERE_KEYSTORECODEALIAS=adempiere
ADEMPIERE_KEYSTOREPASS=xxx <<< YOUR PASSWORD
ADEMPIERE_CERT_CN=erp.yourdomain.com
ADEMPIERE_CERT_ORG=Your Company Name
ADEMPIERE_CERT_ORG_UNIT=YourOrganisationUnit
ADEMPIERE_CERT_LOCATION=Jakarta
ADEMPIERE_CERT_STATE=DKI-JAYA
ADEMPIERE_CERT_COUNTRY=ID

after we edit that files, now we must make it executable.

adempiere:~$ chmod +x *.sh
adempiere:~$ cd utils
adempiere:~$ chmod +x *.sh
adempiere:~$ cd ..
adempiere:~$ RUN_silencesetup.sh

Wait Till the Installation Finish …………. FINISH !!!

then we can try it by start the server

adempiere:~$ /home/adempiere/Adempiere/utils/RUN_Server2.sh

Now, Congratulation you have finish the Adempiere Installation. Open your favourite Internet Browser (must support java) then btowse to http://erp.yourdomain.com:8088/webui



Friday, February 1, 2008

Jakarta's Flood

Today, when I want go to my office. I don't have any clue that Jakarta will having very bad flooding :( until my car in the middle of traffic jam which cause of 20 cm flood in Highway (Highway got Flood ???? Hmmm it's common in Jakarta :().

When arrived at my office, I open one of the local news portal (www.detik.com) and it's got report flood here and flood there :( thats the FACT !!! 30 minutes after that, in front of my office got flood about 30 to 40 cm.

The Effect of Jakarta's Floor this time are :
1. our president are caught on flood (Source : http://www.liputan6.com/ibukota/?id=154315)
2. 54 flight relocated to others airport (Source : http://www.detiknews.com/indexfr.php?url=http://www.detiknews.com/index.php/detik.read/tahun/2008/bulan/02/tgl/01/time/181728/idnews/887908/idkanal/10)
3. Traffic Jam everywhere.
4. Flooded vehicle everywhere.
5. I'm still can't go home !!!!!!

So, What must simple guys like me will act ?
1. Keep monitoring by phone friends and read news from media (portal & radio).
List of Portal you can get Information :
a. www.detik.com
b. www.liputan6.com
c. www.okezone.com
d. www.kompas.co.id

2. Make coffee and wait till get a good news.
3. Prepare to stay overnight at Office.

Monday, January 28, 2008

Ubuntu 7.10 + Bridge + Transparent Proxy (Squid) + Webmin

:) I'm happy that I have install my server and currently running for production. Here is the simple tutorial I want to share with u guys :

1. Install Ubuntu 7.10 (Gusty)
a. Download ubuntu iso from ftp://kambing.ui.edu/pub/ubuntu/releases/gutsy/ubuntu-7.10-server-i386.iso or download from the nearest mirror.

b. Burn the Image (*.iso) to the CD. (you can use Nero or others software to burn it).

c. Set your bios to boot from CDROM and put your Ubuntu Server's CD on the CDROM.

d. Boot it and follow the instruction.

Note : When installation, will be a question about server package you want to Install. In this case, I tick LAMP & SSH (for remote) option.

2. Install Bridge

We need to use 2 NIC (network card) to implement Bridge mode and below is my network scheme :

[Internet: 192.168.1.1] ---- [eth0:192.168.1.2 :eth1] ---- [SWITCH:]==[Office:192.168.1.10-192.168.1.254]

So what we need to do are :
a. Install required application / package

wilson@gateway:~$ sudo apt-get install iptables ebtables bridge-utils
[sudo] password for wilson: <== key-in your password

b. Setup eth0 & eth1 become bridge when start/restart

wilson@gateway:~$ sudo nano /etc/rc.local

add following to the rc.local before "exit 0"

brctl addbr br0
ifconfig eth0 0.0.0.0 promisc up
ifconfig eth1 0.0.0.0 promisc up
brctl addif br0 eth0
brctl addif br0 eth1
ip link set br0 up
ip addr add 192.168.1.2/24 brd + dev br0
route add default gw 192.168.1.1 dev br0

Description :
brctl addbr br0 <== interface for the bridge
ifconfig eth0 0.0.0.0 promisc up <== make eth0 become no Ip Address
ifconfig eth1 0.0.0.0 promisc up <== make eth1 become no IP Address
brctl addif br0 eth0 <== add eth0 to br0
brctl addif br0 eth1 <== add eth1 to br0
ip link set br0 up <== turn on br0
ip addr add 192.168.1.253/24 brd + dev br0 <== this required if you want to manage it remotely
route add default gw 192.168.1.1 dev br0 <== add default gateway


c. Make eth0 & eth1 become no Ip Address

wilson@gateway:~$ sudo nano /etc/network/interfaces

delete all of the content contain eth0 and eth1 to become :

auto lo
iface lo inet loopback

d. reboot and test the server

After reboot the machine, try to ping the br0 Ip address. If it's work's then Binggo :) your machine already configured become Bridge.

3. Install Squid

Squid is a proxy server application that can help you cache the www content, block content and authentication.

wilson@gateway:~$ sudo apt-get install squid

Now, you get your proxy server working. For more of squid configuration you can learn it from http://www.squid-cache.org, but in this tutorial I give some simple configuration for our proxy to become transparent.

Edit squid configuration files:

wilson@gateway:~$ sudo nano /etc/squid/squid.conf

Search, change and add the following configuration.

http_port 3128 transparent
acl lan src 192.168.1.0/24
http_access allow lan

Save it and restart the squid.

wilson@gateway:~$ sudo /etc/init.d/squid restart

4. Redirect http port to Proxy

Well, you have your proxy server (squid) running. But if you check it's log when your client do browsing, it's not using proxy. Why ???

It's because when your client browsing to a website, it's using port 80 and the proxy is 3128 by default. So we need to redirect port 80 to 3128. How ?

Note : in Ubuntu 7.10 you will find problem on ebtables cause there are some bugs on the Ubuntu ebtables, it's sound like miss link. So I make canocial link to solve the problem.

wilson@gateway:~$ sudo ln -s /etc/ethertypes /debian/ebtables/etc/ethertypes


wilson@gateway:~$ ebtables -t broute -A BROUTING -p IPv4 --ip-protocol 6 --ip-destination-port 80 -j redirect --redirect-target ACCEPT



wilson@gateway:~$
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 80 -j REDIRECT --to-port 3128

Now, when you check on the logs files. You can see that it's working :)

How to check the log ???

wilson@gateway:~$ sudo tail -f /var/log/squid/access.log

5. Install Webmin to manage your server :)

Install required package for webmin :

wilson@gateway:~$ sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl


Download webmin from www.webmin.org

wilson@gateway:~$ wget http://prdownloads.sourceforge.net/webadmin/webmin-1.390.tar.gz

Unpack it :

wilson@gateway:~$ tar zxvf webmin-1.390.tar.gz

Install it :

wilson@gateway:~$ cd webmin-1.390
wilson@gateway:~$ sudo ./setup.sh

Follow the instruction.

After finish installation try to browse it. Example : https://192.168.1.2:10000

Done !!! Another Binggo :)

Well, I think this is all for this moment. :) be simple in lives :)

Monday, January 21, 2008

Ubuntu 7.10 Broadcom Wireless

Today, it's my first time successfully install linux on my laptop. I must say thanks to Ubuntu Developer that make it's very simple to use and install.

I said first time successfully install linux is because I ever install it using Ubuntu Version 6.XX LTS and it's disappoint me because I'm not success in install it's Wireless Driver (Broadcom) even though there are many instruction or guide in Internet (Via Googlinggg).

Today I try to reinstall (Never Give Up in Live) it, but this time I use Ubuntu 7.10 (Gusty Gibbon) and search within google to find solution for my wireless and it's SHOCK !!! me .... it's very simple ....

Okay , I will try to make simple tutorial about that.


************************************************************************
Simple Tutorial installing Broadcom wireless device on Ubuntu 7.10
************************************************************************

1. Install Ubuntu 7.10 (I don't explain how to install Ubuntu).
2. Open Software Source (System - Administration - Software Source).
3. Check all of the Options and find the server nearest to your location.


4. After the Software source checked, what you need to do is open Restricted Drivers Manager (System - Administration - Restricted Drivers Manager) then check Firmware for Broadcom 43xx chipset family.



5. After you check Enabled check box, it's will appear confirmation windows; (Just press Enable Firmware button).



6. The package required will be downloaded and installed.



7. After the installation complete, it's will asking for firmware location. You can download the firmware from openwrt.org website or Download from Internet.



8. After that, the installation already finish and the Restricted Driver Manager will be like below.



9. Restart then Open Network Administration (System - Administration - Network) to setup your wireless configuration whether you use WEP or WAP.


Thursday, January 17, 2008

Preparing simple documentation

Today, I have a planning to make some simple guide for Linux+Squid+ClamAV, so wish me luck then I will post the result here as soon as I accomplish it.

Wish me luck :)

Wednesday, January 16, 2008

Hello from Me :)

Hello, this is my first blog that I made after many years considering whether I want to create a blog or not ..... And ..... Finally I decide to make my Blogs to express things that express my self.

Well ... welcome to my first blog then .......