Wednesday, June 15, 2011

Cacti Installation on Centos 5.2

Cacti is a GPL-licensed, scalable, RRDtool-based monitoring program with flexible graphing options. This article describes the process of installing and configuring Cacti on CentOS 5.2.
 
Useful links to this installation were BXtra and TechDB.

Per the Cacti documentation, Cacti requires:
RRDTool 1.0.49 or 1.2.x or greater
MySQL
4.1.x or 5.x or greater

PHP 4.3.6 or greater, 5.x greater highly recommended for advanced features

A Web Server e.g. Apache or IIS
I'd also recommend installing vim, net-snmp, net-snmp-utils, php-snmp, initscripts, perl-rrdtool, and any dependencies.

To perform this install, I am logged into Gnome as a normal user, and opened a terminal that is switched to the root user using the
su command. I had already installed apache, mysql, and PHP during the original install process of CentOS 5.2.

I added a new repository to facilitate this install. To do this, I created a file
(
/etc/yum.repos.d/dag.repo) containing Dag Wiers repository, which contains rrdtool, among other things.
[dag]


name=Dag RPM Repository for Red Hat Enterprise Linux

baseurl=http://apt.sw.be/redhat/el5/en/i386/dag
    gpgcheck=1
 gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt enabled=1


You can create this file by typing
vim /etc/yum.repos.d/dag.repo and copying and pasting the above information into the file. Be warned that the above text containing the repository is version and architecture-specific.

I then typed
yum update to update CentOS and the repository list before installing additional software.

I installed everything but cacti through yum. You can verify that you have the packages in question (or the version numbers of installed packages) by attempting to install them, as yum will remind you that you already have the latest version installed, as well as the version status of the packages, like shown here:
# yum install php httpd mysql mysql-server php-mysql vim-enhanced net-snmp net-snmp-utils php-snmp initscripts perl-rrdtool rrdtool initscripts
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* base: pubmirrors.reflected.net
* updates: mirror.fdcservers.net
* addons: chi-10g-1-mirror.fastsoft.net
* extras: mirror.fdcservers.net
Setting up Install Process
Parsing package install arguments
Package php-5.1.6-23.2.el5_3.i386 already installed and latest version
Package httpd-2.2.3-22.el5.centos.1.i386 already installed and latest version
Package mysql-5.0.45-7.el5.i386 already installed and latest version
Package mysql-server-5.0.45-7.el5.i386 already installed and latest version
Package php-mysql-5.1.6-23.2.el5_3.i386 already installed and latest version
Package 2:vim-enhanced-7.0.109-4.el5_2.4z.i386 already installed and latest version
Package 1:net-snmp-5.3.2.2-5.el5_3.1.i386 already installed and latest version
Package 1:net-snmp-utils-5.3.2.2-5.el5_3.1.i386 already installed and latest version
Package php-snmp-5.1.6-23.2.el5_3.i386 already installed and latest version
Package initscripts-8.45.25-1.el5.centos.i386 already installed and latest version
Package perl-rrdtool-1.3.7-1.el5.rf.i386 already installed and latest version
Package rrdtool-1.3.7-1.el5.rf.i386 already installed and latest version
Package initscripts-8.45.25-1.el5.centos.i386 already installed and latest version
Nothing to do

Download the latest version of Cacti (0.8.7e, as of the writing of this article) from here. I downloaded it to my desktop and unzipped it by right clicking it and selecting "Extract here". I also renamed the cacti-0.8.7e directory by right clicking and selecting "Rename". You could do this in the command line, if you wanted to:
[your root shell] # tar xzvf cacti-0.8.7e.tar.gz
[your root shell] # mv cacti-0.8.7e cacti
Move the entire cacti directory to /var/www/html/ :
[your root shell] # mv cacti /var/www/html
I chose to create a 'cactiuser' user (and cacti group) to run cacti commands and to have ownership of the relavent cacti files. It was here that I noticed that my install did not have any of the /sbin directories in its $PATH , so I simply typed the absolute path:
[your root shell] # /usr/sbin/groupadd cacti
[your root shell] # /usr/sbin/useradd -g cacti cactiuser
[your root shell] # passwd cactiuser
Change the ownership of the /var/www/html/cacti/rra/ and /var/www/html/cacti/log/ directories to the cactiuser we just created:
[your root shell] # cd /var/www/html/cacti
[your root shell] #
chown -R cactiuser rra/ log/

Create a mysql root password, if you haven't already (password in this example is samplepass:
[your root shell] # /usr/bin/mysqladmin -u root password samplepass

