Archive for FreeBSD Server

RAR files on Linux

By default Linux support .tar, .tar.gz, .bz2 and .zip compressed files.

On FreeBSD unzip command is not available, you can install from ports.

RAR files can be uncompressed with command unrar.

On linux you can install it with

yum install unrar

On FreeBSD, you can install it from package or from ports


pkg_add -r unrar
rehash

Comments off

Restarting Network

On Linux, you can restart network service with command

# service network restart

Similar command is available for FreeBSD, but is less used/known.

The command is /etc/netstart

freebsd# /etc/netstart
hw.bus.devctl_disable: 1 -> 1
lo0: flags=8049 mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0×3
inet 127.0.0.1 netmask 0xff000000
dhclient already running? (pid=238).
route: writing to routing socket: File exists
add net ::ffff:0.0.0.0: gateway ::1: File exists
route: writing to routing socket: File exists
add net ::0.0.0.0: gateway ::1: File exists
net.inet6.ip6.forwarding: 0 -> 0
net.inet6.ip6.accept_rtadv: 1 -> 1
route: writing to routing socket: File exists
add net fe80::: gateway ::1: File exists
route: writing to routing socket: File exists
add net ff02::: gateway ::1: File exists
IPv4 mapped IPv6 address support=NO
freebsd#

Comments off

FreeBSD DHCP Lease

To assign IP from DHCP for your network card on FreeBSD, add following line to /etc/rc.conf

ifconfig_lnc0=”DHCP”

You can see current lease info at

/var/db/dhclient.leases

freebsd# cat /var/db/dhclient.leases
lease {
interface “lnc0″;
fixed-address 192.168.199.128;
option subnet-mask 255.255.255.0;
option dhcp-lease-time 1800;
option routers 192.168.199.2;
option dhcp-message-type 5;
option dhcp-server-identifier 192.168.199.254;
option domain-name-servers 192.168.199.2;
option broadcast-address 192.168.199.255;
option domain-name “localdomain”;
renew 6 2005/12/24 09:33:15;
rebind 6 2005/12/24 09:46:02;
expire 6 2005/12/24 09:49:47;
}
freebsd#

Comments (1)

FreeBSD Cpanel Server - Pear not working

In a FreeBSD 5.4 Cpanel server, Apache is compiled with pear, but is not working. The site worked well on Linux Cpanel server, but after moving to FreeBSD server, start getting following error

Warning: main(DB.php): failed to open stream: No such file or directory in /home/user/public_html/db_connect.php on line 5

Fatal error: main(): Failed opening required ‘DB.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/user/public_html/db_connect.php on line 5

Solution can be found at Dedicated Server Forum

Comments off

« Previous entries