Tag Archives: Linux

Vmware ESX 3.5 and Dell openmanage

First you need to install:
http://www.vmware.com/download/download.do?downloadGroup=VI-RCLI-U2

This is a vmware Remote CLI tools. Install it on a windows machine.
After you install remember to log out and the log in, else you will get some error about libxml.dll cannot be found.

Then download Dell Openmanage  to the same machine that you install Vmware Remote CLI:

http://support.dell.com/support/downloads/format.aspx?c=us&cs=04&l=en&s=bsd&deviceid=2331&libid=36&releaseid=R251021&vercnt=3&formatcnt=0&SystemID=PWE_R710&servicetag=&os=LIN4&osl=en&catid=-1&dateid=-1&typeid=-1&formatid=-1&impid=-1&checkFormat=true

Put the Vmware ESX into maintaince mode.

Put tar.gz file  onto the ESX Host, and the untar the file, and then install the Dell Openmanage

tar zxfv OM_6.2.0_ManNode_A00.tar.gz
cd openmanage
sh setup.sh

Make sure that the Dell openmanage is install on the ESX.

Check if the Dell openmanage is started

/opt/dell/srvadmin/dataeng/bin/dataeng status if not then start it: /opt/dell/srvadmin/dataeng/bin/dataeng start (This commands should be run at the ESX host)

Enable SNMP in the firewall:

esxcfg-firewall -e snmpd
esxcfg-firewall –openPort 1311,tcp,in,OpenManageRequest

On the windows machine where you have install Remote CLI goto folder: C:\Programmer\VMware\VMware VI Remote CLI\bin

vicfg-snmp.pl –server <ESX Host> –username root -c appmanager -p 5567 -t 10.105.2.129/appmanager

vicfg-snmp.pl –server <ESX Host> –username root -E

If you need to test the SNMP traps you can run this command

vicfg-snmp.pl –server <ESX Host> –username root -T

Pureftpd (Ubuntu / Debian)

Setting up Pure ftpd to run on certains port is very simple.
Log on to you linux box and run this command:

echo “60010 60030” > /etc/pure-ftpd/conf/PassivePortRange
/etc/init.d/pure-ftpd restart

or if you run mysql as a backend

/etc/init.d/pure-ftpd-mysql restart

Now you just need to forward port 60010 to 60030, to you linux box.

Debian packages cpio failes to be updated

If you have some troubles upgrading cpio, it returns this error:

Preparing to replace cpio 2.6-18 (using …/cpio_2.6-18.1+etch1_i386.deb) …
Unpacking replacement cpio …
Replaced by files in installed package tar …
dpkg: error processing /var/cache/apt/archives/cpio_2.6-18.1+etch1_i386.deb (–u npack):
unable to create `./usr/share/locale/ko/LC_MESSAGES/cpio.mo’: No such file or d irectory
Errors were encountered while processing:
/var/cache/apt/archives/cpio_2.6-18.1+etch1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Try to run this commands:

mkdir -p /usr/share/locale/ko/LC_MESSAGES
mkdir -p /usr/share/locale/gl/LC_MESSAGES
mkdir -p /usr/share/locale/ru/LC_MESSAGES
mkdir -p /usr/share/locale/tr/LC_MESSAGES
mkdir -p /usr/share/locale/sv/LC_MESSAGES
mkdir -p /usr/share/locale/zh_CN/LC_MESSAGES
mkdir -p /usr/share/locale/da/LC_MESSAGES
mkdir -p /usr/share/locale/nl/LC_MESSAGES

And then the update should be working just fine

Tweaking mySQL in Debian

This guide is not complete to tweak you mySQL on Debian systems, because a good tweak is depending on what you want to use mySQL to.

Key Buffer:
The key buffer holds the indexes of tables in memory, and of cause a bigger key buffer result in faster row lookups. The bigger this value is the better is it, but preventing swaping. good rule of thumb seems to be to use 1/4 of system memory. key_buffer = 256M

Query Cache:
query_cache_size, as the name say it is the total memory available to query caching. query_cache_limit is the maximum number of kilobytes one query may be in order to be cached. If you set this value to high it will prevent a lot of small query to be cached. Setting it to low will prevent bigger query to be cached.
query_cache_size = 128MB
query_cache_limit = 4MB

Table Cache:
If you application need to open a lot of tables, a important variable is table_cache, it is the number of tables a thread can keep open at the same time.
table_cache = 512

The InnoDB Engine:
Allmost everybody do not use InnoDB engine I mySQL, there are using MyISAM istead. Mysql reserved memory for InnoDB, so you could easy skip this Add skip-innodb to you my.cnf file.

Binary Logging:
If you don’t want to replicate data changes to a second server, and don’t use the binary logging as incredimental backup, you can disable this feature.
Comment out this line:
log_bin = /var/log/mysql/mysql-bin.log

[ad]

Apache and multiple SSL virtual host on same IP address

In standard way, apache only supports one SSL virtual host per IP address, if you want to use different SSL Certificates file. But with mod-gnutls it is possible to have multiple Virtual host with different SSL Certificates file.

Install mod-gnutls in Debian:

apt-get install libapache2-mod-gnutls

Then you need to enable mod-gnutls

cd /etc/apache2/mods-enabled
ln -s ../mods-available/gnutls.* .

Then you need to create the gnutls cache files

touch /var/cache/apache2/gnutls_cache
chmod 700 /var/cache/apache2/gnutls_cache
chown 33.33 /var/cache/apache2/gnutls_cache

And then you need to setup the two virtualhost:

<VirtualHost *:443>
ServerAdmin [email protected]
ServerName v1.dalbjerg.nu
DocumentRoot /var/www/v1.dalbjerg.nu
GnuTLSEnable on
GnuTLSPriorities NORMAL
GnuTLSCertificateFile /etc/apache2/v1/ssl.crt
GnuTLSKeyFile /etc/apache2/v1/ssl.key
</VirtualHost>

<VirtualHost *:443>
ServerAdmin [email protected]
ServerName v2.dalbjerg.nu
DocumentRoot /var/www/v2.dalbjerg.nu
GnuTLSEnable on
GnuTLSPriorities NORMAL
GnuTLSCertificateFile /etc/apache2/v2/ssl.crt
GnuTLSKeyFile /etc/apache2/v2/ssl.key
</VirtualHost>

Then you need to restart apache

apache2cl restart

If it don’t work see at /var/log/apache2/error.log to see any error is reporting there.

[ad]

Opgraderingen til Apache 2 fra Apache 1.3 og danske bogstaver

Jeg har her til aften opgraderet en webserver fra Apache 1.3 til 2.0, herefter var alle danske bogstaver rettet af alle muligt mærkelige tegn.
Dette kan nemt rettes i apache2.conf filen, som ligger i /etc/apache2/apache2.conf (I hvert fald hvis du kører Debian).

Her skal du finde linien:
# AddDefaultCharset ISO-8859-1
Og så rette den til
AddDefaultCharset ISO-8859-15 (Forskellen på ISO-8859-1 og ISO-8859-15 er at € tegnet er med.)

Herefter skal apache genstartes dette gøres med ”apache2ctl restart”

Problems with apt-get in Debian (NO_PUBKEY A70DAF536070D3A1)

I got this error:

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

This can be resolve but typing:
gpg --keyserver wwwkeys.eu.pgp.net --recv-keys A70DAF536070D3A1
gpg --armor --export A70DAF536070D3A1 | apt-key add -

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