Create a MySQL database for cacti:
[your root shell] # mysqladmin --user=root --password=samplepass create cacti

Change directories to the cacti directory, and use the cacti.sql file to create tables for your database:


[your root shell] # cd /var/www/html/cacti
[your root shell- cacti] # mysql --user=root --password=samplepass cacti <
cacti.sql



I also created a MySQL username and password for Cacti:
[your root shell] # mysql --user=root --password=samplepass
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 28
Server version: 5.0.45 Source distribution

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'samplepass';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye

Edit
/var/www/html/cacti/include/config.php with your favorite editor, and update the information to reflect our cacti configuration (you can leave the other text in the file alone):
/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "samplepass";
$database_port = "3306";
Create a cron job that polls for information for Cacti (I'm choosing to use /etc/crontab here):

[your root shell] # vim /etc/crontab


Add this line to your crontab:
*/5 * * * * cactiuser /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1
Edit your PHP config file at /etc/php.ini to allow more memory usage for Cacti. It is a relatively large text file- using vim, I search for "memory_limit" by typing /memory_limit in command mode.
[your root shell] # vim /etc/php.ini
I changed memory_limit = 8M to memory_limit = 128M
Before I check to see if Cacti works, I want to check and see if mysqld and httpd are running using the service command.
[your root shell] # /sbin/service mysqld status
[your root shell] # /sbin/service httpd status

If
mysqld and httpd are running, great. If not, type:
[your root shell] # /sbin/service mysqld start
[your root shell] #
/sbin/service httpd start
If you're an "I need to see what the output looks like" type, here is an example of the previous command:
[your root shell] # /sbin/service mysqld status
mysqld is stopped
[your root shell] # /sbin/service mysqld start
Initializing MySQL database: Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[ OK ]
Starting MySQL: [ OK ]
You should now be able to access cacti at http://localhost/cacti from the local computer or from any computer within your LAN network at http://your.internal.IP.address/cacti .

There should be a Cacti Installation Guide window that shows up, giving licensing info and the like. Click "Next".

Select "New Installation", since this is a new installation.

The next window to pop up should tell you whether Cacti could find the paths to all of the elements that Cacti needs to run, such as RRDtool, PHP, snmp stuff, etc. If everything but Cacti was installed via yum, you should be good here. Click "Finish" to save the settings and bring up the login window.

Below is a screenshot of the login window. The default user name is
admin. The default password is admin. It should prompt an automatic password change for the admin account when you log in the first time.

If you successfully log in, I'd recommend taking a break here. Depending on how fast you are, your cron job may not have had enough time to run the poller program and create data for your graphs. I'd suggest taking a deep breath, or brewing a cup of tea (or coffee) for yourself.

The localhost machine should have some graph templates that are already created, but you can click the "Create Additional Devices" link to add graphs for any other machines on your network. I added my FreeNAS box (tutorial for that to follow).

After having consumed your beverage of choice, press the "Graphs" button. Cacti should have a graph showing you a couple minutes of data for the machines you have added. The longer your machine is on, the more informational the graphs will be. Also, if you click on a particular graph, Cacti will Congratulations! You're now monitoring!

View the Cacti documentation page for more information on how to take advantages of Cacti.

Below are some graphs that were made using Cacti.

Wednesday, June 8, 2011

How to use Gevey : iphone4

How to use Gevey :
Before using,you should need following two tips :
1.If your iPhone 4 has custom firmware, the GEVEY Sim adapter will not work. You must restore your iPhone 4 to the original iPhone 4 Firmware.
2.If after booting up the iPhone 4, and you do not see the "accept" screen, make sure you have an active sim and that it is correctly inserted in your iPhone.
User Manual :
1.Turn off your iphone and insert your SIM card and GEVEY sim together with the metal SIM tray provided.
2: Turn on your iphone and wait for the SIM welcome menu to show and then select "accept".
3: At the beginning, there is a "no service "message will show on your iphone,don't worry , just wait and later you will see one signal bar appears on the top left corner.
4: After you see the singal bar, please dial "112" and hang up in 2 seconds.
5: Turn on your Airplane mode and then turn off right away,Your phone will show "SIM failure" and "No SIM Card installed"
6: When you see the "No SIM Card installed" info on the iphone , please turn on the airplane mode then and turn it off asap. Later you will see the "SIM Failure" info and the singal will show up as well.
Notice :
1.If there is no singal show up after you follow the steps above,please switch off your iphone and repeat the user guide steps again.
2.If you want to use the 3G network,just turn on "data roaming"in the network menu.
3.You can do a language selection for the welcome message at the STK menu.

Tuesday, May 10, 2011

Install KnowledgeTree in Cent OS

Note that these steps should be performed as root.

1) Install OpenOffice.org 2.4
a) Download the OpenOffice.org RPM from the OpenOffice.org website
http://download.openoffice.org/2.4.3/other.html
Image:Rh_step0.png
b) Untar the OpenOffice.org package
$ tar -xf OpenOffice.org.tar.gz
Image:Rh_step1.png

c) Run the OpenOffice.org RPM file
$ cd /RPMS
$ rpm -i *.rpm 
Image:Rh_step2.png
Image:Rh_step3.png

Or yum install openoffice.org-core.x86_64 

2) Temporarily disable SELinux.
$ su -
$ setenforce permissive
Image:Rh_step5.png

3) Configure the KnowledgeTree repositories
a) Create a new file with the following content and copy it to
/etc/yum.repos.d/KT.repo


[KT]
name=KT
baseurl=http://repos.knowledgetree.com/rpm/rhel/5/$basearch
enabled=1
gpgcheck=0

[KTnoarch]
name=KT - noarch
baseurl=http://repos.knowledgetree.com/rpm/rhel/5/noarch
enabled=1
gpgcheck=0

[Zend]
name=Zend Server
baseurl=http://repos.zend.com/zend-server/rpm/$basearch
enabled=1
gpgcheck=0

[Zendnoarch]
name=Zend Server - noarch
baseurl=http://repos.zend.com/zend-server/rpm/noarch
enabled=1
gpgcheck=0

b) Update Yum
$ yum update
4) Install KnowledgeTree using Yum 
$ yum install knowledgetree-ce
 
 
/etc/init.d/zend-server restart
 
If some package failed try to reinstall with yum separately , 
if mysql not installed install separately or use default mysql 
 
start with " service mysqld start " and stop httpd service
 
"service httpd stop" 

Monday, May 9, 2011

LVM volume Creation in Xenserver

First add partition to xenserver from xencenter.
 
pvcreate /dev/xvdb1
vgcreate vg02 /dev/xvdb1
lvcreate --name lv02 --size 20G vg02
mke2fs -j /dev/vg02/lv02
mkdir /space or mkdir /home/systest
mount /dev/vg02/lv02 /space

df -h


vi /etc/fstab

/dev/vg02/lv02  /space ext3 defaults 1 2


vg02 or lv02 is just names you can write any , xvdb is partition name so define accordingly.

Tuesday, May 3, 2011

Open source ALM tools continue to gain market share, give the development manager a migraine

The influence of open source on software development is often measured by the impact of successful libraries and frameworks. It’s hard to imagine building a modern web application without open source components. A similar trend is now unfolding in the Application Lifecycle Management (ALM) space, driven by tools created by projects needing to support their own open source software delivery. While ALM tools are often associated with the heavyweight workflow characteristics of enterprise application development, successful open source projects are a great example of the transformation underway in ALM, towards lean methods and lightweight, developer-centric tools.


In contrast with the application development tools which we use for writing and debugging code, ALM tools assist us with an application’s evolution over time. At their core, ALM tools track tasks and changes, help manage builds and releases, and support the dialogue that defines an application’s evolution. This subset of ALM is sometimes referred to as Application Development Management (ADM). On top of this core feature set layer tools for project and product management. Large organizations add additional tools to the stack to handle program and project portfolio management.
Thanks to a combination of resource constraints, a preference for using open source technologies for open development, and the common desire for developers to sharpen and extend their own toolset, the past decade has delivered a critical mass of the open-source ALM tools. Consider the scale of ALM on Eclipse.org: 33M lines of code in the last coordinated release (733 installable features/components), 330K total Bugzilla reports (3K new each month), 15K Bugzilla users, 1K committers (400 active), 300 projects and 173 Hudson build jobs. Add to that dozens of interdependencies between Eclipse projects and other open source projects such as the popular Apache libraries. ALM on Eclipse is managed entirely with open source tools including Bugzilla, CVS, Git, Hudson, MediaWiki and Mylyn.

