Friday 23 December 2011

Install Sphinx 2.0.2 with PostgreSQL on Redhat 5.6 Cloud Server

1:cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.6 (Tikanga)

2: psql --version
psql (PostgreSQL) 8.4.7

3:whereis pg_config
pg_config

4:yum install postgresql84-devel
install compltely.
again check whereis pg_config
pg_config: /usr/bin/pg_config /usr/include/pg_config.h /usr/share/man/man1/pg_config.1.gz

5:cd /usr/local/
wget http://http://sphinxsearch.com/downloads/accept.php?file=sphinx-2.0.2-beta.tar.gz

6:tar -zxvf sphinx-2.tar.gz

7:cd sphinx-2

8:mkdir /usr/local/sphinx

9:./configure --without-mysql --with-pgsql /usr/bin/pg_config --prefix=/usr/local/sphinx


10: make

11: make install

12: cd /usr/local/sphinx/etc
cp sphinx-min.conf sphinx.conf

13: do the required changes in sphinx.conf
database pgsql
database user
database name
database password
port: 5432
14:run the sphinx searchd
/usr/local/etc/bin/indexer --all
searchd start

Thursday 15 December 2011

How to block users through MAC Address IPTABLES Ubuntu 10.10

I have installed a squid 2.7 transparently and also implemented sarg for reports. but i am facing a problem here. i have configure my network users in dhcp.conf. but there are some other users appears in my sarg reports with a heavy downloads.

now i have to do some thing specials for these guys.
i am going to invite them on lunch.

i just open terminal on my server, and run the command
arp -a
i found all the MAC Address and IP Address. i do have a MAC table of my network users.
then i copy all the MAC address that are not listed in my MAC table and create another file for them, past all with in a file.
After that i tab the terminal run the following commands to:
To check my iptables Rules:
iptables-save
ok
Then Run the command to block each MAC user that i have in newly created file. by running the following two commands repeatedly for each user.

iptables -A INPUT -m mac --mac-source 00:xx:6b:xx:05:xx -j DROP
iptables -A FORWARD -m mac --mac-source 00:xx:6b:xx:05:xx -j DROP

then check out the command
iptables-save
and then
iptables-apply

All the unauthorized users are blocked now.

if i want to give access to some one later on i have to follow the simple steps.
iptables -D INPUT -m mac --mac-source 00:xx:6b:xx:05:xx -j DROP
iptables -D FORWARD -m mac --mac-source 00:xx:6b:xx:05:xx -j DROP

iptables-save to check the specific entry is deleted from IPTABLES-RULES.
now he can access the internet.
now who is going to pay for lunch. don't worry i am going to pay.

Enjoy the fruits
do comments if you like it.

Wednesday 14 December 2011

How to Create Redmine Plugin (Custom Menus) and integrate on HostGator Server VPS.

How to Create Redmine Plugin to Add Custom Menus to Project Menu on HostGator Server VPS:
The name of Plugin is CMenu and tittle is workplans.

steps are below:
first i have taken the backup of the redmine application database.
host: localhost
username: user_redmine
password: password
encoding: utf8

Then start creating the new plugin:

ssh -p 2222
password:

mysqldump -u user database > databasebakup

Creating a new Plugin
To set the RAILS_ENV variable in order to use the command below:

export RAILS_ENV="production"

Creating a new plugin can be done using the Redmine plugin generator.
Syntax for this generator is:
So open up a command prompt and "cd" to your redmine directory, then execute the following command:

ruby script/generate redmine_plugin CMenu

The plugin structure is created in vendor/plugins/redmine_C_Menu:
Edit vendor/plugins/redmine_C_Menu/init.rb to adjust plugin information (name, author, description and version):
.............................................
require 'redmine'
Redmine::Plugin.register :redmine_C_Menu do
name 'CMenu plugin'
author 'sysadmin'
description 'A plugin for adding custum menu'
version '0.0.1'
end
.............................................

Then restart the application and point your browser to http://redmin.domain/admin/plugins.

After logging in, you should see your new plugin in the plugins list:

Generating a model
For now plugin doesn't store anything. Let's create a simple Workplans model for our plugin. Syntax is:

