DragonFlyBSD pkg : initial impression

After use pkg in FreeBSD 10 and very satisfied with the result I feel curious about its brother, DragonFlyBSD.

I install DragonFlyBSD 3.8.2 using 32 bit inside my virtualbox ( I think its same if I run with vps that provide custom iso like vultr).

After configure ssh server for network access, I start test pkg command :

$ ssh alam@192.168.1.201
alam@192.168.1.201’s password:
Last login: Tue Oct 21 08:17:01 2014
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California.  All rights reserved.

DragonFly v3.8.2-RELEASE (GENERIC) #7: Thu Aug 14 21:26:32 PDT 2014

Welcome to DragonFly!

To erase a line you’ve written at the command prompt, use “Ctrl-U”.
— Dru <genesis@istar.ca>
> su
dflybsd#

# pkg update
Updating repository catalogue
pkg: http://mirror-master.dragonflybsd.org/dports/dragonfly:3.8:x86:32/LATEST/meta.txz: Not Found
pkg: repository Avalon has no meta file, using default settings
Fetching digests.txz: 100% of 977 KB
Fetching packagesite.txz: 100% of 4 MB

Adding new entries: 100%
Incremental update completed, 20921 packages processed:
0 packages updated, 0 removed and 20921 added.
dflybsd# pkg info

bind98-9.8.7P1_5               BIND DNS suite with updated DNSSEC and DNS64
ca_root_nss-3.16.1             The root certificate bundle from the Mozilla Project
cdrtools-3.00_2                CD/DVD/BluRay and ISO-9660 image creation and extraction tools
curl-7.37.1_2                  Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers
cvsps-2.1_1                    Create patchset information from CVS
expat-2.1.0_1                  XML 1.0 parser written in C
gettext-0.18.3.1_1             GNU gettext package
git-2.0.2                      Distributed source code management tool
indexinfo-0.2                  Utility to regenerate the GNU info page index
isc-dhcp42-server-4.2.6_2      The ISC Dynamic Host Configuration Protocol server
libxml2-2.9.1_1                XML parser library for GNOME
openssl-1.0.1_13               SSL and crypto library
pkg-1.3.6                      Package manager

#

Preinstalled package after I type pkg update is more than FreeBSD offer but I like it, I have git, curl and bind out of box 🙂

See what version of compiler DragonFlyBSD use

# cc -v
Using built-in specs.
COLLECT_GCC=/usr/libexec/gcc47/cc
Target: i386-pc-dragonflybsd
Configured with: DragonFly/i386 system compiler (c, c++, objc, LTO)
Thread model: posix
gcc version 4.7.3 [DragonFly] Release/2013-04-11

Try find wordpress

# pkg search wordpress

de-wordpress-3.8
ja-wordpress-3.8.1
p5-WordPress-XMLRPC-1.23
ru-wordpress-3.8.1
wordpress-3.8.1,1
zh-wordpress-zh_CN-3.8.1
zh-wordpress-zh_TW-3.8.1

Looks like the version is bit out date but not big problem for me as wordpress provide easy upgrade procedure.

Good news for me is PHP also available in 5.2 version.

Try install it via pkg

# pkg install php52
Updating repository catalogue
pkg: http://mirror-master.dragonflybsd.org/dports/dragonfly:3.8:x86:32/LATEST/meta.txz: Not Found
pkg: repository Avalon has no meta file, using default settings
Avalon repository is up-to-date
All repositories are up-to-date
The following 1 packages will be affected (of 0 checked):

New packages to be INSTALLED:
php52: 5.2.17_15

The process will require 7 MB more space
1 MB to be downloaded

Proceed with this action [y/N]: y
Fetching php52-5.2.17_15.txz: 100% of 1 MB
Checking integrity… done (0 conflicting)
[1/1] Installing php52-5.2.17_15: 100%

I don’t understand about error message above (Avalon has no meta file) so I ignore it 🙂

Looks like I love DragonFlyBSD too. Same pkg and no hard learning curve 🙂

Install PHP on DragonFly BSD

PHP is my another concern when I study an OS. Since many project we did in the past use PHP heavily.  PHP 5.2 is another ‘can’t move on’ requirement for many project of us and available in check list.

DragonFly BSD dports also offer PHP same as I expect :

Checking available PHP version in dports

# whereis php52
php52: /usr/dports/lang/php52
dflybsd# cd /usr/dports/lang && ls -l | grep php
drwxr-xr-x  1 root  wheel  0 Jan 16 13:34 php-mode.el
drwxr-xr-x  1 root  wheel  0 Jan 16 13:34 php5
drwxr-xr-x  1 root  wheel  0 Jan 16 13:34 php5-extensions
drwxr-xr-x  1 root  wheel  0 Jan 16 13:34 php52
drwxr-xr-x  1 root  wheel  0 Jan 16 13:34 php52-extensions
drwxr-xr-x  1 root  wheel  0 Jan 16 13:34 php53
drwxr-xr-x  1 root  wheel  0 Jan 16 13:34 php53-extensions
drwxr-xr-x  1 root  wheel  0 Jan 16 13:34 php55
drwxr-xr-x  1 root  wheel  0 Jan 16 13:34 php55-extensions
drwxr-xr-x  1 root  wheel  0 Jan 16 13:34 php_doc

Nice. In general dports offer PHP  (in time of writing) :

  • PHP 5.4 : located in PHP5 (version 5.4.23)
  • PHP 5.3 (version 5.3.28)
  • PHP 5.5 (version 5.5.7)
  • PHP 5.2 (version 5.2.17)

Install PHP as Apache Module on DragonFly BSD

As I already install Apache MPM Worker previously I want to add PHP capability to web server as module.