The 1,948 respondents to the 2010 Eclipse Community Survey provide an overview of the degree to which open source tools have percolated into commercial software development. Only a small fraction of the survey respondents were directly involved with Eclipse, and half were from organizations with over 100 employees. The striking pattern is that the core open source ALM tools, when combined, have the market lead in each of three key ALM categories visible in the figure below. In 2010 for these categories, open-source ALM has taken the market lead from closed-source solutions. While surveys of this sort are always skewed towards the type of developer who bothers to answer surveys, this result remains indicative of a shift in application development practices and open-source ALM market share. In 2011, I predict that this trend will continue and that open source tools will percolate into the ALM stacks of more conservative organizations. A degree or two of separation from their open source counterparts, many of those developers will not recognize the term DVCS before it is force fed to them.










The attraction to open source ALM is not just price point, but the amount of innovation that has been driven by open source developers building tools to support their own productivity patterns. The ecosystem of extensions that forms around popular open source projects is another key driver of adoption. Those ecosystems are also likely to produce the most interesting integrations, since open source has proven itself as the most effective mechanism for growing both the community and APIs needed for innovative extensions. Finally, organizations with long application and product lifecycles are attracted to open source ALM tools because a suitable open source license gives them confidence that they will be able to access and extend the knowledge base represented by their issue tracker ten years from now, when the landscape of ALM vendors will much different than it does today.
Open source ALM tools are built on developer-centric principles. Transparency is favoured over hierarchy, with very task and bug on Eclipse and Mozilla being editable by anyone. It relies on asynchronous collaboration and a consistent use of the task or issue tracker to capture all discussion relevant to changes in the software. It encourages lining up modularity and framework boundaries with team boundaries, allowing API layers to facilitate dependencies and collaboration. There are also things missing from the stack. Responsiveness to the community often takes precedence over planning, and after the fading away of XPlanner, there has been a distinct gap in project management features within the open source tool space. There is also no single integrated open source ALM stack, instead open source projects glue together their own best of breed solutions, and layer customizations on top, as is the case with the numerous tools built on the Eclipse Bugzilla repository. Integration with product, project and portfolio management tools is typically non-existent, as this is not something that even large open source projects need.








While open-source developers will continue working very happily with their increasingly slick tool set, this impedance mismatch with large-scale ALM implies major problems for organizations who are planning to get a lot of ALM functionality for free. There mismatch between both the toolset and the cultural aspects of open source ALM tools and what’s needed by the enterprise. Agile and lean development have the opportunity to bridge some of the cultural gap, but still have a considerable way to go in order to incorporate the lessons learned from open source. There is enough of a gap in the toolset that organizations already deploying open-source tools at the enterprise ALM scale have needed to set up their own ALM tool engineering teams. These teams create enterprise-level authentication and access control, provide third-party ALM tool integrations, and implement support for features such as linking existing Project Portfolio Management (PPM) tools. Due to the pace of change in open source ALM tools, they are fighting a losing battle. While wasteful, this exercise is currently necessary. Large organizations that fail to integrate already deployed open source tools into their existing ALM and PPM infrastructure will see a dramatic reduction in the predictability of their development process, since their process relies on a connectivity between development and planning tools that was present in the more traditional ALM tool stack.
There is hope. First, the benefits of open-source ALM tools are fundamental as the ease with which they allow developers to work makes us happier and more productive. The velocity of successful open-source projects demonstrates how good these tools are at supporting the delivery of high-value software that is responsive to the needs of the community and customer. On the flipside, Enterprise ALM tools provide management and planning facilities which are critical for predictability of delivery as well as the longer-term planning that is necessary for organizations to thrive. These two worlds must be integrated into a cohesive whole, especially as more Agile teams find themselves at the intersection of open source and enterprise ALM.
After I presented my keynote on open source ALM at W-JAX last November, a colleague from one of the world’s largest software companies commented that the same developers that worked on open-source projects were twice as productive as when they worked on closed source projects. We discussed the usual issues of motivation and incentive structure, but nailed down the key issue being the sheer friction generated by traditional ALM tools which has been removed from open source ALM tools. It is time to reconnect the software planning process to a new breed of open source ALM tools that support lean and high velocity delivery, connect them to the planning and management tools needed for software delivery at scale, and bring some of the benefits of open source development to the enterprise.

http://endeavour-mgmt.sourceforge.net/
jabox.org

Friday, April 29, 2011

