RRD4SAR
praveenmanja | 29 April, 2010 02:29
RRD4SAR
Description: Fetch SAR statistics for a selected day for a selected remote machine and display them graphically. Uses RRDtool (Copyright 1997-2004 by Tobias Oetiker ), SAR command authored by Sebastien Godard & PHP(libssh2).
License: Distributed under GNU GENERAL PUBLIC LICENSE - Version 3
Author: Praveen Kumar K S
Download: rrd4sar

SVN | Write-Thru-Proxy
praveenmanja | 30 December, 2008 06:14
SVN
STACK Design / Install / Configure / Repository Mirroring(write thru
proxy) / Repository Migration(cvs2svn), Repository Browsing(websvn),
Repository Search(gonzui)
Chapter 1. SVN What?
Chapter 2. SVN Why?
Chapter 3. SVN How?
Chapter 4. SVN Stack
Chapter 5. SVN Install Instructions
5.1 Apache for SVN
5.2 Subversion
5.3 Subversion authentication & authorization
5.4 cvs2svn
5.5 SVNSYNC
5.6 REVERSE SYNC
5.7 SYNC AUTOMATE
5.8 WRITE THRU PROXY
Chapter 6. Errors & Resolutions
Chapter 7. WebSVN
Chapter 8. gonzui
SVN Install Instructions | Howto co from mirror and commit to master:
Plan 1) (DISCARDED)
To get the UUID on the master machine:
svnadmin dump -r0 /home/myname/svn/projects | head -n 3 > saved-uuid
Copy the file saved-uuid to the mirror machine and do a
svnadmin load --force-uuid /svnroot/MySubversionIndiaServer < saved-uuid
On client:
svn switch --relocate
svn commit
Plan 2) (IMPLEMENTED) WRITE THRU PROXY
Use Apache(mod_proxy) and SVNMasterURI(available since SVN beta1)
In MySubversionIndiaServer:
Install & enable mod_proxy:
cd /home/myname/svn/softwares/apache-2.2.6/bin
./apxs -c -i
/home/myname/svn-install-scripts/httpd-2.2.6/modules/proxy/mod_proxy.c
/home/myname/svn-install-scripts/httpd-2.2.6/modules/proxy/proxy_util.c
./apxs -c -i /home/myname/svn-install-scripts/httpd-2.2.6/modules/proxy/mod_proxy_http.c
vi /home/myname/svn/softwares/apache-2.2.6/conf/httpd.conf
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
vi /home/myname/svn/softwares/apache-2.2.6/conf/httpd.conf
#SVN 1.5 beta india
<Location /svn>
DAV svn
SVNPath /home/myname/svn/testproject
#SVNAutoversioning on
#ModMimeUsePathInfo on
AuthType Basic
AuthName "Subversion repository"
AuthUserFile
/home/myname/svn/softwares/apache-2.2.6/etc/svn-auth-file
Require valid-user
</Location>
#SVN 1.5 beta us for sync only
<Location /MySubversionAmericaServer>
DAV svn
SVNPath /home/myname/svn/MySubversionAmericaServer
Order deny,allow
Deny from all
Allow from MySubversionAmericaServer # or provide IP
#SVNAutoversioning on
#ModMimeUsePathInfo on
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /home/myname/svn/softwares/apache-2.2.6/etc/svn-auth-file
Require valid-user
</Location>
#SVN 1.5 beta us synced for co only
<Location /CO-from-INDIA-CIN-to-AMERICA/>
DAV svn
SVNPath /home/myname/svn/MySubversionAmericaServer
SVNMasterURI http://MySubversionAmericaServer/svn/
#SVNAutoversioning on
#ModMimeUsePathInfo on
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /home/myname/svn/softwares/apache-2.2.6/etc/svn-auth-file
Require valid-user
</Location>
In MySubversionAmericaServer:
cd /home/myname/apache-2.2.6/bin
./apxs -c -i
/home/myname/svn-install-scripts/httpd-2.2.6/modules/proxy/mod_proxy.c
/home/myname/svn-install-scripts/httpd-2.2.6/modules/proxy/proxy_util.c
./apxs -c -i /home/myname/svn-install-scripts/httpd-2.2.6/modules/proxy/mod_proxy_http.c
vi /home/myname/apache-2.2.6/conf/httpd.conf
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
vi /home/myname/apache-2.2.6/conf/httpd.conf
#SVN 1.5 beta us
<Location /svn>
DAV svn
SVNPath /svnroot/testproject
#SVNAutoversioning on
#ModMimeUsePathInfo on
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /home/myname/apache-2.2.6/etc/svn-auth-file
Require valid-user
</Location>
#SVN 1.5 beta india for sync only
<Location /MySubversionIndiaServer>
DAV svn
SVNPath /svnroot/MySubversionIndiaServer
Order deny,allow
Deny from all
Allow from MySubversionIndiaServer # or provide IP
#SVNAutoversioning on
#ModMimeUsePathInfo on
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /home/myname/apache-2.2.6/etc/svn-auth-file
Require valid-user
</Location>
#SVN 1.5 beta synced for co only
<Location /CO-from-AMERICA-CIN-to-INDIA/>
DAV svn
SVNPath /svnroot/MySubversionIndiaServer
SVNMasterURI http://MySubversionIndiaServer/svn/
#SVNAutoversioning on
#ModMimeUsePathInfo on
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /home/myname/apache-2.2.6/etc/svn-auth-file
Require valid-user
</Location>
Errors & Resolutions
Install errors and resolutions not covered here.
1) During svnsync usage
Error:
svnsync: PROPFIND of '/MySubversionAmericaServer': Could not resolve hostname `MySubversionIndiaServer'
Resolution:
ip instead of hostname
2)
SVNSYNC troubleshooting:
Trouble shooting trailing slases in httpd.conf
I tried Subversion 1.5 Beta1 WebDAV Write-Thru Proxies. Works fine for me.
While compiling SVN 1.5, it complained about few thing(mostly related to Neon
and Swig-Python).. which were resolved after I provided it with latest version of Neon and Swig.
I tried a mirrored(svnsync) setup like:
A -------------> a
b <------------- B
where A,B are masters and a,b are slaves. Later I tried
checkout-from-mirror-checkin-to-master scenario.
Works well. It gave me trailing slash related error.
Resolution:
In master httpd.conf no trailing slash in location directive:
<Location /ABCD>
In mirror httpd.conf has trailing slash in location directive:
<Location /co-from-mirror-cin-to-master/>
SVNMasterURI http://masterhost/ABCD/
..
..
</Location>
Complication of the above setup should be noted first.
On checkout from mirror and checkin to master , this setup does the following.
1) redirect to master
2) cin to master
3) sync to mirror (using svnsync in post-commit wrapper)
Setup involves svnsync, location directive, SVNMasterURI. So this whole slash
thing observation may not be a actual problem at all. I may have gone wrong
somewhere. Anyways.. as I said.. it was resolved with no further problem.
master: noslash
mirror: slash
SVNMasterURI: slash
=OK
master: noslash
mirror: slash
SVNMasterURI: noslash
=svn: Unusable URI: it does not refer to this repository
master: noslash
mirror: noslash
SVNMasterURI: slash
=svn: Server sent unexpected return value (405 Method Not Allowed) in response
to PROPPATCH request for
'/co-from-mirror-cin-to-master!svn/wbl/1e1fafe4-c5f4-48ba-93c3-05646e5b9087/3
master: slash
mirror: slash
SVNMasterURI: slash
=svnsync: Server sent unexpected return value (405 Method Not Allowed) in
response to PROPFIND request for '/ABCD'
SVN | Write-Thru-Proxy | Errors & Resolutions
praveenmanja | 30 December, 2008 05:30
SVN
STACK Design / Install / Configure / Repository Mirroring(write thru
proxy) / Repository Migration(cvs2svn), Repository Browsing(websvn),
Repository Search(gonzui)
Chapter 1. SVN What?
Chapter 2. SVN Why?
Chapter 3. SVN How?
Chapter 4. SVN Stack
Chapter 5. SVN Install Instructions
5.1 Apache for SVN
5.2 Subversion
5.3 Subversion authentication & authorization
5.4 cvs2svn
5.5 SVNSYNC
5.6 REVERSE SYNC
5.7 SYNC AUTOMATE
5.8 WRITE THRU PROXY
Chapter 6. Errors & Resolutions
Chapter 7. WebSVN
Chapter 8. gonzui
Errors & Resolutions
Install errors and resolutions not covered here.
1) During svnsync usage
Error:
svnsync: PROPFIND of '/MySubversionAmericaServer': Could not resolve hostname `MySubversionIndiaServer'
Resolution:
ip instead of hostname
2)
SVNSYNC troubleshooting:
Trouble shooting trailing slases in httpd.conf
I tried Subversion 1.5 Beta1 WebDAV Write-Thru Proxies. Works fine for me.
While compiling SVN 1.5, it complained about few thing(mostly related to Neon
and Swig-Python).. which were resolved after I provided it with latest version of Neon and Swig.
I tried a mirrored(svnsync) setup like:
A -------------> a
b <------------- B
where A,B are masters and a,b are slaves. Later I tried
checkout-from-mirror-checkin-to-master scenario.
Works well. It gave me trailing slash related error.
Resolution:
In master httpd.conf no trailing slash in location directive:
<Location /ABCD>
In mirror httpd.conf has trailing slash in location directive:
<Location /co-from-mirror-cin-to-master/>
SVNMasterURI http://masterhost/ABCD/
..
..
</Location>
Complication of the above setup should be noted first.
On checkout from mirror and checkin to master , this setup does the following.
1) redirect to master
2) cin to master
3) sync to mirror (using svnsync in post-commit wrapper)
Setup involves svnsync, location directive, SVNMasterURI. So this whole slash
thing observation may not be a actual problem at all. I may have gone wrong
somewhere. Anyways.. as I said.. it was resolved with no further problem.
master: noslash
mirror: slash
SVNMasterURI: slash
=OK
master: noslash
mirror: slash
SVNMasterURI: noslash
=svn: Unusable URI: it does not refer to this repository
master: noslash
mirror: noslash
SVNMasterURI: slash
=svn: Server sent unexpected return value (405 Method Not Allowed) in response
to PROPPATCH request for
'/co-from-mirror-cin-to-master!svn/wbl/1e1fafe4-c5f4-48ba-93c3-05646e5b9087/3
master: slash
mirror: slash
SVNMasterURI: slash
=svnsync: Server sent unexpected return value (405 Method Not Allowed) in
response to PROPFIND request for '/ABCD'
3) During cvsus --> MySubversionAmericaServer conversion using cvs2svn
Error:
'/home/myname/cvs/cvsroot/dummy/dummy.txt,v' is not a valid ,v file
Resolution:
It is an empty file(not required) and can be removed during conversion
Checkout from mycvsserver says:
cvs -d :pserver:praveen@mycvsserver:2401/cvsroot co dummy/dummy.txt
cvs server: warning: new-born dummy/dummy.txt
has disappeared
cvs -d :pserver:praveen@mycvsserver:2401/cvsroot co dummy
cvs server: Updating
dummy
U
dummy/dummy.txt
mv /home/myname/cvs/cvsroot/dummy/dummy.txt,v /tmp/junk/
Error:
It is not clear how the following symbols should be converted.
Use --force-tag, --force-branch, --exclude, and/or --symbol-default to
resolve the ambiguity.
'ABCDEF' is a tag in 11111 files, a branch in 111
files and has commits in 222 files
'GEFGEF' is a tag in 333 files, a branch in 1111 files
and has commits in 11 files
Temporary Resolution:
--symbol-default="heuristic"
Error:
Unable to convert a path
'whatever.whatever'
to internal encoding.
Consider rerunning with one or more '--encoding' parameters or
with '--fallback-encoding'.
Resolution:
--encoding=latin_1
--encoding=utf_8
--encoding=utf_7
--encoding=utf_16
--encoding=shift_jis
--fallback-encoding=utf_8
4) After installing svn-python binding in MySubversionAmericaServer.. while executing
python
>>>import svn.repos
Error:
undefined symbol: gss_delete_sec_context
Resolution:
cd /home/myname/svn-install-scripts/subversion-1.5.0-beta1
vi Makefile
#SVN_APR_LIBS = /home/myname/apache-2.2.6/lib/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl
SVN_APR_LIBS = /home/myname/apache-2.2.6/lib/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl -lgssapi
ln -s /usr/lib/libgssapi.so.2.0.0 /usr/lib/libgssapi.so
And make again.
SVN STACK | gonzui
praveenmanja | 30 December, 2008 05:21
SVN
STACK Design / Install / Configure / Repository Mirroring(write thru
proxy) / Repository Migration(cvs2svn), Repository Browsing(websvn),
Repository Search(gonzui)
Chapter 1. SVN What?
Chapter 2. SVN Why?
Chapter 3. SVN How?
Chapter 4. SVN Stack
Chapter 5. SVN Install Instructions
5.1 Apache for SVN
5.2 Subversion
5.3 Subversion authentication & authorization
5.4 cvs2svn
5.5 SVNSYNC
5.6 REVERSE SYNC
5.7 SYNC AUTOMATE
5.8 WRITE THRU PROXY
Chapter 6. Errors & Resolutions
Chapter 7. WebSVN
Chapter 8. gonzui
gonzui:
Install Ruby
echo "Installing Ruby:"
cd /home/myname/svn-install-scripts/
#wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz
tar zxvf ruby-1.8.6.tar.gz
cd ruby-1.8.6
CFLAGS="-m32" ./configure
make
make install
Install BDB
echo "Installing bdb:"
cd /home/myname/svn-install-scripts/
#wget ftp://moulon.inra.fr/pub/ruby/bdb.tar.gz
tar zxvf bdb.tar.gz
cd bdb-0.6.2
make distclean
make clean
ruby extconf.rb
make
make install
Installing Gonzui
echo "Installing gonzui:"
cd /home/myname/svn-install-scripts/
#wget http://nchc.dl.sourceforge.net/sourceforge/gonzui/gonzui-1.1.tar.gz
tar zxvf gonzui-1.1.tar.gz
cd gonzui-1.1
If its a 32bit arch node:
CFLAGS="-m32"
./configure
--prefix=/home/myname/svn/softwares/gonzui
If its a 64bit arch node:
CFLAGS="-m64 -fPIC"
./configure
--prefix=/home/myname/svn/softwares/gonzui
make
make install
Gonzui post installation
cd /home/myname/svn/softwares/gonzui/
cp etc/gonzuirc.sample ~/.gonzuirc
Edit ~/.gonzuirc
:daemon => true,
:http_port => 8081,
:site_title => "My Repository - Code Search",
TO ADD CVS REPOS:
cd /home/myname/svn/softwares/gonzui/bin
cvs -d :pserver:praveen@mycvsserver:/cvsroot login
Example:
./gonzui-import --cvs :pserver:praveen@mycvsserver:/cvsroot dummyproject
TO ADD SVN REPOS:
cd /home/myname/svn/softwares/gonzui/
./gonzui-import --svn http://MySubversionIndiaServer/svn/dummyproject dummyproject
Run gonzui server
./gonzui-server
Run svn updates to gonzui
./gonzui-update
List whats in gonzui
./gonzui-db --list
If added content is to be removed:
./gonzui-remove <>
Set a cron to update repository changes to gonzui
crontab -e
*/1 * * * * /home/myname/svn/softwares/gonzui/bin/gonzui-update
Add startup. Edit /etc/rc.local
/home/myname/svn/softwares/gonzui/bin/gonzui-server
SVN STACK | WebSVN
praveenmanja | 30 December, 2008 05:20
SVN
STACK Design / Install / Configure / Repository Mirroring(write thru
proxy) / Repository Migration(cvs2svn), Repository Browsing(websvn),
Repository Search(gonzui)
Chapter 1. SVN What?
Chapter 2. SVN Why?
Chapter 3. SVN How?
Chapter 4. SVN Stack
Chapter 5. SVN Install Instructions
5.1 Apache for SVN
5.2 Subversion
5.3 Subversion authentication & authorization
5.4 cvs2svn
5.5 SVNSYNC
5.6 REVERSE SYNC
5.7 SYNC AUTOMATE
5.8 WRITE THRU PROXY
Chapter 6. Errors & Resolutions
Chapter 7. WebSVN
Chapter 8. gonzui
WebSVN-2.0:
Requires Apache with php-4.3+
Hence use RHEL default httpd+php installation
Verify php -v
Install,
cd /home/myname/svn/
svn --username=guest co http://websvn.tigris.org/svn/websvn/tags/2.0/ websvn-2.0
Password: Hit enter
cd websvn-2.0
Edited httpd.conf and add proper host:port
<VirtualHost MySubversionIndiaServer:8080>
ServerName MySubversionIndiaServer
DocumentRoot /home/myname/svn/websvn-2.0
SetEnv HTTP_PORT 8080
ErrorLog /var/log/httpd/error_log.websvn
</VirtualHost>
Do an Apache graceful
/etc/init.d/httpd-new graceful
Browse http://MySubversionIndiaServer/doc/install.html
chmod -R 0755 /home/myname/svn/websvn-2.0/cache
cd /home/myname/svn/websvn-2.0/
mv include/distconfig.php include/config.php
Edit include/config.php
Browse http://MySubversionIndiaServer:8080/