Archive for July, 2010

SVN with web View — Gentoo Build

Posted in Uncategorized on 22/07/2010 by Undersys

Recently, I’ve found a need to keep track of a lot of documents and configs of devices.
I’ve also had a need to version control some of my documents and code.

I’ve decided to use SVN with WebSVN to view all the configs and documents. To commit I will be using RapidSVN

Under Gentoo when you install SVN server it automatically sets the repository location at “/var/svn” If you want this to be on a separate volume, you’ll need to set up a mount point before the install.

SVN has two DB options :-

  1. FSFS
  2. Berkeley DB

I want to use FSFS, so add the “-berkdb” use flag to your /etc/make.conf
You can find the benefits/weakness of each hear.

I also want to build SVN with Apache, for the SVN DAV.
So make sure /etc/make.conf contains the apache2 use flag
To install :-
# emerge –config =dev-vcs/subversion-1.6.11
# emerge -a mod_python

After the install fix the permissions, as they may be broken.

# groupadd svnusers
# chown -R root:svnusers /var/svn/repos
# chmod -Rf go-rwx /var/svn/conf
# chmod -Rf g-w,o-rwx /var/svn/repos
# chmod -Rf g+rw /var/svn/repos/db
# chmod -Rf g+rw /var/svn/repos/locks

Start the server :-
# /etc/init.d/svnserve start

Lets get apache configured to support SVN
# nano /etc/conf.d/apache2
find the line “APACHE2_OPTS=”
start apache
# /etc/init.d/apache2 start

Install WebSVN
Add use flags “enscript”
# emerge -av websvn

Create a repository
# svnadmin create –fs-type fsfs /var/svn/REPOSITORYNAME

Edit Apache default vhost
# nano /etc/apache2/vhosts.d/00_default_vhost.conf
This will expose all repositories. Add the following:-
<Location /svn>
DAV svn
SVNParentPath /var/svn

Note the above config is very insecure, by default all can read/write and all clients can connect with out auth. For me this is by design as my SVN host is fire-walled off from everything but internal LAN clients.

Edit websvn
# nano  /var/www/localhost/htdocs/websvn/include/config.php
Since I want to expose all my repositories I need to  uncomment and change the following line to set my SVN path :-

Also edit and uncomment  the following line to enable enscript

Itanium 2 , I’ve got one :)

Posted in Uncategorized on 20/07/2010 by Undersys

You may recall this post
I asked the question what was that ugly mashed box was. Well matter of fact its an itanium2, Hp zx2000 workstation. Well was.
I ended up buying this off ebay. Missing everything but case,motherboard,cpu and power supply.

Over the last few months I have been working on converting ugly box into a nice 4ru rack case.
I brought an Antec 4ru case 4U22EPS650 it was cheep and met all the requirements.

To get the Itanium up and running i brought the flowing:-

  • 4gb of ECC, registered DDR1 266mhz, 4x 1gb sticks
  • 1 ATI 7000 AGP video card
  • 2x LSI 1030 based cards (mine turned out to be dell’s)
  • 5x 36gb SCA80 SCSi HDD’s
  • 1x DDS4 tape drive
  • 1x 5in4 SCSi hot swap caddy
  • 1x 6x DVD-ROM/CD-Rom (more on this later)
  • 1x 8mb IDE flash drive

Specs of my Itanium are

1.0ghz itanium 2 “deerfield” low power itanium You can find more at wiki
HP zx200 motherboard  E-ATX, using zx1 chipset with PCI-x and AGP slots.

I brought two Dell LSI21320-IS PCI-X SCSI U320 cards. The reason for two is that the only have one SCSI channel each and given the way SCSI works I did not want to put a slow tape on the same bus as fast disks. You can find the IA64 firmware from LSI. The Zx2000 only supports a very limited range of SCSI cards, as long as the chipset is an LSI 1030 your fine anything else forget about it, it will just beep and flash like a crazy bitch.

The reason for the ATI 7000, is its one of the only cards to meet the following two key items:-
1) Supports OpenVMS
2) Works on a zx2000

