Blue Flower

Bill

Bill

Sunday, 05 July 2015 13:13

Updating to -STABLE

Updated 2/10/13: Updated for FreeBSD 10 and update to pkg system.

This updating to -STABLE guide will be a new rewrite with a few modifications. The CVSup method of retrieving and synchronizing the Ports Collection is being deprecated as part of a migration to Subversion. While it remains supported, the service will be discontinued as of February 28, 2013.

How to update from -RELEASE to -STABLE

Copied with permission by the author

Updating to -STABLE

Original page by Jochem Kossen

Abstract: After a FreeBSD -RELEASE has been released, development continues to the next version. Development is done in a number of branches, like -STABLE and -CURRENT. In this article I'll explain how to track the -STABLE branch.-STABLE is the branch which will bring the next stable release. -CURRENT is the unstable development branch. -CURRENT is only meant for developers!

Note: -STABLE is a BRANCH. That means it is being developed constantly. This also means -STABLE could be broken at any moment. Do not worry though, I've never noticed any problem with it.

Installing subversion is no longer necessary. 10.3 base now includes svnlite. This has been updated below.

Deleting the current sources

First lets get rid of the current /usr/src:


# rm -dfr /usr/src
# mkdir /usr/src

A list of the current subversion sites are below.

https://www.freebsd.org/doc/handbook/svn.html#svn-mirrors

Now we need to checkout both ports and sources using the following commands. Replace HOST with the closest mirror to you (See link above). Also on the 2nd line if you are using FreeBSD 9 then the command shown will work fine.


# cd /usr/src
# svnlite checkout https://svn.FreeBSD.org/base/stable/10 /usr/src

Please DO NOT continue until at least the sources are updated via svn

Building the base system and kernel

Read /usr/src/UPDATING

UPDATING contains important information and clues needed for upgrading FreeBSD. It could be you need to add a user first, or enable a device in your kernel, or whatever. Things like this are in UPDATING, so read it:


# less /usr/src/UPDATING

Remove old obj files. The very first time you run the second or third command, don't be surprised if you see "no match"


# cd /usr/obj
# chflags -R noschg *
# rm -fr *

Update files essential for buildworld


# mergemaster -p

You will get prompted Do you wish to delete what is left of /var/tmp/temproot? [no]. Hit Enter for No. It will spit out an output. Continue on.

Build the world (This can take a REALLY long time. On a 500Mhz PC It can take over an hour-and-a-half.)

If you have a multi-core processor, or multi-processor system, you can do:

# make -jX buildworld

Replace X with the number of total processor cores your system has plus 1. So, on a single CPU dual-core processor, you'd use -j3.


# cd /usr/src
# make buildworld

