Wednesday, May 30, 2007

Increasing MaxClients

I noticed that in times of increased activity, my servers weren't responding. Having a look at the logs revealed "server reached MaxClients setting", so I was just stilling in a queue until somebody dropped off the server. Not a great position to be in when your client is shouting down the phone!

So, a quick trip to apache.conf which lives in /etc/apache2 on debian3.1 and a change to the settings.

I've created the following settings for the conf file: each section is part of the IfModule preforc declaration. A quick restart of apache and all is well.

prefork.c:
StartServers 8
MinSpareServers 5
MaxSpareServers 20
MaxClients 256
MaxRequestsPerChild 1000
worker.c:
StartServers 2
MaxClients 256
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
perchild.c:
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0

Using subdomains for plesk login

There is an interesting how-to here for using subdomain login for plesk admin sessions. Normally, you need to login at https://yourdomain:8443 - and lets face it, I kept forgetting the port number when I started using Plesk.

http://alexle.net/archives/152

Tuesday, May 29, 2007

Automatix2

I have just found Automatix2. It is basically an auto-installer for all those pesky programs that don't come with a simple apt-get install. It has a graphical interface not unlike Synaptic, but needs some terminal work to get it installed.
echo "deb http://www.getautomatix.com/apt feisty main" | sudo tee -a /etc/apt/sources.list
Then we need to add the key:
wget http://www.getautomatix.com/keys/automatix2.key
gpg --import automatix2.key
gpg --export --armor E23C5FC3 | sudo apt-key add -
Then all you need to do is update the packages db and install it.
sudo apt-get update
sudo apt-get install automatix2
It appears under:
Applications -> System Tools -> Automatix

It helpfully installs things like:
  • Google Earth
  • Skype
  • Picassa
  • RealPlayer
  • Fonts
  • Opera
  • JRE
  • Multimedia codecs
and the latest versions of many others.

Plesk and Debian disaster

I was doing some server maintenance on one of my servers which houses a Plesk install. The base is Debian and a simple apt-get upgrade, as employed on plenty of previous occasions, updated the packages that needed updating.

Unfortunately, the sources.list for apt were configured to get the latest stable version and Debian 3.1 has recently moved to Debian 4 (etch). Unfortunately, as I have since found, Plesk 8.1 doesn't like etch and despite my best attempts to roll back the changes, all was in vain.

Better still, the admin functions that allow migration of accounts didn't work. So, I was left delving into the mysql psa database to regenerate the installation on another machine before migrating the /var/www/vhosts and /var/qmail/mailnames directories. That of course meant hand creating all clients, domains, email, forwards, aliases, subdomains.......... the list seems endless.

All my servers have now have their sources.list changed to getting 3.1 updates only. I'll not do that again.

Thursday, February 08, 2007

Total Backup problems

I've been hastled by the "do_backup already running" error when using 4PSAs Total Backup. It suddenly struck me that this error might be triggered because the remote system is running a backup when the local system is trying to try connecting for storage.

The other problem I had was exponential growth of the backups - the backups were taking backups of the backups!

You need to assign an exclude path if you put the backups in the /home or /var directories as I initially tried. You can't just put them in root either!

Edit the config file: /usr/local/tbackup/paths.cfg
tar_path /bin/tar
md5_path /usr/bin/md5sum
gpg_path /usr/bin/gpg
exclude_path /boot /dev /initrd /lib /misc /mnt /opt /proc /sbin /tmp /rbackup
include_path
tar_debug_file
log_level LOG_INFO
Well at least I've got the root of that problem now!

Friday, February 02, 2007

LDAP revisited

I revisited the LDAP config this morning thinking that if things didn't work, I'd maybe get some help from Dave who left a message on the blog over night.

I reloaded the base config file for phpLDAPadmin and started to add in server information:
server name: My LDAP server
server host: ldap.server.domain.ltd
server port: 389
server base: dc=server,dc=domain,dc=tld
server auth_type: cookie
Then, login via the browser:
Login DN: cn=admin,dc=server,dc=domain,dc=tld
password: blah
And it worked!

As far as getting thunderbird to find the contact details:
Name: obvious
Hostname: obvious
Base DN: ou=personal,dc=server,dc=domain,dc=tld
Port: 389
Bind DN: cn=admin,dc=server,dc=domain,dc=tld
TBird doesn't list the entries, but it you Shift+F, you can find the entries.
Go back to Options, and under Composition->Addressing, select the Directory server.

The autopopulation of the address fields still doesn't seem to work, but I can search and find my contacts, so things are looking up.

Thursday, February 01, 2007

LDAP and thunderbird

I've always hankered after a central db for contacts. I just hate that going from machine to machine means that I can't have a list of people I email regularly and when a system re-install happens, all that data is lost - it's a pain the proverbial.

I decided that I'd give an LDAP installation a try. Why not install an LDAP server on my local webserver and point all my email clients to that? Hmmm...

UbuntuForums
Linux.com
sudo apt-get install slapd ldap-utils
sudo apt-get install db4.2-util
sudo /etc/init.d/slapd restart
You shouldn't have any errors - if you do... stop and pull your hair out (life shouldn't be this tough).

phpLDAPadmin is a web-based GUI for performing LDAP maintenance.

Well, in the end... after several attempts at setting it up, I finally got some data IN... only to find that I couldn't see it in TBird or Evolution. I need to try this again at some other point in the future. Maybe future Ubuntu releases will make this a trivial task! We can only hope so.