Tuesday, 31 May 2011

How to Install Fedena on Fedora 13

How to Install Fedena on Fedora 13

1. Setup required ruby, rubygems, rails and other packages.

# yum install ruby rubygems ruby-mysql mysql-server

Wait. But Fedora 13 resitory has ruby version 1.8.6 . We need 1.8.7 in order to install fedena on fedora 13.
Its avalable in rawhide repository. We need to rebuild it.

1.1 Rebuilding rawhide ruby and rybygem

Asuming you have rpm build environment.


#yum remove ruby  Remove previously installed ruby rpms.
#yum install yum-utils fedora-release-rawhide
#yumdownloader --enablerepo=rawhide --source ruby rubygems ruby-libs ruby-devel
#yum install $( rpm -qRp ruby-*src.rpm | grep -v rpmlib)
#rpmbuild --rebuild ruby-*src.rpm
#cd /root/rpmbuild/RPMS/

Now we have folowing build rpms ready for install
ruby-1.8.7.334-1.fc13.x86_64.rpm
ruby-libs-1.8.7.334-1.fc13.x86_64.rpm
ruby-devel-1.8.7.334-1.fc13.x86_64.rpm
ruby-ri-1.8.7.334-1.fc13.x86_64.rpm
ruby-static-1.8.7.334-1.fc13.x86_64.rpm
ruby-tcltk-1.8.7.334-1.fc13.x86_64.rpm
ruby-irb-1.8.7.334-1.fc13.noarch.rpm
ruby-rdoc-1.8.7.334-1.fc13.noarch.rpm

#yum install x86_64/ruby-* --nogpgcheck
#yum install noarch/ruby-* --nogpgcheck

Now we got ruby 1.8.7 installed.

Now install rubygems

# yum install rubygems

2. Download latest fedena source code from GitHub.

# wget -c https://download.github.com/projectfedena-projectfedena_v2.0-a213125.tar.gz
extract it to the installation directory.

I normally uses /opt for non-fedora repository packages to install.

#tar -zxvf /home/user/Downloads/Packages/projectfedena-projectfedena_v2.0-a213125.tar.gz
#mv projectfedena-projectfedena_v2.0-a213125 /opt/fedena


3.Installing Rails version 2.3.5


Fedena runs on version 2.3.5 of rails,

This will fetch and install ruby packages by gem command.

# gem install rails -v=2.3.5
Fetching: activesupport-2.3.5.gem (100%)
:
:   ( Content suppresed)
:
Installing RDoc documentation for rails-2.3.5...

4. Setup mysql server and database details in database.yml.

Because fedena uses mysql database.

# yum install mysql-server mysql-client libmysql-ruby

start mysqld service.

# service mysqld restart

Restarting mysqld (via systemctl):                        [  OK  ]

Now put database details in database.yml file.

# cd /opt/fedena/

Open the file database.yml in the config folder of the fedena soucre. And change the following details.

# vim /opt/fedena/config/database.yml

database: fedena - The name of the database you want to use for fedena

username: root - Mysql username for fedena

password: mypass - The password for the above mysql user.

5 .Installing the prawn gem


#gem install prawn -v=0.6.3

6.Installing the rest of the gems

Install the rest of the gems by running

#rake gems:install        (According to install guide on projectfedena.org)

This command doesn't work in fedora. I got following error.

If you install rubygems version newer than  3.7-2. YOu will get the following error.

So remove it and install 3.7.2 rpm.

# rake gems:install
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
rake aborted!
uninitialized constant ActiveSupport::Dependencies::Mutex

(See full trace by running task with --trace)


So I tried following command. You need to be in fedena intallation home directory.

# gem install rake

Fetching: rake-0.9.0.gem (100%)
Successfully installed rake-0.9.0

1 gem installed
Installing ri documentation for rake-0.9.0...
Installing RDoc documentation for rake-0.9.0...

Then run above commend

# rake gems:install

This will install remaining gems dependancies required by fedena.


7. Now create fedena mysql database
In fedena source directory run following command to create fedena database,


# rake db:create

and
 
# rake db:migrate

8. Make  server scriptS executable.


#chmod +x script/*

 9. Now finally start the server by running server script.

#/opt/fedena/script/server

Your fedena application server is started now.
put http://serveraddress:3000 in your browser.
Note that your default admin user name is admin and password is admin123.

If you want to run fedena inside apache server.

# gem install passenger

make sure you have  gcc-c++ curl-devel zlib-devel httpd-devel apr-devel apr-util-devel installed.

# passenger-install-apache2-module            

follow the instructions.

Make changes in apache configuration file(httpd.conf).
Add following lines in httpd.conf file.

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
   PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7
   PassengerRuby /usr/bin/ruby


And add virtual host.


        ServerName fedena.yourhost.com
        DocumentRoot /opt/fedena/public
        ServerAlias www.fedena.yourhost.com
        ErrorLog logs/fedena.yourhost-error_log
        CustomLog logs/fedena.yourhost.com-access_log combined
       
        AllowOverride all
         Options -MultiViews
     

  
 
Reload apache

# service httpd reload

Now you can access fedena http://fedena.yourhost.com

Wednesday, 25 May 2011

How to Install Fedena on Fedora 15

How to Install Fedena on Fedora 15

Reason to write this howto is I couldn't found good howto installtion guide anywhere. Even on projectfedena site you will get only ubuntu specific howto and that is also not complete.
1. Setup required ruby, rubygems, rails and other packages.

