By all by yourself, I mean, without root.
This is on my Mac running OSX 10.10.
- Get yourself an httpd.conf – cp /private/etc/apache2/httpd.conf .
- Edit it to use a port >1024 and with user you – Listen 8081 & User jrwren & Group staff
- Log to a place you can write – ErrorLog /home/jrwren/errorlog & CustomLog /home/jrwren/access_log combined
- Use different pidfile – PidFile /home/jrwren/httpd.pid Do this fter the Include /private/etc/apache2/extra/httpd-mpm.conf
- Accept mutex – Mutex file:/home/jrwren
- Edit whatever else you want – ProxyPass / http://localhost:8080 & SetOutputFilter DEFLATE to see that Apache proxy does gzip for you
- Start httpd – httpd -d . -f httpd.conf -X
I made a change to the official mongodb charm.
Before the change, the install step, when deploying the charm took 5 minutes.
2014-11-17 20:54:13 Installing mongodb
2014-11-17 21:04:12 Entering config_changed
After the change, the install step, when deploying took a tiny bit over 2 minutes.
2014-11-19 19:14:55 Installing mongodb
2014-11-19 19:16:06 Entering config_changed
Before: Fetched 46.2 MB
After: Fetched 14.6 MB
Why the huge change? The charm was previously running ‘apt-get install mongodb’ which Recommends the mongodb-dev package which Depends on development packages, ultimately pulling in a c++ compiler and boost dev libraries and header files.
I am happy to download 1/4 of what I previously was required to download for the same functionality.
When writing charms for juju, or automating your deploys using any other tool, remember consider what the system is really doing with the commands you give it.
I highly recommend always running apt-get install with the –no-install-recommends option when you are in a server environment. You’ll waste less time.
A note on the time comparison: At first I hesitated to write this, because the hardware on which I tested this is doing other things. I then realized that this is exactly what all hardware in the cloud is doing all the time. This isn’t a benchmark. This isn’t a timing test. This is an example of making a single case of something slow, a bit faster.
This is a 3 year old piece of software in the latest Ubuntu LTS release. That is real bummer.
I don’t want to do all this:
I’d really just like to apt-get install netatalk and have the latest.
Using a 3.0+ version of Netatalk is especially nice since it uses filesystem extended attributes for AppleDouble instead of hidden files all over the place. http://netatalk.sourceforge.net/3.0/ReleaseNotes-3.0.html
First, the results:
$ sudo add-apt-repository ppa:evarlast/netatalk
$ sudo apt-get update && sudo apt-get install netatalk
A brief warning: config file syntax changed entirely from 2.2 netatalk to 3.0 netatalk. If you are upgrading from 2.x to 3.x you will need to audit your config files and test and make sure everything works.
How I did it:
On a refresh trusty install:
$ sudo apt-get install dpkg-dev devscripts libmysqlclient-dev libssl-dev systemtap-sdt-dev libdbus-glib-1-dev libglib2.0-dev tracker libtracker-sparql-0.16-dev libtracker-miner-0.16-dev libtdb-dev libevent-dev
$ sudo apt-get source netatalk
$ sudo apt-get build-dep netatalk
$ curl -o netatalk_3.1.6.orig.tar.bz2 -L ‘http://sourceforge.net/projects/netatalk/files/latest/download?source=files’
$ tar jxvf netatalk_3.1.6.orig.tar.bz2
$ cd netatalk-3.1.6
$ cp -a ../netatalk-2.2.2/debian .
$ dch -v 3.1.6 -D trusty
$ vim debian/patches/series # remove everything except the macusers patch
$ vim debian/control # edit and update with dependent packages we installed as listed http://netatalk.sourceforge.net/wiki/index.php/Install_Netatalk_3.1.6_on_Ubuntu_14.04_Trusty Be sure to add a final NETA_LDCONFIG=/bin/true to the configure flags
$ vim debian/rules # edit and update configure options as listed on wiki page
$ vim debian/atalk.docs # remove README line
$ dpkg-buildpackage -rfakeroot -S
Install the package or dput it into a PPA.
In putting this together I ran into an issue with a strange automake assumption that the build will be as root, or that the user running make can run ldconfig. This is not the case when building debian pacakges. Searching for NETA_LDCONFIG returned this url: http://oichinote.com/plus/2014/07/installing-debianized-netatalk-3-1-3-on-ubuntu-14-04.html
This is a note to myself that its not an “implied scheme url”. My brain wants to call it an implied scheme url, and the standard name for it is protocol relative url.
They are nice.