The reason for the odd Optical drive is that OpenVMS install media that I have is VERY VERY VERY picky.
To get OpenVMS to boot on the zx2000, You mush have the DVD-rom connected to IDE channel 1(hdd, not optical) using the HDD cable set as Master. Any other setting will fail. The zx2000 has two IDE channels labeled “optical” and “hdd”. Make sure you plug the optical drive into the master port on the “HDD” channel.
Also I had loads of issues with any form of DVD/RW combo drive. I used an old Apple 6x IDE DVD-rom/CD-Rom drive with no issues.

The 8mb IDE flash card is plugged into IDE socket 2 (Optical) and gives me space to load Firmware and EFI tools for pre-boot use. Its more then enough. Why so small ? Its all I need and was free..

The zx2000 was released by HP as a desktop. Lucky for me it comes with a wicked BMC, You can turn it on/off view the console, send TOC read logs and more. All via the serial port regardless of what state the machine is in!
Also its VERY quite.

I currently have running on this machine :-
1) HP-UX 11.23
2) OpenVMS 8.3-1H1
3) Linux, Gentoo
4) Windows 2008 R2
The fifth disk is currently spare.

You can find a full set of images on my flicker
Hear is a quick teaser…

Zimbra OCS on a OpenVZ VPS Server

Posted in HowTo on 11/07/2010 by Undersys

I recently went and brought a VPS from  Basic specs are 2x 2500Mhz CPU cores, 2.5gb guaranteed memory (no burstable).

This should be more then enough I though to run Zimbra OCS after all I have it up and running in a Test VM running on ESXi with only 1gb of memory and 1 cpu core.

What I did not release is that when a Java server process starts up, you can define how much memory it grabs and what size of memory chunks it asks for. Out of the box install of Zimbra optimise’s it self for the total amount of system memory in my case 2.5gb. So when the ZImbra  application stack goes to start on my OpenVZ VPS it comes up with an fail ” Can not create Java Virtual machine, out of memory”

Out of memory wtf!
The Java stack expects to be able to grab a contiguous chunk of memory, in my case 1.5gb. Because of the underlying OpenVZ and the way it handles memory its not possible for a OpenVZ VPS instance to have a contiguous block of memory.
Hence why the JVM was crashing, Originally it was asking for 3x 512mb blocks of contiguous memory.
My VPS could not do this, you could edit the OpenVZ settings to allow bigger “chunks” of memory to be offered up. Since I have no control over this I had to tell Java to ask for more lots of smaller chunks of memory.

If your trying to get around the errors. Do the following.
Commands to type are in italics

1) Install Zimbra but do not start any of the services and or application stack after configuration.

2) Change to the zimbra user and  enter the following commands.
# su – zimbra
# zmlocalconfig -e mailboxd_java_options=”-server -Djava.awt.headless=true -XX:+UseConcMarkSweepGC -XX:NewRatio=2 -XX:PermSize=128m \
-XX:MaxPermSize=128m -XX:SoftRefLRUPolicyMSPerMB=1 -Xms128m -Xmx128m”

# zmlocalconfig -e tomcat_java_heap_memory_percent=5
# zmlocalconfig -e zmmtaconfig_interval=3600
# zmlocalconfig -e zmstat_interval=300
# zmlocalconfig -e mailboxd_java_heap_memory_percent=5
# zmlocalconfig -e mailboxd_java_heap_new_size_percent=5
# zmlocalconfig -e ldap_common_threads=16
# zmlocalconfig -e ldap_common_toolthreads=8
# zmlocalconfig -e ldap_db_cachesize=50000
# zmlocalconfig -e ldap_db_idlcachesize=50000
# zmlocalconfig -e ldap_db_dncachesize=0
# zmlocalconfig -e zimbra_zmjava_options=”-Xms128m -Xmx128m”

# zmprov mcf zimbraMessageCacheSize 5000

Now we need to tune some of the non Zimbra apps, Change back to the root user for this.
Edit the following files
# nano /opt/zimbra/conf/
Edit the folowing
“$max_servers =10” and set it to “$max_servers =2”

# nano /opt/zimbra/conf/my.cnf
Edit/add the following
“innodb_buffer_pool_size =” to “innodb_buffer_pool_size = 144245094”
“thread_cache = ” to “thread_cache = 5”
“max_connections   = ” to “max_connections   = 15”

I’ve now got Zimbra OCS up and running in a VPS. So far its been very stable and preforms quite fine for my work load.

References for the above :-