ruby script/generate redmine_plugin_model CMenu workplans tabmenu:string Click:string

This creates the workplans model and the corresponding migration file.
Please note you may have to rename your migration. Timestamped migrations are not supported by the actual Redmine plugin engine (Engines). If your migrations are named with a timestamp, rename it using "001", "002", etc. instead.

mv vendor/plugins/redmine_c_menu/db/migrate/20111214133141_create_workplans.rb vendor/plugins/redmine_c_menu/db/migrate/001_create_workplans.rb

If you have already created a database table record in plugin_schema_info with the timestamp version number, you will have to change it to reflect your new version number, or the migration will hang.

Migrate the database using the following command:

rake db:migrate_plugins

Generating a controller

Warning: starting from 1.4.0, Redmine won't provide anymore the default wildcard route (':controller/:action/:id'). Plugins will have to declare the routes they need in their proper config/routes.rb file.
For now, the plugin doesn't do anything. So let's create a controller for our plugin.
We can use the plugin controller generator for that. Syntax is:

ruby script/generate redmine_plugin_controller CMenu workplans index

A controller workplansController with 1 action (#index) is created.
Edit vendor/plugins/redmine_c_menu/app/controllers/workplans_controller.rb redmine_C_menu directory to implement the actions.

vim vendor/plugins/redmine_c_menu/app/controllers/workplans_controller.rb
.........................................................
class WorkplansController < ApplicationController
unloadable
before_filter :find_project, :authorize, :only => :index
def index
       @workplans = CMenu.find(:all)
 end
 def find_project
      @project = Project.find(params[:project_id])
 end
end
............................................................

Then edit vendor/plugins/redmine_c_menu/app/views/workplans/index.html.erb that will display existing polls:
...........................................................
<h2>Workplans</h2>
............................................................
Extending the project menu

Now, let's consider that the CMenu are defined at project level (even if it's not the case in our example poll model). So we would like to add the CMenu tab to the project menu instead.
Open init.rb and replace the line that was added just before with these 2 lines:
................................................................
permission :workplans, { :workplans => [:index] }, :public => true
menu :project_menu, :workplans, { :controller => 'workplans', :action => 'index' }, :caption => 'CMenu', :after => :activity, :param => :project_id
.................................................................

The second line adds our Polls tab to the project menu, just after the activity tab.
The first line is required and declares that our 1 action from workplansController are public
To make it private add the permission:
permission :view_workplans, :workplans => :index and remove the :public => true from 1st line.
Restart the application again and go to one of your projects:
If you click the CMenu tab, you should notice that the project menu is no longer displayed.
To make the project menu visible, you have to initialize the controller's instance variable @project.
Edit your workplansController to do so:
................................................................
class WorkplansController < ApplicationController
unloadable
before_filter :find_project, :authorize, :only => :index
def index
       @CMenu = CMenu.find(:all)
 end
 def find_project
      @project = Project.find(params[:project_id])
 end
end
................................................................
The project id is available in the :project_id param because of the :param => :project_id option in the menu item declaration above.
Now, you should see the project menu when viewing the CMenu:

Adding stylesheets
Let's start by adding a stylesheet to our plugin views.
Create a file named workplans.css in the vendor/plugins/redmine_C_Menu/assets/stylesheets directory:

a.workplans { font-size: 120%; color: blue }

When starting the application, plugin assets are automatically copied to public/plugin_assets/redmine_C_Menu/ by Rails Engines to make them available through your web server. So any change to your plugin stylesheets or javascripts needs an application restart.
Then, append the following lines at the end of vendor/plugins/redmine__C_Menu/app/views/polls/index.html.erb so that your stylesheet get included in the page header by Redmine:
..................................................................
<% html_title "Workplans" >
< content_for :header_tags do >
<= stylesheet_link_tag 'workplans', :plugin => 'redmine_C_Menu' >
< end %>
..................................................................

Restart your application and view the Plugin:

Thats it

Regards:
Imran Ullah

Tuesday 13 December 2011

How to install Redmine 1.1.2 on Ubuntu Server 10.XX