I choose PHP 5.2

# cd /usr/dports/lang/php52 && make install

install_apache52_on_dragonflybsd

After installation completed.

Continue reading

How to use DragonFly BSD Ports (dports)

How to install software in DragonFly BSD? that question came into my mind after I successfully install version 3.6 on my VirtualBox. I know about pkg_add and ports on FreeBSD so I guess I need to know about how ports work on DragonFly BSD and install a software like Apache on this opportunity. In fact its not hard at all.

Create ports skeleton

This command will create dports directory

# cd /usr

# make dports-create-shallow
If problems occur you may have to rm -rf dports and try again.

git clone –depth=1 git://mirror-master.dragonflybsd.org/dports.git  /usr/dports
Cloning into ‘/usr/dports’…
remote: Counting objects: 124398, done.
remote: Compressing objects: 100% (117288/117288), done.
remote: Total 124398 (delta 5201), reused 94462 (delta 3286)
Receiving objects: 100% (124398/124398), 46.52 MiB | 98.00 KiB/s, done.
Resolving deltas: 100% (5201/5201), done.
Checking connectivity… done
Checking out files: 100% (98096/98096), done.
dflybsd#

Install DialogPorts

# cd /usr/dports/ports-mgmt/dialog4ports && make install

Install Apache MPM Worker using Dport

# cd /usr/dports/www/apache22-worker-mpm && make install

Let the options as is and hit OK.

Other dependencies will be installed automatically.

In the middle of installation I got problem with gmake. Its refused to install due to dns problem. I used to overcome it with pkg_add -vr gmake and DragonFly BSD offer almost identical solution.

help2man-1.43.3_1 depends on executable: gmake – not found
===>    Verifying install for gmake in /usr/dports/devel/gmake
===>  Found saved configuration for gmake-3.82_1
===>   gmake-3.82_1 depends on file: /usr/local/sbin/pkg – found
=> make-3.82.tar.bz2 doesn’t seem to exist in /usr/distfiles/.
=> Attempting to fetch http://ftp.gnu.org/gnu/make/make-3.82.tar.bz2

The problem came from my side, internet connection is so slow that make the message appear. After connection restored and retry it everything fine now.

Checking Installed Package / Software

# pkg info
apache22-worker-mpm-2.2.26     Version 2.2.x of Apache web server with worker MPM.
apr-1.4.8.1.5.3                Apache Portability Library
autoconf-2.69                  Automatically configure source code on many Un*x platforms
autoconf-wrapper-20131203      Wrapper script for GNU autoconf
bind98-9.8.6                   BIND DNS suite with updated DNSSEC and DNS64
ca_root_nss-3.15.2_1           The root certificate bundle from the Mozilla Project
cdrtools-3.00_2                CD/DVD/BluRay and ISO-9660 image creation and extraction tools
curl-7.33.0                    Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers
cvsps-2.1_1                    Create patchset information from CVS
db48-4.8.30.0                  The Berkeley DB package, revision 4.8
dialog4ports-0.1.5_2           Console Interface to configure ports
expat-2.1.0                    XML 1.0 parser written in C
gdbm-1.11                      GNU database manager
gettext-0.18.3.1               GNU gettext package
git-1.8.4.1                    Distributed source code management tool
gmake-3.82_1                   GNU version of ‘make’ utility
help2man-1.43.3_1              Automatically generating simple manual pages from program output
isc-dhcp42-client-4.2.5        The ISC Dynamic Host Configuration Protocol client
isc-dhcp42-server-4.2.5        The ISC Dynamic Host Configuration Protocol server
libtool-2.4.2_2                Generic shared library support script
libxml2-2.8.0_2                XML parser library for GNOME
lynx-2.8.7.2,1                 Non-graphical, text-based World-Wide Web client
m4-1.4.17,1                    GNU m4
p5-Locale-gettext-1.05_3       Message handling functions
pcre-8.33                      Perl Compatible Regular Expressions library
perl5-5.16.3_6                 Practical Extraction and Report Language
pkg-1.1.4_8                    New generation package manager
dflybsd#

Impressive.

Configure SSH Server on DragonFlyBSD After First Time Installation

I used to access server via ssh after first time installation of an server and since I use ‘common’ IP then I get famous message.

Get rid of that message :

$ ssh-keygen -f "/home/alamsyah/.ssh/known_hosts" -R 192.168.1.200
/home/alamsyah/.ssh/known_hosts updated.
Original contents retained as /home/alamsyah/.ssh/known_hosts.old

Then I try ssh

$ ssh alam@192.168.1.200
The authenticity of host ‘192.168.1.200 (192.168.1.200)’ can’t be established.
ECDSA key fingerprint is 25:e4:32:fb:04:35:f8:63:fb:28:d9:55:2d:51:1e:8d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.1.200’ (ECDSA) to the list of known hosts.
Permission denied (publickey).
$

Ups, Permission denied.

After google and read manual I got solution for editing ssh configuration

configure_ssh_dflybsd_1

Yes, ee is exist here in case you wondering about text editor here 🙂

config_ssh_dflybsd_2

Change “PasswordAuthentication” value from no to yes and save the file starting by press ESC button.

Restart ssh service

config_ssh_dflybsd_3

Retry ssh access from terminal or putty

$ ssh alam@192.168.1.200
alam@192.168.1.200’s password:
Last login: Thu Jan 16 11:24:46 2014
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California.  All rights reserved.

DragonFly v3.6.0-RELEASE (GENERIC) #10: Sun Nov 24 07:57:21 PST 2013

Welcome to DragonFly!

Having trouble using fetch through a firewall?  Try setting the environment
variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details.
> su
Password:
dflybsd#

Great. This step give me more confident to explore the machine.