Category Archives: Unix

Unix

Dynagen in FreeBSD

After ports unfreeze, I do some directory ports walking ( wanna analogy it as blogwalking icon smile Dynagen in FreeBSD ), find dynagen and dynamips ports. I thought dynagen not available in FreeBSD but I’m wrong icon smile Dynagen in FreeBSD

su-2.05b# whereis dynamips

dynamips: /usr/ports/emulators/dynamips

su-2.05b# whereis dynagen

dynagen: /usr/ports/emulators/dynagen

su-2.05b# ls /usr/ports/emulators | grep dyna

dynagen
dynamips
dynamips-devel

wow, try dynagen first icon smile Dynagen in FreeBSD

su-2.05b# cd /usr/ports/emulators/dynagen/

See version

su-2.05b#ee Makefile

# New ports collection makefile for: dynagen
# Date created: 2006-11-07
# Whom: trasz

#
# $FreeBSD: ports/emulators/dynagen/Makefile,v 1.6 2007/04/13 13:03:46 trasz Exp $
#PORTNAME= dynagen
PORTVERSION= 0.9.0
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= dyna-gen

MAINTAINER= trasz@freebsd.org
COMMENT= Text-based front end for Dynamips

RUN_DEPENDS= dynamips:${PORTSDIR}/emulators/dynamips

Version 0.9, no time for installation but prepare the file is OK

su-2.05b# make fetch

On FreeBSD before 6.2 ports system unfortunately can not set default X11BASE by itself so please help it a bit by setting X11BASE=${LOCALBASE} in make.conf.
On the other hand, if you do wish to use non-default X11BASE, please set variable USE_NONDEFAULT_X11BASE.
*** Error code 1

Sigh, this box is 4.11 not 6.2, try add more option in ‘make’

su-2.05b# make USE_NONDEFAULT_X11BASE=1 fetch

===> Vulnerability check disabled, database not found
=> dynagen-0.9.0.tar.gz doesn’t seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from http://heanet.dl.sourceforge.net/sourceforge/dyna-gen/.
fetch: http://heanet.dl.sourceforge.net/sourceforge/dyna-gen/dynagen-0.9.0.tar.gz: Not Found
=> Attempting to fetch from http://nchc.dl.sourceforge.net/sourceforge/dyna-gen/.
dynagen-0.9.0.tar.gz 100% of 230 kB 2598 Bps 00m00s

ready to install, make install clean

P.S : I should learn about how to modifiy ports, dynagen has reach 0.9.2 but ports still 0.9 icon smile Dynagen in FreeBSD

Unix

php4-gd and xorg7.2

Try to upgrade php4-gd from ports, but still not work icon sad php4 gd and xorg7.2

kongja# portupgrade php4-gd

—>  Upgrading ‘php4-gd-4.4.6′ to ‘php4-gd-4.4.7′ (graphics/php4-gd)
—>  Building ‘/usr/ports/graphics/php4-gd’
===>  Cleaning for php4-4.4.7
===>  Cleaning for autoconf-2.59_2
===>  Cleaning for xorg-libraries-7.2
………………….
………………….
===>  Cleaning for php4-gd-4.4.7
===>  Found saved configuration for php4-gd-4.3.10
===>  Extracting for php4-gd-4.4.7
=> MD5 Checksum OK for php-4.4.7.tar.bz2.
=> SHA256 Checksum OK for php-4.4.7.tar.bz2.
===>  Patching for php4-gd-4.4.7
===>  Applying FreeBSD patches for php4-gd-4.4.7
===>   php4-gd-4.4.7 depends on executable in : phpize – found
===>   php4-gd-4.4.7 depends on file: /usr/local/bin/autoconf259 – found
===>   php4-gd-4.4.7 depends on file: /usr/local/libdata/xorg/libraries – not found
===>    Verifying install for /usr/local/libdata/xorg/libraries in /usr/ports/x11/xorg-libraries
Read /usr/ports/UPDATING for the procedure to upgrade or install xorg 7.2.
*** Error code 1
read more »

Unix

FreeBSD ports unfreeze

Fiuh, finally ports unfreeze

I thought my system is crash when I try to update ports, until I red about Xorg 7.2 ports committed icon smile FreeBSD ports unfreeze

Yeah, big ports

Today,

kongja# csup -g -L2 ports-supfile -h cvsup12.freebsd.org

Parsing supfile “ports-supfile”
Connecting to cvsup12.freebsd.org
Cannot connect to 2001:468:902:201:209:3dff:fe11:442c: No route to host
Connected to 128.205.32.21
Server software version: SNAP_16_1h
Negotiating file attribute support
Exchanging collection information
Establishing multiplexed-mode data connection
Running
Updating collection ports-all/cvs

……………………
read more »

Unix

Overwrite FreeBSD ports

