Category Archives: Linux

Arcserve (Brightstor) Linux behind Windows Arcserve R12

We have upgraded a Arcserve (Brightstor) R11.5 to version R12. But behind this one there was install some R11.1 Linux agents. We have been told by CA Support that R12 support R11.1 linux clients. That can maybe be true, but not in our setup. We need to upgraded the R11.1 to R11.5. There is not yet a R12 Agent to Linux out there.

R11.5 can be download from CA Trials page: http://www.ca.com/trials, but remember that you need a R11.5 license.

[ad]

Grep .gz files on linux

I was looking to a method to search a lot of .gz files through. It was some logfiles, you can use zgrep to do this.
Example:
zgrep ‘Search word’ /path/to/yours.gz

So I do this to search a lot of gz files through:
Zgrep ‘130.226.165.XXX’ /var/log/apache2/access*.gz

If you just want to cat a single gz file, you can use zcat.
Zcat /var/log/apache2/access.log.52.gz

Vmware Server 1.0.5-80187 on Ubuntu 8.04

I have some trouble install vmware-mui on my Ubuntu 8.04.

I got it fix, doing this:

ln -s /usr/lib/vmware-mui/lib/libcrypto.so.4 /lib/libcrypto.so.4
ln -s /usr/lib/vmware-mui/lib/libssl.so.4 /lib/libssl.so.4
ln -s /usr/lib/vmware-mui/lib/libcrypto.so.4 /lib/libcrypto.so.4

And after that i edit /etc/init.d/httpd.vmware
And go line 256.

I change so that vmware_exec “Starting httpd.vmware:” vmware_start_httpd is call over 2 lines se above. And also vmware_exec  “Shutting down http.vmware: ” vmware_stop_httpd this i change to 2 lines.

# See how we were called.
case “$1” in
start)
#vmware_exec “Starting httpd.vmware:” vmware_start_httpd
echo “Starting httpd.vmware:”
vmware_start_httpd
;;
stop)
#vmware_exec  “Shutting down http.vmware: ” vmware_stop_httpd
echo “Shutting down http.vmware: ”
vmware_stop_httpd
;;

Debian and build a package from source

I want to build pure-ftpd from source becurs my debian server dosent support capabilities.
So first i download the package:
host:/usr/local/src/# cd /usr/local/src
host:/usr/local/src/# apt-get -b source packagename

Then i change the debian/rules files in the package, so that pure-ftpd not support capabilities. (–without-capabilities)

host:/usr/local/src/# cd pure-ftpd-1.0.21/debian

host:/usr/local/src/#nano rules

Then i compile pure-ftpd.

host:/usr/local/src/# cd ..

host:/usr/local/src/# dpkg-buildpackage -rfakeroot -uc -b

Then I install the pure-ftpd-common and pure-ftpd-mysql

host:/usr/local/src/# cd ..

host:/usr/local/src/# dpkg -i pure-ftpd-common_1.0.21-11.1_all.deb

host:/usr/local/src/# dpkg -i pure-ftpd-mysql_1.0.21-11.1_i386.deb

Apache and Certificate

If you want a sign certificat to use with apache, you need to do this:

openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr

openssl rsa -in server.key -out server.key.insecure
mv server.key server.key.secure
mv server.key.insecure server.key

Mail the server.csr file to certificat trust. Then you get a file back, rename that file to server.crt

Then you need to change this 2 lines, in apache.conf

SSLCertificateFile /etc/httpd/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/ssl.key/server.key

CA BrightStor 11.5 under linux (Arcserve R11.5)

I have tonight install CA Brightstor 11.5, on my Linux servers. I am running Debian so it’s pretty easy; we just need these two files:

/cdrom/cmagent/babcmagt.deb
/cdrom/babagent/babagtux.deb

So it’s just: dpkg –i /cdrom/cmagent/babcmagt.deb
dpkg –i /cdrom/cmagent/babagtux.deb

Then we need to setup the 2 files:
/opt/CA/BABuagent/uagentsetup
/opt/CA/BABcmagt/caagentsetup

Then wee need the agent to start automatic
cd /etc/init.d/
ln –s /opt/CA/BABcmagt/caagent .

Then wee to change something in BABcmagt config fil:
/opt/CA/BABcmagt/agent.cfg
ENV LD_ASSUME_KERNEL=2.4.18
This should be: #ENV LD_ASSUME_KERNEL=2.4.18
update-rc.d caagent defaults
caagent disable all
caagent enable all