How to install Redmine 1.1.2 on Ubuntu Server 10.XX
follow the steps bellow and see how easly and step by step you are going to install and configure redmine on your local machine:

1 : sudo apt-get update

2 : sudo apt-get upgrade

3 : sudo apt-get install ruby1.8-dev rubygems1.8 libmysql-ruby libmysqlclient-dev rake libopenssl-ruby libapache2-mod-passenger imagemagick libmagickcore-dev libmagickwand-dev

4 :  sudo gem install rails -v=2.3.5
     if it requires the Ruby version v >= 1.3.1

     Then follow the steps:

4.a: Install the following packages for ruby

     sudo aptitude install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby sqlite3 libsqlite3-ruby1.8

     We need to create some symlinks from the install to locations every programme would look for

     sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby

     sudo ln -s /usr/bin/ri1.8 /usr/bin/ri

     sudo ln -s /usr/bin/rdoc1.8 /usr/bin/rdoc

     sudo ln -s /usr/bin/irb1.8 /usr/bin/irb

     Check Ruby Version

4.b: If you want to check ruby version use the following command

     ruby -v


    ####################### Rubygems ###################

 RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries , a tool  designed to easily manage the installation of gems, and a server for distributing them.

     RubyGems Features

     Easy Installation and removal of RubyGems packages and their dependents.
     Management and control of local packages
     Package dependency management
     Query, search and list local and remote packages
     Multiple version support for installed packages
     Web-based interface to view the documentation for your installed gems
     Easy to use interface for building gem packages
     Simple server for distributing your own gem packages

     you can download latest rubygems

4.c: wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
4.d: tar xzvf rubygems-1.3.1.tgz
     cd rubygems-1.3.1
     Install rubygem using the following command
     sudo ruby setup.rb
 
     This will complete the rubygem installation.

     Now create a symbolic link using the following command

     sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

     Check gem version using the following command

     gem -v

     Update gem packages using the following command

     sudo gem update --system
4.e: now repeat the step 4

    gem install rails -v=3.2.5
 
    you will see some warnings like No definition for X. Ignore those, they mean that some documentation was not installed, and we can live with that.

5 : sudo gem install mysql

6 : sudo gem install ruby-openid

7 : sudo gem install i18n -v=0.4.2

8 : sudo gem install passenger

9 : sudo gem install rmagick

you will see some warnings like No definition for X. Ignore those, they mean that some documentation was not installed, and we can live with that.

10 : Enter the MySQL console as root:
     mysql -u root -p
     password:
11 : inside the MySQL console, execute these commands:

11.a) create database redmine character set utf8;

11.b) create user 'redmine'@'localhost' identified by 'redmine@123';

11.c) grant all privileges on redmine.* to 'redmine'@'localhost';

exit from mysql.
Remember to change myPassword with your actual password. This is the one that will be used for the user redmine in the database redmine at localhost.


12 : Execute the following commands to get redmine 1.1.2.
server@root# wget http://rubyforge.org/frs/download.php/74419/redmine-1.1.2.tar.gz
download completed
then

13 : tar -xvzf redmine-1.1.2.tar.gz

14 : cd redmine-1.1.2


15 : Now setup the database configuration file to match our current environment:

cp config/database.yml.example config/database.yml

vim config/database.yml

production:
adapter: mysql
database: redmine
host: localhost
username: redmine
password: redmine@123
encoding: utf8

development:
adapter: mysql
database: redmine_development
host: localhost
username: redmine
password: redmine@123
encoding: utf8

save and exit!

16 : generate session and db migration:

rake generate_session_store
If you have a problem by installing Redmine 1.2.2:

rake aborted!
uninitialized constant Gem::SyckDefaultKey
then run the following command:
sudo gem update --system 1.3.7
rake generate_session_store

sudo mkdir /opt/redmine

cd /opt/redmine

sudo cp -r ~/redmine-1.1.2 .

cd redmine-1.1.2

sudo RAILS_ENV=production rake db:migrate

sudo RAILS_ENV=production rake redmine:load_default_data

Note: Press enter to accept the default language (English) and then execute the following:

