Apache 2.4 on Debian

ns1 got converted to 64-bit, and upgraded to Jessie. It’s been a little painful, but worked for the most part.

1) The biggest thing was installing core packages with :amd64 such that we were never left without dpkg nor apt.

2) PERL broke horribly, and that’s why we moved to Jessie — the only way to get it to REALLY reinstall/rebuild CPAN.

3) A couple of days later, 2 more Seagate drives threw a media chip, and racked up 3k-4k reallocated sectors over a couple of days. Not only have Seagate drives failed extremely rapidly under controlled power and temperatures (some of these were replacements of failed original drives), now, the warranty page on Seagate’s website gives a 404 error.

The drives were replaced with WD RED drives, which have been very stable in this environment. RAID6 ensured that at no point did we lose access to data, nor suffer any losses.

4) Apache 2.4 has changed a whole bunch. In 2.2, there were transitional packages off of the base names, and in 2.4, the transitional packages moved it back. Whatever. *sigh* That’s cleaned up, but was no real factor.

These changes in Apache 2.4 have been resolved:
* conf.d is no longer used
* sites-enabled/* must have “.conf” appended
* mod_auth_pam is no longer available
* “Require user” is now requires “pwauth” and “libapache2-mod-authnz-external” and new directives
* Require group” is now replaced with “Require unix-group”, and requires “libapache2-mod-authz-unixgroup”, which is different from user authentication.

I’m still working on one of my aliased directories which is not working.

I’m also trying to sort out why Tine 2.0 is stuck “upgrading”. That’s normal for Tine 2.0 though. It’s really an annoying beast, and I’m glad I don’t rely on it. I really just want CalDAV, IMAP, and maybe something to sync notes and reminders. It seems this is nearly impossible.

Raspberry Pi Quick TTY Setup

This was how I set up my Pi 2 without using the HDMI/USB console. I have a wifi adapter in one USB port, and a Prolific TTY to Serial USB adapter.

### Prepare the installer
Download NOOBS from http://www.raspberrypi.org/downloads/
If the zip file is corrupt, then pull down with torrent. Mine had one corrupt block from the webserver.
Format your TF/uSD card as FAT32 (not exFAT, ext*, nor NTFS)
Unpack NOOBS.zip into your TF/uSD card
Remove all but Raspbian from “os” dir
edit recovery.cmdline to have “silentinstall”
edit flavours.json to have only raspbian, not the scratch version.

### Connect the TTY console with power
Connect Prolific TTL to Serial adapter
Red pin (5V) to pin 2 (furthest from USB, closest to edge)
Skip pin 4. Black is pin 6, white is pin 8, green is pin 10
DO NOT USE THE USB POWER PORT. We are powering through the red pin. Both power at same time will kill the board. You CAN unplug the red pin so as to allow more amps through the power micro-USB port.

### Power and autoboot
Plug in the USB port and connect to your comm port (putty, hyperterm, whatever) at 115200,8,n,1
It takes 4 seconds to say “Recovery Console”, then two for unpacking, and about 20 mins for complete install. Green LED (drive light) should blink.
The pi and it will install then reboot

### Basic config
Login as pi / raspberry, then sudo to root
Walk through raspi-config, then “FINISH”
sudo to root and set root password.

### Set up network
Plug in your wifi adapter, OR the ethernet cable, or both.
Edit /etc/wpa_supplicant/wpa_supplicant.conf to include:
ifdown wlan0 ; ifup wlan0
Wait 20 seconds for reconnect
cp -p /etc/network/interfaces /etc/network/interfaces.bak
cat < <"EOF" > /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet dhcp

### Change the primary console to be tty instead of GUI
cp -p /boot/cmdline.txt /boot/cmdline.txt.bak
cat < <"EOF" > /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p6 rootfstype=ext4 elevator=deadline rootwait

### Install “resize” for console
apt-get update
apt-get install xterm
cat < <"EOF" >> /etc/profile
alias ll=’ls -laF’

### Set time and certificates (required for firmware update)
apt-get install ntpdate ca-certificates
cat < <"EOF" >> /etc/ntp.conf
server us.pool.ntp.org
server ntp.ubuntu.com
/etc/init.d/ntp stop
ntpdate us.pool.ntp.org ntp.ubuntu.com
/etc/init.d/ntp start

### Update firmware
apt-get install rpi-update

### Update base OS
sudo apt-get upgrade

### Other references

### Power test
2015-02-20 03:55am 90% or better 5x-18650 power brick, base install, boot then idle with rtl8188cu wifi-N and SSH connected.
2015-02-20 10:49am 75% battery left
2015-02-20 15:47pm 25% still last LED, getting dimmer
2015-02-20 19:55pm Blinking final LED
2015-02-20 20:59pm last syslog entry before going down.