# yum install ruby rubygems ruby-mysql.x86_64 mysql-server

remove the fedora 15 repository rubygems rpm and install f14 rubygems rpm. as newer version is not compitable.

# yum localinstall rubygems-1.3.7-2.fc14.noarch

2. Download latest fedena source code from GitHub.

# wget -c https://download.github.com/projectfedena-projectfedena_v2.0-a213125.tar.gz

extract it to the installation directory.
I normally uses /opt non-fedora repository packages.

#tar -zxvf /home/user/Downloads/Packages/projectfedena-projectfedena_v2.0-a213125.tar.gz
#mv projectfedena-projectfedena_v2.0-a213125 /opt/fedena
 
3.Installing Rails version 2.3.5
Fedena runs on version 2.3.5 of rails,
This will fetch and install ruby packages by gem command.

[root@pradhumna fedena]# gem install rails -v=2.3.5
Fetching: activesupport-2.3.5.gem (100%)
:
:   (content trimmed and removed)
:

Installing RDoc documentation for rails-2.3.5...

4. Setup mysql server and database details in database.yml.

Because fedena uses mysql database.

# yum install mysql-server mysql-client libmysql-ruby

start mysqld service.

# service mysqld restart
[root@pradhumna fedena]# service mysqld restart
Restarting mysqld (via systemctl):                         [  OK  ]
# mysql -p
mysql> create databse fedena;
mysql> grant all on fedena.* to fedena@localhost identified by 'fedenapass';
mysql> flush privileges;
mysql> quit;

Now put database details in database.yml file.

# cd /opt/fedena/

Open the file database.yml in the config folder of the fedena soucre. And change the following details.

# vim /opt/fedena/config/database.yml

database: fedena - The name of the database you want to use for fedena
username: root - Mysql username for fedena
password: mypass - The password for the above mysql user.

5 .Installing the prawn gem
#gem install prawn -v=0.6.3

6.Installing the rest of the gems
Install the rest of the gems by running
#rake gems:install        (According to install guide on projectfedena.org)

This command doesn't work in fedora. I got following error. 
If you install rubygems version newer than  3.7-2. YOu will get the following error.
So remove it and install 3.7.2 rpm.

 [root@pradhumna fedena]# rake gems:install
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
rake aborted!
uninitialized constant ActiveSupport::Dependencies::Mutex

(See full trace by running task with --trace)

So I tried following command. You need to be in fedena intallation home directory.

[root@pradhumna fedena]# gem install rake
Fetching: rake-0.9.0.gem (100%)
Successfully installed rake-0.9.0
1 gem installed
Installing ri documentation for rake-0.9.0...
Installing RDoc documentation for rake-0.9.0...

# rake gems:install

Wednesday, 4 May 2011

Automated DB backup script on Fedora

Here is Script to do automated Mysql and postgress backup.
You need to create .pgpass file is users home diretory.

.pgpass file format is as follows


host:postgress_port:dbname:pg_db_username:pg_db_password


And password less login to remote backup host.

Here is the script





#!/bin/bash
#
# Mysql and Postgres database backup script
#
# Pre-Backup script
# - Stops Service
# - Takes a MySQL and Postgres Dump
# - Start the service

# Which service to mess with
SERVICE="httpd"

# MySQL Properties
DBDUMPDIR="/opt/dbdump"
DBNAME="db"
DBHOST="localhost"
DBUSER="dbuser"
DBPASSWORD="dbpass"

echo "Shutting down Service..."
/etc/init.d/${SERVICE} stop

while ps ax | grep -v grep | grep ${SERVICE} > /dev/null;
do
  echo "...stopping..."
  sleep 5
done

echo "Creating MySQL Dump..."
if [ ! -d "${DBDUMPDIR}" ]; then
  mkdir -p ${DBDUMPDIR}
fi
#mysqldump --host=${DBHOST} --user=${DBUSER} --password=${DBPASSWORD} ${DBNAME} > ${DBDUMPDIR}/${DBNAME}_`date +%d-%m-%y-%T`.sql
sleep 5
echo "Creating Postgres Dump..."
pg_dump pg_db -U pg_user -f /opt/dbdump/pg_db_`date +%d-%m-%y-%T`.sql
sleep 10
echo "Restarting Service..."
/etc/init.d/${SERVICE} start

while ! ps ax | grep -v grep | grep ${SERVICE} > /dev/null;
do
  echo "...starting..."
  sleep 5
