Feeds:
Posts
Comments

Archive for March, 2010

Some times you may have some content that you want small group of people to view it in your application.

The Apache allows you to protect directories with the .htaccess and .htpasswd configuration files so any one request a file from it will prompet a box with username and password.

FIRST we need to make a password file  (should be somewhere not accessible from the web ).

# htpasswd -c /home/.htpasswd demo (this will create the file in home directory)

and it will ask you for a password and confirmation

SECOND go to the folder that you want to protect  Ex(/public_html/project/semsem)

create .htaccess file and place the following:

AuthUserFile /home/.htpasswd -password file

AuthName “restricted area” -description will appear in login screen

AuthType Basic

Require valid-user


and we are done , go to the required path and enter your credential.

note: you will need to AllowOverride directive

Refrences:

Read Full Post »

Delete .svn folder Recursively

We Are Moving Into New Blog ..

Please check the answer in the following link

http://isaber.info/blog/2013/01/16/removing-svn-from-directory-recursively/

Please Accept our apology

 

Read Full Post »

Dimdim is an open source web conferencing , iwas trying last few weeks to build and install the open source version of dimdim.

and it wasn’t that simple to make every thing work probably .

so i like to share this script that i made while i try to build dimdim on on CentOS 5.3

Install JDK6
============
# http://java.sun.com/javase/downloads/widget/jdk6.jsp
# chmod 777 jdk-6u17-linux-i586-rpm.bin
# ./jdk-6u17-linux-i586-rpm.bin

JDK folder at /usr/java/jdk1.6.0_17

Set JAVA CLASSPATH
==================
# nano /root/.bash_profile
# JAVA_HOME=/usr/java/jdk1.6.0_17
# PATH=$JAVA_HOME/bin:$PATH:$HOME/bin
# export JAVA_HOME
# export PATH

MultiLibs(yum)
==============
# yum install gcc-c++
# yum install gdb
# yum install pcre-devel
# yum install libjpeg-devel
# yum install zlib-devel
# yum install libpng-devel
# yum install python-devel
# yum install zlib*

OpenOffice:
===========
Version Required: v3.0
to Check if you have OpenOffice Installed:
# find / -name soffice.bin | grep openoffice | grep program | grep org3

link: http://download.services.openoffice.org/files/stable/3.2.0/OOo_3.2.0_LinuxX86-64_install_wJRE_en-US.tar.gz

Note: if you found Error like this :
libfreetype.so.6 is needed by ooobasis3.1-core04-3.1.1-9420.i586
libgnomevfs-2.so.0 is needed by ooobasis3.1-gnome-integration-3.1.1-9420.i586
libgconf-2.so.4 is needed by ooobasis3.1-gnome-integration-3.1.1-9420.i586

get each lib provider  and install it using yum like this :

# yum whatprovides libfreetype.so.6 , yum whatprovides libfreetype.so.6 , yum whatprovides libgconf-2.so.4
and the install the libraries:
# yum install freetype-2.2.1-21.el5_3.i386
# yum install gnome-vfs2-2.16.2-4.el5.i386
# yum install GConf2-2.14.0-9.el5.i386

CherryPy
========

a) Version Required: v3.1

b) Check if you have CherryPy Installed:

Open a terminal and follow the below steps:

Type python2.4
Type import cherrypy

c) Recomended Install:

Please go to the below URL to download and install CherryPy v3.1

http://www.cherrypy.org/wiki/CherryPyDownload

CherryPy Installation:
Open a terminal and follow the below steps:
a. Download http://download.cherrypy.org/cherrypy/3.1.0/CherryPy-3.1.0.zip
b. unzip CherryPy-3.1.0.zip
c. cd CherryPy-3.1.0 and chmod +x *
d. python2.4 setup.py install

d) Now please follow above mentioned “step 4-b” by opening a new terminal and assure that cherrypy is correctly imported in python2.4 .

Flup
====

a) Version Required: v1.0

b) Check if you have Flup Installed:

Open a terminal and follow the below steps:

Type python2.4
Type import flup

c) Recomended Install:

Please go to the below URL to download and install Flup v1.0

http://www.saddi.com/software/flup/dist/flup-1.0.tar.gz

Flup installation:
Open a terminal and follow the below steps:
a. Download http://www.saddi.com/software/flup/dist/flup-1.0.tar.gz
b. tar xvzf flup-1.0.tar.gz
c. cd flup-1.0 and chmod +x *
d. python2.4 ez_setup.py -U setuptools
e. python2.4 setup.py install
d) Now please follow above mentioned “step 5-b” by opening a new terminal and assure that flup is correctly imported in python2.4

PyCurl
======
#PATH=$PATH:usr/local/bin
#export PATH

#LD_LIBRARY_PATH=/usr/local/lib:/opt/openoffice.org/basis3.0/program/
#export LD_LIBRARY_PATH

a) Version Required: v7.19

Note:-
If you are using CentOS 5.2, You need to upgrade your curl 7.15 to 7.19.
Download curl 7.19 from http://curl.haxx.se/download/curl-7.19.0.tar.gz
untar it tar xzf curl-7.19.0.tar.gz
cd curl-7.19.0
./configure
make
make install

After installing curl you need to make a soft link like
ln -s /usr/local/lib/libcurl.so.4 /usr/lib/libcurl.so.4

c)    for pycurl installation do as follows:

Type
easy_install-2.4 pycurl
cd ..
Type python2.4
Type import pycurl

demjson
=======

a) Version Required: v1.3

b) Check if you have demjson Installed:

Open a terminal and follow the below steps:

Type python2.4
Type import demjson

c) Recomended Install:

Please go to the below URL to download and install demjson v 1.3

