Specifying the package option when invoking make will create a binary package in /usr/pkgsrc/packages/All. As compiling can take a long time on the Pi, this is especially handy when doing reinstalls or using multiple boards.
Here is the list of packages which have been created :
So far, running NetBSD on the Raspberry Pi has been a very positive experience and the system is very stable. I would definitely recommend anyone wanting to use BSD on the Pi to give NetBSD a try, it’s well worth it.
I should probably also mention that it’s smaller than a toaster :-)
Server Side Includes are an interesting way to embed content dynamically into static files. It can be particularly useful to inject information about the visitor or to add headers, footers or any file containing data changing over time.
Please note, however, that Nginx does not implement the full SSI specification yet. More information about what is currently supported can be found in the ngx_http_ssi_module documentation.
To enable SSI, the following directive must be added in the http, server or location block :
Here is an example HTML snippet with SSI directives, showing how to echo variables and include content from other files :
In order to populate fortune.txt and uptime.txt, we can use Cron and refresh files content as required. For even more fun, we can also use cowsay together with fortune.
Finally, here is the resulting output when accessing the page using Lynx :
Visitor IP address : 126.96.36.199
Visitor User agent : Lynx/2.8.8rel.2 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.0.1h
Server local time : Sunday, 21-Sep-2014 18:55:49 CEST
Server time (GMT) : Sunday, 21-Sep-2014 16:55:49 GMT
Server uptime : 18:55:01 up 52 days, 7:50, 3 users, load average: 0.13, 0.19, 0.22
Fortune of the day
/ In most countries selling harmful \
| things like drugs is punishable. Then |
| howcome people can sell Microsoft |
| software and go unpunished? |
\ -- Hasse Skrifvars, email@example.com, /
// \ \
(| | )
Most of the time, there is no need to compile Nginx manually as Debian and Ubuntu provide several packages being compiled with a different set of modules (for details, see : Nginx packages in Debian stable). However, when performing more specific testing tasks, I sometimes need an exact particular version and have to compile it manually.
So here are the required steps to build Nginx with SSL and SPDY modules enabled.
Since I’ve been more and more interested about NetBSD lately, I decided to draw some ASCII logos to be used as MOTD and/or as /etc/issue. So here are the two variants I came up with, rendered with Amiga Topaz font.
Feel free to use them on your systems, and change the NetBSD port in the information boxes accordingly. I currently use mainly NetBSD/evbarm, so the logos reflect that.
Known for its portability, it might come at no surprise that NetBSD (and pkgsrc as well) is also easy to cross build on other platforms and even other hosts. Building NetBSD on Linux can be very conveniant, as it’s far easier to get access to high-performance Linux powered machines than to NetBSD ones. So let’s go through the process and build a NetBSD/amd64 release on a Debian host, using an unprivileged user account.
First, we will need to install some development packages on the host machine :
apt-get install build-essential zlib1g-dev flex
Then, we can download and extract source sets for the NetBSD version we want to build. At the time of writing, latest NetBSD release is 6.1.4 :
We can now build the cross compiler :
Compilation results :
Here is more information about configuration options used in those examples :
Once our toolchain is ready, we can now build NetBSD itself :
./build.sh -U-u-m amd64 release
Compilation results :
From there, building an ISO image takes only a few seconds :
./build.sh -U-u-m amd64 iso-image
We can now try to boot the resulting ISO image :
Unsurprisingly, it works as expected! Welcome to NetBSD :-)