Archive for 2011

How to Add the RPMforge Repository in RHEL/CentOS 5

How to Add the RPMforge Repository in RHEL/CentOS 5


How to Add the RPMforge Repository in                            RHEL/CentOS 5

RPMforge is a third party RPM repository for Red HatEnterprise Linux or CentOS. here i am going to     show how to add the RPMforge repository in Red Hat Enterprise Linux or CentOS 5.
Install yum-priorities
yum install yum-priorities
Plugins are enabled in CentOS 5 by default. To make sure that yum-priorities is enabled. Just type following command to check it:-
vi /etc/yum/pluginconf.d/priorities.conf
Download and install package (i386 – 32bit)
wget http://packages.sw.be/rpmforge-release
/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# install the rpmforge yum repo
rpm -Uhv rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# clean up after ourselves
rm rpmforge-release-0.3.6-1.el5.rf.i386.rpm
Download and install package (x86_64 – 64bit)
wget http://packages.sw.be/rpmforge-release/
rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
# install the rpmforge yum repo
rpm -Uhv rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
# clean up after ourselves
rm rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
Set priorities
Edit the .repo files in /etc/yum.repos.d/ by adding
priority=N #Note: N is an integer number from 1 to 99
vim /etc/yum.repos.d/CentOS-Base.repo
[base], [addons], [updates], [extras] ... priority=1
[centosplus],[contrib] ... priority=2
vim /etc/yum.repos.d/rpmforge.repo
[rpmforge]
priority=10
Final step, install  DAG GPG key
wget http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
rpm --import RPM-GPG-KEY.dag.txt
rm RPM-GPG-KEY.dag.txt




------------------------------------------------------------------------------------------------------------------------


FEED



Share












SUPPORT US












VISIT COUNTER !!





Installing Tomcat 6.x on CentOS 5

             

Installing Tomcat 6.x on CentOS 5


UPDATE: This post was revised to work with java6u10 and now includes instructions for automated startup config.
FYI: if you used this post before 11/06, there have been some major changes to the start up script. This new version is the most basic and easiest.
This is a quick and dirty guide for installing Apache Tomcat 6.0.18 on CentOS5. It is based on detailed instructions for CentOS 4 and tomcat 6.0.13 here. If you get no luck, please check out this link for comprehensive explanation and adopt it to your platform.
Install pre-requisite
1. Download java JDK 6 Update 10 and Java Runtime Environment (JRE) 6 Update 10 bin (NOT RPM)

2. Open terminal, su to root and move downloaded files to /root directory
$ su root
Password:
# mv [.....]
3. Create java environment
# mkdir /usr/java
# cd /usr/java
4. Execute downloaded jdk and jre bins.
# sh /root/jre-6u10-linux-i586.bin
# sh /root/jdk-6u10-linux-i586.bin
5. verify install
# ls
you should see that your /usr/java directory now contains jdk1.6.0_10 and jre1.6.0_10 directories
Install overview
1. Download and extract Apache Ant (apache-ant-1.7.1-bin.tar.gz) to /usr/share
# cd /usr/share
# tar -xzf apache-ant-1.7.1-bin.tar.gz
2. Download and extract Apache Tomcat (apache-tomcat-6.0.18.tar.gz) to /usr/share
# tar -xzf apache-tomcat-6.0.18.tar.gz
3. Enable ant link
# ln -s /usr/share/apache-ant-1.7.1/bin/ant /usr/bin
4. Set up JAVA_HOME $env in catalina.sh
# cd /usr/share/apache-tomcat-6.0.18/bin
# vi catalina.sh
5. After the first line, add following
JAVA_HOME=/usr/java/jdk1.6.0_10
6. Test config with Tomcat
# cd /usr/share/apache-tomcat-6.0.18/bin
# ./startup.sh
7. Check logs for errors
# less /usr/share/apache-tomcat-6.0.18/logs/catalina.out
8. Fix errors if any. Go to http://localhost:8080 for Tomcat's web interface.
Automate start up
1. Create script in /etc/init.d for automated start up/shutdown
# cd /etc/init.d
# vi tomcat

