HostOnNet Blog

Category Archives: FreeBSD

portupgrade – upgrading installed ports

Today i have upgraded software packages installed on my FreeBSD 5.4 server. This is done with utility called portupgrade. To upgrade installed ports, you have to first install portupgrade from ports. Check if you have portupgrade package already installed #


Upgrading FreeBSD Ports with portsnap

I used to upgrade FreeBSD ports tree with CVSup. I run it through cron everyday. Today found a much better way to upgrade FreeBSD ports tree – portsnap portsnap is more efficient and secure way to upgrade ports tree. Here


Upgrading FreeBSD 5.3 to FreeBSD 5.4

FreeBSD can easily upgraded to latest version. Recently i have upgraded my FreeBSD 5.3 server to FreeBSD 5.4. Upgrading FreeBSD 5.3 to FreeBSD 5.4


FreeBSD booting with different kernel

If you upgrade or recompile FreeBSD kernel and it won’t boot up properly, you need to boot with old kernel and do the recompiling again. To boot with previous version of kernel, reboot the server, select option 6 “Boot Loader”


Installing ImageMagick on FreeBSD 5.4 Server

ImageMagick allows PHP, Perl and other scripts to manipulate images. On FreeBSD server, ImageMagick can be installed easily from ports. Before installing any software from ports, make sure ports tree on your server is uptodate. # cd /usr/ports # make


FreeBSD Log File Rotation with NewSysLog

FreeBSD uses NewSysLog to rotate log files. NewSysLog is installed and running by default on FreeBSD servers, so what you need to do is add your log files (Eg: Apache log files) to /etc/newsyslog.conf To rotate Apache log, i have


Set server time with ntpdate

Server time can be set with ntpdate command on both Linux and FreeBSD. ntpdate command get date and time from the time server (a server running NTP – Network Time Protocol server) and update the date and time. Windows by


Keeping FreeBSD up to date

FreeBSD uses ports to install and upgrade software. Ports collection can be found at /usr/ports/, if its not installed, you can always install it with /stand/sysinstall utility. Upgrading ports # cd /usr/ports/sysutils/portupgrade # make all install # cd /usr/ports/sysutils/portsnap #


DNS Server file

In FreeBSD and Linux servers, DNS server used by the server is set in /etc/resolv.conf freebsd# cat /etc/resolv.conf search localdomain nameserver 192.168.199.2 freebsd# In this case, when you request a web resource from server, server will use 192.168.199.2 as DNS


Configure IP Addresses

FreeBSD uses only 1 configuration file to list your IP addresses and default gateway: /etc/rc.conf There is one line per IP address in this file. Secondary (alias) IP addresses are configured with a netmask of 255.255.255.255. Here’s an example of