Archive for the ‘Tips’ Category

Configuring Big Brother as a Solaris 10 Service

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org  mkdir /var/svc/manifest/application/monitoringcreate the /var/svc/manifest/application/monitoring/bigbrother.xml file.  contents of bigbrother.xml (change directories, user, group, and stop/start                            script paths to fit your install):---------------------------------------------------------------------------------  <?xml version='1.0'?><!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'><!--    bigbrother.xml : BigBrother manifest, Kyle Reynolds    2006-07-02--> <service_bundle type='manifest' name='bigbrother'><service name='application/monitoring/bigbrother' type='service' version='1'>     <single_instance />    <dependency      name='multi-user-server'      grouping='require_any'      restart_on='error'      type='service'>      <service_fmri ...

Configuring Big Brother Tests for Miscellaneous Processes

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org   On the machine running the process you wish to test for, create a script in the $BBHOME/ext directory following the example script below.  Change the `PROC_1` variable to reflect the process you will `grep` for and the `BBPROG` variable to reflect the name of the ...

Start Iplanet Without Password Prompt

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org If Iplanet (Sun One Webserver) has security turned on (in the magnus.conf) it will prompt for a password to start the webserver. In cases where you might script the starting of Iplanet, you might want to provide the password, but not be prompted every ...

Rotate Iplanet Logs

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org To force daily rotation of Iplanet (Sun One Web Server) logs, add the following line to magnus.conf: Init fn=flex-rotate-init rotate-start=0000 rotate-interval=1440 where the rotate-interval is in minutes, 1440 being 24 hours. Restart Iplanet. "access" and "errors" logs will be rotated every 24 hours and named as such: -rw-r--r-- ...

iPlanet Generate Server Key from Command Line

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org Iplanet (Sun One Webserver) requires a server certificate to boot if you turn security on (to require a password to boot). This is commonly done through the admin console, but can also be done on the command line. This example uses Sun One Webserver ...

vi Reference

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org vi reference ------------ Editing commands Moving around the file h  cursor left     j  cursor right k  cursor up       l  cursor down ^  & B    Beginning of line  $         end of line )     Next sentance (     Previous sentance }     Next Paragraph {     Previous  Paragraph :$   end of file w    one character forward W    one word forward :20  go to Line ...

Trusted Authentication with openSSH

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org Trusted authentication with OpenSSH 1. Change directory to the .ssh (hidden directory) located under your home directory, or create it (mkdir -m 755 ~/.ssh). 2. Create the necessary 1024 bit public and private keys for type dsa, version 2, of ssh (-t dsa).                     ssh-keygen -t dsa -b 1024 3. ...

Solaris SED add delete replace

Tuesday, August 7th, 2007

Tip courtesy of Kyle Reynolds at http://www.camelrichard.org SED add/ delete/ replace ------------------------ sed -f <scriptname> <filename>  # runs the scripted commands against the <filename> example: sed -f deletescript myfile.ldif sed -f addscript newfile.ldif or from command line: sed '/<searchstring>/d' filename ----------------------------------------------------------------------------------- ----------------------------------------------------------------------------------- deletescript: # deletes any line containing <searchstring> /<searchstring>/d ------------------------------------------------------------------------------------ addscript: # adds the <newline entry> above any line containing <searchstring> /<searchstring>/i\ <newline entry> ------------------------------------------------------------------------------------ addscript: # adds the <newline ...

Unix Reqular Expressions Reference

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org Regular Expressions Reference Sheet ----------------------------------- Ctr     Definition                                                      ---     ----------                                                      ^       The pattern has to appear at the beginning of a string.         $       The pattern has to appear at the end of a string.               .       Matches any character.                                          []      Bracket expression. Matches one of any characters enclosed.     [^]     Negates a bracket expression. Matches ...

Unix grep Command Notes and Examples

Tuesday, August 7th, 2007

 Tip courtesy of Kyle Reynolds at http://www.camelrichard.org grep command notes and examples ------------------------------- grep [options] 'pattern' [file ...] Option  Description ------  ----------- -i      Ignore upper/lower case distinction. -n      Print matched lines and their line numbers. -c      Print only a count of the matching lines. -l      Print names of files with matching lines but not the lines. -h      Print matching lines ...