Upgrade ports is easy, using portupgrade. Even portupgrade can upgrade it’s own program icon smile Overwrite FreeBSD ports

The problem come with error message ‘xxxx already installed’, how to overcome this problem?

Answer: read the guide icon smile Overwrite FreeBSD ports

kongja# portupgrade p5-libwww-5.79_1

—> Upgrading ‘p5-libwww-5.79_1′ to ‘p5-libwww-5.803′ (www/p5-libwww)
—> Building ‘/usr/ports/www/p5-libwww’
===> Cleaning for p5-Compress-Zlib-1.33
bla…bla..bla

===> Checking if net/p5-URI already installed
===> p5-URI-1.35 is already installed
You may wish to “make deinstall” and install this port again
“make reinstall” to upgrade it properly.
If you really wish to overwrite the old port of net/p5-URI
without deleting it first, set the variable “FORCE_PKG_REGISTER”
in your environment or the “make install” command line.
*** Error code 1
Stop in /usr/ports/net/p5-URI.
*** Error code 1
Stop in /usr/ports/www/p5-libwww.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade30900.0 make
** Fix the problem and try again.
** Listing the failed packages (*:skipped / !:failed)
! www/p5-libwww (p5-libwww-5.79_1) (unknown build error)
—> Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed

wow, check if the ports already installed

read more »

Unix

Ignore port on FreeBSD

After update ports collection and find old port, need to upgrade. I found that port status : ‘Ignored

bow# portversion -v | grep ‘<'

XFree86-libraries-4.3.0_7 < needs updating (port has 4.4.0_3)

bow# portupgrade XFree86-libraries-4.3.0_7

** Port marked as IGNORE: x11/XFree86-4-libraries:
is part of XFree86-4

doh, new commit for this port icon sad Ignore port on FreeBSD

Try to update it’s makefile a bit

bow# cd /usr/ports/x11/XFree86-4-libraries/

bow# ee Makefile

find these lines:
.if ${X_WINDOW_SYSTEM:L} != xfree86-4
IGNORE= is part of XFree86-4
.endif

jadikan :

#.if ${X_WINDOW_SYSTEM:L} != xfree86-4
#IGNORE= is part of XFree86-4
#.endif

try to portupgrade once again :

bow# portupgrade XFree86-libraries-4.3.0_7

—>Upgrading ‘XFree86-libraries-4.3.0_7′ to ‘XFree86-libraries-4.4.0_3′ (x11/XFree86-4-libraries)
—>Building ‘/usr/ports/x11/XFree86-4-libraries’
===>Cleaning for libiconv-1.9.2_1
===>Cleaning for gettext-0.14.4_1
bla..bla…bla…

done, upgrading to newest program
I love FreeBSD ports

Unix

Update FreeBSD with freebsd-update

After fresh install freebsd 4.11 in old machine I need to update it right away since many security advisories. Quick way to do that using freebsd-update :

Installing freebsd-update

dns# whereis freebsd-update
freebsd-update: /usr/ports/security/freebsd-update
dns# cd /usr/ports/security/freebsd-update/
dns# make install

===> Vulnerability check disabled, database not found
=> freebsd-update-1.6.tar.gz doesn’t seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from http://www.daemonology.net/freebsd-update/.
freebsd-update-1.6.tar.gz 100% of 30 kB 6810 Bps
Configuration

dns# cp /usr/local/etc/freebsd-update.conf.sample /usr/local/etc/freebsd-update.conf

read more »

Unix

Install list for new FreeBSD server

Some thought on configuration and install list for new FreeBSD server :

1. Install minimal (pick minimal or developer)

 Install list for new FreeBSD server
2. Configure ethernet card

defaultrouter=”10.10.12.9″
gateway_enable=”YES”
hostname=”alamster.rasyid.net”
ifconfig_em0=”inet 192.168.1.2 netmask 255.255.255.0″
ifconfig_em0_alias0=”inet 10.10.12.1 netmask 255.255.255.240″

3. Time synchronize

-bash-2.05b$ rdate time.nist.gov

read more »

Unix

Install program in FreeBSD; ports, package or source?

FreeBSD supports three methods for installing program :

  1. Ports
  2. Package
  3. Source

Every method has its advantage and disadvantage :

  • Ports, till time of writing, already reach 16984, wow. Supports many option, my favorite since beginning icon smile Install program in FreeBSD; ports, package or source? . Simply type make install .
  • Package, for time consuming ports like cvsup I prefer use package for its small size. Package not provide option.
  • Source, everything begin with source. If no ports or package available I use source.

Like debian or ubuntu ports make life easier, every dependency handling automatically as long you got internet connection icon smile Install program in FreeBSD; ports, package or source?

