ページ更新: 2009-12-13 (日) (4097日前)

(2009-12-13)

FreeBSDのインストールメモ。自分はFreeBSDに関しては全くの初心者なので、このページの内容は当てにしないこと。

目次

[編集]

情報源 #

実は、これらの記事を読む前に作業した。

[編集]

FreeBSD 8.0 #

VMware Workstation 8.0にて。

8.0-RELEASE-amd64-bootonly.iso (45.1MB) を用いてインストールした。

なお、8.0-RELEASE-amd64-dvd1.iso : 2.01 GB も手元にあるが、今回は用いなかった。

[編集]

CDROMから起動 #

FreeBSD8-01.png

→「1. Boot FreBSD [default]」

[編集]

Country Selection #

FreeBSD8-02.png

→「110 Japan」

[編集]

System Console Keymap #

FreeBSD8-03.png

→「Japanese 106」

[編集]

sysinstall Main Menu #

FreeBSD8-04.png

sysinstall のメニュー。インストール後も、たぶんsysinstallコマンドで呼び出せるだろうから、 手っ取り早く「Express」を選択。

→「Express」

[編集]

FDISK #

FreeBSD8-05.png

→「A = Use Entire Disk」、「S = Set Bootable」、「Q = Finish」

[編集]

Install Boot Manager for drive da0? #

FreeBSD8-06.png

→「Standard」

[編集]

FreeBSD Disklabel Editor #

FreeBSD8-07.png

FreeBSD8-08.png

→「A = Audo Defaults」、「Q = Finish」

[編集]

Choose Distributions #

FreeBSD8-09.png

FreeBSD8-10.png

FreeBSD8-11.png

→「All」、「X Exit」

[編集]

Choose Installation Media #

FreeBSD8-12.png

→「3 FTP Passive」

[編集]

Please select a FreeBSD FTP distribution site #

FreeBSD8-13.png

→「Japan」のどれか

[編集]

Network interface information required #

FreeBSD8-14.png

FreeBSD8-15.png

FreeBSD8-16.png

FreeBSD8-17.png

→「em0」、「IPv6 = No」、「DHCP = Yes」、「Host = freebsd8」、

[編集]

ディスクへの書き込み、インストールなど #

FreeBSD8-18.png

FreeBSD8-19.png

FreeBSD8-20.png

[編集]

sysinstall Main Menu #

これで、sysinstallにに戻ってきた。再起動して、インストールを完了する。

FreeBSD8-21.png

FreeBSD8-22.png

[編集]

パスワード #

rootでログインし(パスワードなし)、パスワードを設定する。

# passwd
[編集]

ssh #

rootでログインし(パスワードなし)、パスワードを設定する。

# passwd

packagesからsshをインストールする。でも、名前を知らないので、portsで探してみる。

# cd /usr/ports
# make search name=ssh | grep ^Path | grep ssh
 :
Path:  /usr/ports/sequcirty/ssh2
Path:  /usr/ports/sequcirty/ssh2-nox11
 :

とりあえず、x11なしのを入れてみる。

# pkg_add -r ssh2-nox11
 :
Depending on how you would like to start sshd2(8) you have two choices:
1) Add the following line to /etc/rc.conf or /etc/rc.conf.local:

sshd2_enable="YES"
 :

2) add the following entries to your /etc/inetd.conf:
 :
# vi /etc/rc.conf
(sshd2_enable="YES" を足す。)
# shutdown -r now
# ifconfig
(IPアドレスが表示される)
[編集]

VMware-tools #

perl がなければ、インストールする:

# which perl
perl: Command not found.
# pkg_add -r perl

VMware-toolsを展開する:

(VMwareのメニューで「VMware toolsのインストール」を実行しておく)
# mount /cdrom
# ls /cdrom
vmware-freebsd-tools.tar.gz
# tar zxf /cdrom/vmware-freebsd-tools.tar.gz
# umount /cdrom

VMware-tools をインストールする(エラー: compat6x-amd64 package が必要):

# cd vmware-tools-distrib/
# ls
FILES                   bin                     etc                     lib
INSTALL                 doc                     installer               vmware-install.pl
# ./vmware-install.pl --default
 :
The path "/usr/local/share/doc/vmware-tools" does not exist currently. This
program is going to create it, including needed parent directories. Is this
what you want? [yes]

