Setting up Squid on FreeBSD (howto)

Squid is a caching proxy and conserving badwidth application for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator. With Squid, you can reduce the network/internet traffic by 30% or more from normal usage (without squid) and enhance respone time.

Step-by-step instructions on how to install Squid on FreeBSD can be found here.

Reset admin/root password in FreeBSD (howto)

  1. Turn the system off.
  2. Hit ESC when the OS boots up
  3. Choose to boot into Single User Mode (option 4)
  4. Select the default shell (/bin/sh)
  5. When the machine is booted up and you see the prompt, enter:
    • mount -u /
    • mount -a
  6. Type passwd to reset the password
  7. Enter the new password and confirm it
  8. Type reboot to reboot the machine (or press the shutdown button to reboot)

How to resize ZFS in FreeNAS

One of the frequently asked questions regarding ZFS. Is it possible to resize a RAIDZ, RAIDZ2 or MIRRORED ZPOOL?

The answer is a littlebit complicated…
If you want to change the ‘geometry’ of the ZPOOL (for example: change from a mirrored pool to a raidz, or simply add a disk to a raidz, or change from raidz to raidz2) then the answer is no.

But it is possible to change the disks of a pool with bigger ones and use the space.

Read further…

Add greylisting to a FreeBSD Postfix Mail Server (howto)

Greylisting is an important tool in the war against spam.  Servers who connect to a mail server with an active greylisting are given a 450 recipent address rejected error the first time they try to connect and will not be allowed to successfully connect for a predefined time frame (normally a couple of minutes). A 450 SMTP error is not a permanent error and an RFC compliant mail server will try and resend the email again a bit later on. On the other hand the tools spammers tend to use do not adhere to standards and will not bother to retry sending the message again.

More…

Setting up LAMP on FreeBSD (howto)

Referring to “LAMP” with regards to FreeBSD doesn’t make sense, but anyway, that’s how the author titled this howto “Setting up LAMP on FreeBSD“.

I’m not complaining, it’s always nice to see FreeBSD related article on Linux.com ;-)

Setting up a LAMP server is a common task for systems administrators, and FreeBSD is one of the most reliable and stable operating systems available. You can swap out the L in LAMP with F for FreeBSD to build a fast and reliable Web server.

In this article I assume FreeBSD is already installed. If not, make sure you download the latest stable production version of FreeBSD and run the installer. I recommend choosing the MINIMUM option at the installer screen to quickly install only the most basic and necessary things.

To install applications on FreeBSD, use the ports files. Ports are plain text files that know where to download source code, so that the software will be compiled on your computer. This way you can change settings (including or excluding specific modules) as you want, and the software will fit perfectly to the specifications of your computer. First, you have to make sure that the latest ports files are installed. If you’ve never installed the ports, issue portsnap fetch extract in the shell; otherwise, issue portsnap fetch update. This will download the latest ports files. After a bunch of messages that show you what files have been downloaded, you’re ready to go.

more…

Source: Linux.com (31/07/2008)

FreeBSD News – quick links (week 16)

Howto’s

Interesting pages

MySQL 6.0 installed on FreeBSD

The other day I came across some neat instructions on how to set up FreeBSD with MySQL 6.0. It’s pretty straight forward:

  • Download MySQL 6.0 here

  • Extract the files to /usr/local/mysql

  • Add MySQL group "groupadd mysql"

  • Add MySQL user "useradd -g mysql mysql"

  • Change the permissions with "chown mysql -R /usr/local/mysql" from /usr/local/mysql run "scripts/mysql_install_db --user=mysql"

  • Change the permissions again "chown -R root ." and "chown -R mysql data"

  • Now run the server "bin/mysqld_safe --user=mysql &"

Source: FreeBSD World

Creating and Managing A Jailed Virtual Host in FreeBSD

It is possible to spawn a completely jailed second (or many!) operating system within a modern FreeBSD install. Doing so can be tricky, but here I will document the method that I have found works for me. The first most important resource about jails, is the man page, and many of the examples that you will see are basically straight following of the man page. Once you are done, each jail will operate as if its a complete independant operating system.

Scope Of This Document

This Howto article is intended to be a practical example, and I will start my host system with FreeBSD 6.2-RELEASE. The Install will be of the “minimal” variety, and for the first part of this document, we will not update the system with buildworld. After a jail is created, we will then update the host, and then update the jail. This will demonstrate a practical example of how to build, and then maintain a jail thru critical security releases.

Further instructions