Thursday, June 25, 2009

SubVersion Configuration.

SubVersion Configuration:
Machine Config in use:
RHEL4 Update 6 Full install.
apr-9.21 and subversion-1.4.5 rpms to be installed.
cvs2svn-1.5.1-2.el4.noarch.rpm to be installed if there is a need for cvs2svn shift.

Apache Configuration:

<Location /svn>
        DAV svn
        SVNParentPath /export/home/svn
        SVNListParentPath on
        AuthzSVNAccessFile /export/home/authz
        AuthType Basic
        AuthName "Mentor Noida"
        AuthLDAPEnabled on
        AuthLDAPAuthoritative on
        AuthLDAPURL ldap://hostname:389/ou=people,dc=abc,dc=com?uid?sub?(objectClass=*)
        Require valid-user
</Location>

Path Based Authentication (authz File):
[groups]
groupname=user1,user2,user3.................
[Repos:path]
user=perm
@groupname=perm

eg:
[jaguarcvs:/]
abagaria=r

[rtlc:/]
abagaria=

[systems:/]
abagaria=rw

Cvs -> Svn

Importing an Existing CVS Repository to SVN.
cvs2svn -s <path to the new svn repository space> <path to the old $CVSROOT>
eg: cvs2svn -s /export/home/svn/jaguarcvs /export/home/jaguarcvs/CVS
chown -R apache:apache <path to the new svn repository space>


Note:
There should be no binaries checked in along with the source code in the repository.
If there is a repository checked in anyways Please use "cvs admin -kb $FILE" on the binary to correct the format.

Using Subversion:
svn --no-auth-cache <command> - so that authentication is not cached for further use.
svn co - Checkout
svn ci - checkin
svn import directory <path of the svn where directory needs to be added> - To Push in unversioned directory in versioning system.
svn list - listing of the files from the current path.
svn update - freshen up the existing versions.
svn add - adds a file/folder to the repository (pending commit).
svn delete - deletes a file/folder from the repository (pending commit).
svn copy source destination - copyies file/folder from one location to another (immediate).
svn move source destination - moves above.
svn mkdir - same as mkdir a;svn add a
svn status - status of all the files/folders in a prticular folder (relative to there repos copy ).
svn diff - check difference b/w working copy and repos copy.
svn lock - to lock the repos copy of the working file.
svn unlock - to unlock file.

Subversion Administration:
Creation of a Repository:
    cd [parent path for all repositories]
    svnadmin create [new repository name]
    chown -R apache:apache [new repository name]
    cd /tmp
    mkdir tempstruct
    cd tempstruct
    mkdir branches tags trunk vendors
    svn import -m "Initial Repository Structure" http://innvm-svn/svn/[new repository name]
Lock Administrator:
    svnadmin lslocks /export/home/svn/repos:    To view locks.
    svnadmin rmlocks /export/home/svn/repos /filepath : To remove locks from a particular folder/file
Branching:
    svn copy http://svn.example.com/repos/calc/trunk \
http://svn.example.com/repos/calc/branches/my-calc-branch \
-m "Creating a private branch of /calc/trunk."
    

Sunday, September 28, 2008

Marimba Query Builder

I dont know how many of you have faced this problem.

Although Marimba is a very great Inventory mgt. tool; using it to gather out information is very very difficult.

A basic marimba query is some what similar to a SQL query, the first select is the first part of the query and the every other refine query is a nested in select query with it.

Monday, April 7, 2008

Printer Configuration Solaris

Edit /etc/printers.conf file to add all the printers whose queue will be managed by the server.

Eg:

/etc/printers.conf ::
<Printer-name>:\
:bsdaddr=<server-name>,<Printer-Destination>,Solaris:

To start the service use /etc/init.d/lp start

This starts the lpsched process. (For solaris 10 use svcadm enable print/server)

Saturday, March 22, 2008

NIS

DB folder:

/var/yp generally.
Makefile to decide such settings.

/usr/ccs/bin/make <map-name>
/usr/ccs/bin/yppush -v <map-name> #to push maps on desired yp servers.

Friday, March 21, 2008

RHN Registration.

rhn_register Command used to register the license of Linux used to RHN interactively.
rhnreg_ks command used to register non-interactively by using option ahead of command.
eg:
rhnreg_ks --profile=<FQDN> --username=<rhn-user> --password=<rhn-password> --email=<mail for guy who is registering>.