2. Place following in the file
#!/bin/bash
# chkconfig: 234 20 80
# description: Tomcat Server basic start/shutdown script
# processname: tomcat
JAVA_HOME=/usr/java/jdk1.6.0_10
export JAVA_HOME
TOMCAT_HOME=/usr/share/apache-tomcat-6.0.18/bin
START_TOMCAT=/usr/share/apache-tomcat-6.0.18/bin/startup.sh
STOP_TOMCAT=/usr/share/apache-tomcat-6.0.18/bin/shutdown.sh
start() {
echo -n "Starting tomcat: "
cd $TOMCAT_HOME
${START_TOMCAT}
echo "done."
}
stop() {
echo -n "Shutting down tomcat: "
cd $TOMCAT_HOME
${STOP_TOMCAT}
echo "done."
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 10
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
esac
exit 0

2. Change permissions
# chmod 755 tomcat
3. Add script to system services
# chkconfig --add tomcat
4. Verify modifications (this script uses levels 2-4)
# chkconfig --level 234 tomcat on
# chkconfig --list tomcat
you should see that service using levels 2, 3 and 4:
tomcat 0:off 1:off 2:on 3:on 4:on 5:off 6:off
5. Test script start up/shutdown
# service tomcat start
# service tomcat stop

So, at this point, tomcat service will start automatically upon reboot. G'luck

-------------------------------------------------------------------------------------------------------------
FEED













SUPPORT US












VISIT COUNTER !!





Installing Java and Apache Tomcat in your CentOS / Redhat Server

Installing Java and Apache Tomcat in your CentOS / Redhat Server

Steps :

Installing Java SDK

Step 1: SSH into the server using the following command
ssh –X root@ip-address-of-server
Then provide the root password. Please note that you need to use the root (admin) account itself, since you need super-user privileges to install applications in the server.

ssh to linux server

Step 2: Install jpackage-utils in the server using
yum install jpackage-utils

You can also get the packages (using wget) from http://www.jpackage.org/ and install them manually.

installing jpackage

This will automatically pull the packages from the repository and install them Smile

java-utils

Step 3: Now we are going to install the Java SE Development Kit 6u22 for Linux. You may check this site to find whether this is latest version or not.
Since I’m going to use wget, I need a direct link to download the package.You can grab the package from here


http://techblog.googlecode.com/files/jdk-6u22-linux-i586-rpm.bin

Now use wget and pull this package to your server.

downloading java sdk from techblog project site

Step 4: Once it has been downloaded directly to the server, change the permissions accordingly as shown below:
chmod +x package-name.bin



Now issue the following command and verify that Java has been installed properly.
java –version

verifying java installation

Installing Tomcat

Since Apache Tomcat is available in the repository, you can use the install command for installing it:
yum install tomcat*

This will install the server.

installing tomcat using yum

But in my case, it installed tomcat5 – which is an old version. The new version has a better memory management utility. So I had to remove the installation Sad smile
remove yum 

removing tomcat

Installing Tomcat6 manually

As of today the latest version is 6.0.29. So we use the wget utility and download the package from the server:
wget http://apache.mirror.testserver.li/tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.tar.gz

Please note that it is better to download this file to the /opt directory. (You can do this either by ‘cd-ing’ to the directory before issuing the wget or moving the file to /opt once the file has been downloaded).

installing tomcat manually

Now untar the tarball using
tar –xvfz tarball-name.tar.gz

This will extract the items in the tarball and now you need to go to the bin directory in the extracted directory and run the startup.sh script. That’s it!
Now go to localhost:8080 (you may use Lynx for this) and verify that tomcat is running:
lynx
press g
enter “localhost:8080”

tomcat - using lynx

NOTE: Now you can try it at ip-address-of-server:8080. Please note that sometimes the datacentre may not have opened the port 8080. In my case, since Nazdrovia is using Planet Inc as the datacentre for providing the frontend and Amazon EC2 as backend, I had to ask them to open the port. So if you are getting a ‘server not found’ error, it is due the firewall – you may ask the datacentre to open it.

Starting Apache Tomcat during bootup

It is hard to run the start-up script manually every time you restart the server. So you may add the location of the script to
/etc/rc.d/rc.local
 
And it will be executed automatically every time you boot the system.
Please note that if you are using a Debian based distribution, then the location of the above mentioned file is at:
/etc/rc.local
 
Admin and Manager roles You need to assign admin and manager roles to the tomcat users in order to manage web apps using a web based interface. (Please note that if you put anything in the web-apps directory of the server, it will be deployed automatically).You can do this by going to the new folder you created by extracting the tarball and editing the tomcat-users.xml file (/conf/tomcat-users.xml).
nano tomcat-users.xml

Now you need to add the following lines to that xml file:



Please note that you have to change the default passwords of the existing users due to security reasons. Once you have done that you can login to the admin and manager pages :
ip-address-of-server:8080/admin

tomcat web app admin

ip-address-of-server:8080/manager

tomcat web app manager


Managing the service

You can start or stop the tomcat service using the following commands:

/etc/init.d/tomcat6 start
/etc/init.d/tomcat restart
/etc/init.d/tomcat stop


Have fun and enjoy!




FEED













SUPPORT US












VISIT COUNTER !!





Google Plus vs. Facebook

Google Plus vs. Facebook

Google’s social network finally takes shape as Google+ and looking back at Google Wave and buzz we are happy to see that Google had its homework well done.
Disclaimer: Most reviews of Google+ are desperately vague and written by authors who haven’t actually used it. I got to spend nearly 12 hours with it and finally created an opinion of my own, views expressed here are unbiased and to the point.
Note: Checkout official demos of Google+.

What Google Plus is about:
Its a Social network built by taking Facebook as the platform base, and building all new interface and features on top of it. Google Plus integrates almost all major Google services into one place pretty nicely.

What Google Plus is Not:
Its not an instant Facebook killer. Google plus is far from complete on features, but just like facebook, it would gain over time and eventually beat facebook, provided Google doesn’t suck at marketing this time.

Google Plus – Initial impressions
Google has learnt a lot from Buzz mistakes and technical advancements of Google Wave. The combined experience must have been a shocker for the management that actually lead to a new approach to next generation Social network built entirely on HTML5.




On the first look, Google+ looks cleaner, snappier and more intuitive than Facebook. And after having it used for nearly a day, the opinion has grown stronger. Every part of the user interface is faster than Facebook, and yet better on eyes. Searching for people, for instance, is super fast. Think of people search as Google Instant for Social.
Lets go deeper into various interface components of Google Plus Project:

Circles:
All your social contacts happily reside inside Circles. Circles give you a very graphical representation of your contacts grouped into “geometric circles” each belonging to different categories like Family, Friends, Co-workers, etc. Organizing contacts is among the easiest you could find on a web application, thanks to HTML5. Finding & Dragging multiple contacts into circles is fun. It took me couple of minutes to organize all my contacts.



Sparks:
What excites you? With Sparks, Google is trying to capture the market of “topic based following”, the ones that are already popular with Quora or, #hashtags of twitter. You can now follow topics of your interest from around the web with a click of a button. This is not Facebook pages or groups by any sort, these are plain meta tags, and the returned results are site agnostic.



Hangouts:
This is something Skype is already jealous of and Facebook would hate in the future. Live video collaboration for upto 10 people is now actually possible using Hangouts on G+. You chat and have live audio/video stream like never before.

Notifications:
Just like Google got notifications right in Android, they can’t go wrong in Google+. Notifications are clean, interactive and are placed in the upper right corner of the navigation bar.



The notifications are visible across all google sites, and come handy. For Instance when you receive a comment on one of your posts, you can click and bringdown a dialog which actually lets you comment inline without having to navigate away from the page you are currently on. Facebook forces you to goto the page and of course doesn’t notify anywhere other than its own site.



Apart from that, Google+ can send email and sms notifications for almost all sorts of events that you choose to.

Photos:
If there is feature I’ve to chose that I love the most, photos would be it. With the Picasa integrated into Google+, you can’t really go wrong. Photos on Google+ are more like Picasa on steroids, its fast, nifty and intuitive. Unlike Facebook where you only see photos of a limited size and resolution, Google+ takes it to near fullscreen placing the comments nicely along the side bar and a slideshow at the bottom.



Whats more is that you can edit photos and give some easy touches using the inbuilt photo editor, thanks to the Picnik acquisition.



If you like photography, you would love upgrading from Facebook to G+.

The Mobile app:
The Android Google+ app is one pof the best apps I’ve seen on android or iPhone. The interface is slick and smooth. Its powerful yet easy. You can quickly jump between the circles, profile, photos, and share new stuff with a click of a button.



You even get to see the buzzword around your place under “near me” sliding tab.
Camera photos are automatically uploaded to a private album which can later be shared on Google+ streams of your choice.
iPhone users are pretty much out of luck till apple approves the Google+ app. Meanwhile, web app should satisfy the tastes.

Verdict: Google plus Vs. Facebook
Google + has done a good job at rethinking Social networks. We need webapps that take full advantage of our modern browsers that are capable of HTML5 and great graphics, animations. Facebook has started to go there but Google+ has already attained it.
Google+ is short on features, at least for now. What I miss on Google+ is Fan Pages for business, websites. Facebook pages are great for attracting millions of fan following. I don’t know if its even on Google’s Todo list or not, but we definitely miss it.
Other than that third party API, and applications are not yet available. To stay in market Google would have to push them soon enough. With release of API, we would start seeing 3rd party apps building Google+clients & start integrating other webapps, native apps with Google+. Applications is other part of the story, Facebook users love playing games and other time killing applications. May be google integrates it with Chrome Webstore or something else to make apps possible, but it would be a must.
We don’t believe Google+ would be a Facebook killer instantly, even though its better. The point to consider is that Facebook is 700million users strong, it would take a year or move even if all of them start thinking about it.



FEED













SUPPORT US












VISIT COUNTER !!





How to setup FTP in windows


How to setup FTP in windows

Setting up FTP Tutorial

Welcome to my 1st Windows XP tutorial on how to set up FTP. Because this is such a short process to set up FTP and get it running,
I’ve found that though having FTP right in the “My Network Places” is a fast way to access your website via FTP, when you want to upload or download something that is not very small, it takes a very long time. But with FileZilla, those kind of files are much faster, and that we will include in our next tutorial. Maybe you prefer opening up FileZilla and don’t consider it slower than the “My Network Places”.

Let’s start.
Part 1. Enabling My Network Places to Always Show Up
First, to get FTP in Windows XP, lets activate the “My Network Places” and set it up so that it always appears in the Start Menu.Right-click on your start button and then select “Properties”.

Tutorial How to setup FTP in windows 1

And yes, for you observant folk, I keep my taskbar (where the start button, quick launch, time, etc. is at) on the left because I use a widescreen laptop…It took a while to get used to it but you might want to try it out if you’re using a widescreen computer. It saves valuable vertical space on your screen which you need for cool things such as CAD programs, word, or of course – our favorite Photoshop.

Anyway, press “Customize” (see screenshot below to see what I’m talking about).

Tutorial How to setup FTP in windows 2

Click on the “Advanced” tab.



Scroll down for the check box next to the “My Network Places” and check it. Then, click OK and OK again at the other window.

Tutorial How to setup FTP in windows 4

And now, the “My Network Places” should be in your start menu…hopefully, if you’ve done everything right (right as in you put the check in the check box next to “My Network Places”).

Tutorial How to setup FTP in windows 5

Part 2. Actually Setting it Up
Open up “My Network Places”. On the left, right under where it says “Network Tasks”, there is an option, “Add a network place”. Click it.

Tutorial How to setup FTP in windows 6

Click “Next”, select “Choose another network location”, click “Next”. Finally, on this page, in the text box labeled as “Internet or network address”, simply type in your ftp address. For example: ftp://koldfyre.enhacker.com

Tutorial How to setup FTP in windows 7

Then, just click “Next”.

Uncheck “Log on anonymously” and then enter your user name. And…click “Next”.

Type a name…For example: “name”. And once more…click “Next”.

And…click “Finish”.

There…you’re done. Now to access this FTP location, you simply need to go to “My Network Places” and then double-click on your FTP folder.

Thats all.





FEED













SUPPORT US












VISIT COUNTER !!







ROHIT PATEL