Linuxの設定メモ
TurboLinux
(TurboLinuxWorkstation6.0の場合)
それぞれのファイルを適当に環境に合わせて変更し、サービスを再起動する。
手を加えないファイルも多い、示したもの以外は不要なわけではないのであんまりいじらないでおく。
ピリオドに注意。
●サービスの再起動の方法
TurboLinux の場合は
/usr/sbin/turboservice
または
/etc/rc.d/init.d/dhcpd stop
/etc/rc.d/init.d/dhcpd start
/etc/rc.d/init.d/named stop
/etc/rc.d/init.d/named start
/etc/rc.d/init.d/atalk
/etc/rc.d/init.d/smb
●DHCPDの設定
192.168.0.210から192.168.0.240をリース
[/etc/dhcpd.conf]
subnet 192.168.0.0
netmask 255.255.255.0
{
range
192.168.0.210
192.168.0.240;
default-lease-time
86400;
max-lease-time
604800;
option subnet-mask
255.255.255.0;
option broadcast-address
192.168.0.255;
option routers
192.168.0.1;
option domain-name-servers
192.168.0.2;
option domain-name
"hogehoge.com";
}
わが家はnameサーバとルータは別になっている。
●NAMEDの設定
[/var/named/named.local] # 変更不要
@ IN
SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
1 IN
PTR localhost.
[/var/named/yutakanodomain.rev]
@ IN
SOA home.hogehoge.com. rootmail.hogehoge.com.
(
1 ;Serial
3600 ;Refresh
300 ;Retry
3600000 ;Expire
3600 ) ;Minimum
IN
NS home.hogehoge.com.
1 IN
PTR netgenesis.hogehoge.com.
2 IN
PTR home.hogehoge.com.
10 IN PTR
biblo.hogehoge.com.
20 IN PTR
ci.hogehoge.com.
30 IN PTR
performa.hogehoge.com.
40 IN PTR
fmv.hogehoge.com.
100 IN PTR
100.hogehoge.com.
200 IN PTR
200.hogehoge.com.
[/var/named/yutakanodomain.zone]
@ IN
SOA home.hogehoge.com.
rootmail.hogehoge.com.
(
1 ;Serial
3600 ;Refresh
300 ;Retry
3600000 ;Expire
3600 ) ;Minimum
IN
NS home.hogehoge.com.
netgenesis.hogehoge.com. IN
A 192.168.0.1
home.hogehoge.com. IN
A 192.168.0.2
biblo.hogehoge.com. IN
A 192.168.0.10
ci.hogehoge.com. IN
A 192.168.0.20
performa.hogehoge.com. IN A
192.168.0.30
fmv.hogehoge.com. IN
A 192.168.0.40
100.hogehoge.com IN
A 192.168.0.100
200.hogehoge.com IN
A 192.168.0.200
www.hogehoge.com. IN
CNAME home.hogehoge.com.
ftp.hogehoge.com. IN
CNAME home.hogehoge.com.
[/etc/named.conf]
// generated by named-bootconf.pl
options {
directory "/var/named";
/*
* If there is a firewall
between you and nameservers you want
* to talk to, you
might need to uncomment the query-source
* directive below.
Previous versions of BIND always asked
* questions using
port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address
* port 53;
};
//
// a caching only nameserver config
//
zone "." {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "named.local";
};
// Mar,2001 Yutakano
zone "hogehoge.com" {
type master;
file "yutakanodomain.zone";
};
zone "0.168.192.in-addr.arpa" {
type master;
file "yutakanodomain.rev";
};
[/etc/host.conf]
order bind,hosts
multi on
[/etc/resolv.conf]
domain hogehoge.com
search hogehoge.com
nameserver 192.168.0.2
●AppleTalkの設定
[/etc/atalk/AppleVolumes.default]
# This file looks empty when viewed with "vi". In fact, there is
one
# '~', so users with no AppleVolumes file in their home directory get
# their home directory by default.
#
# volume format:
# path [name] [casefold=x] [codepage=y] [options=z,l,j] \
# [access=a,@b,c,d] [dbpath=path] [password=p]
#
#
# casefold options:
# tolower -> lowercases names in both directions
# toupper -> uppercases names in both directions
# xlatelower -> client sees lowercase, server sees uppercase
# xlateupper -> client sees uppercase, server sees lowercase
#
# access format:
# user1,@group,user2 -> restricts volume to listed users/groups
#
# miscellaneous options
# prodos
-> make compatible with appleII clients.
# crlf
-> enable crlf translation for TEXT files.
# noadouble
-> don't create .AppleDouble unless a resource
#
fork needs to be created.
#
# codepage=filename -> load filename from nls directory.
# dbpath=path -> store
the database stuff in the following path.
# password=password -> set a volume password (8 characters
max)
#
# user
~ options=noadouble
# public
/home/samba/public public@home options=noadouble
# htnl
/home/httpd/html html@home options=noadouble,crlf
#
[/etc/atalk/afpd.conf]
"ServerName"
●INETDの設定
[/etc/hosts.allow]
#
# hosts.allow This file describes the names of the hosts
which are
#
allowed to use the local INET services, as decided
#
by the '/usr/sbin/tcpd' server.
#
# See man hosts_access(5) for more information
All : 127.0.0.0 : allow
All : 192.168.0.0/255.255.255.0 : allow
portmap : 192.168.0.0/255.255.255.0 : allow
All : All : deny
[/etc/hosts.deny]
#
# hosts.deny This file describes the names of the
hosts which are
#
*not* allowed to use the local INET services, as decided
#
by the '/usr/sbin/tcpd' server.
#
# See man hosts_access(5) for more information.
ALL: ALL
●SAMBAの設定
これはSWATにおまかせしたほうが楽なんでテキストはいじらない(笑)。
っつーかWindowsの設定だから別に気にしてない。
使えなかったらそれはそれでしょーがねーし。
以下の行を追加
[/etc/inetd.conf]
swat stream tcp
nowait.400 root /usr/sbin/swat swat
[/etc/service]
swat
901/tcp
# Add swat service used via inetd
●MS-DOSのドライブのマウント
DOSはパーミッションとかいうものは無いので通常はrootのみ書き込みができる。
他の人が書き込みするための処理。
mount -t vfat -o uid=ユーザID ,
gid=グループID , umask=マスク値 /dev/hda1 /mnt/win
[/etc/fstab]
fstabに記述することで起動時に認識。
/dev/hda1 /mnt/win vfat uid=ユーザID ,
gid=グループID , umask=マスク値 0 0
●Beepを鳴らす
スクリプト終了時にBeepを鳴らしたいときに使う。
あんまり役に立たないかも〜
~/bin/beep に入れて使っているけれども /bin/beep でもいいかも。
echoでできなかったのでperlのスクリプトです。
#!/usr/bin/perl
# Beep
printf "\007\n";
yutakano@tim.hi-ho.ne.jp
Sep ,2001