Wednesday, March 28, 2012

openfire is not running - CentOS

Openfire is not running

This question has been Answered.
Hey,

I try to install Openfire on my VPS with CentOS release 5.6 (Final) but for some reason it doesnt start.

# uname -a
Linux server1.xxxxx.xx 2.6.18-028stab091.2 #1 SMP Fri Jun 3 00:02:40 MSD 2011 i686 i686 i386 GNU/Linux

#java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode)

# /etc/init.d/openfire start
Starting openfire:
# /etc/init.d/openfire status
openfire is not running

# /etc/init.d/openfire start

Openfire is already running. Remove /var/run/openfire.pid if you know this to be untrue.

# rm -f /var/run/openfire.pid


# netstat -an | grep 9090

P.S. I have no firewall installed e.g. iptables.


/opt/openfire/logs/nohup.out:
Exception in thread "main" java.lang.OutOfMemoryError

I changed this line in /etc/sysconfig/openfire

#OPENFIRE_OPTS="-Xmx1024m"
OPENFIRE_OPTS="-Xms512m -Xmx1024m"


/opt/openfire/logs/nohup.out:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Help appreciated!

See more help
http://community.igniterealtime.org/message/215863#215863

Saturday, March 17, 2012

How To Check Folder size in Linux

for checking available siz in HD

[root@root]# df -h

for check each folder size

[root@root]# du - sh <directory name>
e.g

[root@root]# du - sh akwal
(akwal is directory name)

Asia cup Match Schedule (2012)


Schedule : Asia cup 2012 : India v Pakistan v Sri Lanka v Bangladesh
DateMatchVenue
11 March 2012Pakistan v BangladeshSher-e-Bangla stadium, Mirpur
13 March 2012India v Sri LankaSher-e-Bangla stadium, Mirpur
15 March 2012Pakistan v Sri LankaSher-e-Bangla stadium, Mirpur
16 March 2012India v BangladeshSher-e-Bangla stadium, Mirpur
18 March 2012India v PakistanSher-e-Bangla stadium, Mirpur
20 March 2012Sri Lanka v BangladeshSher-e-Bangla stadium, Mirpur
22 March 2012FinalSher-e-Bangla stadium, Mirpur

Tuesday, March 13, 2012

block googletalk in squid


vi /etc/squid/squid.conf

acl chat_block url_regex -i  "/etc/squid/googletalk"

http_access deny chat_block

vi /etc/squid/googletalk


#### G-Talk URLS ####
.google.com:5222
.google.com:8000
.google.com:5060
.google.com:5223
.talk.google.com
.googletalk.
chatenabled.mail.google.com

Banish Firewall Addon for IPCop / UNINSTALL BANISH IN IPCOP


Banish Firewall Addon for IPCop :


Banish is an unofficial IPCop Firewall Addon module. It that allows you to simply and completely block IP addresses, ranges of IPs, domains and MAC Addresses at the IPTables firewall level. “Banished” entries are blocked from accessing your network, even if you have vulnerable opened/forwarded ports, and internal clients are blocked from accessing “banished” resources. The versatility of this module is useful for blocking unwanted intruders from gaining access to your network and preventing client-side access to banned external resources such as Peer to Peer networks (ex. Kazaa, WarezP2P, etc.).

Packets from & destined to a “banished” resource are dropped and logged. Logged entries are visible in IPCop’s Firewall Logs. Banish can be configured to silently drop pings

 banish.sidsolutions.net


HOW TO INSTALL BANISH IN IPCOP

Download Banish via this link

copy in /tmp directory
move in /temp  directory
root@ipcop:/tmp # tar -xzf banish1.4.7.tar.gz
Then move Banish directory
root@ipcop:/tmp/banish-1.4.7 # ./install_Banish.sh 


SID Solutions
Solid Innovative Designed Solutions
Providing tomorrow's solutions, today.


Starting Banish 1.4.7 installation 


Checking if files extracted to /tmp....OK!
Checking files.................................OK!
Checking md5sum......................... OK!
Backing up files...............................Done!
Extracting files.................................Done!
Installing system files.......................Done!
Appending to files...........................Done!
Starting Banish...............................Done!
Cleaning up....................................Done!


Banish Installation Complete 


To uninstall, run /usr/local/bin/uninstall_Banish.sh


http://sidsolutions.net

HOW TO UNINSTALL BANISH IN IPCOP 


root@ipcop:/ #   /usr/local/bin/uninstall_Banish.sh 

IPCOP - Reset root password 1.4.21

V 1.4.10
B.2. Loss of the Root Password
If you interrupt the installation or loose your root password, you can recover by booting IPCop in “single user” mode. To do this, attach a monitor and keyboard to your IPCop machine and reboot. During reboot, while the GRUB splash screen is displayed, press the a key. A long command line will appear with the cursor situated at the end. Press the space bar and type the word: 
single
then press the Enter key. IPCop will boot and you will be placed at the command prompt, logged in as the root user. Enter: 
sh-2.05b# passwd
You will be prompted to enter the root password, twice. Next reboot your machine by entering: 
sh-2.05b# /usr/local/bin/ipcopreboot boot,

MORE help
click this link


AND IF YOU WANT ADMIN PASSWORD,


root@ipcop:~ # setup


and reset admin password,



Thursday, March 8, 2012

How to handle tough situations


A boy was born to a couple after eleven years of marriage. They were a loving couple and the boy was the gem of their eyes. When the boy was around two years old, one morning the husband saw a medicine bottle open.

He was late for office so he asked his wife to cap the bottle and keep it in the cupboard. His wife, preoccupied in the kitchen totally forgot the matter.

The boy saw the bottle and playfully went to the bottle fascinated by its color and drank it all. It happened to be a poisonous medicine meant for adults in small dosages. When the child collapsed the mother hurried him to the hospital, where he died. The mother was stunned. She was terrified how to face her husband.

When the distraught father came to the hospital and saw the dead child, he looked at his wife and uttered just five words.

QUESTIONS:
       1. What were the five words?
       2. What is the implication of this story?

ANSWER:
       The husband just said "I am with you Darling"

The husband's totally unexpected reaction is a proactive behavior.
The child is dead. He can never be brought back to life. There is no point in finding fault with the mother. Besides, if only he had taken  time to keep the bottle away, this would not have happened.

 No one is to be blamed. She had also lost her only child. What she needed at that moment was consolation and sympathy from the husband. That is what he gave her.

If everyone can look at life with this kind of perspective, there would be much fewer problems in the world. "A journey of a thousand miles begins with a single step." Take off all your envies, jealousies, unforgiveness, selfishness, and fears. And you will find things are actually not as difficult as you think.

MORAL OF THE STORY
Sometimes we spend time in asking who is responsible or whom to blame, whether in a relationship, in a job or with the people we know. By this way we miss out some warmth in human relationships.