done
echo "Uploading files to Remote Backup Server...."
rsync -av -e "ssh -p 22456" /opt/dbdump/* sshuser@backuphost.domain.com:/home/sshuser/db_backup
exit 0

Now create a crontab.

35 12 * * * /usr/local/etc/db_backup.sh >> /var/log/db_backup.log
 
                                                                                     1,1           Top

Tuesday, 28 December 2010

How to install Mantis on Fedora 14


How to Install Mantis on Fedora 14.

This tutorial provides step-by-step instructions on how to install and configure Mantis - Bug Tracker on your Fedora operating system.
Mantis is an open source free defect tracking utility.

Requirements

Apache
mysql-server
PHP

Lets Install required packages and its dependancies.

#yum install httpd php php-pdo php-mysql php-gd mysql mysql-server

Go to the /var/www/html direcotory. 


extract tarball

#tar -zxvf mantisbt-1.2.4.tar.gz
#cd mantisbt-1.2.4
#chown -R apache.apache mantisbt-1.2.4
#cp config_inc.php.sample config_inc.php
#vim /var/www/html/mantisbt-1.2.4/config_inc.php

put appropriate database and host specific information
 
<?php
  $g_hostname = 'localhost'; 
  $g_db_type = 'mysql';
  $g_database_name = 'tracker';
  $g_db_username = 'mantisdbuser'; 
  $g_db_password = ''; ?>
# --- Anonymous Access / Signup ---
$g_allow_signup = ON;
$g_allow_anonymous_login = OFF;
$g_anonymous_account = '';
# --- Email Configuration ---
$g_phpMailer_method = PHPMAILER_METHOD_MAIL; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL
$g_smtp_host = 'localhost'; # used with PHPMAILER_METHOD_SMTP
$g_smtp_username = ''; # used with PHPMAILER_METHOD_SMTP
$g_smtp_password = ''; # used with PHPMAILER_METHOD_SMTP
$g_administrator_email = 'administrator@yoursite.com';
$g_webmaster_email = 'webmaster@yoursite.com';
$g_from_name = 'Mantis Bug Tracker';
$g_from_email = 'noreply@yoursite.com'; # the "From: " field in emails
$g_return_path_email = 'admin@yoursite.com'; # the return address for bounced mail
$g_email_receive_own = OFF;
$g_email_send_using_cronjob = OFF;
$g_enable_email_notification = OFF;

save and close file.

create mysql database

mysql> create database tracker;
mysql> grant all on tracker.* to mantisdbuser@localhost identified by 'mantisdbpass';
mysql> flush privileges;
mysql> quit

Create virtual host in /etc/httpd/conf/httpd.conf

DocumentRoot /var/www/html/mantisbt-1.2.4
ServerName yoursite.com
ErrorLog logs/yoursite.com-error_log
CustomLog logs/yoursite.com-access_log common

put entry in host file

192.168.1.2 yoursite.com

Open your mozilla firefox browser. And open bellow link.



Next screen

Now click on continue to login into mantis.

Now your mantis is installed.
Login with default admin username Administrator
password is root.

Friday, 11 June 2010

Friday, 4 December 2009

Shell script to list all users in /etc/passwd file


No need for grep. awk does it all.

awk -F":" '$7 ~ /\/bin\/bash/ {print $1}' /etc/passwd



Sukhdev S. Jadhav

Friends are like an treasure,so if you want to become rich in your life make as many friends as possible in the life.

Tuesday, 8 September 2009

rsnapshot with rsync howto on Fedora

rsnapshot with rsync howto on Fedora
Simple yet Powerfull for incremental backup.


Required packages,
Rsync
rsnapshot

You can do it for remote servers also.
I have configure it for local files only.
#yum install rsnapshot rsync -y

created backup_root /backup/
mkdir /backup/
Off course it has to be on diffrent hard disk as we are taking backup.
But I created on local disk for testing.

#vim /etc/rsnapshot.conf

Set snapshots root directory:
 snapshot_root	/disk1/backup/ 
Configure backup policy
interval hourly 6       # run 6 times a day means every 4 hour 
interval daily 7        # and everyday and keep for 7 days.
#interval weekly 4
#interval monthly 3

I set it for hourly and weekly only.

Specify local and remote backup directories
Find out comments that read as follows:

 ############################### ### BACKUP POINTS / SCRIPTS ### ############################### 

backup /etc/ localhost/
#backup /usr/local/ localhost/
backup /var/log/ localhost/

Save and close the file.



 Test your config file for errors 
Type the following to test your configuration file for errors
# rsnapshot configtest
Output:

 Syntax OK 

You can also run rsnapshot in a test mode to display its action:
# rsnapshot -t hourly

Run rsnapshot for first time

To run first time, enter:
# rsnapshot hourly


Configure cron job
Edit /etc/cron.d/rsnapshot file to setup backup snapshot job. This is a sample cron file for rsnapshot. The values used correspond to the examples in /etc/rsnapshot.conf. There you can also set the backup points and many other things. To activate this cron file you have to uncomment the lines below.
Feel free to adapt it to your needs.

 0 */4         * * *           root    /usr/bin/rsnapshot hourly 30 3          * * *           root    /usr/bin/rsnapshot daily 0  3          * * 1           root    /usr/bin/rsnapshot weekly 30 2          1 * *           root    /usr/bin/rsnapshot monthly    सुखदेव सोपान जाधव  Sukhdev Sopan Jadhav   "मौसम के साथ साथ बदल जाना चाहिये| खुशीयाँ न हो तो फीर गम से बहल जाना चाहीये|  जीस रौशनी से आँखे खूल न सके | उस रौशनी से दूर निकल जाना चाहिये |" - अब्बास दाना बडौदी | 

Friday, 8 May 2009

Vtiger CRM 5.0.4 - Installation On Fedora 8

Requirements,

System Requirements
* Hardware: Hosted.
* Web Server: Apache 2.0.40 or above.
* Database: MySQL version 4.1.x through 5.1.x.
* PHP:PHP 5.0.x through 5.2.x.
* Web Browser: Firefox 1.5.x and above or Opera 7.21 and above.
* Operating System: RedHat Linux 7.2/8.0/9.0, SuSe 9.0, Debian 3.0/4.0, Mandrake 10.0, or Fedora Core 3/6/9.