The installation of VMware Tools 8.1.3 build-203739 for FreeBSD completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command:
"/usr/local/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/local/bin/vmware-config-tools.pl". Do you
want this program to invoke the command for you now? [yes]

The VMware Tools for FreeBSD 8.0 depend on libraries provided by the
compat6x-amd64 package. Unfortunately we were unable to locate these libraries
on your system.  Please install the compat6x-amd64 package from the FreeBSD
Ports Tree before you attempt to configure VMware Tools.

The easiest way to install this pakage is by using pkg_add utility.  Refer to
the man pages on how to properly use this utility.

Please re-run this program after installing the compat6x-amd64 package.
Execution aborted.

compat6x-amd64 が必要なので、インストールする。

# pkg_add -r compat6x-amd64
 :
*******************************************************************************
*                                                                             *
* Do not forget to add COMPAT_FREEBSD6 into                                   *
* your kernel configuration (enabled by default).                             *
*                                                                             *
* To configure and recompile your kernel see:                                 *
* http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html *
*                                                                             *
*******************************************************************************

先ほど中断された vmwre-config-tools.pl を実行する:

# /usr/local/bin/vmware-config-tools.pl --default

Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:                                      done


No X install found.

Starting VMware Tools services in the virtual machine:
   Switching to guest configuration:                                   done
   Guest memory manager:                                               done
   Guest operating system daemon:                                      done

The configuration of VMware Tools 8.1.3 build-203739 for FreeBSD for this
running kernel completed successfully.

You must restart your X session before any mouse or graphics changes take
effect.

You can now run VMware Tools by invoking the following command:
"/usr/local/bin/vmware-toolbox" during an X server session.

Please remember to configure your network by adding:
ifconfig_vxn0="dhcp"
to the /etc/rc.conf file and start the network with:
/etc/netstart
to use the vmxnet interface using DHCP.

Enjoy,

--the VMware team
#
# shutdown -r now
[編集]

bash #

# pkg_add -r bash
# rehash
# which bash
/usr/local/bin/bash
[編集]

python, mercurial, subversion, emacs-nox11, mg, vim #

# pkg_add -r python mercurial subversion emacs-nox11 mg vim

 :

====
Note that some of the standard modules are provided as separate
ports since they require extra dependencies:

bsddb           databases/py-bsddb
gdbm            databases/py-gdbm
sqlite3         databases/py-sqlite3
tkinter         x11-toolkits/py-tkinter

Install them as needed.
====

 :

====
Note that we now install a few more files in /usr/local/share/mercurial:
- shell completion scripts (bash, tcsh and zsh)
- CGI scripts for web access to repositories
  see http://www.selenic.com/mercurial/wiki/index.cgi/CGI_Install
- various documentation files
====

 :

====
Note that some of the standard libraries are provided as separate
ports since they require extra dependencies:

        converters/ruby-iconv   iconv module

        databases/ruby-gdbm:    GDBM module

        x11-toolkits/ruby-tk:   Tcl/Tk modules
        japanese/ruby-tk:       Tcl/Tk modules for Japanized Tcl/Tk

        lang/ruby-mode.el:      Emacs lisp modules

Install them as occasion demands.
====

 :

*****************************************************************
Although libxcb can yield dramatic improvements in speed,
memory footprint, and responsiveness, and will probably
become the default Xlib for X.org/freedesktop.org, it is
still experimental software.  Some broken callers will abort()
on locking assertion failures.  As a temporary workaround, set
LIBXCB_ALLOW_SLOPPY_LOCK in your environment to skip the abort().
This may result in noisy stacktrace printing.
*****************************************************************

 :

**************************************************************************
The executable for Exuberant CTAGS is installed as /usr/local/bin/exctags
**************************************************************************

 :

SECURITY NOTE: The VIM software has had several remote vulnerabilities
discovered within VIM's modeline support.  It allowed remote attackers to
execute arbitrary code as the user running VIM.  All known problems
have been fixed, but the FreeBSD Security Team advises that VIM users
use 'set nomodeline' in ~/.vimrc to avoid the possibility of trojaned
text files.
# which python hg svn emacs mg vim
/usr/local/bin/python
/usr/local/bin/hg
/usr/local/bin/svn
/usr/local/bin/emacs
/usr/local/bin/mg
/usr/local/bin/vim