17 : Now do the following

sudo chown -R www-data:www-data files log tmp public/plugin_assets

sudo chmod -R 755 files log tmp public/plugin_assets

sudo nano /etc/apache2/mods-available/passenger.conf

Add this line inside the <IfModule mod_passenger.c> tag:

18 : PassengerDefaultUser www-data

19 : Now let’s configure apache:

sudo nano /etc/apache2/sites-available/default

20 : Just before the closing tag, </VirtualHost>, add the following:

RailsEnv production

RailsBaseURI /redmine

21 : Now we put a link to our application to be accessible from apache and restart it:
sudo ln -s /opt/redmine/redmine-1.1.2/public /var/www/redmine
sudo /etc/init.d/apache2 restart


22 : now open your browser and type:

http://localhost/redmine

username: admin
password: admin

Thats it!


Monday 12 December 2011

Error: Can not connect to posgersql, Limit Exceeded for non super users resolved

As we have copy the same contents on form old DB-Server to new Managed Cloud Server, having the same username and passwords for all the databases and same setting.
Due to which by name accessing the server1.com give us the error of limit exceeded for non super users.I Google this issue and find most of the article to increase the number of connections in postgresql.conf file. i checkout my total connection by the time of connectivity that was less than the defined limit. after that search out some other solution but find nothing about this issue to resolve this. at last i applied the procedure, to access the database through server IP rather than name. and i log-in to PostgreSQL successfully. so the reason was the duplication of same name on two different server with same username and password. and we have finally resolve this issue.

Friday 9 December 2011

How to Install Sphinx 2.0.2 on CentOS-5.2 PostgreSQL

Follow the Steps you will finally install Sphinx successfully on your CentOS server.
1:yum install gcc
 cd /usr/local

2:wget http://sphinxsearch.com/files/sphinx-2.0.2-1.beta.tar.gz
tar -zxvf sphinx-2.0.2-1.beta.tar.gz

3:whereis pg_config

4:yum install postgresql-devel

5: whereis pg_config
pg_config: /usr/bin/pg_config /usr/include/pg_config.h /usr/share/man/man1/pg_config.1.gz

6:cd sphinx-2.0.2-1.beta

7: ./configure --without-mysql --with-postgres /usr/bin/pg_config

8:yum install g++

9:make && make install

10:cp /usr/local/etc/sphinx-min.conf.in /usr/local/etc/sphinx.conf

11: cd  /usr/local/etc/
      vim sphinx.conf

12:do the changes as required
     database pgsql
     database user
     database name
     database password
     port: 5432

13: save and quit.

14: /usr/local/etc/bin/indexer --all
    searchd start

thats it.

Friday 2 December 2011

How to install a D-LinkN 150 DWA-525 wireless network card in Ubuntu 10.10


How to install a D-Link  WIRLESS N 150 (DWA-525) wireless network card in Ubuntu 10.10
1. Install the card and power up the machine.

2. Open the terminal and run

lspci

In the list you will see:

Network Controller: Ralink Device 3060 0

So now we know what device we need drivers for.

3: www.ralinktech.com, clicked on Software at the top then chose Linux from the side menu on the left and then downloaded the RT3062PCI/mPCI/CB/PCIe(RT3060/RT3062/RT3562/RT3592) file because it says 3060 which is the dwa-525.

4: 4. Extract the package and cd to the directory.

5. We need to make a slight modification to the configuration for the driver:

vim os/linux/config.mk

And set:

# Support Wpa_Supplicant
HAS_WPA_SUPPLICANT=y

# Support Native WpaSupplicant for Network Manager
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

By default they are both set to ‘n’. Save and close the file.

6: 6. From the top level directory, compile and install the driver:

sudo su
make && make install

if it gives you the error of building library Then update your pae- by the following procedure
go to system from top menue select synptic manager
go to the tab status
select the Not installed (residual config..) and
select linux-backports----
mark for installation and apply.
OR
search pea.. and select the desired version and mark for installation and apply.
after installation complete open your terminal and cd in to the donwonloded package directory then apply the same command of make && make install