Install Dependency Packages
# yum install libpng libpng-devel libjpeg libjpeg-devel freetype freetype-devel zlib-devel xorg-x11-devel openssl-devel krb5-devel imap-2004d

Prerequisites - PHP

Your php.ini must configured with the following parameters:

* safe_mode = Off
* display_errors = On
* file_uploads = On
* register_globals = Off
* max_execution_time = 600
* output_buffering= On
* memory_limit = 32M
* error_reporting = E_WARNING & ~E_NOTICE
* allow_call_time_pass_reference = On
* log_errors = Off
* short_open_tag= On

Install From Source

1. Download http://prdownloads.sourceforge.net/vtigercrm/vtigercrm-5.0.4.tar.gz from the Sourceforge.net.
[root@ds9 vtigercrm]# wget -c http://prdownloads.sourceforge.net/vtigercrm/vtigercrm-5.0.4.tar.gz?download

2. Extract the vtigercrm-5.0.4.tar.gz file into the Apache root directory. Alternately you may extract it in a subdirectory

#tar -zxvf vtigercrm-5.0.4.tar.gz
#chown -R apache:apache www.progresspartners.co.in/vtiger

3.Start a Web Browser and follow the procedure given in the Configuring vtiger CRM Server chapter for completing vTiger CRM installation.
http://www.progresspartners.co.in/vtiger
Follow the Wizard: (ref)

Database Configuration
create database in mysql and enter your database configuration information

Or create database manually in mysql cli.

[root@ds9 www]# mysql -p
mysql> CREATE DATABASE vtigertest DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;

mysql> grant all on vtigertest.* to vtigertest@localhost identified by 'vtigertest';

mysql> quit

Rest is very simple and web based.


Here is my login screen




Post-installation Check List

1. You must have READ/WRITE permissions on the following vtiger CRM folders and Files within those folders:

* PHP Configuration - config.inc.php
* Cache Directory - cache/
* Mail Merge Template Directory -test/wordtemplatedownload/
* Uploads Directory - storage/
* Install Directory - install/
* Installation file -install.php
* Product Image Directory -test/product/
* User Image Directory - test/user/
* Contact Image Directory- test/contact/
* Logo Directory- test/logo/
* Email Templates Directory -modules/Emails/templates/
* User Privileges Directory - user_privileges/
* Smarty Compile Directory - Smarty/templates_c
* Tabdata File Permission - tabdata.php
* ParentTabdata File Permission - parent_tabdata.php
* Smarty Cache Directory - Smarty/cache
* Logs Directory - logs/
* WebMail attachments Directory - modules/Webmails/tmp/

Saturday, 25 April 2009

Installation and Configuration Of Horde on Fedora 10

Step By step Guide to Installation and Configuration Of Horde on Fedora 10

Horde is The Horde Framework provides a common structure and interface for Horde applications (such as IMP, a web-based mail program).

Basicaly I want to try new webmail for cyrus IMAP. So I was in searching for good Webmail application. I tried roundcubemail and atmail also. Both are good in looks but lack in features.

So Friends, Lets start.


1. Prerequisites


apache, php php-imap php-mysql, mysql-server imap(cyrus-imapd) sendmail poppasswd.
Note that This is the prerequisites for my installation.



To install this application you need to have root access on system. off cource.

Open a gnome-terminal ( Kaali Khidaki) my favorite terminal.

switch to root user.

$su -

2. Configure PHP


open /etc/php.ini and edit bellow lines

file_uploads = On
short_open_tag = On


###install horde application and componants. also install turba and kronolith. the address book and calender application along with this.
ingo is The Horde web-based Email Filter Rules Manager
and imp is webmail application.

[root@lp ~]#yum install imp horde kronolith turba ingo -y

It will install few dependamcies also.

3. Configure mysql
Check that mysql is running:
# service mysqld restart

Create the horde database:
# cd /usr/share/horde/scripts/sql/
# vi vim create.mysql.sql #Important#edit the default password
# mysql -p < create.mysql.sql # create the tables

Test to see if you can connect to the database:
# mysql -h localhost -D horde -u horde -p
Exit mysql with the command 'exit'
If you can't connect, look a the throubleshooting guide before continuing


4. Configure Horde config files

Go to:
# cd horde/config

and make a copy of the default configuration files:

Here is my config files fo refence.

