Archive
fix OSX Mountian Lion sleep connectivity problem
If your imac or other osx device has no network connectivity after entering the sleep mode, you can fix it by entering the su mode and editing this file:
/Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist
Locate the two lines containing PrioritizeNetworkReachabilityOverSleep
and change the value in the next line from <integer>0</integer> to <integer>1</integer>
Now your ethernet connection should remain active even while the computer is in the sleep mode.
Update — Airprint for IOS6
IOS6 requires these additions to my previous instructions to work with airprint.
Create the following files
/usr/share/cups/mime/airprint.types
##contents of airprint.types##
image/urf urf string(0,UNIRAST<00>)
/usr/share/cups/mime/airprint.convs
##contents of airprint.convs###
image/urf application/pdf 100 pdftoraster
recreate /etc/avahi/services with airprint-generate.py
wget https://github.com/tjfontaine/airprint-generate/blob/master/airprint-generate.py
chmod +x airprint-generate.py
./airprint-generate.py -d /etc/avahi/services/
service restart cups
service restart avahi-daemon
Printing should now work!
Add logrotate to unbound nameserver – Debian Squeeze
You can add logrotate to your unbound nameserver. Just create a file named unbound and place it in /etc/logrotate.d.
File contents below:
/var/log/unbound.log {
rotate 12
weekly
compress
missingok
notifempty
postrotate
/etc/init.d/unbound restart
endscript
}
Install apache2 mpm worker and php5-fpm on Debian/Ubuntu
To install apache2-mpm-worker with php5-fpm support just apt-get install apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapache2-mom-fastcgi php5-fpm.
Create a php5-fpm.conf (or whatever .conf) and add it to /etc/apache2/conf.d. My file contains this (includes cgi support). After installing the above do a2enmod fastcgi and add the below php5-fpm.conf file to /etc/apache2/conf.d
##php5-fpm.conf ###
<IfModule mod_fastcgi.c>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
</IfModule>
<IfModule mod_alias.c>
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory /var/www/cgi-bin/>
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
</IfModule>
<IfModule mod_actions.c>
Action application/x-httpd-php /cgi-bin/php5
</IfModule>
Also add this to /etc/php5/fpm/pool.d/www.conf
listen = /var/run/php5-fpm.sock
You should be able to restart apache2 and start php5-fpm and have php support. The same setup also works for nginx.
Add airprint (wireless IOS printing) to Debian Squeeze
You can enable wifi printing on your IOS device with a Debian box connected to your local wired network assuming your wireless ap is also connected to the same network. Here’s how
Before you start you should have a cups compatible printer connected to the Debian box.
apt-get install cups-pdf avahi-daemon python-cups cups-driver cups-driver-gutenprint foomatic-db foomatic-db-engine foomatic-filters foomatic-filters-ppds
Test cups printing and make sure it’s functional. Add this to /etc/cupsd.conf
ServerAlias *
mkdir /opt/airprint (or wherever you want)
wget https://github.com/tjfontaine/airprint-generate/blob/master/airprint-generate.py
chmod +x airprint-generate.py
./airprint-generate-py -d /etc/avahi/services
Restart avahi ie /etc/init.d/avahi-daemon restart
ls /etc/avahi/services and you should see your printer listed.
Try printing from your IOS device (iphone, ipad, etc) connected to your wifi network. It should work!
Airprint (wireless IOS printing) for Debian Squeeze
You can enable wifi printing on your IOS device with a Debian box connected to your local wired network assuming your wireless ap is also connected to the same network. Here’s how
Before you start you should have a cups compatible printer connected to the Debian box.
apt-get install cups-pdf avahi-daemon python-cups cups-driver cups-driver-gutenprint foomatic-db foomatic-db-engine foomatic-filters foomatic-filters-ppds
Test cups printing and make sure it’s functional. Add this to /etc/cupsd.conf
ServerAlias *
mkdir /opt/airprint (or wherever you want)
wget https://github.com/tjfontaine/airprint-generate/blob/master/airprint-generate.py
chmod +x airprint-generate.py
./airprint-generate-py -d /etc/avahi/services
Restart avahi ie /etc/init.d/avahi-daemon restart
ls /etc/avahi/services and you should see your printer listed.
Try printing from your IOS device (iphone, ipad, etc) connected to your wifi network. It should work!
Start Debian 6 without X (in text mode)
You can boot Debian 6 without starting X by doing this:
edit /etc/X11/default-display-manager and change as indicated below:
# /usr/sbin/gdm3 (leave this in place in case you want to re-enable X) false
repeated errors in /var/log/messages
If your seeing repeated messages like this in /var/log/messages on your Debian/Ubuntu server, you need to install sysklogd.
rsyslogd: [origin software=”rsyslogd” swVersion=”4.6.4″ x-pid=”1015″ x-info=”http://www.rsyslog.com”%5D rsyslogd was HUPed, type ‘lightweight’.
repeated errors in /var/log/messages
If your seeing repeated messages like this in /var/log/messages on your Debian/Ubuntu server, you need to install sysklogd.
rsyslogd: [origin software=”rsyslogd” swVersion=”4.6.4″ x-pid=”1015″ x-info=”http://www.rsyslog.com”%5D rsyslogd was HUPed, type ‘lightweight’.
repeated errors in /var/log/messages
If your seeing repeated messages like this in /var/log/messages on your Debian/Ubuntu server, you need to install sysklogd.
rsyslogd: [origin software=”rsyslogd” swVersion=”4.6.4″ x-pid=”1015″ x-info=”http://www.rsyslog.com”%5D rsyslogd was HUPed, type ‘lightweight’.