Skip to content

Category Archives: Applications

CVSROOT Environment Variable for CVS-over-SSH

15-Jan-09

When using CVS-over-SSH, set the CVSROOT environment variable as follows: :ext:username@remotemachine:/full/path/to/cvsroot You may wish to use SSH public key authentication and ssh-agent to avoid having to enter your password on the remote machine repeatedly.

Generate a Patch File from CVS

15-Jan-09

To generate a patch against CVS to your current sandbox: cvs diff -uw To generate a patch against a tagged revision (PROD_2005031101 for this example) in CVS to your current sandbox: cvs diff -uw -r PROD_2005031101

Apply a Symbolic Tag to All Files in a CVS Checkout

15-Jan-09

To apply a symbolic CVS tag to all files in your sandbox, do the following: cvs tag PROD_2005050900 where PROD_2005050900 is the name of the symbolic tag you want to apply.

Check a Binary File into CVS

15-Jan-09

Use the -kb flag: cvs add -kb getacro.gif See Version Management with CVS for more.

Export from CVS

15-Jan-09

To export from CVS, resulting in a directory structure with no “CVS” subdirectories, use the cvs export command: cvs export -r PROD_2005100501 webproject PROD_2005100501 is the tag (a datespec following -D can also be used); webproject is the source tree to export.

Running Tar over SSH

15-Jan-09

Running tar over ssh is straightforward: % tar czvf – /home/anl | ssh desthost “cat > home.tar.gz” Other ideas: % tar -cf – /u01 | ssh otherhost “bzip2 -c > /u1/u01-backup.tbz” % tar -cf – /dir | ssh otherhost “cd /newbasedir ; tar -xpf -”

Change a User’s Password in MySQL

15-Jan-09

Log in to the database as root and do the following: mysql> USE mysql; mysql> UPDATE user SET password = password(‘newpassword’) WHERE User=’username’; mysql> FLUSH PRIVILEGES;

Generate a CSR from a Private RSA Key

15-Jan-09

To generate the CSR, do the following: openssl req -new -nodes -key host.key -out host.csr See also: Generating Certificate Signing Requests.

Running Exim in Simulated SMTP Mode

15-Jan-09

To run Exim in simulated SMTP mode, for debugging or configuration testing, use the “-bh” flag: exim -bh 11.22.33.44 The IP address is the address you are simulating the connection from. If you need Exim to do callouts, use the “-bhc” flag: exim -bhc 11.22.33.44

Create a Self-Signed Certificate with OpenSSL

15-Jan-09

To create a self-signed certificate for internal or testing use, enter the following commands: openssl genrsa 1024 > host.key openssl req -new -x509 -nodes -sha1 -days 1825 -key host.key > host.cert