7. After compilation, and whist still root, modprobe the driver:

modprobe rt3562sta

You should get no output signalling success.

8. Now an important step. We need to blacklist a conflicting driver that will be loaded preferentially for this network card.

sudo vim /etc/modprobe.d/blacklist.conf

and enter the following line at the bottom of the file:

blacklist rt2800pci
:wq!
Save and close.

9. Restart the machine.

10. When the machine is back up, verify the driver has been loaded and is being used by the device:

lsmod

You should see the following in the list:

rt3562sta     924607     1

11. Now, launch the Network Manager and it should have detected the available wireless networks and you can configure the one you want.

Regards:
shahmeer

How to install and configure openerp on Ubuntu 10.10 setp by step


[How to] Installation OpenERP v6.x.x on Ubuntu server 10.10 MAVERAK
Manual installation of the openerp-server and the openerp-web server (OpenERP v6.x.x) on the same
servermachine, with a fresh installed Ubuntu 10.10 server (64 bit). Install only the openssh server,
make no server system updates after the server installation.
The result of this installation is an automatic boot-up of the OpenERP servers (application and webserver).
1:- The Ubuntu user must have root rights.
2:- Installation of dependencies and postgresql
     sudo addgroup openerp
     sudo adduser --ingroup openerp openerp
     # password = openerp@123

3:- sudo apt-get install postgresql (installs postgresql 8.4)
     sudo su - postgres
     createuser --createdb --no-createrole --pwprompt openerp
    #password openerp@123
    Shall the new role be a superuser? (y/n) y
    exit from postgresql command: \q

4:- Install dependencies for OpenErp Server
      sudo apt-get install python-psycopg2 python-reportlab python-imaging python-egenix-mxdatetime python-tz python-pychart python-pydot python-lxml python-vobject python-yaml python-profiler    python-setuptools
python-mako graphviz python-dev build-essential
sudo easy_install PyYaml

5:- Installation of Openerp-server
     cd /home/openerp
     sudo wget http://www.openerp.com/download/stable/source/openerp-server-6.0.1.tar.gz
     sudo tar zxvf openerp-server-6.0.1.tar.gz
     cd /home/openerp/openerp-server-6.0.1
     sudo python setup.py install
     su openerp
6:- cd /home/openerp/openerp-server-6.0.1
     openerp-server -s (This starts up the server and also creates a configuration file ".openerp_serverrc" in   the directory /home/openerp)
     You must see something like this:
     [2011-01-29 18:25:21,645][?] INFO:server:OpenERP version - 6.0.1
     [2011-01-29 18:25:21,646][?] INFO:server:addons_path - /usr/local/lib/python2.6/dist-packages/openerp-server/addons
    [2011-01-29 18:25:21,646][?] INFO:server:database hostname - localhost
    [2011-01-29 18:25:21,646][?] INFO:server:database port - 5432
    [2011-01-29 18:25:21,646][?] INFO:server:database user - openerp
    [2011-01-29 18:25:21,646][?] INFO:server:initialising distributed objects services
    [2011-01-29 18:25:21,829][?] INFO:web-services:starting HTTP service at 0.0.0.0 port 8069
    [2011-01-29 18:25:21,830][?] INFO:web-services:starting HTTPS service at 0.0.0.0 port 8071
    [2011-01-29 18:25:21,830][?] INFO:web-services:Registered XML-RPC over HTTP
    [2011-01-29 18:25:21,831][?] INFO:web-services:starting NET-RPC service at 0.0.0.0 port 8070
    [2011-01-29 18:25:21,831][?] INFO:server:Starting 3 services
    [2011-01-29 18:25:21,833][?] INFO:server:OpenERP server is running, waiting for connections...
7:- Control C (to shut down the openerp-server)
     exit