Note Before any RHN registeration use command:

rpm --import /usr/share/rhn/RPM-GPG-KEY.

FlexLM License Documentation

Common Commands used.

lmgrd -c <license_file_name> : To start the License.
lmdown -c <license_file_name> : Stop the Licenses.
lmreread -c <license_file_name> : To reread the License file and update running licenses as required without the need to shutdown the daemon.
lmstat -c <license_file_name> : To see the status of the running License.

PS: It is recommended to run Licenses from a user who doesnt has admin priviledges due to security concerns.

Thursday, March 20, 2008

Cron Configuration

* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)

Tuesday, March 18, 2008

HPUX problems.

Unable to find exisiting shared Library:
Solution: Set variable SHLIB_PATH <path for shared lib folder>.

Monday, March 17, 2008

Veritas Netbackup Unix

Default Installation Directory:
/usr/openv/
Services file :
/etc/init.d/netbackup
Administration Console Binary:
/usr/openv/netbackup/bin/jnbSA
TLD Status: Media being handled by the robots/Tape Library.
Catalog:
DB which stores all the information about all the media and its contents.
Without Catalog Netbackup installation is as gud as new and cant recover anything from the media no matter how old or how new.

Shutdown Procedure:
service netbackup stop
If netbackup process still available on ps command:
/usr/openv/netbackup/bin/bp.kill_all
The above given command helps in killing remainder bp processes gracefully.
If it still doesnt works all hail to kill -9 [:)].

Note: Kill -9 makes netbackup service unstable. Hence advisable to reboot the machine once kill -9 is used.

Media Information (CLI):
bpmedialist
Change Media Expiry List(CLI):
bpexpdate -m <media-id> -d expdate

Media Manager Service:
Sometimes due to some reason (generally disk space issue) Media Manager Service shuts it self down. In such a situation untill the point the problem is rectified and the service is restarted netbackup wont work properly as it wont know which media to load.
Following commands are used to start and stop media manager service efficiently (the commands can also be run with backup going on):
/usr/openv/db/bin/nbdb_admin -stop/start.

Sunday, March 16, 2008

Netapp How To


Volumes Manipulation:-
    1. Creation:
      vol create <name> <aggr> size
      enter the volume path in /vol/rootvol/etc/exports file (normal nfs format)
      exportfs -a
    2. Resize Volume:
      vol size <name> +/- size
Qtree Manipulation:-
    1. Creation:
      qtree create <absolute-path-to-tree>
      exports changes
      exportfs -a
      assign quota for qtree by changing /rootvol/etc/quotas file.
      quota off <volume-name>
      quota on <volume-name>
    2. Checking Netapp usage for particular qtree (Performance):
      qtree stats
User Manipulation:-
    1. Creation:
      mkdir folder in desired volume
      assign quota for user by changing /rootvol/etc/quotas file.
      quota off <volume-name>
      quota on <volume-name>
    2. Resize quota allocated:
      change quotas file
      quota resize <volume-name>
      Note: quota off/on also works but not recommended as requires a lot more processing than resize. Off/on to be done only during creation/deletion.
CIFS Manipulation:-
    1. Creation:
      cifs shares -add <name> <absolute-path-to-share>
    2. Deletion:
      cifs shares -delete <name>
    3. Access Maniputation to CIFS:
      cifs access <share-name> <user-name> rwx
      cifs access -delete <share-name> <user-name>
    4. Terminating all cifs sessions:
      cifs terminate
Checks And Status:-
    1. sysconfig -r
    2. sysconfig -a
    3. fcstat device_map
    4. fcstat link_stat
Snapshot:-
    1. Reserving size for Snapshots of a volume:
      snap reserve <volume-name> <percentage>
      Do Remember that snapshots may end up taking more space than reserved for them.
    2. Number and Scheduling for Snapshots:
      snap sched <volume-name> #week-#day-#hourly
    3. Creation of a new snapshot:
      snap create <volume-name> <snapname>
    4. Deleting a snapshot
      snap delete <volume-name> <snapname>
