Posts Tagged ‘Linux’

Changing a DB2 server name

If you find DB2 not being able to start because of a server name problem, it most likely is caused by moving a virtual machine and not renaming the DB2 database.

To update DB2 to the proper name:

  1. Stop DB2 as administrator (db2inst user).
    >su – db2inst
    >db2stop
    If there are open database connections, then force them off.
    >db2stop force
  2. Go to the sqllib directory.
  3. Edit the db2nodes.cfg file. The file is usually read-only, so make enable writing first.
    >chmod u+w db2nodes.cfg
    >vi db2nodes.cfg
  4. In the db2nodes.cfg file, rename the existing computer name to that of the new computer name.
  5. Save the file.
  6. Reset the permissions to read-only.
    >chmod u-w db2nodes.cfg
  7. Start DB2.
    >db2start

You should no longer see any error messages about finding the database.

Be the first to comment - What do you think?  Posted by David Dietrich - February 11, 2009 at 3:57 pm

Categories: DB2   Tags: , ,

Slow SSH in Ubuntu

If you are experiencing long delays when connecting to Ubuntu through SSH, this is most likely a protocol issue.

In your SSH_CONFIG file, set:

GSSAPIAuthentication no

Restart the ssh daemon, and you should be quickly connecting to your Ubuntu server from now on.

Be the first to comment - What do you think?  Posted by David Dietrich - February 9, 2009 at 3:50 pm

Categories: Linux   Tags: ,

How to install Subversion with Apache HTTPD

  1. Ensure you have Apache installed on your system.
  2. Ensure you have mod_dav_svn installed:
    > yum -y update mod_dav_svn
  3. Install ssl support to enable https:
    > yum install mod_ssl
  4. Edit /etc/httpd/conf.d/subversion.conf and append the following lines to the end of your config file:

    <Location /svn>
    DAV svn
    SVNParentPath /var/svn
    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile /etc/svn-auth-file
    AuthzSVNAccessFile /etc/svn-serve.conf
    Require valid-user
    </Location>

  5. Create a file called /etc/svn-auth-file
    Assign permission:

    > chown root.root /etc/svn-auth-file
    > chmod 644 /etc/svn-auth-file

  6. Add users to /etc/svn-auth-file (one per line) in the form:
    tom:$apr1$hDMIx…$abctozvZbC9J6/heHBBe481You can use htpasswd to do this automatically:

    > ### First time: use -cm to create the file
    > ### Use -m to use MD5 encryption of the password, which is more secure
    > htpasswd -m /etc/svn-auth-file harry
    New password: *****
    Re-type new password: *****
    Adding password for user harry
    > htpasswd /etc/svn-auth-file -m sally
    New password: *******
    Re-type new password: *******
    Adding password for user sally
    >

  7. Create a file called /etc/svn-serve.conf
    Fill it with:

    [/]
    *=
    svnUser=rw


    The user svnUser is being granted read and write access to all projects, while all other users (*) are being denied access.

  8. Assign permissions:

    > chown root.apache /etc/svnserve.conf
    > chmod 640 /etc/svnserve.conf

  9. Create /var/svn.

    > mkdir -p /var/svn
    > chmod 755 /var/svn

  10. If you are running SELinux, run:

    > chcon -R -h -t httpd_sys_content_rw_t /var/svn
    > setsebool -P httpd_unified=1

  11. You are now ready to being adding Subversion repositories!

Be the first to comment - What do you think?  Posted by David Dietrich - January 31, 2009 at 2:32 am

Categories: Apache Tomcat, Change Management, Linux   Tags: , ,

How to install Virtualmin on Ubuntu Linux

  1. First install Ubuntu 8.04-1 LTS. It’s the only version VirtualMin supports.
  2. Towards the end of the install, Ubuntu will ask what servers you want to add. Only choose OpenSSH server. No apache, bind, ftp, etc. ONLY OpenSSH.
  3. Reboot, login, and get the file install-virtualmin-3.642.sh from the network.
  4. Run >
    sudo sh install-virtualmin-3.642.sh

    and type in your password.

  5. In /etc/hosts, add the following line after any search and/or domain statements (not required), and before any other nameserver statements:
    nameserver 127.0.0.1
    
  6. Login to https://Virtualmin.Your.IP:10000/ and verify the Virtualmin configuration under Virtalmin->System Settings->Re-Check Config.
  7. Edit /etc/dovecot/dovecot.conf and change the following settings:
    disable_plaintext_auth = no

    Find the section –
    auth default {
    –and change mechanisms to at least the following:

    mechanisms = plain login

    At the end of the section–
    protocol pop3 {
    –change/add the following setting:

    pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  8. # edit /etc/default/saslauthd and set OPTIONS like this:
    OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd" 
  9. # run this command as root:
    sudo dpkg-statoverride --add root sasl 710 /var/spool/postfix/var/run/saslauthd
    
  10. # add the postfix user to the sasl group:
    sudo adduser postfix sasl
    
  11. Configure ProFTPd
    In /etc/proftpd/proftpd.conf, chroot users by upcommenting the following line (don’t forget the tilde ~ at the end of the line):

    DefaultRoot                     ~
  12. Reboot

You should now have a working Ubuntu system with Virtualmin fully loaded. Make a clone of this clean system!

Be the first to comment - What do you think?  Posted by David Dietrich - January 24, 2009 at 5:43 am

Categories: Linux, Ubuntu, Virtualization   Tags:

« Previous Page

  • Twitter
  • Facebook
  • LinkedIn