If you forget to change this line you get some error about:
12/15 02:47:39(8282) – (_AGBRSpawnSubBrowser), major=11, minor=5 12/15 02:47:39(8283) – (chuid) (root), uid=0, gid=0
12/15 02:47:39(8282) – (_AGBRSpawnSubBrowser): child pid=8283
12/15 02:47:39(8282) – (stcpSend)Failed in send(4), tosnd=8, length=8, Broken pipe
12/15 02:47:39(8282) – (AGBRSendHeader) Failed to send BROWSER_HEADER
12/15 02:47:39(8282) – (_AGBRAppendSubBrowser) Failed in _AGBROpenDir(), ret=-1
12/15 02:47:39(8282) – (_AGBRSpawnSubBrowser): Failed in _AGBRAppendSubBrowser(), ret=-1
12/15 02:47:39(8282) – (uniBrowser) no sub-browser is available

If you are using Ubuntu, please do this also:

If you want to install on Ubuntu (which uses dash as /bin/sh), you need to go through some additional steps.

Go to this page:
http://ubuntuforums.org/showthread.php?t=474790

Download and install getlibs

Right after you dpkg -i the 2 .deb’s, you need to change /bin/sh to /bin/bash in all files in /opt/CA. Then you can proceed as directed above, and all is good.

Thanks to Craig Andrews and Clark Burns, for this Ubuntu trick.

Linux RAID og nye diske

Nå man vil komme en ny disk i sit raid og ens bootloader er grub, skal man huske efter man har tilføjet disken til raidet, at tilføje den nye disk til grup. (Installere grub på den), ellers kan man ikke boote sit system, hvis man står med en defekt disk lige pludseligt, dette gøres ved at man skriver:

Husk evt. at redigere /bot/grup/device.map, så den passer til dit nye setup.

#grub –device-map=/boot/grub/device.map

>> root (hd0,0)
>> setup (hd0)
>> root (hd1,0)
>> setup (hd1)
>> quit

#update-grub

Installation of tinydns and axfrdns. djbdns

This is a small howto in installation of djbdns, with tinydns and axfrdns services.
First install daemontools

mkdir -p /package
chmod 1755 /package
cd /package
wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
gunzip daemontools-0.76.tar.gz
tar -xf daemontools-0.76.tar
cd admin/daemontools-0.76
wget http://djbware.csi.hu/patches/daemontools-0.76.errno.patch
patch < daemontools-0.76.errno.patch
#Ask: /package/admin/daemontools-0.76/src/error.h
#to the question about witch file you want to patch
#
package/install

Now install ucspi-tcp

cd /usr/local/src
wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
gunzip ucspi-tcp-0.88.tar.gz
tar -xf ucspi-tcp-0.88.tar
cd ucspi-tcp-0.88
wget http://www.qmail.org/moni.csi.hu/pub/glibc-2.3.1/ucspi-tcp-0.88.errno.patch
patch < ucspi-tcp-0.88.errno.patch
make setup check

Then install djbdns

cd /usr/local/src
wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
gunzip djbdns-1.05.tar.gz
tar -xf djbdns-1.05.tar
cd djbdns-1.05
wget http://djbware.csi.hu/patches/djbdns-1.05.errno.patch
patch -p1 < djbdns-1.05.errno.patch
make setup check

Global:

useradd dnslog

TinyDNS (DNS Server)

useradd tinydns
tinydns-conf tinydns dnslog /etc/tinydns 1.2.3.5
ln -s /etc/tinydns /service

DNS Cache (DNS Resolv)

useradd dnscache
dnscache-conf dnscache dnslog /etc/dnscache 1.2.3.5
ln -s /etc/dnscache /service

AXFR Server

useradd axfrdns
axfrdns-conf axfrdns dnslog /etc/axfrdns /etc/tinydns 1.2.3.4
ln -s /etc/axfrdns /service

Debian Unstabe NO_PUBKEY

When you run apt-get in Debian Unstable, you can get a error like this:

W: GPG error: ftp://ftp.se.debian.org unstable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 010908312D230C5F
W: You may want to run apt-get update to correct these problems

It can be solved, this way:
gpg –keyserver wwwkeys.eu.pgp.net –recv-keys 010908312D230C5F
gpg –armor –export 010908312D230C5F | sudo apt-key add –
apt-get update

Byt keyid “010908312D230C5F”, med den nøgle du mangler.