Snapmirror:-
    1. Status for Snapmirror:
      snapmirror status
    2. Snapmirroring Data from one Netapp to another:
      options snapmirror.access host=hostname,hostname (This options needs to be set on the source filer to give access to the destination to get data).
      snapmirror initialize -S <source filer:vol/qtree path> <destination volname/absolute qtree path>
      eg: napp2> snapmirror initialize -S napp1:vol1 volume1
      The above command will snapmirror vol1 of napp1 to volume1 of napp2
      One thing to remember: the destination volume needs to restricted before the snapmirror is initialized.
      napp2> snapmirror initialize -S napp1:/vol/vol1/qtree1 /vol/volume1/qtree2
    3. Updating the snapmirror:
      Almost same command as initialize
      snapmirror update -S <source filer:vol/qtree path> <destination >
    4. Breaking the snapmirror:
      breaking a snapmirror is necessory to make the the destination data writable with full control. breaking in done on destination filer.
      snapmirror quiesce <destination data path>
      snapmirror break <destination data path>
    5. Releasing snapmirrors:
      Releasing of snapmirrors is important as snapshots take space and keep on growing as the data on the volume keeps on changing. This needs to be done both on source and destination filers & both have different ways of getting done.
      source: snapmirror release vol/qtree dest:vol/qtree
      Destination: a mere deletion of the snapmirror snapshot will do.
      remember once the snapmirrors have been release the snapmirror cant be resumed.
System Status:-

sysstat <update-time-in-seconds>

System Failure Troubleshooting:-


partner: Command given on the node which has taken over to get data of bad node.
options autosupport.doit "messages(normally the case id)": to generate the autosupport.

HPUX Remote Execution Errors

When u run a command in HP-UX u sometimes observe that the command gives a couple of stty errors although when u login into the machine and run the command the same errors dont come.
eg:
rsh hpux ls
stty: unknown error
abc 123 abc.123

rsh hpux
#ls
abc 123 abc.123

The issue between the 2 is that stty works only for interactive login.
So having stty commands in ur profile files (.cshrc/.profile/.login etc) without a interactive login check creates an issue.
Hence keeping a check to see if the login is interactive or not helps.

eg for csh login:

if ( $?prompt ) then
stty erase "^H"
stty intr "^C"
stty kill "^X"
endif

As we can see the if statement helps the check that stty commands are executed only when the login is interactive.

Friday, March 7, 2008

VNC Clipboard Transfers.

Use vncconfig running in background to aid clipboard transfers to and from vncviewer to the host machine.

Thursday, February 7, 2008

Msconfig startup entries

hklm\s/w\ms\shared tools\msconfig

Friday, February 1, 2008

Monday, January 28, 2008

PATH setup command

alias path 'set path = ( \!* $path )'

Put this in ur cshrc. After that u just need to given path ab_path_to_be_added and that path will get added automatically.

Tuesday, January 15, 2008

Solaris Patch Mgt.

patchadd (patch_name) for installing the patch's
patchadd -M (directory_name) (patch-name) for installing multiple patchs
patchrm (patch_name) for removing the patch
patchrm -R (dirctory and patchname ) for removing patch

Tuesday, January 8, 2008

SSH without interruptions

Configuration: Client Side (bangvst3a12l)

Here are the steps you need to do on the computer that acts as the SSH client:

1) Generate your SSH encryption key pair for the b_v3infra account. Press the Enter key each time you are prompted for a password to be associated with the keys. (Do not enter a password.)

[b_v3infra@bangvst3a12l  b_v3infra]# ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key
(/b_v3infra/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in
/b_v3infra/.ssh/id_dsa.
Your public key has been saved in
/b_v3infra/.ssh/id_dsa.pub.
The key fingerprint is:
1e:73:59:96:25:93:3f:8b:50:39:81:9e:e3:4a:a8:aa
b_v3infra@bangvst3a12l 
[b_v3infra@bangvst3a12l  b_v3infra]#

2) These keyfiles are stored in the .ssh subdirectory of your home directory. View the contents of that directory. The file named id_dsa is your private key, and id_dsa.pub is the public key that you will be sharing with your target server. Versions other than RedHat/Fedora may use different filenames, use the SSH man pages to verify this.

[b_v3infra@bangvst3a12l  b_v3infra]# cd ~/.ssh
[b_v3infra@bangvst3a12l  b_v3infra]# ls
id_dsa  id_dsa.pub  known_hosts
[b_v3infra@bangvst3a12l  .ssh]#