8:- Installation of the Openerp-server daemon
     sudo vi /etc/init.d/openerp-server (create a new file)
     #! /bin/sh
    ### BEGIN INIT INFO
    # Provides: openerp-server
    # Required-Start: $syslog
    # Required-Stop: $syslog
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: OpenERP Server - the server
    # Description: OpenERP is a complete ERP and CRM software
    ### END INIT INFO
   PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
   DESC=openerp-server
   NAME=openerp-server
   DAEMON=/usr/local/bin/openerp-server
   # Specify the user name (Default: openerp).
   USER="openerp"
  # Specifty an alternate config file (Default: ~/.openerp_serverrc)
  CONFIGFILE="/home/openerp/.openerp_serverrc"
  # pidfile
  PIDFILE=/var/run/$NAME.pid
  # Additional options that are passed to the Daemon
  DAEMON_OPTS="-c $CONFIGFILE"
  # Exit if the package is not installed
  [ -x "$DAEMON" ] || exit 0
  [ -f $CONFIGFILE ] || exit 0
  checkpid() {
  [ -f $PIDFILE ] || return 1
  pid=`cat $PIDFILE`
  [ -d /proc/$pid ] && return 0
  return 1
  }
  # function that starts the daemon/service
  #
  if [ -f /lib/lsb/init-functions ] || [ -f /etc/gentoo-release ] ; then
  do_start() {
  start-stop-daemon --start --quiet --pidfile $PIDFILE \
  --chuid $USER --background --make-pidfile \
  --exec $DAEMON -- $DAEMON_OPTS
  RETVAL=$?
  sleep 5 # wait for few seconds
  return $RETVAL
  }
  #
  # Function that stops the daemon/service
  do_stop() {
  start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo
  RETVAL=$?
  sleep 2 # wait for few seconds
  rm -f $PIDFILE # remove pidfile
  return $RETVAL
  }
  do_restart() {
  start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo
  sleep 2 # wait for few seconds
  rm -f $PIDFILE # remove pidfile
  start-stop-daemon --start --quiet --pidfile $PIDFILE \
  --chuid $USER --background --make-pidfile \
  --exec $DAEMON -- $DAEMON_OPTS
  RETVAL=$?
  sleep 5 # wait for few seconds
  return $RETVAL
  }
  else
  do_start() {
  $DAEMON $DAEMON_OPTS > /dev/null 2>&1 &
  RETVAL=$?
  sleep 5 # wait for few seconds
  echo $! > $PIDFILE # create pidfile
  return $RETVAL
  }
  do_stop() {
  pid=`cat $PIDFILE`
  kill -15 $pid
  RETVAL=$?
  sleep 2 # wait for few seconds
  rm -f $PIDFILE # remove pidfile
  return $RETVAL
  }
 do_restart() {
 if [ -f $PIDFILE ]; then
 do_stop
 fi
 do_start
 return $?
 }
 fi
 start_daemon() {
 if [ -f $PIDFILE ]; then
 echo "pidfile already exists: $PIDFILE"
 exit 1
 fi
 echo -n "Starting $DESC: "
 do_start
 checkpid
 if [ $? -eq 1 ]; then
 rm -f $PIDFILE
 echo "failed."
 exit 1
 fi
 echo "done."
 }
 stop_daemon() {
 checkpid
 if [ $? -eq 1 ]; then
 exit 0
 fi
 echo -n "Stopping $DESC: "
 do_stop
 if [ $? -eq 1 ]; then
 echo "failed."
 exit 1
 fi
 echo "done."
 }
 restart_daemon() {
 echo -n "Reloading $DESC: "
 do_restart
 checkpid
 if [ $? -eq 1 ]; then
 rm -f $PIDFILE
 echo "failed."
 exit 1
 fi
 echo "done."
 }
 status_daemon() {
 echo -n "Checking $DESC: "
 checkpid
 if [ $? -eq 1 ]; then
 echo "stopped."
 else
 echo "running."
 fi
 }
 case "$1" in
 start) start_daemon ;;
 stop) stop_daemon ;;
 restart|force-reload) restart_daemon ;;
 status) status_daemon ;;
 *)
 N=/etc/init.d/$NAME
 echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
 exit 1
 ;;
 esac
 exit 0 
 # vim: sts=4 st=4 et

9:   sudo chmod +x /etc/init.d/openerp-server
10: sudo mkdir /var/log/openerp
11: sudo touch /var/log/openerp/openerp-server.log
10: sudo chown -R openerp:openerp /var/log/openerp/
11: sudo update-rc.d openerp-server defaults
       su openerp
