:FreeBSD9x設定など
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
[[:お仕事メモ]]
#contents
*bashを使う [#t78f4b75]
/usr/ports/shells/
#make install clean
#chsh -s /usr/local/bin/bash
*ネットワーク設定 [#a7553d6a]
**IP固定 [#o4a017c6]
/etc/rc.conf
-ifconfig_em0="DHCP"
+ifconfig_em0="inet 192.168.136.151 netmask 255.255.255.0"
+defaultrouter="192.168.136.254"
**DNS設定 [#u8984539]
/etc/resolv.conf
+nameserver 192.168.136.200
+nameserver 192.168.136.201
*ユーザ作成 [#k33a174a]
#addusers
Username: admin
Full name: admin
Uid (Leave empty for default): 2000
Login group [admin]: wheel
Login group is users. Invite admin into other groups? []...
Login class [default]: default
Shell (sh csh tcsh nologin) [sh]: bash
Home directory [/home/admin]: /home/admin
Use password-based authentication? [yes]: yes
Use an empty password? (yes/no) [no]: no
Use a random password? (yes/no) [no]: no
Enter password:
Enter password again:
Lock out the account after creation? [no]: no
Username : 68user
Password : *****
Full Name : 68user
Uid : 2000
Class :
Groups : users wheel
Home : /home/admin
Shell : /bin/tcsh
Locked : no
OK? (yes/no): yes
adduser: INFO: Successfully added (admin) to the user da...
Add another user? (yes/no): no
Goodbye!
*Telnet [#v38b5d6a]
/etc/rc.conf
+inetd_enable="YES"
/etc/inetd.conf
+telnet stream tcp nowait root /usr/libexec/te...
*各種アップデート [#h422ef0e]
**portsnap [#lb91f246]
-設定
/etc/portsnap.conf //#cp portsnap.conf portsnap.conf.sa...
# REFUSE arabic chinese french german hebrew hungarian j...
# REFUSE korean polish portuguese russian ukrainian viet...
-ポートツリーを最新にする。
#portsnap fetch
#portsnap extract
#portsnap update
二回目以降はextractは不要。下記のように&&でまとめることも...
#portsnap fetch && portsnap update など。
**freebsd-update [#rbee4a14]
-現在のバージョンを確認する。
#uname -a
-FreeBSD(OS)を最新にする。
#freebsd-update fetch
#freebsd-update install
no needsが出たら終了。
**portupgrade [#m1d73d1a]
-インストール
/usr/ports/ports-mgmt/portupgrade
#make install clean
-パッケージデータベース不整合の修正
#pkgdb -F
-パッケージのバージョンを見る
#pkg_version | grep "<"
<と表示されていれば新しいバージョンがある。
-アップグレード
#portupgrade パッケージ名
#portupgrade -a //新しいパッケージがある場合は対象を全て...
*FTP [#f2e1210a]
/etc/rc.conf
+ftp stream tcp nowait root /usr/libexec/ft...
一応繋がる。
*NTP [#u368e4a8]
/etc/rc.conf
+ntpd_enable="YES"
同期の確認
#ntpq -p
*httpd(apache22) [#sa8ff9aa]
-インストール
/usr/ports/www/apache22/
#make install clean //適宜OKボタン
-自動起動
/etc/rc.conf
apache22_enable="YES"
apache22ssl_enable="YES"
-エラー
[warn] (2)No such file or directory: Failed to enable th...
-対処方法
#kldload accf_http.ko
/boot/loader.conf
+accf_http_load="YES"
-http://www.skymerica.com/blog/yotsumoto/arch/2007/06/11/...
-http://d.hatena.ne.jp/nyamix/20080608/1213015876
*日本語マニュアル [#fe418687]
-インストール
/usr/ports/japanese/man/
#make install clean
-日本語環境
/usr/home/admin/.login_conf
me:\
:charset=UTF-8:\
:lang=ja_JP.UTF-8:
/etc/login.conf
japanese:Japanese Users Accounts:\
:charset=UTF-8:\
:lang=ja_JP.UTF-8:\
:tc=default
#chsh ユーザ名
Class: japanese //classにjapaneseを追加。
/usr/home/admin/.bashrc
+LC_CTYPE=ja_JP.UTF-8
+LANG=ja_JP.UTF-8
+esac
+export LC_CTYPE
+export LANG
/usr/home/admin/.profile
if [ -n "$BASH_VERSION" ]; then
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
結局動かないし、その上不具合っぽくあちこちにガタがきてる...
*Samba36 [#u04149ba]
/usr/local/etc/pkgtools.conf
MAKE_ARGS = {
+ 'converters/libiconv' => 'WITH_EXTRA_PATCHES=yes',
}
/usr/ports/converters/libiconv
#make install clean //WITH_EXTRA_PATCHES=yesを追加して...
#iconv -l | grep MS
EUCJP-MS //が追加されるらしいがされなかった。
-インストール
// Samba Ver.3.6.7
/usr/ports/net/samba36
#make install clean // MULTIBYTE=YES にする必要があるか...
@CUPSのチェック外す。プリンタは使わないし。
/etc/rc.conf
+samba_enable="YES"
+winbindd_enable="YES"
再起動、または/usr/local/etc/rc.d/samba start
-設定ファイル
/usr/local/etc/smb.conf
+display charset = CP932
+unix charset = EUC-JP-MS
+dos charset = CP932
-共有フォルダ作成
#mkdir -p /usr/home/admin/public
#chown root:nobody /usr/home/admin/public
#chmod 777 /usr/home/admin/public
/usr/local/etc/smb.confに以下を追加。
[globals]
workgroup = workgroup
netbios name = SMBSERVER
server string = Samba %v
security = User
[homes]
comment = %S's Home Directories
writeable = yes
browseable = no
[public]
path = /usr/local/samba/public
public = yes
only guest = yes
writable = yes
printable = no
-ユーザー追加
#smbpasswd -x admin
-ユーザの一覧
#pdbedit -L
終了行:
[[:お仕事メモ]]
#contents
*bashを使う [#t78f4b75]
/usr/ports/shells/
#make install clean
#chsh -s /usr/local/bin/bash
*ネットワーク設定 [#a7553d6a]
**IP固定 [#o4a017c6]
/etc/rc.conf
-ifconfig_em0="DHCP"
+ifconfig_em0="inet 192.168.136.151 netmask 255.255.255.0"
+defaultrouter="192.168.136.254"
**DNS設定 [#u8984539]
/etc/resolv.conf
+nameserver 192.168.136.200
+nameserver 192.168.136.201
*ユーザ作成 [#k33a174a]
#addusers
Username: admin
Full name: admin
Uid (Leave empty for default): 2000
Login group [admin]: wheel
Login group is users. Invite admin into other groups? []...
Login class [default]: default
Shell (sh csh tcsh nologin) [sh]: bash
Home directory [/home/admin]: /home/admin
Use password-based authentication? [yes]: yes
Use an empty password? (yes/no) [no]: no
Use a random password? (yes/no) [no]: no
Enter password:
Enter password again:
Lock out the account after creation? [no]: no
Username : 68user
Password : *****
Full Name : 68user
Uid : 2000
Class :
Groups : users wheel
Home : /home/admin
Shell : /bin/tcsh
Locked : no
OK? (yes/no): yes
adduser: INFO: Successfully added (admin) to the user da...
Add another user? (yes/no): no
Goodbye!
*Telnet [#v38b5d6a]
/etc/rc.conf
+inetd_enable="YES"
/etc/inetd.conf
+telnet stream tcp nowait root /usr/libexec/te...
*各種アップデート [#h422ef0e]
**portsnap [#lb91f246]
-設定
/etc/portsnap.conf //#cp portsnap.conf portsnap.conf.sa...
# REFUSE arabic chinese french german hebrew hungarian j...
# REFUSE korean polish portuguese russian ukrainian viet...
-ポートツリーを最新にする。
#portsnap fetch
#portsnap extract
#portsnap update
二回目以降はextractは不要。下記のように&&でまとめることも...
#portsnap fetch && portsnap update など。
**freebsd-update [#rbee4a14]
-現在のバージョンを確認する。
#uname -a
-FreeBSD(OS)を最新にする。
#freebsd-update fetch
#freebsd-update install
no needsが出たら終了。
**portupgrade [#m1d73d1a]
-インストール
/usr/ports/ports-mgmt/portupgrade
#make install clean
-パッケージデータベース不整合の修正
#pkgdb -F
-パッケージのバージョンを見る
#pkg_version | grep "<"
<と表示されていれば新しいバージョンがある。
-アップグレード
#portupgrade パッケージ名
#portupgrade -a //新しいパッケージがある場合は対象を全て...
*FTP [#f2e1210a]
/etc/rc.conf
+ftp stream tcp nowait root /usr/libexec/ft...
一応繋がる。
*NTP [#u368e4a8]
/etc/rc.conf
+ntpd_enable="YES"
同期の確認
#ntpq -p
*httpd(apache22) [#sa8ff9aa]
-インストール
/usr/ports/www/apache22/
#make install clean //適宜OKボタン
-自動起動
/etc/rc.conf
apache22_enable="YES"
apache22ssl_enable="YES"
-エラー
[warn] (2)No such file or directory: Failed to enable th...
-対処方法
#kldload accf_http.ko
/boot/loader.conf
+accf_http_load="YES"
-http://www.skymerica.com/blog/yotsumoto/arch/2007/06/11/...
-http://d.hatena.ne.jp/nyamix/20080608/1213015876
*日本語マニュアル [#fe418687]
-インストール
/usr/ports/japanese/man/
#make install clean
-日本語環境
/usr/home/admin/.login_conf
me:\
:charset=UTF-8:\
:lang=ja_JP.UTF-8:
/etc/login.conf
japanese:Japanese Users Accounts:\
:charset=UTF-8:\
:lang=ja_JP.UTF-8:\
:tc=default
#chsh ユーザ名
Class: japanese //classにjapaneseを追加。
/usr/home/admin/.bashrc
+LC_CTYPE=ja_JP.UTF-8
+LANG=ja_JP.UTF-8
+esac
+export LC_CTYPE
+export LANG
/usr/home/admin/.profile
if [ -n "$BASH_VERSION" ]; then
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
結局動かないし、その上不具合っぽくあちこちにガタがきてる...
*Samba36 [#u04149ba]
/usr/local/etc/pkgtools.conf
MAKE_ARGS = {
+ 'converters/libiconv' => 'WITH_EXTRA_PATCHES=yes',
}
/usr/ports/converters/libiconv
#make install clean //WITH_EXTRA_PATCHES=yesを追加して...
#iconv -l | grep MS
EUCJP-MS //が追加されるらしいがされなかった。
-インストール
// Samba Ver.3.6.7
/usr/ports/net/samba36
#make install clean // MULTIBYTE=YES にする必要があるか...
@CUPSのチェック外す。プリンタは使わないし。
/etc/rc.conf
+samba_enable="YES"
+winbindd_enable="YES"
再起動、または/usr/local/etc/rc.d/samba start
-設定ファイル
/usr/local/etc/smb.conf
+display charset = CP932
+unix charset = EUC-JP-MS
+dos charset = CP932
-共有フォルダ作成
#mkdir -p /usr/home/admin/public
#chown root:nobody /usr/home/admin/public
#chmod 777 /usr/home/admin/public
/usr/local/etc/smb.confに以下を追加。
[globals]
workgroup = workgroup
netbios name = SMBSERVER
server string = Samba %v
security = User
[homes]
comment = %S's Home Directories
writeable = yes
browseable = no
[public]
path = /usr/local/samba/public
public = yes
only guest = yes
writable = yes
printable = no
-ユーザー追加
#smbpasswd -x admin
-ユーザの一覧
#pdbedit -L
ページ名: