this is obsolete doc -- see http://doc.nethence.com/ instead

DragonflyBSD post-installation 

 

http://pbraun.nethence.com/doc/sysutils_bsd/dragonflybsd.html 

http://pbraun.nethence.com/doc/sysutils_bsd/freebsd.html 

http://pbraun.nethence.com/doc/sysutils_bsd/jail.html 

 

 

Network configuration and sshd 

Afer first reboot, you shall enable networking and the ssh daemon. 

 

Define your hostname, ip/mask and gateway, 

cd /etc/
vi rc.conf

like, 

keymap="fr.iso.acc"
hostname="dfly.example.local"
ifconfig_lnc0="inet 10.1.1.3 netmask 255.255.255.0"
defaultrouter="10.1.1.254"
sshd_enable=yes

note. for a jail guest, use a /32 netmask (just like the ip alias on the jail host) 

apply, 

rcrestart netif

 

Define your files and dns name resolutions, 

vi hosts
vi resolv.conf

Note. 'hosts: files dns' is configured by default in nsswitch.conf 

 

Configure the ssh daemon to enable logins (dfly only permits without-password namely with authorized keys), 

cd /etc/ssh/
cp sshd_config sshd_config.dist
sed '/^#/d; /^$/d;' sshd_config.dist > sshd_config
vi sshd_config

add/change, 

PermitRootLogin yes
PasswordAuthentication yes
ChallengeResponseAuthentication yes

apply, 

/etc/rc.d/sshd restart

 

Don't forget to setup root's password, 

passwd root

 

You can now login remotely. 

 

 

Timezone 

Define the timezone, 

cd /etc/
ln -sf ../usr/share/zoneinfo/Europe/Paris localtime

 

 

A few binary packages and shell installation 

Choose a mirror (http://www.dragonflybsd.org/mirrors/). For France, ftp://dfly.nfrance.com/ is fine. Install at least bash and pdksh, 

setenv PKG_PATH ftp://dfly.nfrance.com/packages/amd64/DragonFly-2.8.2/stable/All
pkg_radd bash pdksh screen wget lftp vim lynx
cd /bin/
ln -s /usr/pkg/bin/bash
ln -s /usr/pkg/bin/ksh
echo '/bin/bash' >> /etc/shells
echo '/bin/ksh' >> /etc/shells
chpass -s /bin/bash
#chpass -s /bin/ksh

Note. ast-ksh (ksh93) isn't always available as binary package (it probably doesn't compile) 

 

 

Environment 

Configure your shell, 

cd ~/
mkdir -p .trash/
mv .* .trash/
vi .bash_profile

like, 

source $HOME/.bashrc

and, 

vi .bashrc

like, 

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$HOME/bin
export PATH

 

HOSTNAME=${HOSTNAME:-`uname -n`}
[[ $USER = root ]] && \
        PS1='${HOSTNAME%%.*}# ' || \
        PS1='${HOSTNAME%%.*}> '

 

case "$-" in *i*)
        alias rm='rm -i'
        alias cp='cp -i'
        alias mv='mv -i'
        alias ll='ls -alkF'
        #alias vi='vim'
        alias reboot='shutdown -r now'

 

        who
        ;;
esac

 

# linux
#alias shu='shutdown -P now'

 

# bsd
alias shu='shutdown -p now'

 

# pkgsrc
export PATH=$PATH:/usr/pkg/bin:/usr/pkg/sbin
export PKG_PATH=ftp://dfly.nfrance.com/packages/amd64/DragonFly-2.8.2/stable/All

apply immediately, 

source .bashrc

 

You can now re-login remotely to check your shell and environment. 

 

 

Syslog configuration 

Configure the system logs, 

cd /etc/
mv syslog.conf syslog.conf.dist
vi syslog.conf

like, 

*.*  -/var/log/messages

and secure them, 

cd /var/log
chmod 640 messages

apply, 

/etc/rc.d/syslogd restart

 

 

GNU Screen configuration 

Configure GNU Screen (previously installed), 

cd /usr/pkg/etc/
wget http://pbraun.nethence.com/code/misc/screenrc
cd /etc/
ln -s /usr/pkg/etc/screenrc
cd ~/
wget http://pbraun.nethence.com/code/misc/.screenrc

apply, 

screen

 

 

Indexing 

Generate the locate db, 

/usr/libexec/locate.updatedb

 

While indexing is going on, and since gnu screen is configured, you can continue in another window. Nevermind, on dfly it's freaking fast, anyway. 

 

 

Crontab configuration 

Disable 'at', 

vi /etc/crontab

comment that line, 

#*/5    *       *       *       *       root    /usr/libexec/atrun

 

 

Additional notes 

pkgsrc from source 

Fetch the intial pkgsrc repository from the net, 

cd /usr/
make pkgsrc-create

Note. to update, 

make pkgsrc-update

 

thttpd installation 

Install and configure thttpd, 

pkg_radd thttpd
cp /usr/pkg/share/examples/rc.d/thttpd /etc/rc.d/
rm -f /usr/pkg/share/thttpd/index.html
#mv -f /usr/pkg/share/thttpd/index.html /usr/pkg/share/thttpd/index.html.dist
cd /etc/
ln -s ../usr/pkg/etc/thttpd.conf
echo 'thttpd_enable=yes' >> rc.conf

apply, 

/etc/rc.d/thttpd restart

 

 

References 

http://www.dragonflybsd.org/docs/newhandbook/ 

http://wiki.dragonflybsd.org/