For FreeBSD automatic installation of using bsdinstall [ZFS Operations]

This tutorial by user kunst1080 shows us how to get an FreeBSD automatic installation set up using bsdinstall. *Note that this is a translated article.

Original: http://kunst1080.hatenablog.com/entry/2015/05/30/181955, translated:  http://kunst1080.hatenablog.com/entry/2015/05/31/221431

bsdinstall-config-components

Now, we take a look at how to install to ZFS using bsdinstall.

Installation of ZFS in an auto layout

As it is described in the manual, to the first half (PREAMBLE), if describe the environment variable “ZFSBOOT_DISKS” instead of “PARTITIONS”, ZFS allows you to install to.

However, care must be taken of the following two points.

  • If you want to automatically install, set environment variable “nonInteractive”.
  • It needs to be export environment variables “ZFSBOOT_DISKS” and “nonInteractive”.

In particular, care must be taken with regard to the second point.

(I tried to read freebsd/script at master · freebsd/freebsd · GitHub, I am feeling that because DISTRIBUTIONS has been export, but such ZFSBOOT_DISKS has not been export, …… and it is the cause)

First half (PREAMBLE)

[Read more…]

How to Run a Django Site with Apache, mod_wsgi, and MySQL on FreeBSD 10.1

This tutorial by FreeBSD user Chad Stovern (DigitalOcean) shows us how to get a Django website set up with Apache, mod_wsgi, and MySQL on FreeBSD 10.1.

Original: https://www.digitalocean.com/community/tutorials/how-to-run-a-django-site-with-apache-mod_wsgi-and-mysql-on-freebsd-10-1

django apache_software_foundation_logo_3074   mysql-logo

Introduction

This article shows you how to deploy a web application using Django, the popular Python framework. The beauty of developing with popular web frameworks is that a lot of repetitious work has been done for you, so you can focus on building your site.

Whether you’re a developer or not, it’s great to know that the core of what you’re running on your Droplet has undergone the scrutiny of a large open-source community and should be less susceptible to large security holes.

One thing that is not inherently simple is knowing how to get these web frameworks up and running outside of your own development or testing environment. In this article we’ll show you how to do just that, using a standard Apache, mod_wsgi, and MySQL stack running on top of FreeBSD 10.1.

Goals

  • Install and configure a Python virtual environment for your Django site
  • Create and configure a sample Django site for testing
  • Configure a simple and secure MySQL server
  • Configure a simple Apache virtual host that will serve your Django site
  • Test that the newly minted site works properly

Prerequisites

Before you begin this guide you’ll need the following:

  • A FreeBSD 10.1 Droplet
  • Access to your root account or an account with sudo privileges following this tutorial
  • A working knowledge of how to edit text files from the command line
  • The Bash shell environment, since we’ll be using Virtualenv later on this tutorial. Follow the instructions in the Changing the Default Shell section of the How To Get Started with FreeBSD 10.1 tutorial. You may need to log out and log in again to get the Bash shell for your freebsd user

FreeBSD Foundation May 2015 Update

The FreeBSD Foundation have published their updates for May 2015. Follow the link for news on development projects, conferences, a behind-the-scene look on FreeBSD running on servers, as well as this year’s fundraising goals. We would also like to extend our condolences to long time BSD advocate, Paul Schenkeveld, his contributions to the community will be remembered.

freebsdfoundationThe start of summer is upon us and that also means the beginning of a particularly fun few months at the Foundation. From meeting FreeBSD developers at BSD events to installing new hardware, we’re continuing to come up with new ways to support the Project. As always, we can’t do anything without your help so, thank you again for all you do, and enjoy our latest update!
Deb
View the FreeBSD Foundation May 2015 Update: https://www.freebsdfoundation.org/press/2015mayupdate.pdf

A Repository with 44 Years of Unix Evolution

provenance.png

Interested in a bit of some FreeBSD history? This article by, Diomidis Spinellis (Department of Management Science and Technology, Athens University of Economics and Business), details the history of Unix’s evolution of the repository system all the way to its use in FreeBSD.

Original PDF: http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.pdf
Original HTML: http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html

A Repository with 44 Years of Unix Evolution

Abstract

The evolution of the Unix operating system is made available as a version-control repository, covering the period from its inception in 1972 as a five thousand line kernel, to 2015 as a widely-used 26 million line system. The repository contains 659 thousand commits and 2306 merges. The repository employs the commonly used Git system for its storage, and is hosted on the popular GitHub archive. It has been created by synthesizing with custom software 24 snapshots of systems developed at Bell Labs, Berkeley University, and the 386BSD team, two legacy repositories, and the modern repository of the open source FreeBSD system. In total, 850 individual contributors are identified, the early ones through primary research. The data set can be used for empirical research in software engineering, information systems, and software archaeology.

