Showing posts with label freebsd. Show all posts
Showing posts with label freebsd. Show all posts

Wednesday, November 25, 2009

How to split large files in Linux and *BSD

Suppose you have a large file that you need to "break down" to smaller pieces and then reconstruct. It's fairly simple, using the split command.

I will only give a brief usage example. For more information, check out man split (and info coreutils 'split invocation' on Linux).

Thursday, November 19, 2009

IPFW: rule-based forwarding disabled

If you want to enable IPFW (or load the module) and you get "rule-based forwarding disabled" in dmesg... and you need forwarding, well, that is just too bad. You will need to enable IPFW forwarding support in the kernel.

Tuesday, September 2, 2008

Postfix on FreeBSD - Maildir delivery

Suppose you have a clean FreeBSD install and you want to get Postfix as your MTA.

Current setup:

  • OS: FreeBSD 7.0-RELEASE
  • SHELL: bash
  • no previously installed MTA present on the system

Wednesday, February 27, 2008

Webmin in FreeBSD

Webmin installation in FreeBSD is pretty straightforward:

pkg_add -rv webmin
echo 'webmin_enable="YES"' >> /etc/rc.conf
/usr/local/lib/webmin/setup.sh
/usr/local/etc/rc.d/webmin start

Tuesday, February 26, 2008

Basic apache configuration in FreeBSD

So I decided to try out apache in FreeBSD...
pkg_add -rv apache
vi /usr/local/etc/apache/httpd.conf
Added the lines:
ServerName www
BindAddress *
Supposing my hostname is dvorak, I need to edit
vi /etc/hosts
and add the line:
127.0.0.1 dvorak

procfs and loadavg

I think that one of the biggest problems somebody with a Linux background faces with FreeBSD is having gotten used to procfs.

Sendmail: Maildir format

Here's a quick one: on FreeBSD, how to configure sendmail to deliver mail in Maildir format?

...Using procmail for this example.

PACKAGESITE

Coming from my Linux background, I expected that after installing FreeBSD and choosing my geographical location – and, most importantly, choosing a local FTP mirror for the bootonly install CD –, somehow the system would "guess" that I'd want to keep the same location when doing further package installs - with pkg_add for instance. Unfortunately, pkg_add goes to the default ftp://ftp.freebsd.org package location and it can take a long time to install a package with lots of dependencies.

After fiddling around I found out there's an environment variable called PACKAGESITE that instructs pkg_add to go to a "package site" designated by the user.

Monday, February 25, 2008

LSCOLORS

As stated earlier, I came back to the problem of LSCOLORS.

If using bash, in order to get colorful directory listings in FreeBSD the user needs to set the CLICOLOR environment variable to "YES" and export it and would also need to define (and export) the LSCOLORS variable, all inside ~/.bash_profile.

So, how do we define LSCOLORS?

Sunday, February 24, 2008

First customizations

OK, first things first. For an 'experiment' with FreeBSD I first needed it installed somewhere... for the purpose of my own mental and psychical health, I choose to get FreeBSD running in a virtual machine first.

Since I'm not eager to see it (...yet) as a viable fully fledged desktop system, I was not interested in the X part of this install so I chose a minimal install, by using the "boot only" CD.