Software development, photography, jokes, ....


Sites by me

 
tas-logoTransportation Administration System
snoezelkussen-logo-kleinstSnoezelkussens voor verstandelijk gehandicapten
ikzoekeenbegeleider-logoBegeleiders voor gehandicapten
Laat uw hond het jaarlijkse vuurwerk overwinnen
Betuweroute en Kunst
logo 50x50Hey Vos! Je eigen naam@vos.net emailadres?
Kunst in huis? Nicole Karrèr maakt echt bijzonder mooie dingen
nettylogo2Kunst in huis? Netty Franssen maakt ook bijzonder mooie dingen
Professionele opvang bij Gastouderbureau
Kind-Zijn
Salarisadministratie en belastingadvies bij
De Zaak Loont
Zutphense Bomenstichting

Hosting Favorites

 
ANU Internet Services
XelMedia .internet Services
register.com

Blogroll

 
Bomenstichting
LassoSoft
MacFreak
Quality that computes
The Economy of Motion
Wheel 2.0
IntrAktv



Website Hosting bij Xel Media


Marc's Place


 

[Repair] MySQL Upgrade on Mac OS X

Some time ago I did a MySQL upgrade without thinking ... that was not funny. So I retraced what I did to get the new version up and running and wrote it down as a sequence of steps to follow, when I need to upgrade to the next higher version.

I published these steps on the page [Repair] MySQL Upgrade (Mac OS X) , so they might be of help to you too.
View Comments
 

Apache vhost sort order on CentOS

I’ve written a page on how to control the order of Apache vhosts [on CentOS]. Just for reference.
 
View Comments
 

ProFTPD with MySQL backend

I know there are already many pages about ProFTPD and MySQL, but all info I needed was scattered over the Internet.
Therefore I collected all info I needed and put into one page: Setup ProFTPD and MySQL.
 
View Comments
 

Allow LoginWindow only for some users on Mac OS X Server

Looking for the way to disallow regular users to login via VNC or Apple Remote Desktop?

- Open Server Admin in /Applications/Server/
- Connect to and select your server.
- 10.5 Server: select Settings -> Access
- 10.7 Server: select Access
- Then select Services -> For selected services below -> Login Window.
- Then select Allow only users and groups below on the right, and add yourself and whoever else you want to grant access.

10.5 Server:
Allow LoginWindow for some Users Mac OS X 10.5 Server

10.7 Server:
Allow LoginWindow for some Users Mac OS X 10.7 Server

I have no idea if this method is still present in 10.8 or 10.9 server.
View Comments
 

Daily Script on Mac OS X Server did not clean up /tmp

Lately my /tmp folder was piling up with files (krb5cc*) without any signals that these files were regularly deleted. A bit of googling showed that these come from the Open Directory Server, but that's something I cannot control. So I went to investigate why the daily script would not delete them. I googled a bit again and found out where the parameter file for the daily, weekly and monthly cleanup-scripts is located: /etc/defaults/periodic.conf. There, I found these settings for /tmp :

# 110.clean-tmps
daily_clean_tmps_enable="YES"           # Delete stuff daily
daily_clean_tmps_dirs="/tmp"            # Delete under here
daily_clean_tmps_days="3"               # If not accessed for
daily_clean_tmps_ignore=".X*-lock .X11-unix .ICE-unix .font-unix .XIM-unix"
daily_clean_tmps_ignore="$daily_clean_tmps_ignore quota.user quota.group"
                                        # Don't delete these
daily_clean_tmps_verbose="YES"          # Mention files deleted


The one to look for is where it says "3". This indicates that the routine should clean up old files not accessed for 3 days. But it did not - and the files were not mentioned in the ignore-parameters. Even rm -rf krb5cc* returned immediately an error that its argument list was too long. Therefore I started reading what the exact values for this parameter should be.

Well, it turns out that the value needs a qualification, like d(ays) or m(months), etc.. I found that out by reading /etc/periodic/daily/110.clean-tmps and studying how find uses -atime, -ctime and -mtime and how to add or subtract values. Here are a few find-commands, copied from /etc/periodic/daily/110.clean-tmps, which I tried to make sure that what I just read was right:

$ cd /tmp
$ sudo find -dx . -fstype local -type f -atime +1h -mtime +1h -ctime +1h
$ sudo find -dx . -fstype local -type f -atime +1d -mtime +1d -ctime +1d
$ sudo find -dx . -fstype local -type f -atime +2d -mtime +2d -ctime +2d


Further reading suggested to use override-files, so I sudo'd into vi to create the file /etc/periodic.conf with the following contents:

daily_clean_tmps_days="2d"

Yes, 2 days. Three days is too long for a server, in my opinion. The file's attributes look like this:

marcvos @ ~ $ ls -l /etc/periodic.conf
-rw-r--r-- 1 root wheel 27 Oct 25 16:38 /etc/periodic.conf


Next, delete the file daily.out:

$ sudo rm /var/log/daily.out

Reboot the server. Check your /tmp folder and /var/log/daily.out the next days.

With me, I now finally saw all those files getting deleted.
 
View Comments
 

iperf3: a Network Bandwidth Tester

I was investigating my WiFi access points for improvement and while browsing the web for ideas I came across iperf3. Simple and effective, iperf3 is a tool to measure network bandwidth (read more about it ...)
To simplify installation, I created a MacOS X (Intel) installer package for iperf3 so you do not need to compile yourself.
(download iperf3.pkg)
An Universal Binary Installer Package for MacOS X can be found on NCSA Illinois, although that is iperf2.
(download iperf.pkg)

Simple 1-2-3 Network test:
Install iperf3 on a Mac where you start it as a server: open Terminal and enter the following:
iperf3 -s
Then install it on another Mac and run it as a client: open Terminal and enter:
iperf3 -c 192.168.178.131 -t 60 -P 2
where you must replace this IP-address with yours where iperf3 runs as a server on.

Wait a minute (-t 60) and the results are presented as follows:
Connecting to host 192.168.178.131, port 5201
[ 4] local 192.168.178.13 port 65334 connected to 192.168.178.131 port 5201
[ 5] local 192.168.178.13 port 65335 connected to 192.168.178.131 port 5201
[ ID] Interval Transfer Bandwidth
Sent
[ 4] 0.00-60.00 sec 342 MBytes 47.8 Mbits/sec
Received
[ 4] 0.00-60.00 sec 342 MBytes 47.8 Mbits/sec
Sent
[ 5] 0.00-60.00 sec 321 MBytes 44.9 Mbits/sec
Received
[ 5] 0.00-60.00 sec 321 MBytes 44.9 Mbits/sec
Total sent
[SUM] 0.00-60.00 sec 663 MBytes 92.7 Mbits/sec
Total received
[SUM] 0.00-60.00 sec 663 MBytes 92.7 Mbits/sec

iperf Done.


To stop the server, press CTRL-C.
Enter iperf3 --help  for all possible options.

This suite is also available on iOS: WiFi Bench.
View Comments
 

Virtual host order on Mac OS X Server

I am in the process of converting my website forwarding setup to actual host names (A-records). I was quite reluctant to do this at first, because I could not oversee the consequences and googling didn't reassure me either. But on the LDC09, I talked to Chris who kindly explained to me how easy and unproblematic this actually is. Being a sceptic, I did not start by converting all entries at once, but I do convert one entry per day - when it succeeds.

The first one went wrong already because of my logical thinking as a programmer. I pointed the subdomain name to our Mac OS 10.4 server and setup the site there, putting the default (*) at the bottom. Hey, where is a catch-all entry for!? It belongs at the end, just like with a if/else/end - the last 'else' is the catch-all. But from that moment on, every site landed on my newly created domain, so I quickly swapped the two site entries so that the catch-all was the first one again. Now it worked.

So I made a whole plan : setup a subdomain on one afternoon and check if it works the next morning. This way I set some others up on this 10.4 server and they all work.

Then comes the day I needed to setup the same construct on a Mac OS 10.5 Server. So I deleted the website forwarding entry, created the A-record, created the site on the OS X server, leaving the catch-all at the top and waited until the next morning. The domain name worked all right, but landed on /library/webserver/documents/ (the www-root) instead of the path I put into the site. I have been struggling for two days with this 10.5 server. I checked and double checked, changed the site's path, etc.. Nothing worked, it kept landing on the webroot. And today I thought, what if I swap the site entries and put the default (*) at the bottom (as I did at first on the 10.4 server) and ... it worked! I tested the other sites which have no domain name yet (website forwarding) and they all work ok.

So the order for site entries on MacOS 10.4 Server differs from MacOS 10.5 Server. You can see that in the
sites folder inside the Apache folder (/etc/httpd/ on 10.4 and /etc/apache2/ on 10.5). Sites are loaded by including sites/*.conf and the order is determined by the name of the conf-files (10.5 example):

-rw-r--r-- 1 root wheel 1659 Nov 1 17:12 sites/0000_any_80_my.site.com.conf
-rw-r--r-- 1 root wheel 1857 Nov 1 17:12 sites/0001_any_80_default.conf
-rw-r--r-- 1 root wheel 566 Nov 1 17:12 sites/virtual_host_global.conf


So it seems on 10.5 the catch-all sites are loaded last.
View Comments
 
See Older Posts...
© 1997- Marc Vos (and others) Contact Me