Sunday, June 27, 2010

Compiz fusion icon and Ubuntu 9.04

I tested Compiz fusion on my Ubuntu 9.04 it was awesome.
Ctrl+Left Arrow gives a cube rotating.

To be able to do this on your Ubuntu 9.04 machine

sudo apt-get install simple-ccsm
sudo apt-get install compizconfig-settings-manager


 System - Preferences - CompizConfig Settings Manager


You may need to install fusion-icon from 
System->Preferences->Synaptics Package manager 


then type ccsm on command prompt 
you should get a screen.


Which will ask you preferences for your Desktop background.
You should get such a window




and then go to General in the window select 
General options -> Desktop Size and increase the number of desktops to 4.
Or what ever you wish 
Ctrl+Alt+Left Arrow should give you effect which you can see on my laptop here





Awesome effect.My laptop is Dell Insprion no hi fi graphics and it works cool.


Now to be able to see cube caps

System-->Preferences-->CompizConfig Settings Manager
|
|------->General Options--->Desktop Size tab
|
|-->Horizontal Virtual Size (4 )
|-->Vertical Virtual Size (1)
|-->Number of Desktops (1)

Then to be able to rotate and see cube you need


Ctrl+Alt+Left Click +Drag mouse

Ctrl+Alt+Left Arrow/Right Arrow will switch cube surfaces.


How it looks on my laptop when I press

Ctrl+Alt+Left Click +Drag mouse






References
1) http://answers.yahoo.com/question/index?qid=20090829192510AAe1kvM
2) http://www.unixmen.com/linux-tutorials/linux-tutorials-video-/200-turn-on-3d-compiz-effects-on-ubuntu-904-jaunty-jackalope
3) http://ubuntuforums.org/showthread.php?t=846693
4) http://www.linuxhaxor.net/?p=1458
5)http://ubuntuforums.org/showthread.php?t=490398

Wednesday, June 23, 2010

Installing Red5 on CentOS 5.5 64 bit

Step 1
yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel


Step 2
yum install subversion

Step 3

wget http://www.apache.org/dist/ant/binaries/apache-ant-1.8.0-bin.zip

Use the latest version of ant available

before doing wget check if the above link is actually working.
Using the latest ant version will save your life a lot of errors.
I had n number of errors which went away by using them.
If by the time you read this blog this guide becomes old and new releases are available just Google latest ant apache version and use that.

Guides can become obsolete since with new updates new steps might be needed.

unzip apache-ant-1.8.0-bin.zip

mv apache-ant-1.8.0 /usr/local/ant

Do not do yum install ant or
yum install ant-*
because when I did yum install ant
and tried to execute it got following error
Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the nested "antversion" element


Step 4

export ANT_HOME=/usr/local/ant
ln -s /usr/local/ant/bin/ant /usr/local/bin/ant



Step 5

Check ant version (To make sure ant is working)

ant –version



Step 6

INSTALL Red5
Get latest Red5 :
svn co http://red5.googlecode.com/svn/java/server/trunk red5
Build Red5 :
cd red5
ant prepare
ant dist
Move Red5:
cd ..
mv red5 /opt/red5
OPERATE RED5
cd /opt/red5/dist


Start Red5 (when need or on server reboot):
./red5.sh



Step 7

1. Check if red5 is running:
ps aux | grep red5
2. Go to its folder and shut red5 down:
cd /opt/red5/dist
./red5-shutdown.sh
3. See if it’s still running or not:
ps aux | grep red5
4. Restart it, and also make it output the logs into a file of your choice:
./red5.sh > start.log &
5. Make sure it’s back online:
ps aux | grep red5

Step 8 init script to run at boot
in this case

CREATE INIT FILE

vi /etc/init.d/red5

*create the file and paste the script below than save and close by pressing ESC than typing :wq
Insert Red5 init script

#!/bin/sh
# Startup script for Red5 flash streaming server on RedHat/CentOS (cPanel)
# chkconfig: 2345 95 55
# description: Red5 Flash Streaming Server
# processname: red5