1  Introduction

The Unix operating system stands out as a major engineering breakthrough due to its exemplary design, its numerous technical contributions, its development model, and its widespread use. The design of the Unix programming environment has been characterized as one offering unusual simplicity, power, and elegance [1]. On the technical side, features that can be directly attributed to Unix or were popularized by it include [2]: the portable implementation of the kernel in a high level language; a hierarchical file system; compatible file, device, networking, and inter-process I/O; the pipes and filters architecture; virtual file systems; and the shell as a user-selectable regular process. A large community contributed software to Unix from its early days [3], [4,pp. 65-72]. This community grew immensely over time and worked using what are now termed open source software development methods [5,pp. 440-442]. Unix and its intellectual descendants have also helped the spread of the C and C++ programming languages, parser and lexical analyzer generators (yacc, lex), document preparation tools (troff, eqn, tbl), scripting languages (awk, sed, Perl), TCP/IP networking, and configuration management systems (SCCS, RCS, Subversion, Git), while also forming a large part of the modern internet infrastructure and the web.

Luckily, important Unix material of historical importance has survived and is nowadays openly available. Although Unix was initially distributed with relatively restrictive licenses, the most significant parts of its early development have been released by one of its right-holders (Caldera International) under a liberal license. Combining these parts with software that was developed or released as open source software by the University of California, Berkeley and the FreeBSD Project provides coverage of the system’s development over a period ranging from June 20th 1972 until today.

Curating and processing available snapshots as well as old and modern configuration management repositories allows the reconstruction of a new synthetic Git repository that combines under a single roof most of the available data. This repository documents in a digital form the detailed evolution of an important digital artefact over a period of 44 years. The following sections describe the repository’s structure and contents (Section II), the way it was created (Section III), and how it can be used (Section IV).

2  Data Overview

[Read more…]

All-In-One Redux – Proxmox & FreeNAS

Original: http://churnd.net/2014/03/30/all-in-one-redux-proxmox-and-freenas

Logo-ProxmoxVERGB_FreeNAS_Shark_Logo_Onlight_Lg

Why?

After using my VMware/NexentaStor All-In-One for a while, I grew tired of VMware’s bloat & limitations. Doing “cool stuff” in VMware requires a license, & vSphere Client only runs on Windows. I got tired of starting up a Windows VM just to manage my hypervisor. That’s the only thing I started Windows up for, and it got old. I wanted something I could manage directly from my primary OS, OS X, as well as lightweight & preferably open source.

There are plenty of hypervisor products on the market today, but I wanted to move to something open source & unix based. KVM has quickly become a big presense in this market, and for a good reason: it’s awesome. It’ll run on just about any hardware you have, and has even been ported to Solaris in the form of SmartOS.

What?

Host

Of the many great projects that use KVM, I chose Proxmox. Here’s a few of the many reasons why:

  • It’s OSS licensed AGPLv3.
  • It’s based on Debian.
  • The management is all web-based & some CLI.
  • It supports QEMU & OpenVZ.
  • It supports OpenVSwitch.
  • It has a good community.
  • You can buy support if you want it.

I also checked out oVirt & plain KVM/libvirt on CentOS. oVirt was a bit too bloated for my tastes. KVM/libvirt on CentOS wasn’t web based, but I almost went with them because I could have ran virt-manager via ssh X forwarding. I liked the Proxmox project a bit better.

Storage

[Read more…]

More Bacula Excludes with Jails and FreeBSD

In this tutorial, user shows how to get Bacula Excludes set up in your FreeBSD jails.

Original: http://dan.langille.org/2015/05/15/more-bacula-exclude

borg-logo

Following on from my post about excluding the base OS with a Bacula FileSet, I decided to exclude some more.

The starting point

Here are the baselines:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
*estimate level=full job="knew jail snapshots"
Using Catalog "MyCatalog"
Connecting to Client knew-fd at knew.int.unixathome.org:9102
2000 OK estimate files=496,579 bytes=70,810,186,782
*estimate level=full job="tallboy jail snapshots"
Using Catalog "MyCatalog"
Connecting to Client tallboy-fd at tallboy.vpn.unixathome.org:9102
2000 OK estimate files=163,040 bytes=3,628,862,728
*estimate level=full job="zuul jail snapshots"
Using Catalog "MyCatalog"
Connecting to Client zuul-fd at zuul.unixathome.org:9102
2000 OK estimate files=574,237 bytes=117,950,136,800

What else will I exclude?

I decided to exclude the following as well:

1
2
3
4
5
6
7
8
/tmp
/usr/local/man
/usr/local/share/licenses
/usr/local/share/locale
/var/cache/pkg
/var/db/ports
/var/db/portsnap
/var/tmp/nginx

Adding iocage support

Along the way, I extended the Exclude to work on server using the iocage jail management tool. I also split the Exclude out into its own file.

Here is the iocage Exclude:

[Read more…]

Yes You Can Virtualize FreeNAS

Josh Paetzel has confirmed that FreeNAS can be used in a virtualized environment. FreeNAS is an open source network attaced storage operating system based on FreeBSD. Check out the guide below to get an idea of your use case or visualization scenario.

Original: http://www.freenas.org/whats-new/2015/05/yes-you-can-virtualize-freenas.html

FreeNAS is the world’s most popular open source storage OS, and one of the more popular questions I get asked is, “How do I run FreeNAS as a VM?” Due to the number of caveats required to answer that question, I would typically short-circuit the conversation by recommending against it, or only recommend it for test environments since the prerequisite knowledge required to “do it right” can’t be passed on quickly. Somehow over time, this message morphed into a general consensus that “you cannot (or shouldn’t) virtualize FreeNAS at all under any circumstances”, which wasn’t my intention. So, I’m here to set the record straight once and for all: You absolutely can virtualize FreeNAS.

virtualization

Whether you are test driving the functionality of FreeNAS, testing an upgrade for compatibility in your environment, or you want to insulate your FreeNAS system from hardware faults, virtualization can provide many well understood benefits. That said, while FreeNAS can and will run as a virtual machine, it’s definitely not ideal for every use case. If you do choose to run FreeNAS under virtualization, there are some caveats and precautions that must be considered and implemented. In this post I’ll describe what they are so that you can make well-informed choices.

Before we get started though, I should probably start with a disclaimer…

 

Warning

If best practices and recommendations for running FreeNAS under virtualization are followed, FreeNAS and virtualization can be smooth sailing. However, failure to adhere to the recommendations and best practices below can result in catastrophic loss of your ZFS pool (and/or data) without warning. Please read through them and take heed.

[Read more…]

Adrian Chadd: freebsd-wifi-build, or “wait, you can run freebsd on atheros MIPS access points? where do I get that?”

In this blog, Adrian Chadd discusses FreeBSD on Atheros MIPS access points.

Original: http://adrianchadd.blogspot.com/2015/05/freebsd-wifi-build-or-wait-you-can-run.html

I’ve been running FreeBSD at home as my primary internet/wifi access for a few years now. It’s cheap, it’s easy to do, and I’ve tried very hard to wrap up the whole process into a mostly-simple build system that spits out a useful image to use.

It’s pretty simple in concept – I take FreeBSD-HEAD, build it with some cut-down options, create a custom filesystem image with some custom boot scripts and a custom configuration file, and provide an image that you can TFTP (using a serial console and ethernet cable) or upload directly to the AP if it supports it.

The supported hardware list is here:

https://github.com/freebsd/freebsd-wifi-build/wiki/Supported-Boards

Now, it’s not a huge list like OpenWRT, but that’s mostly because I don’t have an infinite supply of Atheros MIPS based routers. I think I’ll get some of the TP-Link Archer series stuff next.

Building it is pretty simple:

https://github.com/freebsd/freebsd-wifi-build/wiki

You checkout the build repo, check out FreeBSD-HEAD, install a couple of packages, and run the build for your board. Once it’s done, the images for your board appear in ../tftpboot/. There’s a wiki page for each of the supported boards with a walkthrough with how to get FreeBSD going on it.

[Read more…]

How to Install MongoDB on FreeBSD 10.1

This tutorial by user Hathy A of DigitalOcean shows us how to get MongoDB set up on FreeBSD 10.1.

Original: https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-freebsd-10-1

mongoDB

Introduction

MongoDB is a free and open-source NoSQL database. It is one of the most popular databases used in web applications today because it offers high performance, scalability, and lots of flexibility in database schema design. In this tutorial, you will learn how to install and run MongoDB on FreeBSD 10.1.

Prerequisites

To follow this tutorial, you need to have:

  • A FreeBSD 10.1 server which is accessible over SSH
  • A user with root privileges; the default freebsd user on DigitalOcean is fine
  • SSH key

A FreeBSD Droplet requires an SSH Key for remote access. The freebsd user is automatically created, and your SSH key is added to this user account. A root password will not be emailed out for FreeBSD. For help on setting up an SSH Key, read How To Configure SSH Key-Based Authentication on a FreeBSD Server.

Note: Check out the Getting Started with FreeBSD Tutorial Series for help on installing and using FreeBSD 10.1.

Step 1 — Installing the Package Management Tool

[Read more…]