From: matthias Date: Thu, 28 Oct 2010 07:13:23 +0000 (-0700) Subject: More, more wiki style. Adapt style of other docs and fix wording/typos X-Git-Url: https://gitweb.dragonflybsd.org/ikiwiki.git/commitdiff_plain/85e01a9da013387797c079565509efd816b65f1a More, more wiki style. Adapt style of other docs and fix wording/typos --- diff --git a/docs/newhandbook/environmentquickstart/index.mdwn b/docs/newhandbook/environmentquickstart/index.mdwn index a62f824b..7436f4f0 100644 --- a/docs/newhandbook/environmentquickstart/index.mdwn +++ b/docs/newhandbook/environmentquickstart/index.mdwn @@ -1,12 +1,10 @@ -This document describes the DragonFly environment one will find on a newly installed system using the default options in the installer after selecting HAMMER for the file systems option. - +# DragonFly BSD Quick Start +This document describes the DragonFly environment one will find on a newly installed system. [[!toc levels=3 ]] -## Disk, Partition layout, Mount points, PFSes, Snapshots - -If you followed the default options during installation you will be -left with a system with the following disk configuration +## Disk layout +If you chose to install on the HAMMER file system during installation you will be left with a system with the following disk configuration: # df -h Filesystem Size Used Avail Capacity Mounted on @@ -24,14 +22,13 @@ left with a system with the following disk configuration In this example -**/dev/serno/9VMBWDM1** is the hard disk specified with serial number, +* `/dev/serno/9VMBWDM1` is the hard disk specified with serial number, +* `/dev/serno/9VMBWDM1.s1` is the first slice on the hard disk. -**/dev/serno/9VMBWDM1.s1** is the first slice on the hard disk. +The disklabel looks at follows -Let us see its disklabel + # disklabel /dev/serno/9VMBWDM1.s1 - - # sudo disklabel /dev/serno/9VMBWDM1.s1 # /dev/serno/9VMBWDM1.s1: # # Informational fields calculated from the above @@ -65,22 +62,20 @@ Let us see its disklabel The slice has 3 partitions: -a - for /boot - -b - for swap +* `a` - for `/boot` +* `b` - for swap +* `d` - for `/`, a HAMMER file system labeled ROOT -d - for /, a HAMMER file system labeled ROOT - -When you create a HAMMER file system you must give it a label, here the Installer labeled it as "ROOT" and mounted it as +When you create a HAMMER file system you must give it a label, here the installer labeled it as "ROOT" and mounted it as ROOT 288G 12G 276G 4% / -Now a PFS is a Pseudo File System inside a HAMMER file system. The HAMMER file system in which the PFSes are created is referred to as the root file system. (You should not confuse the "root" file system with the Label "ROOT", the label can be anything it is just that the installer Labeled it as ROOT -because it is mounted as /) +A PFS is a Pseudo File System inside a HAMMER file system. The HAMMER file system in which the PFSes are created is referred to as the root file system. You should not confuse the "root" file system with the Label "ROOT", the label can be anything. It is just that the installer labeled it as ROOT because it is mounted as `/`. -Now inside the ROOT HAMMER file system you find the installed created 7 PFSes from the `df -h' output above, let us see how they are mounted in fstab +Now inside the ROOT HAMMER file system you find the installed created 7 PFSes from the `df -h` output above, let us see how they are mounted in `/etc/fstab`: # cat /etc/fstab + # Device Mountpoint FStype Options Dump Pass# /dev/serno/9VMBWDM1.s1a /boot ufs rw 1 1 /dev/serno/9VMBWDM1.s1b none swap sw 0 0 @@ -97,9 +92,9 @@ Now inside the ROOT HAMMER file system you find the installed created 7 PFSes fr The PFSes are mounted using a NULL mount because they are also HAMMER file systems. You can read more on NULL mounts here [mount_null(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=mount_null§ion=8). -You don't need to specify a Size for the PFSes like you do for Logical Volumes inside a Volume Group for LVM. All the Free space in the root HAMMER file system is available for all the PFSes to grow. That is the reason in the `df -h' output above you saw free space is same for all PFSes and the root HAMMER file system. +You don't need to specify a size for the PFSes like you do for logical volumes inside a volume group for LVM. All the free space in the root HAMMER file system is available to all the PFSs. That is the reason in the `df -h` output above you saw free space is same for all PFSes and the root HAMMER file system. -Now if you look in /var +Now if you look in `/var` # cd /var/ # ls @@ -108,10 +103,9 @@ Now if you look in /var you will find the above directories. -If you look at the status of one of the PFSes say /usr you will see /var/hammer is the default snapshot directory. +If you look at the status of one of the PFSes, e.g. `/usr` you will see `/var/hammer` is the default snapshot directory. - - # hammer pfs-status /usr/ + # hammer pfs-status /usr/ /usr/ PFS #3 { sync-beg-tid=0x0000000000000001 sync-end-tid=0x0000000117ac6270 @@ -122,17 +116,14 @@ If you look at the status of one of the PFSes say /usr you will see /var/hammer operating as a MASTER snapshots directory defaults to /var/hammer/ } - # - -But there is no "hammer" directory in /var now. That is because no snapshots are yet taken. You can verify this by checking the snapshots available for /usr +There is no "hammer" directory in `/var` now. That is because no snapshots are yet taken. You can verify this by checking the snapshots available for `/usr` # hammer snapls /usr Snapshots on /usr PFS #3 Transaction ID Timestamp Note - # -The best way to take a snapshot of the whole system is to run the command `hammer cleanup'. It does a lot of things but the fist thing it does during cleanup of a PFS is to take its snapshots as configured. +The best way to take a snapshot of all PFSes is to run the command `hammer cleanup`. It does a lot of things but the fist thing it does during cleanup of a PFS is to take its snapshots as configured. # sudo hammer cleanup cleanup / - HAMMER UPGRADE: Creating snapshots @@ -144,81 +135,25 @@ The best way to take a snapshot of the whole system is to run the command `hamme reblock - run.... recopy - run.... cleanup /var - HAMMER UPGRADE: Creating snapshots - Creating snapshots in /var/hammer/var - handle PFS #1 using /var/hammer/var - snapshots - run - prune - run - rebalance - run.. - reblock - run.... - recopy - run.... + [...] cleanup /tmp - HAMMER UPGRADE: Creating snapshots - Creating snapshots in /var/hammer/tmp - handle PFS #2 using /var/hammer/tmp - snapshots - disabled - prune - run - rebalance - run.. - reblock - run.... - recopy - run.... + [...] cleanup /usr - HAMMER UPGRADE: Creating snapshots - Creating snapshots in /var/hammer/usr - handle PFS #3 using /var/hammer/usr - snapshots - run - prune - run - rebalance - run.. - reblock - run.... - recopy - run.... + [...] cleanup /home - HAMMER UPGRADE: Creating snapshots - Creating snapshots in /var/hammer/home - handle PFS #4 using /var/hammer/home - snapshots - run - prune - run - rebalance - run.. - reblock - run.... - recopy - run.... + [...] cleanup /usr/obj - HAMMER UPGRADE: Creating snapshots - Creating snapshots in /var/hammer/usr/obj - handle PFS #5 using /var/hammer/usr/obj - snapshots - disabled - prune - run - rebalance - run.. - reblock - run.... - recopy - run.... + [...] cleanup /var/crash - HAMMER UPGRADE: Creating snapshots - Creating snapshots in /var/hammer/var/crash - handle PFS #6 using /var/hammer/var/crash - snapshots - run - prune - run - rebalance - run.. - reblock - run.... - recopy - run.... + [...] cleanup /var/tmp - HAMMER UPGRADE: Creating snapshots - Creating snapshots in /var/hammer/var/tmp - handle PFS #7 using /var/hammer/var/tmp - snapshots - disabled - prune - run - rebalance - run.. - reblock - run.... - recopy - run.... + [...] cleanup /var/isos - HAMMER UPGRADE: Creating snapshots - Creating snapshots in /var/hammer/var/isos - handle PFS #8 using /var/hammer/var/isos - snapshots - run - prune - run - rebalance - run.. - reblock - run.... - recopy - run.... - # - -You must have noticed that snapshots were not taken for '/tmp', '/usr/obj' and '/var/tmp'. That is how it is automatically configured by the installer. + [...] -Let us look again in /var now - - # ls - account backups caps cron empty hammer log msgs run spool yp - at cache crash db games lib mail preserve rwho tmp +No snapshots were taken for `/tmp`, `/usr/obj` and `/var/tmp`. This is because the PFSes are flagged as `nohistory`. HAMMER tracks history for all files in a PFS, naturally this consumes disk space until the history is pruned. To prevent that temporary files on the mentioned PFSes (e.g., object files, crash dumps) consume disk space, the PFSes are marked as `nohistory`. - -We have a new directory called "hammer" with the following sub directories +In `/var` will be a new directory called *hammer* with the following sub directories # cd hammer/ @@ -231,7 +166,7 @@ We have a new directory called "hammer" with the following sub directories drwxr-xr-x 1 root wheel 0 Oct 13 11:54 var -Well let us look inside /var/hammer/usr +Well let us look inside `/var/hammer/usr` # cd usr/ @@ -241,8 +176,7 @@ Well let us look inside /var/hammer/usr lrwxr-xr-x 1 root wheel 25 Oct 13 11:43 snap-20101013-1143 -> /usr/@@0x0000000117ac6cb0 -We have a symlink pointing to the snapshot Transaction ID shown below. - +We have a symlink pointing to the snapshot transaction ID shown below. # hammer snapls /usr @@ -258,46 +192,43 @@ You can learn more about PFS mirroring [here](http://www.dragonflybsd.org/docs/h ## Configuring and Starting the SSH Server -Described in detail [here](http://www.dragonflybsd.org/docs/newhandbook/sshserver/) +Described in detail [[here|/docs/newhandbook/sshserver/]] ## Software/Programs and Configuration Files Location -DragonFly default installation contains the base software/programs from the DragonFly project itself and few other software from [pkgsrc](http://www.netbsd.org/docs/software/packages.html) which is the DragonFly official package management system. Ready to install binary software from pkgsrc is referred to as "Packages". +DragonFly default installation contains the base software/programs from the DragonFly project itself and few other software from [pkgsrc](http://www.netbsd.org/docs/software/packages.html) which is the DragonFly official package management system. Ready to install binary software from pkgsrc is referred to as *packages*. The base programs are located in the folders /bin /sbin /usr/bin /usr/sbin - /usr/local/bin /usr/local/sbin -Their configuration files are found mainly in /etc. there is also /usr/local/etc +The configuration files for the base system can be found in `/etc`. There is also `/usr/local/etc` which is used by third-party programs. The software/programs from pkgsrc are located in `/usr/pkg/bin` and `/usr/pkg/sbin`. Their configuration files are found in `/usr/pkg/etc`. -The software/programs from pkgsrc are located in /usr/pkg/bin and /usr/pkg/sbin. Their configuration files are found in /usr/pkg/etc. +## Installing Third-party Software -## Installing new Software from pkgsrc packages +Have a look at the [[pkgsrc howto|docs/howtos/HowToPkgsrc/]] for an in-depth description about dealing with third-party pkgsrc packages. -A Detailed description on how to use packages and pkgsrc are given [[here|docs/howtos/HowToPkgsrc]]. +### Using pkgin -For those who are new to the BSD way of doing things can also have the Debian's apt like way of installing, removing and updating packages. +For those who are new to the DragonFly way of doing things can also have the Debian's apt like way of installing, removing and updating packages. *pkgin* does things similar to *apt-get* or *aptitude* or *yum* for that matter. -**pkgin** does things similar to **apt-get** or **aptitude** or **yum** for that matter. +First we need to configure *pkgin* to use a repository which contains the pkgsrc binary packages. For this example we will use the main DragonFly server. **Note**: Be sure to use a local [[mirror|mirrors/]] for better performance and to reduce load on the main servers. -First we need to configure pkgin to use a repository which contains the pkgsrc binary packages. You can get a list of DragonFly mirrors [here](http://www.dragonflybsd.org/mirrors/). For this example we will use the Belarus [HTTP mirror](http://mirror.datacenter.by/pub/DragonFlyBSD/) shown on that page first under Europe. + # echo "http://mirror-master.dragonflybsd.org/packages/i386/DragonFly-2.7/stable/All/" > \ + /usr/pkg/etc/pkgin/repositories.conf - #echo "http://mirror.datacenter.by/pub/DragonFlyBSD/packages/i386/DragonFly-2.7/stable/All/" > /usr/pkg/etc/pkgin/repositories.conf - - -Now to update pkgin with the list of latest packages available from that repository. +Now to update *pkgin* with the list of latest packages available from that repository. # pkgin update cleaning database from - http://mirror.datacenter.by/pub/DragonFlyBSD/packages/i386/DragonFly-2.7/stable/ + http://mirror-master.dragonflybsd.org/packages/i386/DragonFly-2.7/stable/All/ entries... downloading pkg_summary.bz2: 100% processing remote summary - (http://mirror.datacenter.by/pub/DragonFlyBSD/packages/i386/DragonFly-2.7/stable/All)... + (http://mirror-master.dragonflybsd.org/packages/i386/DragonFly-2.7/stable/All/)... updating database: 100% Now to upgrade packages that are already installed in the system @@ -320,7 +251,7 @@ Now to upgrade packages that are already installed in the system downloading openldap-client-2.4.23.tgz: 100% ..... -In order to search for a new Package for example **rdesktop**. +In order to search for a new package, for example *rdesktop*. # pkgin search rdesktop @@ -331,13 +262,9 @@ In order to search for a new Package for example **rdesktop**. <: package is installed but newer version is available >: installed package has a greater version than available package - -If there are symbols **=** or **<** or **>** after a package name in the output then the last 3 lines of the output will explain them. - To search for a package and install it you can do the following. If there are different versions of the package available in the repository it will show you the list and you need to specify one from them explicitly. At the end of the installation it will show you a message if you need any further configuration for the software to work in a particular way. - - dfly-vmsrv# pkgin search mysql-client + # pkgin search mysql-client mysql-client-4.1.22nb4 MySQL 4, a free SQL database (client) mysql-client-5.0.91 MySQL 5, a free SQL database (client) mysql-client-5.1.49 MySQL 5, a free SQL database (client) @@ -345,14 +272,16 @@ To search for a package and install it you can do the following. If there are di =: package is installed and up-to-date <: package is installed but newer version is available >: installed package has a greater version than available package - dfly-vmsrv# pkgin install mysql-client + + # pkgin install mysql-client there's more than one version available for this package. please re-run pkgin with a package name matching one of the following: mysql-client-4.1.22nb4 mysql-client-5.0.91 mysql-client-5.1.49 nothing to do. - dfly-vmsrv# pkgin install mysql-client-5.1.49 + + # pkgin install mysql-client-5.1.49 calculating dependencies for mysql-client-5.1.49... nothing to upgrade. 1 packages to be installed: mysql-client-5.1.49 (7620K to download, 24M to install) @@ -361,24 +290,13 @@ To search for a package and install it you can do the following. If there are di downloading mysql-client-5.1.49.tgz: 100% installing packages... installing mysql-client-5.1.49... - =========================================================================== - $NetBSD: MESSAGE,v 1.1.1.1 2010/03/04 16:27:18 taca Exp $ - - To use the ``mysqlhotcopy'' script, you'll have to install the following - packages: - - databases/p5-DBD-mysql - devel/p5-File-Temp - - =========================================================================== + [...] processing local summary... updating database: 100% marking mysql-client-5.1.49 as non auto-removable - To remove a package - # pkgin remove mysql-client 1 packages to delete: mysql-client-5.1.49 proceed ? [y/N] y @@ -387,9 +305,9 @@ To remove a package updating database: 100% -**pkgin** is very similar to **apt-get, aptitude , yum, emerge, pacman** and friends in the linux world. +*pkgin* is very similar to *apt-get, aptitude , yum, emerge, pacman* and friends in the Linux world. -All the **pkgin** commands can be seen [here](http://imil.net/pkgin/). **pkgin** comes installed with the default DragonFly install so you can skip the installation part on that page +All the *pkgin* commands can be seen [here](http://imil.net/pkgin/). *pkgin* comes installed with the default DragonFly install so you can skip the installation part on that page. To install a desktop you can [read the following](http://www.dragonflybsd.org/docs/newhandbook/X/) -Other Docs can be found [here](http://www.dragonflybsd.org/docs/newhandbook/X/). When ever you find **pkg_add** or **pkg_radd** used to install a software just use **pkgin** instead. +Other Docs can be found [here](http://www.dragonflybsd.org/docs/newhandbook/X/).