3) Copy only the public key to the home directory of the account to which you will be sending the file.

[b_v3infra@bangvst3a12l  .ssh]# scp id_dsa.pub b_v3infra@vistacmsdev:public-key.tmp

Now, on to the server side of the operation.

Configuration - Server Side (vistacmsdev/RHN Server)

Here are the steps you need to do on the computer that will act as the SSH server.

1) Log into vistacmsdev as user b_v3infra. Create an .ssh subdirectory in your home directory and then go to it with cd.

[b_v3infra@vistacmsdev b_v3infra]# ls
public-key.tmp
[b_v3infra@vistacmsdev b_v3infra]# mkdir .ssh
[b_v3infra@vistacmsdev b_v3infra]# chmod 700 .ssh
[b_v3infra@vistacmsdev b_v3infra]# cd .ssh

2) Append the public-key.tmp file to the end of the authorized_keys file using the >> append redirector with the cat command. The authorized_keys file contains a listing of all the public keys from machines that are allowed to connect to your Vistacmsdev account without a password. Versions other than RedHat/Fedora may use different filenames, use the SSH man pages to verify this.

[b_v3infra@vistacmsdev .ssh]# cat ~/public-key.tmp >> authorized_keys
[b_v3infra@vistacmsdev .ssh]# rm ~/public-key.tmp

From now on you can use ssh and scp as user b_v3infra from server bangvst3a12l to vistacmsdev without being prompted for a password.

If it still doesn’t works check for the following thing:

· .ssh folder of the user has 700 permissions.

· .ssh/authorized_keys file should have 600 permissions.

If the above 2 condition are not met the ssh session will automatically go from Mode 3 to Mode 5 in which it will start asking for passwords.

"LI" error on boot

LI error normally comes with Linux machines which are running or previously had LILO as boot enviornment installed on it.

This error comes when the boot loader (LILO) is unable to find the Linux installation.

Check the harddrive boot sequence for this.

Wednesday, December 26, 2007

Vmware Converter.

Hi.

I just tried to use VMware converter to convert a Physical machine (Win NT) to Virtual Machine.

Following issues came up while converting the machine.


Installation Of Converter Agent:
1. While installing thru the manager it give Unknown error while installing agent.
You can also install the agent directly on the machine. In this case you will know what the messages are:
Mostly the errors will be related to folders not having permissions. This is because Agent tries to write all the files using System Account and hence in NT desire System Acc to have write priviledges on the folders.
To see which folder the installation has stopped on start the installer from the command prompt on the machine like the undergiven command:
abc.msi /l install.log
The above given command starts the installation and logs the progress into install.log simulatneously.
2. Once the installation is complete (manual/Automatic) it often happens that the manager tries to start the agent installation again and again.
this is because the agent service is not running as the machine needs to reboot once the agent has been installed. Make sure that the machine is rebooted after agent installation.

Destination Folder:
The Destination folder needs to be accessible from both destination machine, source machine and manager machine. and should have write access permissions for installation.
So best way out of the problem is to give Domain\Anonymous Full controll to it for the time the migration is going on.

While bringing up the machine as well there were some issues as given below:

The machine start but you will not be able to install vmware tools:
Reason for this is that NT doesnt has builtin drivers for IDE cdrom which is probably being used in the OS. Since the drivers not loaded no drive available to vmware to load vmware-tools iso to. A very simple solution is available for this problem. Change the drive to a SCSI drive as drivers for scsi are built in.

The Machine doesnt connects to network in a bridged enviornment:
The issue which I saw in this particular problem was that the machine was on a bridged connection and the bridging service apparently didn't start up when the virtual machine was started.
Just shutdown the virtual machine and restart vmware services for this to resolve.
If it still doesnt works remove the ethernet adapter and create a new one.

Cygwin Not showing right groups.

1. First check whether the group u want to c is the primary group for that user in the Domain. If not Make it the Primary group.
2. Next check whether the local group policies have been updated. Without that Cygwin wont be able to know which group the user is referring to.
3. Remake the passwd and the group files of cygwin using mkpasswd and mkgroup command.
Without this Changed data will not be updated into Cygwin authentications and the error will still remain there.