12: cd /home/openerp
       vim .openerp_serverrc
Change: do the following changes in this file # set the value according to your requirements

[options]
without_demo = False
smtp_port = 25
db_password = False  #openerp@123
xmlrpcs_interface =
syslog = False
logrotate = True
xmlrpcs_port = 8071
test_report_directory = False
list_db = True
xmlrpc_interface =
timezone = False
cache_timeout = 100000
smtp_password = False
secure_pkey_file = server.pkey
xmlrpc_port = 8069
log_level = info
test_disable = False
admin_passwd = admin
assert_exit_level = error
smtp_server = localhost
static_http_url_prefix = None
test_commit = False
xmlrpcs = True
demo = {}
login_message = False
import_partial =
pidfile = None
db_maxconn = 64
stop_after_init = False
test_file = False
reportgz = False
xmlrpc = True
netrpc_port = 8070
db_port = False            #5432
db_name = False
debug_mode = False
netrpc = True
secure_cert_file = server.cert
logfile = none               #/var/log/openerp/openerp-server.log
csv_internal_sep = ,
pg_path = None
static_http_enable = False
translate_modules = ['all']
smtp_ssl = False
root_path = /usr/local/lib/python2.6/dist-packages/openerp-server
netrpc_interface =
smtp_user = False
db_user = "openerp"
db_host = False            #localhost
email_from = False
addons_path = /usr/local/lib/python2.6/dist-packages/openerp-server/addons
static_http_document_root = None
exit

13: sudo chmod 777 /usr/local/lib/python2.6/dist-packages/openerp-server/addons
14: sudo /etc/init.d/openerp-server start
15: sudo /etc/init.d/openerp-server status (it must say: running)

16: Installing Openerp-web
      cd /home/openerp
17: sudo wget http://www.openerp.com/download/stable/source/openerp-web-6.0.1.tar.gz
18: sudo tar zxvf openerp-web-6.0.1.tar.gz
19: cd /home/openerp/openerp-web-6.0.1
20: sudo python setup.py install (this installation takes a while)
21: ./openerp-web.py (start server for testing)

You must see something like this:
[29/Jan/2011:19:37:37] ENGINE Bus STARTING
[29/Jan/2011:19:37:37] ENGINE Started monitor thread '_TimeoutMonitor'.
[29/Jan/2011:19:37:37] ENGINE Started monitor thread 'Autoreloader'.
[29/Jan/2011:19:37:37] ENGINE Serving on 0.0.0.0:8080
[29/Jan/2011:19:37:37] ENGINE Bus STARTED
Control C (to shut down the openerp-web server).

22: Installation of the Openerp-web daemon
       sudo mkdir /usr/local/bin/openerp
23: sudo vim /usr/local/bin/openerp/openerp-web
paste the two line shown below and save, exit.

#!/bin/sh

24: cd /home/openerp/openerp-web-6.0.1
      exec /usr/bin/python ./openerp-web.py $@
25: sudo chmod +x /usr/local/bin/openerp/openerp-web
26: sudo vim /etc/init.d/openerp-web (create a new file)
Paste the below scrip to the file