http://deron.meranda.us/python/demjson/dist/demjson-1.3.tar.gz

demjson Installation:
Open a terminal and follow the below steps:
a. Download http://deron.meranda.us/python/demjson/dist/demjson-1.3.tar.gz
b. tar xzf demjson-1.3.tar.gz
c. cd demjson-1.3 and chmod +x *
d. python2.4 setup.py install

Setup Python2.5
===============

download from http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tgz
# tar xvzf Python-2.5.2.tgz
# cd Python-2.5.2
# ./configure
# make
# make install

NOTE: BEFORE PROCEEDING FURTHER PLEASE NOTE THAT we need pycurl,demjson,flup,cherrypy modules in python 2.5 also.To
do this follow below steps.It will be using the same cherrypy,flup,demjson,pycurl which you have already downloaded

CherryPy for python2.5
======================
a. Go to the directory where you downloaded the cherrypy package.
# cd CherryPy-3.1.0
# python2.5 setup.py install

check if it installed using.
# python2.5
# import cherrypy

Flup for python2.5
==================
Go to the directory where you downloaded flup

# cd flup-1.0
# chmod +x *
# python2.5 ez_setup.py -U setuptools
# python2.5 setup.py install

check if it installed using.
# python2.5
# import flup

demjson for python2.5
=====================
Go to the directory where you downloaded demjson
# cd demjson-1.3
# chmod +x *
# python2.5 setup.py install

check if it installed using.
# python2.5
# import demjson

pycurl for python2.5
====================
Go to the directory where you downloaded pycurl
# cd curl-7.19.0

Install FCGI
============
download from http://www.fastcgi.com/dist/fcgi.tar.gz
Install through
# ./configure
# make
# make install

libs installed in
/usr/local/lib

Install Corona
==============
download from http://prdownloads.sourceforge.net/corona/corona-1.0.2.tar.gz
Install through
# ./configure
# make
# make install

libs installed in
/usr/local/lib

install ant
===========

/usr/local
# mkdir ant
# wget http://www.trieuvan.com/apache/ant/binaries/apache-ant-1.8.0-bin.zip
# unzip apache-ant-1.8.0-bin.zip

#export ANT_HOME=/usr/local/ant/apache-ant-1.8.0

=============

Prepare Environment
===================
craete directory -ParentDirectory- to hold DIMDIM source code
i called it <webinar>
create direcroty
# mkdir usr/local/Dependencies/Reflector/corona_fcgi_libs
copy libs to it
# cp usr/local/lib/*so* /usr/local/Dependencies/Reflector/corona_fcgi_libs

Create Direcroty tmp – as build dosn’t create it
# mkdir /usr/local/webinar/v4.1/WebApps/ServerII/tmp

# cd <webinar>/v4.1/FCGIApps/Reflector
# vi compile_all.sh

Specify corona and fcgi installed path like

# export FCGI_DIR=/usr/local/lib
# export CORONA_DIR=/usr/local/lib

Now make a directory structure above to v4.1 as shown below

<webinar>
—–v4.1
———-Dependencies
—————Reflector
——————-corona_fcgi_libs

Now do
# cp /usr/local/lib/*so* <ParentDirectory>Dependencies/Reflector/corona_fcgi_libs/

Now try to run Build script
# cd <ParentDirectory>/v4.1/Product/Build/Scripts/SF_RPM_Script/
# ant -f Dimdim_SF_32_v4.5_build.xml build

You can find RPM under RPMS/<architecture> directory
If you build on 32 bit machine, RPM will be under
/usr/src/redhat/RPMS/i386/dimdim-4.5-1.i386.rpm

If you build on 64 bit machine, RPM will be under
/usr/src/redhat/RPMS/x86_64/dimdim-4.5-1.x86_64.rpm

if you can’t find the RPM

go to this path :
/usr/local/webinar/v4.1/Product/Build/Scripts/SF_RPM_Script/Helper/
and run Dimdim-4.5.sh
# ./Dimdim-4.5.sh

Note:
=====
1-you have to remove this folders:
webinar
/BUILD files

2-stop apache service running on port 80….
# service httpd stop

3-Skip OS check
Dimdim-4.5 require CentOS 5.2 … if you want to install it on CentOS 5.3 then have to skip OS check ?
There is a file which check OS “/etc/issue”
# vi /etc/issue
here replace CentOS release 5.3 (Final) to CentOS release 5.2 (Final)

you can run the rmp
#rpm -ivh file.rpm

now go to:
# cd /usr/local/dimdim
# ./Config-ipaddress.pl 123.X.X.X 85

changed IP to XXX.X.X.X and port to 80

and start you dimdim server using
# ./StartDimdim.sh

here now you have your webinar working

FINAL
=====

check this bash file
as there is some variable need to be set so all feature run probably

FINAL (.bash_profile )
======================

#PATH=$PATH:$HOME/bin
#JAVA_HOME=/usr/java/jre1.6.0_18
#export JAVA_HOME

#PATH=$JAVA_HOME/bin:$PATH:$HOME/bin:/usr/local/bin
#export PATH

#LD_LIBRARY_PATH=/usr/local/lib:/usr/lib64:/opt/openoffice.org/basis3.0/program
#export LD_LIBRARY_PATH

#unset USERNAME
==========

here some reference i used when i was deploying this thing 😀

Install DimDim on CentOS 5.3 (Final)

http://help.dimdim.com/forum/showthread.php?t=846

http://blog.svnlabs.com/?s=dimdim

and if there is any questions you comments are appreciated

have fun with dimdim 😀

Read Full Post »

Cakephp cache query

You Can Find the article in the following link:

http://isaber.info/blog/2013/01/19/cakephp-cache-native-query-2/

Read Full Post »