Build the kernel
(change MYKERNEL to the name of your custom kernel configuration file or GENERIC if you don't use a custom configured kernel)


# cd /usr/src
# make buildkernel KERNCONF=MYKERNEL

Installing the base system and kernel

Install your new kernel:

(change MYKERNEL to the name of your custom kernel configuration file or GENERIC if you don't use a custom configured kernel)


# cd /usr/src
# make installkernel KERNCONF=MYKERNEL

We will get more into customizing your kernel later.

Booting into single-user mode

Reboot with your new kernel into single-user mode


# reboot

When your computer reboots, It will bring you to a menu of options. Choose Single-User mode and hit Enter.
Hit [Enter] to boot immediately, or any other key for command prompt.

Booting [kernel] in 9 seconds...

Hit any other key other than [ENTER] to enter single-user mode.

It asks for the location of the shell to be used

choose /bin/sh (just press Enter or Return as this is the default)

Now we need to mount the filesystems


# mount -a -t ufs

Now to Install world


# cd /usr/src
# mergemaster -p

You will get prompted Do you wish to delete what is left of /var/tmp/temproot? [no]. Hit Enter for No. It will spit out an output. Continue on.


# make installworld

Update /etc


# rm -fr /etc.old

(The very first time you run this command, don't be surprised if you see "no match" )


# cp -Rp /etc /etc.old
# /usr/sbin/mergemaster

Reboot and enjoy your new -STABLE system


# fastboot

Sunday, 05 July 2015 13:12

Installing FreeBSD 10.3

Updated 6/9/16: Updated guide to FreeBSD 10.3 installation.

We can now download FreeBSD directly from FTP using the following URL:

FreeBSD 10.3-RELEASE may be downloaded via ftp from the following site:

ftp://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.3/

There are a few choices in the list. I would grab the FreeBSD-10.3-RELEASE-amd64-dvd1.iso

It is up to you how you install the media whether you burn it and install on a PC or install via ESXi 5.x (or 6.x) or any other means of installing a virtual machine. I run FreeBSD 10.3 on ESXi 6.0 at the moment.

Once you get the installation started it will ask if you want to Install, Go to a Shell or Live CD. The obvious choice is to click Install.

Next screen is if you want to set a non-default key map? I choose no. If you know you need this then click Yes and choose your option there.

The next screen is the hostname. Type your hostname as it would appear on your network. On my LAN at home it would be FreeBSD9.home.local

The next screen will give you 4 options and I will discuss all 4 options below:

doc - Recommended! This is to install the FreeBSD Man(ual) pages on this host
games - Optional
ports - Recommended! This is to install the ports system
src - Optional - Only install this if you want to track -STABLE

Click ok at the bottom.

At this point it will ask if you want to use the guided method for partitioning, manual or shell. Easiest way to install is via the guided option. Next screen choose entire disk.At this point you can leave the defaults or choose to edit them. Myself I am still old school so I still like to visually see the /var and /tmp partitions. Do I would delete the freebsd-ufs and then make 3 new ones:

Hit enter on create and choose the following (the size of the drive will vary depending on your machine drive space. I am using a 50GB drive in total in this example)

Type freebsd-ufs
Size 5GB
Mountpoint /tmp

Type freebsd-ufs
Size 10GB
Mountpoint /var

Type freebsd-ufs
Size * GB
Mountpoint /usr

The * above indicates use the rest of the drive

When you're done with your selections use the right arrow key to go over to finish. it's going to ask you to confirm your changes. Click commit and we're going to have to wait for it to finish.

At this point we are nearly finished. When the install is completed it will jump to the "Change your root password" screen. Type in a HIGHLY secure password. It should be no less than 8 characters and consist of letters, numbers and punctuation. It will ask you to confirm the password twice.

The next screen will ask you to configure your network adapter. Choose the adapter that is shown on the screen and hit enter. The next screen will ask you if you want to use DHCP. Choose Yes or No depending on your network. In most cases DHCP is the most common option. The next screen will ask if you want to configure IPv4 for this interface. Again, This is the most common method so hitting Enter should be ok. The next screen will ask if you want to configure IPv6 which is the next generation of IP addresses. If you have it and you know it click yes. Otherwise if you don't no click No.

The next screen is your Network Configuration screen. Just hit ok.

When asked Is your CMOS Set to UTC? If you're sure your BIOS is set to UTC, hit yes. Otherwise hit no even if you're unsure.

Choose your Country and hit Enter and then choose your closest State/Province and then hit Enter again.

ALMOST DONE! Now it will ask you if you want to configure any other options. See below:

sshd - RECOMMENDED! Don't disable this. This will allow you to ssh into the box remotely
moused - Optional - You can install this if you plan on using X/gnome/KDE/Etc.
ntpd - Optional - You can specify a NTP server to sync time
powerd - Optional - You can use this to adjust CPU frequency dynamically

It will ask you if you want to enable Dumpdev Configuration. I choose No.

If you want to add users to the system at the time on the next screen click yes. Otherwise click no.

You should now be at the Final Configuration screen. You can change what options are in this screen or you can just hit Enter to exit. It will ask you to confirm if you really want to exit and the system will then reboot.

Congrats! You now have FreeBSD 10.1 installed!

After several years of development, the Beta version of the BSD Professional (BSDP) Lab exam will debut at BSDCan 2014, in Ottawa, Ontario, CA on May 18 (Sunday), from 10am – 2pm.  If you have not yet made your BSDCan 2014 travel plans, now is a good time to take a look at the BSD Professional Certification details and consider whether you want to participate.  Additional information on the exam can be found on the BSD Certification Group website (www.bsdcertification.org).

The BSDP Lab exam is geared toward the seasoned BSD administrator with at least three years experience.  The exam tests hands-on skills across a variety of topics, described in the BSDP Exam Objectives document.

The Aqemu virtual machine manager is used to provide access to any of the four BSD versions on the exam – DragonFly BSD 3.6.1, FreeBSD 9.2, NetBSD 6.1.2, and OpenBSD 5.4.   A 1/2 hour introduction to the workstation (HP 8540p with US ASCII keyboard), Aqemu, and using virtual machines will precede the exam.

Have a look at the requirements and register at the BSDCG registration site if you want to take the Beta exam.

Saturday, 16 November 2013 00:00

About freebsdrocks

FreeBSD is a secure, high performance operating system that is suitable for a variety of server roles. It can serve as a DNS Server (bind), Mail Services with custom spam filtering (Qmail/Spamd,Clamav) and also a web server (Apache).  These guides can help you install FreeBSD, install secure mail services  and also help you maintain it.

Background:

This site originally started as a very small page with support for qmail. The site was http://nospam.mine.nu (which no longer works). After using the qmailrocks style install for a few years I decided to create a Freebsd based qmail installation with custom spam filtering. The thing I did not like about using qmailrocks is that updating sources was not very easy. It was much easier to maintain ports via portupdate or portmaster. Once I had tested the new qmail installation myself over 50 times or so I posted the walkthrough and things took off. Eventually there were some changes along the way; procmail was replaced with maildrop as procmail used physical RAM to filter out the spams. Maildrop used temporary files as opposed to RAM which is less overhead. Spam filtering was also improved by adding additional rules to qmail and spamd.

As of 10/8/2015 my new qmail 2.0 guide is now completely enhanced to offer your users secure pop3, secure smtp and secure webmail using roundcube. Additional features in the guide include the following:

An updated qmailctl file which controls all services; qmail-send, qmail-smtpd, qmail-smtpd-ssl, spamd, clamav, and dovecot
Custom junk/not junk mail reporting using Roundcube
Converting your Apache SSL Certifcates to qmail for pop3ssl/smtpssl support
Optimizing the system to catch spams
Troubleshooting page

The only service that has been removed is the qmail-pop3d service which runs on port 110.

The qmail 2.0 walkthrough is supported on FreeBSD 9.x and 10.x. Currently there is no support for 8.1

Please let me know if you have any questions. You can contact me at wolsonATgmailDOTcom.


 

Page 14 of 14