#!/bin/sh
### BEGIN INIT INFO
# Provides:
openerp-web
# Required-Start:
$syslog
# Required-Stop:
$syslog
# Should-Start:
$network
# Should-Stop:
$network
# Default-Start:
2345
# Default-Stop:
016
# Short-Description: OpenERP Web - the Web Client of the OpenERP
# Description:
OpenERP is a complete ERP and CRM software.
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/openerp
DAEMON=/usr/local/bin/openerp/openerp-web
NAME=openerp-web
DESC=openerp-web
# Specify the user name (Default: openerp).
USER="openerp"
# Specify an alternate config file (Default: /etc/openerp-web.cfg).
CONFIGFILE="/etc/openerp-web.cfg"
# pidfile
PIDFILE=/var/run/$NAME.pid
# Additional options that are passed to the Daemon
DAEMON_OPTS="-c $CONFIGFILE"
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
[ -f $CONFIGFILE ] || exit 0
checkpid() {
[ -f $PIDFILE ] || return 1
pid=`cat $PIDFILE`
[ -d /proc/$pid ] && return 0
return 1
}
# function that starts the daemon/service
#
if [ -f /lib/lsb/init-functions ] || [ -f /etc/gentoo-release ] ; then
do_start() {
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--chuid $USER --background --make-pidfile \
--exec $DAEMON -- $DAEMON_OPTS
RETVAL=$?
sleep 5 # wait for few seconds
return $RETVAL
}
#
# Function that stops the daemon/service
do_stop() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo
RETVAL=$?
sleep 2 # wait for few seconds
rm -f $PIDFILE # remove pidfile
return $RETVAL
}
do_restart() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo
sleep 2 # wait for few seconds
rm -f $PIDFILE # remove pidfile
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--chuid $USER --background --make-pidfile \
--exec $DAEMON -- $DAEMON_OPTS
RETVAL=$?
sleep 5 # wait for few seconds
return $RETVAL
}
else
do_start() {
$DAEMON $DAEMON_OPTS > /dev/null 2>&1 &
RETVAL=$?
sleep 5 # wait for few seconds
echo $! > $PIDFILE # create pidfile
return $RETVAL
}
do_stop() {
pid=`cat $PIDFILE`
kill -15 $pid
RETVAL=$?
sleep 2 # wait for few seconds
rm -f $PIDFILE # remove pidfile
return $RETVAL
}
do_restart() {
if [ -f $PIDFILE ]; then
do_stop
fi
do_start
return $?
}
fi
start_daemon() {
if [ -f $PIDFILE ]; then
echo "pidfile already exists: $PIDFILE"
exit 1
fi
echo -n "Starting $DESC: "
do_start
checkpid
if [ $? -eq 1 ]; then
rm -f $PIDFILE
echo "failed."
exit 1
fi
echo "done."
}
stop_daemon() {
checkpid
if [ $? -eq 1 ]; then
exit 0
fi
echo -n "Stopping $DESC: "
do_stop
if [ $? -eq 1 ]; then
echo "failed."
exit 1
fi
echo "done."
}
restart_daemon() {
echo -n "Reloading $DESC: "
do_restart
checkpid
if [ $? -eq 1 ]; then
rm -f $PIDFILE
echo "failed."
exit 1
fi
echo "done."
}
status_daemon() {
echo -n "Checking $DESC: "
checkpid
if [ $? -eq 1 ]; then
echo "stopped."
else
echo "running."
fi
}
case "$1" in
start) start_daemon ;;
stop) stop_daemon ;;
restart|force-reload) restart_daemon ;;
status) status_daemon ;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac
exit 0
# vim: sts=4 st=4 et

27: sudo chmod +x /etc/init.d/openerp-web
28: sudo chmod 777 /home/openerp/openerp-web-6.0.1/addons
29 :sudo cp /usr/local/lib/python2.6/dist-packages/openerp_web-6.0.1-py2.6.egg/doc/openerp-web.cfg /etc/
30: sudo vi /etc/openerp-web.cfg

Change:
log.access_file = "/var/log/openerp-web/access.log"
log.error_file = "/var/log/openerp-web/error.log"

save and exit

31: sudo mkdir -p /var/log/openerp-web
32: sudo touch /var/log/openerp-web/access.log
33: sudo touch /var/log/openerp-web/error.log
34: sudo chown -R openerp:openerp /var/log/openerp-web/
35: sudo update-rc.d openerp-web defaults
36: sudo /etc/init.d/openerp-web start

Browser interface
Type in your browser:
http://ipaddressserver:8080 or http://localhost:8080
You must see a login screen; create first a database.
if you find the error of does not connect to server or database can not be create, super admin bad password then go vim /etc/init.d/openerp-server and do the proper changes of your db_passwd: your postgresql openerp user password:
reboot you openerp server and openerp-web , refresh your browser this time you be happy to see you can add database.!!!!!
And EnJoY using the OpEnErP

*Hope This Help You And Save Your Time*