PROG=red5
RED5_HOME=/opt/red5/dist
DAEMON=$RED5_HOME/$PROG.sh
PIDFILE=/var/run/$PROG.pid

# Source function library
. /etc/rc.d/init.d/functions

[ -r /etc/sysconfig/red5 ] && . /etc/sysconfig/red5

RETVAL=0
# above is 0 if you copy paste from this blog and this does not work just replace o above by #zero

case "$1" in
start)
echo -n $"Starting $PROG: "
cd $RED5_HOME
$DAEMON >/dev/null 2>/dev/null &
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo $! > $PIDFILE
touch /var/lock/subsys/$PROG

fi
[ $RETVAL -eq 0 ] && success $"$PROG startup" || failure $"$PROG startup"
echo
;;
stop)
echo -n $"Shutting down $PROG: "
killproc -p $PIDFILE
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$PROG
;;
restart)
$0 stop
$0 start
;;
status)
status $PROG -p $PIDFILE
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
RETVAL=1
esac

exit $RETVAL

Make it executable

chmod a+x /etc/init.d/red5

*usage: /etc/init.d/red5 restart (or start, stop)

Then to be able to see if the script is working or not

use /etc/init.d/red5 start and see in your browser http://IP of server:5080
you should get a red5 working script page.

If you get any problem in executing then probably the copy paste of above script might have given some problem so I have uploaded the script in a text file here on this link
https://docs.google.com/document/edit?id=1dJ40x0mJPaIDXvbMjQQJA6IUBHxhvK2nIYqndFKT1Is&hl=en

Step 9

Always starting at boot Red5
Here is the thread that helped me
http://osflash.org/pipermail/red5_osflash.org/2007-September/015065.html
and steps for this is

Copy the script to /etc/init.d/red5 (chmod 755 red5)

chkconfig --add red5

#start on boot
chkconfig --level 345 red5 on

# usage
service red5 start
service red5 stop
service red5 restart


Step 10
The following is an important blog which helped me for Red5 I modified the script on the blog
init script to run red5 at boot
http://www.chatroulette-clone.com/questions/faq/installing-red5-cpanel/
if some one wants to have a look on it.
Should help them.


References
http://www.videochat-scripts.com/tag/instructions/


http://enbeeone3.com/how-to-install-red5-server-on-centos-5-3

A problem was solved by following thread

http://groups.google.com/group/red5interest/browse_thread/thread/3007c1200fd051ca

Which came as a search result of

http://www.google.co.in/search?q=Class+org.apache.tools.ant.taskdefs.ConditionTask+doesn't+support+the+nested+%22antversion%22+element&hl=en&safe=active&ei=sMwhTK3uL4WWrAebw-XXDg&start=30&sa=N


Instructions available should not be used as it is
http://www.linuxmaza.com/system-administration/howto-install-red5-flash-media-server-in-fedora-11-centos-5-4-redhat/
some steps are wrong

worth checking
http://red5.googlecode.com/svn/java/server/trunk/

init scripts given here interesting
http://wiki.lamsfoundation.org/display/lamsdocs/Installing+a+media+server+(Red5)+for+LAMS
http://red5wiki.com/wiki/Installing_and_running_Red5

Sunday, June 20, 2010

Hooks on Apache,Securing Apache and IPTABLES

http://www.kuzbass.ru:8086/docs/apache_c_mod_perl/79.htm

http://www.linuxdocs.org/HOWTOs/Apache-Overview-HOWTO-12.html

http://perl.apache.org/

http://docstore.mik.ua/orelly/linux/apache/ch15_01.htm

I asked this question here
http://www.gossamer-threads.com/lists/apache/users/385804?page=last

Perl Code for Apache
http://stein.cshl.org/~lstein/talks/perl_conference/apache_api/lifecycle.html

Module writing guide for apache
http://oreilly.com/catalog/9781565925670


Writing Apache Modules with Perl and C


http://press.oreilly.com/pub/pr/1022


97 Things Every Programmer Should Know

http://oreilly.com/catalog/9780596809492?mybuyscid=11816247262&cmp=af-mybuy-9780596809492.IP