[root@lp ~]# cat /etc/horde/conf.php
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Horde: horde/config/conf.xml,v 1.74.2.69 2008/06/05 09:05:50 jan Exp $
$conf['vhosts'] = false;
$conf['debug_level'] = E_ALL;
$conf['max_exec_time'] = 0;
$conf['compress_pages'] = true;
$conf['umask'] = 077;
$conf['use_ssl'] = 2;
$conf['server']['name'] = $_SERVER['SERVER_NAME'];
$conf['server']['port'] = $_SERVER['SERVER_PORT'];
$conf['urls']['pretty'] = false;
$conf['safe_ips'] = array();
$conf['session']['name'] = 'Horde';
$conf['session']['use_only_cookies'] = true;
$conf['session']['cache_limiter'] = 'nocache';
$conf['session']['timeout'] = 0;
$conf['cookie']['domain'] = $_SERVER['SERVER_NAME'];
$conf['cookie']['path'] = '/horde';
$conf['sql']['phptype'] = false;
$conf['auth']['admins'] = array('Administrator', 'root', 'sukhdev');
$conf['auth']['checkip'] = true;
$conf['auth']['checkbrowser'] = true;
$conf['auth']['alternate_login'] = false;
$conf['auth']['redirect_on_logout'] = false;
$conf['auth']['params']['dsn'] = '{localhost:143/imap/notls}';
$conf['auth']['params']['imapconfig'] = 'dsn';
$conf['auth']['driver'] = 'imap';
$conf['signup']['allow'] = false;
$conf['log']['enabled'] = false;
$conf['log_accesskeys'] = false;
$conf['prefs']['driver'] = 'session';
$conf['alarms']['driver'] = false;
$conf['datatree']['driver'] = 'null';
$conf['group']['driver'] = 'datatree';
$conf['group']['cache'] = false;
$conf['perms']['driver'] = 'datatree';
$conf['share']['no_sharing'] = false;
$conf['share']['any_group'] = false;
$conf['share']['cache'] = false;
$conf['share']['driver'] = 'datatree';
$conf['cache']['default_lifetime'] = 86400;
$conf['cache']['params']['sub'] = 0;
$conf['cache']['driver'] = 'file';
$conf['lock']['driver'] = 'none';
$conf['token']['driver'] = 'none';
$conf['mailer']['params']['sendmail_path'] = '/usr/lib/sendmail';
$conf['mailer']['params']['sendmail_args'] = '-oi';
$conf['mailer']['type'] = 'sendmail';
$conf['mailformat']['brokenrfc2231'] = false;
$conf['vfs']['type'] = 'none';
$conf['sessionhandler']['type'] = 'none';
$conf['sessionhandler']['memcache'] = false;
$conf['problems']['email'] = 'webmaster@example.com';
$conf['problems']['maildomain'] = 'example.com';
$conf['problems']['tickets'] = false;
$conf['problems']['attachments'] = true;
$conf['menu']['apps'] = array();
$conf['menu']['always'] = false;
$conf['menu']['links']['help'] = 'all';
$conf['menu']['links']['options'] = 'authenticated';
$conf['menu']['links']['problem'] = 'all';
$conf['menu']['links']['login'] = 'all';
$conf['menu']['links']['logout'] = 'authenticated';
$conf['hooks']['permsdenied'] = false;
$conf['hooks']['username'] = false;
$conf['hooks']['preauthenticate'] = false;
$conf['hooks']['postauthenticate'] = false;
$conf['hooks']['authldap'] = false;
$conf['hooks']['groupldap'] = false;
$conf['portal']['fixed_blocks'] = array();
$conf['accounts']['driver'] = 'null';
$conf['user']['verify_from_addr'] = false;
$conf['imsp']['enabled'] = false;
$conf['kolab']['enabled'] = false;
$conf['memcache']['enabled'] = false;
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */



5. Configure Horde for IMP
Edit this files to allow IMP to run under Horde:

Again I am posting my config file here,

[root@lp ~]# cat /etc/horde/imp/conf.php
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Horde: imp/config/conf.xml,v 1.53.2.33 2008/05/06 17:54:04 slusarz Exp $
$conf['spell']['driver'] = '';
$conf['utils']['gnupg_keyserver'] = array('pgp.mit.edu');
$conf['utils']['gnupg_timeout'] = 10;
$conf['menu']['apps'] = array();
$conf['user']['select_sentmail_folder'] = false;
$conf['user']['allow_resume_all_in_drafts'] = false;
$conf['user']['allow_folders'] = true;
$conf['user']['allow_resume_all'] = false;
$conf['user']['allow_view_source'] = true;
$conf['user']['alternate_login'] = false;
$conf['user']['redirect_on_logout'] = false;
$conf['user']['select_view'] = true;
$conf['server']['server_list'] = 'shown';
$conf['server']['fixed_folders'] = array();
$conf['server']['sort_limit'] = 0;
$conf['server']['cache_folders'] = true;
$conf['server']['token_lifetime'] = 1800;
$conf['server']['cachejs'] = 'none';
$conf['server']['cachecss'] = 'none';
$conf['mailbox']['show_preview'] = false;
$conf['fetchmail']['show_account_colors'] = false;
$conf['fetchmail']['size_limit'] = 4000000;
$conf['msgcache']['use_msgcache'] = false;
$conf['mlistcache']['use_mlistcache'] = false;
$conf['msgsettings']['filtering']['words'] = './config/filter.txt';
$conf['msgsettings']['filtering']['replacement'] = '****';
$conf['spam']['reporting'] = false;
$conf['notspam']['reporting'] = false;
$conf['print']['add_printedby'] = false;
$conf['msg']['prepend_header'] = true;
$conf['msg']['append_trailer'] = true;
$conf['compose']['allow_receipts'] = true;
$conf['compose']['special_characters'] = true;
$conf['compose']['use_vfs'] = false;
$conf['compose']['link_all_attachments'] = false;
$conf['compose']['link_attachments_notify'] = true;
$conf['compose']['link_attachments'] = true;
$conf['compose']['attach_size_limit'] = 0;
$conf['compose']['attach_count_limit'] = 0;
$conf['compose']['reply_limit'] = 200000;
$conf['hooks']['vinfo'] = false;
$conf['hooks']['postlogin'] = false;
$conf['hooks']['postsent'] = false;
$conf['hooks']['signature'] = false;
$conf['hooks']['trailer'] = false;
$conf['hooks']['fetchmail_filter'] = false;
$conf['hooks']['mbox_redirect'] = false;
$conf['hooks']['mbox_icon'] = false;
$conf['hooks']['spam_bounce'] = false;
$conf['hooks']['msglist_format'] = false;
$conf['maillog']['use_maillog'] = true;
$conf['sentmail']['driver'] = 'none';
$conf['tasklist']['use_tasklist'] = true;
$conf['notepad']['use_notepad'] = true;
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */

Edit /etc/horde/imp/config/servers.php

$servers['imap'] = array(
'name' => "IMAP Server",
'server' => 'localhost',
'protocol' => 'imap/notls',
'port' => 143,
'folders' => 'mail/',
'namespace' => '',
'port' => 143,
'maildomain' => 'localhost',
'smtphost' => 'localhost',
'smtpport' => 25,
'realm' => '',
'preferred' => 'true'
);


Now you can access the webbased admin consol for remaining config.
http://www.example.com/horde

The following links helped me for reference.
http://www.harkness.co.uk/other/imp_webmail_install.html
http://tweenpath.net/2008/12/install-configuration-of-popopasswd-server-on-centos-52/
http://wiki.horde.org/FAQ/Admin?referrer=FAQ#

You might required to install poppasswd also.
download and install poppasswd.
wget http://rpm.razorsedge.org/centos-5/RE/poppassd-1.8.5-3.el5.re.i386.rpm

Wednesday, 17 December 2008

MRTG SNMP config

yum install mrtg

snmpconf -g basic_setup


[root@tansen ~]# snmpconf -g basic_setup

The following installed configuration files were found:

1: /etc/snmp/snmpd.conf
2: /etc/snmp/snmptrapd.conf

Would you like me to read them in? Their content will be merged with the
output files created by this session.

Valid answer examples: "all", "none","3","1,2,5"

Read in which (default = all):
************************************************
*** Beginning basic system information setup ***
************************************************
Do you want to configure the information returned in the system MIB group (contact info, etc)? (default = y):

Configuring: syslocation
Description:
The [typically physical] location of the system.
Note that setting this value here means that when trying to
perform an snmp SET operation to the sysLocation.0 variable will make
the agent return the "notWritable" error code. IE, including
this token in the snmpd.conf file will disable write access to
the variable.
arguments: location_string

The location of the system:

Finished Output: syslocation

Configuring: syscontact
Description:
The contact information for the administrator
Note that setting this value here means that when trying to
perform an snmp SET operation to the sysContact.0 variable will make
the agent return the "notWritable" error code. IE, including
this token in the snmpd.conf file will disable write access to
the variable.
arguments: contact_string

The contact information: sukhdev@xlncenterprises.com

Finished Output: syscontact sukhdev@xlncenterprises.com
Do you want to properly set the value of the sysServices.0 OID (if you don't know, just say no)? (default = y):

Configuring: sysservices
Description:
The proper value for the sysServices object.
arguments: sysservices_number

does this host offer physical services (eg, like a repeater) [answer 0 or 1]: 0
does this host offer datalink/subnetwork services (eg, like a bridge): 0
does this host offer internet services (eg, supports IP): 1
does this host offer end-to-end services (eg, supports TCP): 1
does this host offer application services (eg, supports SMTP): 0

Finished Output: sysservices 12
**************************************
*** BEGINNING ACCESS CONTROL SETUP ***
**************************************
Do you want to configure the agent's access control? (default = y):
Do you want to allow SNMPv3 read-write user based access (default = y):

Configuring: rwuser
Description:
a SNMPv3 read-write user
arguments: user [noauth|auth|priv] [restriction_oid]

The SNMPv3 user that should have read-write access: sukhdev
The minimum security level required for that user [noauth|auth|priv, default = auth]:
The OID that this community should be restricted to [if appropriate]:

Finished Output: rwuser sukhdev
Do another rwuser line? (default = y): n
Do you want to allow SNMPv3 read-only user based access (default = y): n
Do you want to allow SNMPv1/v2c read-write community access (default = y):

Configuring: rwcommunity
Description:
a SNMPv1/SNMPv2c read-write access community name
arguments: community [default|hostname|network/bits] [oid]

Enter the community name to add read-write access for: public
The hostname or network address to accept this community name from [RETURN for all]:
The OID that this community should be restricted to [RETURN for no-restriction]:

Finished Output: rwcommunity public
Do another rwcommunity line? (default = y): n
Do you want to allow SNMPv1/v2c read-only community access (default = y): n
****************************************
*** Beginning trap destination setup ***
****************************************
Do you want to configure where and if the agent will send traps? (default = y):
Do you want the agent to send snmp traps on snmp authentication failures? (default = y):

Configuring: authtrapenable
Description:
Should we send traps when authentication failures occur
arguments: 1 | 2 (1 = yes, 2 = no)

Should traps be sent when authentication failures occur? (1=yes, 2=no): 1

Finished Output: authtrapenable 1

Configuring: trapcommunity
Description:
Default trap sink community to use
arguments: community-string

The default community name to use when sending traps: public

Finished Output: trapcommunity public
Do you want the agent to send snmpv2c informs to a trap receiver (default = y): n
Do you want the agent to send snmpv2c traps to a trap receiver (default = y): n
Do you want the agent to send snmpv1 traps to a trap receiver (default = y): n
****************************************
*** Beginning monitoring setup ***
****************************************
Do you want to configure the agent's ability to monitor various aspects of your system? (default = y):
Do you want to configure the agents ability to monitor processes? (default = y):

Configuring: proc
Description:
Check for processes that should be running.
proc NAME [MAX=0] [MIN=0]

NAME: the name of the process to check for. It must match
exactly (ie, http will not find httpd processes).
MAX: the maximum number allowed to be running. Defaults to 0.
MIN: the minimum number to be running. Defaults to 0.

The results are reported in the prTable section of the UCD-SNMP-MIB tree
Special Case: When the min and max numbers are both 0, it assumes
you want a max of infinity and a min of 1.

Name of the process you want to check on: httpd
Maximum number of processes named 'httpd' that should be running [default = 0]: 1
Minimum number of processes named 'httpd' that should be running [default = 0]: 6

Finished Output: proc httpd 1 6
Do another proc line? (default = y): n
Do you want to configure the agents ability to monitor disk space? (default = y):

Configuring: disk
Description:
Check for disk space usage of a partition.
The agent can check the amount of available disk space, and make
sure it is above a set limit.

disk PATH [MIN=100000]

PATH: mount path to the disk in question.
MIN: Disks with space below this value will have the Mib's errorFlag set.
Can be a raw byte value or a percentage followed by the %
symbol. Default value = 100000.

The results are reported in the dskTable section of the UCD-SNMP-MIB tree

Enter the mount point for the disk partion to be checked on: /
Enter the minimum amount of space that should be available on /: 500m

Finished Output: disk / 500m
Do another disk line? (default = y): n
Do you want to configure the agents ability to monitor load average? (default = y):

Configuring: load
Description:
Check for unreasonable load average values.
Watch the load average levels on the machine.

load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]