Pretty impressive list of ports number 16984, I don’t know all of them. Only related ports to sytem administration like apache, php, mysql etc.

Maybe I should explore the ports more for better understanding on how FreeBSD work.

Full list of FreeBSD ports to date :

read more »

Unix

FreeBSD snapshots

I have noticed that FreeBSD mini iso no longer distributed but I found interesting link : FreeBSD snapshots From FreeBSD site :

As part of an ongoing effort to improve the overall release process before a release actually slips out the door with problems, we are now periodically producing interim test releases called snapshots. These snapshots will be very similar to full releases, except that they might not include all the bits included in a full release (such as packages and updated documentation).

for example tracking status for ZFS in FreeBSD current available in snapshots, also stable version of FreeBSD 6.2, cool  FreeBSD snapshots I click on 200705 for latest snapshots :  FreeBSD snapshots wget time icon smile FreeBSD snapshots

Unix

Installing dragonflyBSD 1.8.1

From wikipedia DragonflyBSD is :

DragonFly BSD is a free, Unix-like operating system which was forked from FreeBSD 4.8. Matt Dillon, a long-time FreeBSD and Amiga developer, started work on DragonFly BSD in June 2003 and announced it on the FreeBSD mailing lists on July 16, 2003 [1].

Dillon started DragonFly in the belief that the methods and techniques being adopted for threading and SMP in FreeBSD 5 would lead to a poorly performing system that would be very difficult to maintain. He sought to correct these suspected problems within the FreeBSD project. Due to ongoing conflicts with other FreeBSD developers over the implementation of his ideas, and other reasons, his ability to directly change the FreeBSD code was eventually revoked. Despite this, the DragonFly BSD and FreeBSD projects still work together contributing bug fixes, driver updates and other system improvements to each other.

Intended to be “the logical continuation of the FreeBSD 4.x series”, DragonFly is being developed in an entirely different direction from FreeBSD 5, including a new Light Weight Kernel Threads (LWKT) implementation and a light weight ports/messaging system. Many concepts planned for DragonFly were inspired by AmigaOS.

FreeBSD 4.11 and it’s ports no longer supported but I have old hardware for production software so I decide to learn dflyBSD, to see how installation process looks like, I make simple video using vmware 6. Once I familiar with the process, I’ll deploy it the server.

P.S :

Usefull link around dragonflybsd 1.8.1 :

  1. DragonflyBSD
  2. Review DragonflyBSD 1.8.1
  3. Baby steps with DragonFly BSD 1.8.1

Unix

Install PfSense 1.2Beta1, Quick Overview

Pfsense is web based firewall designed special for PC, based on FreeBSD 6.x

Version 1.2Beta1 using 6.2 release as base, PfSense features from author site :

pfSense changes implemented (subject to change daily):

  • FreeBSD 6.1 – CURRENT with ALTQ
  • Wireless a/b/g wpa_supplicant, turbo, WEP, WPA-E/PSK and WPA2 (TKIP)
  • Incoming load balancing pools
  • PPPoE Server
  • Themes
  • New system->afterfilterchangeshellcmd xml tag which is executed on the system after each filter change (or other networking related changes)
  • All of the GREAT m0n0wall features, some improved
  • setup wizard using xml -> web gui toolkit
  • package xml -> web gui toolkit. RAPIDLY create packages and GUI’s
  • rebootless changes of settings
  • multiple WAN Support
  • outgoing load balancing pool
  • pf (openbsd’s packet filter)
  • failovercapable DHCP-Server with advanced settings (specify gateway, DNS, WINS)
  • advanced support for wireless devices (including WEP, WPA, HostAP-mode, hardware-encryption if supported by driver, mac-filtering, hide SSID, …) with by freeBSD6 supported wireless devices (atheros recommended for full functionality)
  • Systemstatus with realtimegraphs including SWAP usage monitor
  • ALTQ traffic shaping with integrated magic shaper wizard
  • Queuegraphs for Trafficshaper
  • Edit file option
  • Execute command now in menu
  • enhanced configuration-system featuring a configuration history and partial config down-/uploads
  • a lot of small “helpers” that make admins life easier
    • pfflowd – converting PF-status-massages to Cisco NetFlow-Datagrams
    • PFStat – Graphing
    • NTOP – Enhanced network history data
    • STunnel – wrap standard ports with SSL
    • Squid Transparent Proxy
    • arpwatch – watch ethernet/ip-adress-pairings
    • assp – Anti-Spam-Proxy
    • freeradius – Radiusserver
    • mtr – enhanced traceroute
    • nmap – networkscanner for security auditing
    • siproxd – proxy/masquerading for SIP-protocol
    • spamd – fake SMTP-Server as Spam-Tarpit
    • iperf – bandwidth-measuring
    • netio – bandwidth-measuring

Watch this video for quick overview how installation looks like.