CGI Apache
http://docstore.mik.ua/orelly/linux/apache/ch04_01.htm


Introduction in developing Apache modules using C in the UNIX environment


http://articles.techrepublic.com.com/5100-10878_11-1053527.html

Apache as proxy
http://articles.techrepublic.com.com/5100-10878_11-5031574.html?tag=btxcsim



10 things you should do to secure Apache


http://blogs.techrepublic.com.com/10things/?p=477


SolutionBase: 10 tips for securing Apache


http://articles.techrepublic.com.com/2415-7343_11-159903.html?tag=rbxccnbtr1


10 iptables rules to help secure your Linux box


http://blogs.techrepublic.com.com/10things/?p=539&tag=rbxccnbtr1


SolutionBase: Troubleshoot Apache with these tips


http://articles.techrepublic.com.com/2415-10879_11-158866.html?tag=rbxccnbtr1

Configuring Apache to host multiple SSL sites on same IP
http://blogs.techrepublic.com.com/opensource/?p=987&tag=rbxccnbtr1


SolutionBase: Setting up an SSL-enabled Web site with Apache 2.2.4


Getting upto speed with Apache

Interesting links

Monday, June 14, 2010

Preventing DDOS attacks

http://cisco.biz/en/US/prod/collateral/vpndevc/ps5879/ps6264/ps5888/prod_white_paper0900aecd8011e927.html

Red 5 on Ubuntu

http://sandeepghael.com/2009/07/getting-red-5-up-and-running-on-ubuntu-9-04/

Ubuntu KVM

http://www.michaeldolan.com/1030

Modifying apache headers

http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/
http://www.askapache.com/htaccess/using-http-headers-with-htaccess.html

Apache ReWrite Cheat Sheet
http://borkweb.com/story/apache-rewrite-cheatsheet
http://www.addedbytes.com/cheat-sheets/mod_rewrite-cheat-sheet/
Caching Apache
http://www.askapache.com/htaccess/speed-up-your-site-with-caching-and-cache-control.html
Apache variables explained
http://www.askapache.com/htaccess/crazy-advanced-mod_rewrite-tutorial.html

Using rsync correctly
http://www.askapache.com/security/mirror-using-rsync-ssh.html


Regular Expression test tool
http://gskinner.com/RegExr/

Mod ReWrite Forum
http://forum.modrewrite.com/

ReWriteRules
http://www.widexl.com/tutorials/mod_rewrite.html

Authentication with .htaccess
http://www.askapache.com/htaccess/apache-authentication-in-htaccess.html

Search engine friendly redirects
http://www.askapache.com/htaccess/seo-search-engine-friendly-redirects-without-mod_rewrite.html

.htaccess and mod_rewrite along with loop stopping code
http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html


Zope related information
http://comments.gmane.org/gmane.comp.apache.user/91500

Monday, June 7, 2010

Ubuntu many missing keys

gpg --keyserver keyserver.ubuntu.com --recv-keys 2EBC26B60C5A2783 F7D0E1722382D57E 7D2C7A23BF810CD5 4874D3686E80C6B7 6B15AB91951DC1E2 5A9BF3BB4E5E17B5 C5E6A5ED249AD24C 2D79F61BE8D31A30 28A8205077558DD0 E43D207C62D38753 61260473F9D8BC54 6E871C4A881574DE 6AF0E1940624A220 71346C8340130828 5A9A06AEF9CB8DB0 3B22AB97AF1CDFA9 && gpg --export --armor 2EBC26B60C5A2783 F7D0E1722382D57E 7D2C7A23BF810CD5 4874D3686E80C6B7 6B15AB91951DC1E2 5A9BF3BB4E5E17B5 C5E6A5ED249AD24C 2D79F61BE8D31A30 28A8205077558DD0 E43D207C62D38753 61260473F9D8BC54 6E871C4A881574DE 6AF0E1940624A220 71346C8340130828 5A9A06AEF9CB8DB0 3B22AB97AF1CDFA9 |  apt-key add -