1MAX: If the 1 minute load average is above this limit at query
time, the errorFlag will be set.
5MAX: Similar, but for 5 min average.
15MAX: Similar, but for 15 min average.

The results are reported in the laTable section of the UCD-SNMP-MIB tree

Enter the maximum allowable value for the 1 minute load average: 7
Enter the maximum allowable value for the 5 minute load average: 7
Enter the maximum allowable value for the 15 minute load average: 7

Finished Output: load 7 7 7
Do another load line? (default = y): n
Do you want to configure the agents ability to monitor file sizes? (default = y): n


The following files were created:
[root@tansen ~]# snmpconf -g basic_setup

The following installed configuration files were found:

1: /etc/snmp/snmpd.conf
2: /etc/snmp/snmptrapd.conf

Would you like me to read them in? Their content will be merged with the
output files created by this session.

Valid answer examples: "all", "none","3","1,2,5"

Read in which (default = all):
************************************************
*** Beginning basic system information setup ***
************************************************
Do you want to configure the information returned in the system MIB group (contact info, etc)? (default = y):

Configuring: syslocation
Description:
The [typically physical] location of the system.
Note that setting this value here means that when trying to
perform an snmp SET operation to the sysLocation.0 variable will make
the agent return the "notWritable" error code. IE, including
this token in the snmpd.conf file will disable write access to
the variable.
arguments: location_string

The location of the system:

Finished Output: syslocation

Configuring: syscontact
Description:
The contact information for the administrator
Note that setting this value here means that when trying to
perform an snmp SET operation to the sysContact.0 variable will make
the agent return the "notWritable" error code. IE, including
this token in the snmpd.conf file will disable write access to
the variable.
arguments: contact_string

The contact information: sukhdev@xlncenterprises.com