Install Subversion in Cent OS

  1. Install packages using yum

    yum install subversion mod_dav_svn
    
    
  2. Configure /etc/httpd/conf.d/subversion.conf as you wish.

    LoadModule dav_svn_module     modules/mod_dav_svn.so
    LoadModule authz_svn_module   modules/mod_authz_svn.so
     
    
        DAV svn
        SVNParentPath /var/www/svn
        
           AuthType Basic
           AuthName "Subversion repos"
           AuthUserFile /var/www/svn/htpasswd
           Require valid-user
        
    
     
  3. Prepare the repository.

    mkdir /var/www/svn
    cd /var/www/svn
    svnadmin create myrepo
    chown -R apache.apache myrepo
     
  4. Now we are ready to restart httpd.
    service httpd restart
    
Here we go ....

Wednesday, March 16, 2011

Jira JEMH configuration

Original post here

 

JEMH Installation

  1. Add the JEMH JAR
    Get the JAR specific for your version of Jira from the top of the page and copy to the Jira WEB-INF/lib folder
  2. Add the ldaputils jar (if you use ldap)
    Get the latest ldaputils jar (currently 1.0.13) from the LDAP Util library page, take the example-ldaputil.properties file from the JAR and rename it ldaputil.properties, editing it as appropriate
  3. Setup Logging (optional)
    Modify / copy-and-modify the WEB-INF/classes/log4j.properties , this will enable logging of all EMH messages to a separate file. Default is DEBUG, other values are 'INFO', 'WARN' and 'ERROR'.
    #
    # Create a separate appender
    #
    log4j.appender.EMHFileLog=org.apache.log4j.RollingFileAppender
    log4j.appender.EMHFileLog.File=atlassian-jira-emh.log
    log4j.appender.EMHFileLog.MaxFileSize=20480KB
    log4j.appender.EMHFileLog.MaxBackupIndex=5
    log4j.appender.EMHFileLog.layout=org.apache.log4j.PatternLayout
    log4j.appender.EMHFileLog.layout.ConversionPattern=%d %t %p [%c{4}] %m%n
    log4j.appender.EMHFileLog.Threshold=DEBUG
    
    #
    # add entries for the three EMH packages
    #
    log4j.logger.com.dolby.atlassian.jira.service.util.handler=DEBUG, EMHFileLog
    log4j.additivity.com.dolby.atlassian.jira.service.util.handler=false
    
    log4j.logger.com.dolby.atlassian.jira.service.util.handler.emh=DEBUG, EMHFileLog
    log4j.additivity.com.dolby.atlassian.jira.service.util.handler.emh=false
    
    log4j.logger.com.dolby.atlassian.jira.service.util.handler.emh.processor=DEBUG, EMHFileLog
    log4j.additivity.com.dolby.atlassian.jira.service.util.handler.emh.processor=false
    
    log4j.logger.com.dolby.atlassian.jira.service.util.handler.emh.service=DEBUG, EMHFileLog
    log4j.additivity.com.dolby.atlassian.jira.service.util.handler.emh.service=false
Enabling detailed logging of lower level mail operations in Jira is covered in Logging email protocol details.
What no log file?
Whether working on Windows or Linux, a lack of recently updated atlassian-jira.log and atlassian-jira-emh.log usually means file permissions are at fault....
  1. Make Jira aware of the new handler
    POP / Imap?
    This example shows how to setup with POP, Imap is equally possible, just not documented, to use Imap, reconfigure Dovecot, and instead of modifying .../pop/popservice.xml modify .../imap/imapservice.xml.
    Update WEB-INF/classes/services/com/atlassian/jira/service/services/pop/popservice.xml to include:
    
      com.dolby.atlassian.jira.service.util.handler.CreateOrCommentHandler
      Extendable Mail Handler - CreateOrComment
    
  2. Ensure a valid POP Sever is configured
    This is under Global Settings/Mail Servers. If the virtual mailbox approach is used, only one mailbox needs to be setup, in the example shared@jira.myco.net:
  3. Configure the handler
    Modifiy the two properties files. when done, they should be copied to WEB-INF/classes:
    If you use ldap, the minimum config required is to identify a valid user which is used to validate ldap connections. If not, you don't need this file.
    The EMH config file is just an extension of the properties that a mail handler is given, anything you could put in the Jira UI, you can equally add here. Look at the settings, understand what they do, make changes as appropriate for your needs.
    The contents of the configuration file changes as new features are added and refinements are made, check the 'example-emh.properties' available inside every JAR.
Some example properties are:
projectAutoAssign=true, issuetype=3, configFile=emh.properties

Emh.properties


extract example-emh.properties from jar
unzip filename.jar
rename example-emh.properties to emh.properties
copy emh.properties file are to WEB-INF/classes/

Service Properties:

Service listing after save:

  1. Restart Jira