Hye all..
There's a few way to install pkg/applications in *BSD, and today i'll show u how to install SAMBA in NetBSD.
What do u need:
1- a working NetBSD box, with internet access, and u have root access
2- method of installing, we use pkgsrc
3-hard work, willing to learn, blablabla
ok. so after we have a working NetBSD box, we need to install pkgsrc or at least already have it. Do u?
# export PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD-4-0/i386/All"
# export PKG_PATH# pkg_add -v cvsup
parsing: ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD-4-0/i386/All
path: ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD-4-0/i386/All
increasing RLIMIT_NOFILE to max. 1772 open files
trying PKG_PATH ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD-4-0/i386/All
Spawning FTP coprocess
ftp -detv ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD-4-0/i386/All/
wait until the installation of cvsup pkg is finished, then ure ready to kick-off the cvsup..
# cd /usr/pkg/share/examples/cvsup/
# ls
supfile-cvsup.jp.netbsd.org supfile-cvsup.no.netbsd.org
sample of cvsup config file can be choose now, I use supfile-cvsup.no.netbsd.org.
# cp /usr/pkg/share/examples/cvsup/supfile-cvsup.no.netbsd.org /root/
edit using your text editor ( vi, pico, joe, nano etc ) the config file, i use nano ( not in default NetBSD install, u can install it thru pkg_add ):
# nano supfile-cvsup.no.netbsd.org
# Example cvsup config file provided by
# Onno van der Linden
#
# This file can be used to obtain the checked-out NetBSD source files
*default tag=. # Get the current files. Replace the
# ``.'' with a cvs tag to get other
# NetBSD releases.
*default release=cvs
*default delete use-rel-suffix
*default umask=022
*default host=cvsup.no.NetBSD.org # Machine to connect to
*default base=/var/ # Location to put the sources
*default prefix=/usr/ # Where to put the sup subdirectory
*default compress # Use this unless your network link
# is a T1 or faster
# You can get everything using the ``netbsd'' collection.
# netbsd-doc
# Alternatively, comment out the ``netbsd'' collection and just get one or
# more of the partial collections by uncommenting them below.
#netbsd-src
#netbsd-doc prefix=/var/
#netbsd-gnusrc
#netbsd-sharesrc
#netbsd-syssrc
netbsd-pkgsrc
# netbsd-xsrc
edit the file according to above, save it and ure ready to update!
# cvsup -g -L 2 supfile-cvsup.no.netbsd.org
Parsing supfile "./supfile-cvsup.no.netbsd.org"
Connecting to cvsup.no.NetBSD.org
Connected to cvsup.no.NetBSD.org
Server software version: SNAP_16_1h
Negotiating file attribute support
Exchanging collection information
Establishing multiplexed-mode data connection
Running
Updating collection netbsd-pkgsrc/cvs
Edit pkgsrc/audio/mpegaudio/PLIST
Add delta 1.1.1.1 2002.05.12.00.54.02 wiz
Edit pkgsrc/audio/mpegaudio/patches/patch-aa
Add delta 1.1.1.1 2002.05.12.00.54.04 wiz
Edit pkgsrc/audio/mpegaudio/patches/patch-ab
Add delta 1.1.1.1 2002.05.12.00.54.04 wiz
Edit pkgsrc/audio/mpg123-nas/PLIST
Add delta 1.1.1.1 2002.05.25.06.28.00 rh
Edit pkgsrc/audio/mpg321/PLIST
Add delta 1.1.1.1 2002.06.13.09.14.45 rh
Edit pkgsrc/audio/oggasm/PLIST
Add delta 1.1.1.1 2002.05.22.12.26.16 zuntum
Edit pkgsrc/audio/spiralsynth/PLIST
Add delta 1.1.1.1 2002.05.26.01.14.26 rh
Edit pkgsrc/audio/wmmp3/PLIST
Add delta 1.1.1.1 2002.06.13.09.42.44 rh
Edit pkgsrc/audio/wmsmixer/PLIST
Add delta 1.1.1.1 2002.06.21.15.33.55 agc
Edit pkgsrc/chat/bitchx/Makefile
Add delta 1.45 2008.07.13.16.07.13 dholland
Edit pkgsrc/chat/finch/Makefile
Add delta 1.14 2008.07.11.07.39.20 tnn
Edit pkgsrc/chat/goofey/PLIST
Add delta 1.1.1.1 2002.06.20.04.41.09 grant
Edit pkgsrc/chat/libpurple/Makefile.common
Add delta 1.18 2008.07.11.07.39.20 tnn
Edit pkgsrc/chat/libpurple/distinfo
Add delta 1.16 2008.07.11.07.39.20 tnn
Edit pkgsrc/chat/libpurple/patches/patch-aa
Add delta 1.9 2008.07.11.07.39.20 tnn
Edit pkgsrc/chat/pidgin/Makefile
Add delta 1.13 2008.07.11.07.39.20 tnn
Edit pkgsrc/chat/pidgin-sametime/Makefile
Add delta 1.5 2008.07.11.07.39.20 tnn
Edit pkgsrc/chat/pidgin-silc/Makefile
Add delta 1.8 2008.07.11.07.39.21 tnn
Edit pkgsrc/chat/pidgin-silc/distinfo
Add delta 1.12 2008.07.11.07.39.21 tnn
Edit pkgsrc/chat/silc-client/Makefile
Add delta 1.49 2008.07.13.12.04.11 tonnerre
Edit pkgsrc/chat/silc-client/Makefile.common
Add delta 1.11 2008.07.13.12.04.11 tonnerre
Edit pkgsrc/chat/silc-client/PLIST
Add delta 1.23 2008.07.13.12.04.11 tonnerre
Edit pkgsrc/chat/silc-client/PLIST.perl
Add delta 1.7 2008.07.13.12.04.11 tonnerre
Edit pkgsrc/chat/silc-client/distinfo
Add delta 1.32 2008.07.13.12.04.11 tonnerre
Edit pkgsrc/chat/silc-client/options.mk
Add delta 1.5 2008.07.13.12.04.11 tonnerre
Edit pkgsrc/chat/silc-client/patches/patch-aa
Add delta 1.13 2008.07.13.12.04.11 tonnerre
Edit pkgsrc/chat/silc-client/patches/patch-ab
Add delta 1.13 2008.07.13.12.04.11 tonnerre
Edit pkgsrc/chat/silc-client/patches/patch-ac
Add delta 1.10 2008.07.13.12.04.11 tonnerre
Edit pkgsrc/chat/silc-client/patches/patch-ad
Add delta 1.5 2008.07.13.12.04.11 tonnerre
Checkout pkgsrc/chat/silc-client/patches/patch-ae
Edit pkgsrc/comms/asterisk/Makefile
Add delta 1.56 2008.07.10.08.23.20 sborrill
Edit pkgsrc/comms/asterisk/files/asterisk.sh
Add delta 1.3 2008.07.10.08.23.20 sborrill
Edit pkgsrc/comms/conserver/patches/patch-aa
Add delta 1.1.1.1 2002.05.09.16.35.25 hubertf
Edit pkgsrc/comms/esms/PLIST
Add delta 1.1.1.1 2002.06.17.20.00.36 tron
Edit pkgsrc/comms/obexapp/distinfo
Add delta 1.8 2008.07.09.20.14.37 plunky
Edit pkgsrc/comms/obexapp/patches/patch-af
Add delta 1.3 2008.07.09.20.14.37 plunky
Edit pkgsrc/converters/ack/PLIST
Add delta 1.1.1.1 2002.05.31.13.01.01 seb
Edit pkgsrc/converters/ack/patches/patch-aa
Add delta 1.1.1.1 2002.05.31.13.01.01 seb
Edit pkgsrc/converters/hztty/PLIST
Add delta 1.1.1.1 2002.06.19.09.39.18 agc
Edit pkgsrc/converters/nkf/PLIST
Add delta 1.1.1.1 2002.05.31.13.00.35 seb
Edit pkgsrc/converters/qkc/PLIST
Add delta 1.1.1.1 2002.05.31.13.00.14 seb
Edit pkgsrc/converters/tex2rtf/PLIST
Add delta 1.1.1.1 2002.05.25.23.23.01 rh
Edit pkgsrc/cross/bfd-mdsetimage/Makefile
Add delta 1.22 2008.07.10.15.29.29 joerg
Checkout pkgsrc/databases/pear-MDB2/Makefile
Checkout pkgsrc/databases/pear-MDB2/distinfo
Checkout pkgsrc/databases/pear-MDB2/patches/patch-aa
Checkout pkgsrc/databases/pear-MDB2/patches/patch-ab
Checkout pkgsrc/databases/pear-MDB2_Driver_mysql/Makefile
Checkout pkgsrc/databases/pear-MDB2_Driver_mysql/distinfo
Checkout pkgsrc/databases/pear-MDB2_Driver_mysql/patches/patch-aa
Checkout pkgsrc/databases/pear-MDB2_Driver_mysql/patches/patch-ab
Checkout pkgsrc/databases/pear-MDB2_Driver_pgsql/Makefile
Checkout pkgsrc/databases/pear-MDB2_Driver_pgsql/distinfo
Checkout pkgsrc/databases/pear-MDB2_Driver_pgsql/patches/patch-aa
Checkout pkgsrc/databases/pear-MDB2_Driver_pgsql/patches/patch-ab
Edit pkgsrc/devel/Makefile
Add delta 1.945 2008.07.13.15.13.10 rhaen
Edit pkgsrc/devel/Renaissance/Makefile
Add delta 1.17 2008.07.10.13.27.02 joerg
wait until it finished... and now installation of applications/software/pkg/programs
# cd /usr/pkgsrc/net/samba/
# make install clean
=> Bootstrap dependency digest>=20010302: found digest-20080510
===> Skipping vulnerability checks.
WARNING: No /var/db/pkg/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/pkg/sbin/download-vulnerability-list'.
=> Checksum SHA1 OK for samba-3.0.30.tar.gz
=> Checksum RMD160 OK for samba-3.0.30.tar.gz
===> Installing dependencies for samba-3.0.30
==========================================================================
The supported build options for samba are:
ads cups fam ldap pam winbind
You can select which build options to use by setting PKG_DEFAULT_OPTIONS
or the following variable. Its current value is shown:
PKG_OPTIONS.samba (not defined)
==========================================================================
==========================================================================
The following variables will affect the build process of this package,
samba-3.0.30. Their current value is shown below:
* VARBASE = /var
=== lots of output msg ====================
=> Automatic manual page handling
=> Running POST-INSTALL script actions
samba-3.0.30: copying /usr/pkg/share/examples/samba/smb.conf.default to /usr/pkg/etc/samba/smb.conf
===========================================================================
The following files should be created for samba-3.0.30:
/etc/rc.d/smbd (m=0755)
[/usr/pkg/share/examples/rc.d/smbd]
/etc/rc.d/samba (m=0755)
[/usr/pkg/share/examples/rc.d/samba]
/etc/rc.d/nmbd (m=0755)
[/usr/pkg/share/examples/rc.d/nmbd]
===========================================================================
=> Please note the following:
===========================================================================
$NetBSD: MESSAGE,v 1.4 2005/11/14 08:05:27 jlam Exp $
When upgrading a Samba installation and "lock directory" has been set
to a non-default value in the configuration files, then "state directory"
needs to be set appropriately and/or the files located in the lock
directory should be moved to the state directory. Please read the
documentation on "state directory" in the smb.conf(5) manual page for
more information.
===========================================================================
=> Registering installation for samba-3.0.30
samba-3.0.30 requires installed package perl-5.8.8nb8
samba-3.0.30 requires installed package readline-5.2nb1
===> Cleaning for samba-3.0.30
#
so just copy it to the location..
# cd /etc/rc.d
# ls
DAEMON fixsb mixerctl powerd staticroute
LOGIN fsck mopd ppp swap1
NETWORKING ftpd motd pwcheck swap2
SERVERS hostapd mountall quota sysctl
accounting identd mountcritlocal racoon sysdb
altqd ifwatchd mountcritremote raidframe syslogd
amd inetd mountd raidframeparity timed
apmd ipfilter moused rarpd tpctl
bootconf.sh ipfs mrouted rbootd ttys
bootparams ipmon named root veriexec
btconfig ipnat ndbootd route6d virecover
btdevctl ipsec network routed wdogctl
bthcid irdaattach newsyslog rpcbind wpa_supplicant
ccd iscsi_target nfsd rtadvd wscons
cgd isdnd nfslocking rtclocaltime wsmoused
cleartmp kdc ntpd rtsold xdm
cron ldconfig ntpdate rwho xfs
dhclient lkm1 pf savecore ypbind
dhcpd lkm2 pf_boot screenblank yppasswdd
dhcrelay lkm3 pflogd sdpd ypserv
dmesg local poffd securelevel
downinterfaces lpd postfix sshd
# cp /usr/pkg/share/examples/rc.d/smbd .
# cp /usr/pkg/share/examples/rc.d/samba .
# cp /usr/pkg/share/examples/rc.d/nmbd .
# chmod 755 smbd
# chmod 755 nmbd
# chmod 755 samba
edit the /etc/rc.conf file to enable samba, and start during boot. So add this line:
#nano /etc/rc.conf
smbd=YES
nmbd=YES
so now start the SAMBA!!
# /etc/rc.d/samba start
Starting nmbd.
Starting smbd.
or u can also use:
# /etc/rc.d/samba restart
Stopping smbd.
kill: 28409: No such process
Stopping nmbd.
Starting nmbd.
Starting smbd.
check if it runs:
# ps aux | grep /usr/pkg
root 23981 0.0 3.2 1088 1548 ? Ss 11:21AM 0:00.01 /usr/pkg/sbin/nmbd -D
root 24742 0.0 5.5 3316 2684 ? Is 11:21AM 0:00.02 /usr/pkg/sbin/smbd -D
root 24978 0.0 2.7 3316 1320 ? I 11:21AM 0:00.01 /usr/pkg/sbin/smbd -D
# smbclient -L localhost
Password:
Domain=[NETBSD MYGROUP] OS=[Unix] Server=[Samba 3.0.30]
Sharename Type Comment
--------- ---- -------
IPC$ IPC IPC Service (Samba 3.0.30 ())
Domain=[NETBSD MYGROUP] OS=[Unix] Server=[Samba 3.0.30]
Server Comment
--------- -------
Workgroup Master
--------- -------
NETBSD MYGROUP
no password is set, so u just press "ENTER"
so now your SAMBA is running, u can edit/tailor your SAMBA config file as u wish!
# nano /usr/pkg/etc/samba/smb.conf
and restart the SAMBA again to see the result!!
ENJOY!!!
No comments:
Post a Comment