Finished Output: syscontact sukhdev@xlncenterprises.com
Do you want to properly set the value of the sysServices.0 OID (if you don't know, just say no)? (default = y):

Configuring: sysservices
Description:
The proper value for the sysServices object.
arguments: sysservices_number

does this host offer physical services (eg, like a repeater) [answer 0 or 1]: 0
does this host offer datalink/subnetwork services (eg, like a bridge): 0
does this host offer internet services (eg, supports IP): 1
does this host offer end-to-end services (eg, supports TCP): 1
does this host offer application services (eg, supports SMTP): 0

Finished Output: sysservices 12
**************************************
*** BEGINNING ACCESS CONTROL SETUP ***
**************************************
Do you want to configure the agent's access control? (default = y):
Do you want to allow SNMPv3 read-write user based access (default = y):

Configuring: rwuser
Description:
a SNMPv3 read-write user
arguments: user [noauth|auth|priv] [restriction_oid]

The SNMPv3 user that should have read-write access: sukhdev
The minimum security level required for that user [noauth|auth|priv, default = auth]:
The OID that this community should be restricted to [if appropriate]:

Finished Output: rwuser sukhdev
Do another rwuser line? (default = y): n
Do you want to allow SNMPv3 read-only user based access (default = y): n
Do you want to allow SNMPv1/v2c read-write community access (default = y):

Configuring: rwcommunity
Description:
a SNMPv1/SNMPv2c read-write access community name
arguments: community [default|hostname|network/bits] [oid]

Enter the community name to add read-write access for: public
The hostname or network address to accept this community name from [RETURN for all]:
The OID that this community should be restricted to [RETURN for no-restriction]:

Finished Output: rwcommunity public
Do another rwcommunity line? (default = y): n
Do you want to allow SNMPv1/v2c read-only community access (default = y): n
****************************************
*** Beginning trap destination setup ***
****************************************
Do you want to configure where and if the agent will send traps? (default = y):
Do you want the agent to send snmp traps on snmp authentication failures? (default = y):

Configuring: authtrapenable
Description:
Should we send traps when authentication failures occur
arguments: 1 | 2 (1 = yes, 2 = no)

Should traps be sent when authentication failures occur? (1=yes, 2=no): 1

Finished Output: authtrapenable 1

Configuring: trapcommunity
Description:
Default trap sink community to use
arguments: community-string

The default community name to use when sending traps: public

Finished Output: trapcommunity public
Do you want the agent to send snmpv2c informs to a trap receiver (default = y): n
Do you want the agent to send snmpv2c traps to a trap receiver (default = y): n
Do you want the agent to send snmpv1 traps to a trap receiver (default = y): n
****************************************
*** Beginning monitoring setup ***
****************************************
Do you want to configure the agent's ability to monitor various aspects of your system? (default = y):
Do you want to configure the agents ability to monitor processes? (default = y):

Configuring: proc
Description:
Check for processes that should be running.
proc NAME [MAX=0] [MIN=0]

NAME: the name of the process to check for. It must match
exactly (ie, http will not find httpd processes).
MAX: the maximum number allowed to be running. Defaults to 0.
MIN: the minimum number to be running. Defaults to 0.

The results are reported in the prTable section of the UCD-SNMP-MIB tree
Special Case: When the min and max numbers are both 0, it assumes
you want a max of infinity and a min of 1.

Name of the process you want to check on: httpd
Maximum number of processes named 'httpd' that should be running [default = 0]: 1
Minimum number of processes named 'httpd' that should be running [default = 0]: 6

Finished Output: proc httpd 1 6
Do another proc line? (default = y): n
Do you want to configure the agents ability to monitor disk space? (default = y):

Configuring: disk
Description:
Check for disk space usage of a partition.
The agent can check the amount of available disk space, and make
sure it is above a set limit.

disk PATH [MIN=100000]

PATH: mount path to the disk in question.
MIN: Disks with space below this value will have the Mib's errorFlag set.
Can be a raw byte value or a percentage followed by the %
symbol. Default value = 100000.

The results are reported in the dskTable section of the UCD-SNMP-MIB tree

Enter the mount point for the disk partion to be checked on: /
Enter the minimum amount of space that should be available on /: 500m

Finished Output: disk / 500m
Do another disk line? (default = y): n
Do you want to configure the agents ability to monitor load average? (default = y):

Configuring: load
Description:
Check for unreasonable load average values.
Watch the load average levels on the machine.

load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]

1MAX: If the 1 minute load average is above this limit at query
time, the errorFlag will be set.
5MAX: Similar, but for 5 min average.
15MAX: Similar, but for 15 min average.

The results are reported in the laTable section of the UCD-SNMP-MIB tree

Enter the maximum allowable value for the 1 minute load average: 7
Enter the maximum allowable value for the 5 minute load average: 7
Enter the maximum allowable value for the 15 minute load average: 7

Finished Output: load 7 7 7
Do another load line? (default = y): n
Do you want to configure the agents ability to monitor file sizes? (default = y): n


The following files were created:

snmpd.conf

These files should be moved to /usr/share/snmp if you
want them used by everyone on the system. In the future, if you add
the -i option to the command line I'll copy them there automatically for you.

Or, if you want them for your personal use only, copy them to
/root/.snmp . In the future, if you add the -p option to the
command line I'll copy them there automatically for you.


snmpd.conf

These files should be moved to /usr/share/snmp if you
want them used by everyone on the system. In the future, if you add
the -i option to the command line I'll copy them there automatically for you.

Or, if you want them for your personal use only, copy them to
/root/.snmp . In the future, if you add the -p option to the
command line I'll copy them there automatically for you.

cfgmaker --global 'WorkDir: /var/www/mrtg' --global 'Options[_]: bits,growright' --output /etc/mrtg/tansen.cfg public@192.168.1.2

cfgmaker --global 'WorkDir: /var/www/mrtg' --global 'Options[_]: bits,growright' --output /etc/mrtg/mrtg1.cfg public@192.168.15.1


indexmaker --output=/var/www/mrtg/index.html mrtg1.cfg tansen.cfg
env LANG=C /usr/bin/mrtg tansen.cfg

vim /etc/httpd/conf.d/mrtg.conf

Add folowing lines in the file to avoid errors [Wed Dec 17 12:55:05 2008] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/mrtg/.


Options Indexes FollowSymLinks

AllowOverride None





service httpd restart


http://localhost/mrtg/

Saturday, 27 September 2008

Mac OS like Dock for your linux Box


Fast and customizable dockbar

SimDock is a fast and customizable dockbar. It is written in c++ and
wxWidgets and fits well in Gnome but works on most desktop
environments. Does not require Compiz nor 3D acceleration.

Download rpm for Fedora 9 from here.

http://www.mediafire.com/?sharekey=f815cf9298e6d452d2db6fb9a8902bda

Wednesday, 2 July 2008

Linux powers 85% of the world's most powerful computers

The new No. 1 system, built by IBM for the U.S. Department of Energy's Los
Alamos National Laboratory and called "Roadrunner," achieved performance of
1.026 petaflop/sbecoming the first supercomputer ever to reach this
milestone. At the same time, Roadrunner is also one of the most energy
efficient systems on the TOP500.

The Roadrunner uses the Red Hat Enterprise Linux operating system and is
managed with xCAT distributed computing software. It occupies approximately
6,000 square feet (560 m)[8] and became operational in 2008.

Checkout the complete updated list as on June 2008 at