Thursday, December 4, 2008

Tuesday, November 11, 2008

SVN setup

# cd /var
# mkdir svn
# cd svn
# mkdir repos
# svnadmin create /var/svn/repos
# ls repos
conf dav db format hooks locks README.txt
==========================================================
# svn import /home/username/Desktop/myproject file:///var/svn/repos/myproject -m "initial import"
Adding (bin) /home/username/Desktop/myproject/filename1
Adding (bin) /home/username/Desktop/myproject/filename2

Committed revision 1.
=========================================================
Decision to use Apache DAV taken - why?
Installed mod_dav_svn-1.3.0-4.2.i386.rpm for fedora5 found at http://ayo.freshrpms.net/fedora/linux/5/i386/RPMS.core as could not locate 2 .so files - mod_dav_svn.so and mod_authz_svn.so

chown -R apache:apache /var/svn/repos
========================================================
cd /etc/httpd/conf.d
cp subversion.conf subversion.conf_11122008
vi subversion.conf
----------------------subversion.conf---------------------

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

#
# Example configuration to enable HTTP access for a directory
# containing Subversion repositories, "/var/www/svn". Each repository
# must be readable and writable by the 'apache' user. Note that if
# SELinux is enabled, the repositories must be labelled with a context
# which httpd can write to; this will happen by default for
# directories created in /var/www. Use "restorecon -R /var/www/svn"
# to label the repositories if upgrading from a previous release.
#

#
# To create a new repository "http://localhost/repos/stuff" using
# this configuration, run as root:
#
# # cd /var/www/svn
# # svnadmin create stuff
# # chown -R apache.apache stuff
#

#
# DAV svn
# SVNParentPath /var/www/svn
#
# # Limit write permission to list of valid users.
#
# # Require SSL connection for password protection.
# # SSLRequireSSL
#
# AuthType Basic
# AuthName "Authorization Realm"
# AuthUserFile /path/to/passwdfile
# Require valid-user
#

#



DAV svn
SVNParentPath /var/svn/repos
SVNListParentPath On

----------------------------------subversion.conf--------------------------------------
service httpd restart
httpd://localhost/repos lists the contents of repos!
Solution:
Instead of SVNParentPath use SVNPath as thereis only one repository!
=========================================================
For Windows authentication
# cp mod_auth_sspi.so /etc/httpd/modules

Sunday, March 16, 2008

Importance of Backup

I have done some blunders by not taking backups or by not taking backups properly.
I will be updating this post to remind myself of my mistakes!
1. While taking backup of /home, because of space constraints, decided to take backup of individual user directories. Did take the backup of all users except my own!! Did not bother to cross check either.

Monday, February 4, 2008

Linux desktop on Windows machine

1. Install Xmanager.
2. Enter following details in "Xstart":
a. Enter Host. (IP)
b. Protocol SSH.
c. User and Password.
d. Command: gnome-session
3. Click the "Run" button.
You should now have the Linux desktop on windows machine!

Wednesday, December 5, 2007

Configure sendmail to forward mails to the default mail server of the network domain

The following configuration settings are for making a sendmail server to forward the mails to the default mail server which actually does the job of sending the mails to the intented recipients.

1. Login as root and make a copy of sendmail.cf and sendmail.mc before proceeding.
cp /etc/mail/sendmail.cf /etc/mail/sendmail.old
cp /etc/mail/sendmail.mc /etc/mail/sendmail.mc.old

2. In sendmail.mc search for "define('SMART_HOST' " and change the line to
define('SMART_HOST', 'ip_address_of_network_server')

3. Next search for "dnl DAEMON_OPTIONS(" and change the line to
dnl DAEMON_OPTIONS('Port=smtp, Addr=127.0.0.1, Name='MTA')dnl

4. Next search for "MASQUERADE_AS" and change the line to
MASQUERADE_AS('mydomain.com')dnl

5. Run following commands:
make -C /etc/mail
yum -y install sendmail-cf
service sendmail restart

6. Test sendmail configuration by typing following command:
mail myemail@email.com The system will prompt for "Subject"
Subject: Hello
Next type the message
Hello World.
Then end the message with a "."(dot).
You should see the prompt now.
Wait for the mail to come in your inbox.
If you receive the mail that means the configuration has been done successfully.

Tuesday, September 4, 2007

Check to do during import of more than one mysql database from a sql script

I did a classic mistake of not checking what the tables were in the database script.
There were mysql system tables like "user".
I realised my mistake after the server was rebooted!