Linux覚え書き(自分の参考のため<ぼけ防止のため)※あてにしないように:-)
wizをインストール
namazuの設置
VineLinux4.0にWLPCIB-11を取付
PDFサーバ
WordPressをインストール
Sambaの設定
/etc/smb.confの設定
# Samba
config file created using SWAT
# from localhost.localdomain
(127.0.0.1)
# Date: 2001/05/22 13:54:55
#
Global parameters
[global]
coding system = cap
client code page =932
workgroup = SIMA(ワークグループ名)
netbios
name = CASPER(マシン名)
interfaces
= interfaces = 192.168.0.1/255.255.255.0
192.168.0.254/255.255.255.0(なんかすると良いらしい)
update
encrypted = Yes
map to guest = Bad User
os level
= 1
preferred master = Yes
domain master = Yes
dns proxy = No
guest account = s
[mj800c]
comment = mj800-linux
path = /var/tmp
read
only = No
guest ok = Yes
print ok = Yes
printer
name = lp0
[homes]
ただし、プリンタはサーバー側で設定したプリンタだがlp0にはフィルターは必要ない
要するにlinuxで使うプリンタlpはフィルターがいるがwinで使う場合winマシンにプリンタ
ドライバを組み込む
win95,98でネットワーク一覧で見てもマシン名(casper)は出てこないのでwindowsマシンに
lmhostsというファイルを作成する。windowsデレクトリーに置いておく(これが分かるのに1日かかった。)
他のLinux(turboとか)なら何もしなくても一覧で出てくるとか何とか...
lmhosts
192.168.0.3 casper
など
win95側でマシンを見るときは、マイクロソフトネットワークでLinuxで作成したユーザー名と
パスワードを入力する。
あとは、win95側でマシンの検索でcasperを指定して検索すれば見つかるハズ
SWATを使う
/etc/ineted.confに追加
swat
stream tcp nowait.400
root /usr/sbin/swat swat
(一番下の行)
これを追加しないとSWATが使えない
ネットスケープで、http://localhost:901を指定する。
ただしSWATで設定してもプリンターがうまく動かない時もある。
smb.confを手動で直すのが手っ取り早い?
Macとの共有
/etc/atalk/papd.confを編集
#
Attributes are:
#
# Name Type Default Description
# pd
str ".ppd" Pathname to ppd file.
# pr
str "lp" LPD printer name.
# op
str "operator" Operator name, for LPD spooling.
#
# Some examples:
#
# On many systems (notably not
Solaris), no papd.conf is required,
# since papd shares the same
defaults as lpd.
#
# A simple example:
#
MJ800-linux:\
:pr=lp:\
:pd=/usr/share/lib/ppd/HPLJ_4M.PPD:#よくわからん
#
# Note also that papd.conf can list several printers.
これでMacから共有できる(ハズ)もちろんLANにつながってAppletalkをLAN側に切替え
ないといけない(見えるまで時間がかかる)
もちろん、ファイルもwinと共有できる、が、漢字がおかしい...やっぱり漢字は使わない方が
吉かな?
#linuxでのユーザー名とパスワードが必要
印刷したけど間違ってしまった!
ジョブをクリアしないと永遠印刷されるので
lpqでジョブ番号を確認
その後
lprm(ジョブ番号)
で印刷は止まるはず...
マウント
フロッピーの場合
mount
-t msdos /dev/fd0 /mnt/floppy
MOの場合
mount
-t msdos /dev/sda /mnt/mo
linuxからwindowsへアクセス
mount
-t msdos /dev/hda1 /mnt/hdd
たぶん...
ネッ
トワークカード2枚差しでルータにする!
vineLinux自体で出来るみたいだが設定がよく分からないのでfloppyfwというLinuxでフロッピー1
枚で運用可能なlinuxにした。
486SXとメモリ8MぐらいでPCルータになるらしい
configの設定
ウインドウズのノートパドでは編集不可-Jnoteというフリーのアプリで編集可能
−−−−−−−ここから−−−−−−−−
#
#
Configuration for floppyfw
#
# Fill in the blanks.
#
#
#
For configuring of modules to use : /modules.lst
#
# For
configuring logging: /syslogd.cfg
#
# For configuring network
interface cards (ONLY IF NEEDED): /syslinux.cfg
#
# For
configuring firewall rules and incoming traffic: /firewall.ini
#
#
#
Outside network:
#
# eth0 default
device.
#
OUTSIDE_DEV=eth1
#
# DHCP is the hook for
the DHCP-client for the outside interface.
# If used, you may
have hangups of connections when the client has
# to get a new
IP-address.
# This is now the default behaviour for the
external interface.
OUTSIDE_IP=133.41.**.***(割り当てられたIP)
#
# EXTERNAL is a hook for booting a external startup script from a
package.
# the external script has to be in /etc/ext-up.init
#
The PPPoE packages uses this.
#
#OUTSIDE_IP=EXTERNAL
#
# The external script might need you to add your username and
password, as
# the PPPoE package does. This is where you can add
that.
#
USER_IDENT=
USER_PASSWORD=
#
# For dialup
PPP
use:
#
SERIAL_PORT=/dev/ttyS0
PORT_SPEED=57600
TELEPHONE=
PPP_CONNECT_TIMEOUT=60
PPP_CONNECT_POLL=6
#
# Setting fixed IP on the outside.
#OUTSIDE_IP=
#
#
This has to be set if you are running with a fixed outside
IP
#
OUTSIDE_NETMASK=255.255.255.0
OUTSIDE_NETWORK=133.41.**.***(割り当てられたIP)
OUTSIDE_BROADCAST=133.41.**.*(デフォルトゲートウエイ)
#
mac address for outside nic
# Some ISPs uses bootp style dhcp
tables and some just remembers the last
# used MAC address.
#
this allows you to swap nics
# OUTSIDE_MAC=00:00:e8:48:6c:cb
#
# Your inside network, this has 10.42.42.* set as default, this
is
# addresses assigned for internal networks according to RFC
1918.
#
# eth1 is the default device for the internal
network.
#
INSIDE_IP=192.168.0.1(プライベートで使うNIC2枚目のIP)
INSIDE_DEV=eth0
INSIDE_NETMASK=255.255.255.0
INSIDE_NETWORK=192.168.0.0
INSIDE_BROADCAST=192.168.0.255
#
#
Misc
# These are not nescessary to set if you are using
DHCP.
#
DEFAULT_GATEWAY=133.41.**.***(割り当てられたIP)
NAME_SERVER_IP1=133.41.*.*(ネームサーバ)
NAME_SERVER_IP2=
DOMAIN=casper
HOSTNAME=floppyfw
#
#
(y)es or (n)o or (s)hell
#
OPEN_SHELL=y
ONLY_8M=n
#
Choose the serial port for the console "n" for
none.
#SERIAL_CONSOLE=ttyS0
SERIAL_CONSOLE=n
#
#
Turning on syslogd and klogd.
# This is a nice thing but will eat
CPU which is why it is turned
# off by
default.
#
USE_SYSLOG=n
SYSLOG_FLAGS="-m 360"
#
If you don't like the -- MARK -- messages:
#SYSLOG_FLAGS="-m
0"
−−−−−ここまで−−−−−
リブートしてifconfで動作確認、後は他のマシンにつないでpingが通ればOKかな?
これで多分動くはず。ネットワークカードは3com 3c509x/3c9xx NE2000とその互換カードで動くらしい
その他のネットワークカードは不可?
...これでたくさんのマシンがつながれて1個のIPアドレスで多数のパソコンを使い放題と思っていたら一つ重大な
欠点が”FTP”でファイル転送が出来ないのである...正確にはIDとパスワードまででてつながっているようだが
その後タタり...いい解決策はないかなぁ、と思っていたら
FTPソフトをパッシブモードにすれば解決しました。WS_FTPなら
Advanced内で設定変更出来ます。
#FTPソフト自体がFTPサーバーと接続時にサーバーのような動きをするので当然サーバー側からはクライアント側が見えないわけでパッシブモードを使え
ばサーバ側からクライアントに接続せずに
FTPの処理を行うので問題なく動くみたいである。(よくわからん)
その他configの設定とかでも何とかなりそうだけどちょっと?
ApacheでCGIを使う
ユーザー登録後public_htmlの下にcgi-binを作ってcgiを入れて実行しても動かない(と思う)
/etc/httpd/conf/httpd.confの設定ファイルに
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
<Directory
/home/httpd/cgi-bin>
AllowOverride None
Options
ExecCGI
</Directory>
<Directory
/home/*/public_html>
Options Includes
ExecCGI
</Directory>
<IfModule
mod_dir.c>
DirectoryIndex index.html index.htm default.htm
default.html
</IfModule>
AddHandler cgi-script
.cgi
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
を最後の行に追加したら動くようになった。動いてるので良しとする。
その後は、/etc/rc.d/init.d/httpd
restart で再起動すれば使えるはず。
アクセス制限(かなりうる覚え^^;)
etc/httpd/conf内のaccess.confを編集
(追加)
<Directory
/home/test/public_html> #testユーザーのページを学内限定にする
Options
Includes
AllowOverride Indexes
deny from
all #すべての人が見れない
allow
from
133.41.0.0/255.255.0.0 #133.41.0.0から133.41.255.255?までの人が回覧できる(ハズ)
</Directory>
※allow
from, deny
from
接続を許可(allow)、禁止(deny)するドメイン、IP、あるいはホストを設定
※order
許可(allow)、禁止(deny)のどちらかを優先するかを設定
Basic認証でパスワード制限
ユーザーの登録
$/usr/bin/htpasswd-c
/home/test/ .htpasswd test(ユーザー名testでtest内にアクセスする時に認証(ユーザはtest))
New
password:−−パスワード入力
Re-type
new password:−−もういっかい
Adding
password for user test−−登録完了
$
.htappwd
access.confに追加
<Directory
"/home/test/public_html/cgi-bin">
AuthUserFile
/home/test/.htpasswd
AuthGroupFile /dev/null
AuthName "Please
Enter Your Password"
AuthType Basic
<limit GET>
require
valid-user
</limit>--
</Directory>
sendmailの設定(かなり曖昧)
/usr/src/CF-3.7Wpl2内の適当な??.defファイルを編集
#
[smtpcheck]
MAIL_RELAY_RESTRICTION=yes
#WITH_OLD_CF=no # (just
for
smtpcheck.def)
##CHECK_HOST_ALLOW=/etc/sendmail.allow
##CHECK_HOST_DENY=/etc/sendmail.deny
#CHECK_RELAY_DEFAULT=allow
# (allow/deny)
# LOCAL_HOST_* does not check senders
address
LOCAL_HOST_IPADDR=/etc/sendmail.localip
#LOCAL_HOST_IPADDR=133.41
LOCAL_HOST_DOMAIN=/etc/sendmail.localdomain
#LOCAL_HOST_DOMAIN=
#LOCAL_HOST_DOMAIN=hiroshima-u.ac.jp
#
/etc/内のsendmail.localipとsendmail.localdomainを編集
sendmail.localip記述例
133.41
***.18(契約してるISPのPPPのIPアドレス)<複数指定出来るはず?
sendmail.localdomain記述例
hiroshima-u.ac.jp
ppp.*rin.ne.jp(ISPのpppのドメイン名)
??.defファイルを編集後、make ??.cfで??.cfファイルが出来るのでその後/etc内の
sendmail.cfファイルと差し替える。
その後、/etc/rc.d/init.d/sendmail
restartで再起動すれば、hiroshima-u.ac.jp内からと他のISP接続からhiroshima-u.ac.jp
のサーバーからメールが送れるはず?
大学のアカウントのサーバーからは他ISP経由ではメールの受信は出来るが送信は出来ない<スパム防止のため?
RedHat8.0
漢字が打ち込みにくいので改良
canna
/var/lib/canna内のdefault.cannaを他の名前に変えてバックアップ
/var/lib/canna/sampleフォルダ
just.cannaをdefault.cannaにして/var/lib/cannaに移動これでATOK風に使えるはず?けど何故か違うような・・・
RedHat8.0 でホームページ作成(編集)
標準で付いて
るOpenOfficeを使って編集、普通にファイルの読み込みでhtmlを読み込んで編集・・・と簡単なのですがフォントが化けるからフォントを
Terminalにする。(ツール>オプション>フォントの置き換えで解消されるみたいです。)windowsのファイルはindex~.htmlと表示
されたりする。またLinuxの漢字ファイルはwinではうまく表示されないので使わない方が良い
画像の張り付け方が分からない??ビルダーみたいに出来ないのかなぁ・・・
#RedHatでOpenOfficeを使って編集するとフォントがわけ分からなくなります。;_;
sendmailからPostfixへ
Vine2.6はsendmailでなくPostfixになったみたいです。なので設定ファイルもsendmailと違ってきます。なので覚え書き
(^^;
ちなみにetc/postfix/main.cfのみの変更です。これで動いてます。不正中継も大丈夫みたいです。(謎)
しかし、実用すくりぷとんのスクリプトがうまく動いてくれないみたいなのでちょっと悩んでます。
# Global Postfix
configuration file. This file lists only a subset
# of all 100+
parameters. See the sample-xxx.cf files for a full list.
#
#
The general format is lines with parameter = value pairs. Lines
#
that begin with whitespace continue the previous line. A value can
#
contain references to other $names or ${name}s.
#
# NOTE -
CHANGE NO MORE THAN 2-3 PARAMETERS AT A TIME, AND TEST IF
#
POSTFIX STILL WORKS AFTER EVERY CHANGE.
# SOFT BOUNCE
#
#
The soft_bounce parameter provides a limited safety net for
#
testing. When soft_bounce is enabled, mail will remain queued that
#
would otherwise bounce. This parameter disables locally-generated
#
bounces, and prevents the SMTP server from rejecting mail
permanently
# (by changing 5xx replies into 4xx replies). However,
soft_bounce
# is no cure for address rewriting mistakes or mail
routing mistakes.
#
#soft_bounce = no
# LOCAL PATHNAME
INFORMATION
#
# The queue_directory specifies the location of
the Postfix queue.
# This is also the root directory of Postfix
daemons that run chrooted.
# See the files in
examples/chroot-setup for setting up Postfix chroot
# environments
on different UNIX systems.
#
queue_directory =
/var/spool/postfix
# The command_directory parameter specifies
the location of all
# postXXX commands. The default value is
$program_directory.
#
command_directory = /usr/sbin
#
The daemon_directory parameter specifies the location of all
Postfix
# daemon programs (i.e. programs listed in the master.cf
file). The
# default value is $program_directory. This directory
must be owned
# by root.
#
daemon_directory =
/usr/lib/postfix
# QUEUE AND PROCESS OWNERSHIP
#
# The
mail_owner parameter specifies the owner of the Postfix queue
#
and of most Postfix daemon processes. Specify the name of a user
#
account THAT DOES NOT SHARE A GROUP WITH OTHER ACCOUNTS AND THAT
#
OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
#
don't specify nobody or daemon. PLEASE USE A DEDICATED
USER.
#
mail_owner = postfix
# The default_privs
parameter specifies the default rights used by
# the local
delivery agent for delivery to external file or command.
# These
rights are used in the absence of a recipient user context.
# DO
NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
#
default_privs
= nobody
# INTERNET HOST AND DOMAIN NAMES
#
# The
myhostname parameter specifies the internet hostname of this
#
mail system. The default is to use the fully-qualified domain name
#
from gethostname(). $myhostname is used as a default value for many
#
other configuration parameters.
#
myhostname =
ドメイン名
#myhostname
= virtual.domain.name
# The mydomain parameter specifies the
local internet domain name.
# The default is to use $myhostname
minus the first component.
# $mydomain is used as a default value
for many other configuration
# parameters.
#
mydomain =
ドメイン名
#
SENDING MAIL
#
# The myorigin parameter specifies the domain
that locally-posted
# mail appears to come from. The default is to
append $myhostname,
# which is fine for small sites. If you run a
domain with multiple
# machines, you should (1) change this to
$mydomain and (2) set up
# a domain-wide alias database that
aliases each user to
# user@that.users.mailhost.
#
#myorigin
= hiroshima-u.ac.jp
myorigin = $mydomain
# RECEIVING
MAIL
# The inet_interfaces parameter specifies the network
interface
# addresses that this mail system receives mail on. By
default,
# the software claims all active interfaces on the
machine. The
# parameter also controls delivery of mail to
user@[ip.address].
#
inet_interfaces = all
#inet_interfaces
= $myhostname
#inet_interfaces = $myhostname, localhost
#
The mydestination parameter specifies the list of domains that this
#
machine considers itself the final destination for. That includes
#
Sendmail-style virtual domains hosted on this machine.
#
# Do
not include Postfix-style virtual domains - those domains are
#
specified elsewhere (see sample-virtual.cf, and
sample-transport.cf).
#
# The default is $myhostname +
localhost.$mydomain. On a mail domain
# gateway, you should also
include $mydomain. Do not specify the
# names of domains that this
machine is backup MX host for. Specify
# those names via the
relay_domains or permit_mx_backup settings for
# the SMTP server
(see sample-smtpd.cf.
#
# The local machine is always the final
destination for mail addressed
# to user@[the.net.work.address] of
an interface that the mail system
# receives mail on (see the
inet_interfaces parameter).
#
# Specify a list of host or
domain names, /file/name or type:table
# patterns, separated by
commas and/or whitespace. A /file/name
# pattern is replaced by
its contents; a type:table is matched when
# a name matches a
lookup key. Continue long lines by starting the
# next line with
whitespace.
#
#mydestination = $myhostname,
localhost.$mydomain
#mydestination = $myhostname,
localhost.$mydomain $mydomain
mydestination = $myhostname,
localhost.$mydomain, $mydomain,
mail.$mydomain, www.$mydomain,
ftp.$mydomain
# TRUST AND RELAY CONTROL
# The
mynetworks parameter specifies the list of "trusted" SMTP
#
clients that have more privileges than "strangers".
#
#
In particular, "trusted" SMTP clients are allowed to relay
mail
# through Postfix. See the smtpd_recipient_restrictions
parameter
# in file sample-smtpd.cf.
#
# You can specify the
list of "trusted" network addresses by hand
# or you can
let Postfix do it for you (which is the default).
#
# By
default (mynetworks_style = subnet), Postfix "trusts"
SMTP
# clients in the same IP subnetworks as the local machine.
#
On Linux, this does works correctly only with interfaces specified
#
with the "ifconfig" command.
#
# Specify
"mynetworks_style = class" when Postfix should "trust"
SMTP
# clients in the same IP class A/B/C networks as the local
machine.
# Don't do this with a dialup site - it would cause
Postfix to "trust"
# your entire provider's network.
Instead, specify an explicit
# mynetworks list by hand, as
described below.
#
# Specify "mynetworks_style = host"
when Postfix should "trust"
# only the local machine.
#
# mynetworks_style = class
# mynetworks_style = subnet
#
mynetworks_style = host
# Alternatively, you can specify the
mynetworks list by hand, in
# which case Postfix ignores the
mynetworks_style setting.
#
# Specify an explicit list of
network/netmask patterns, where the
# mask specifies the number of
bits in the network part of a host
# address.
#
# You can
also specify the absolute pathname of a pattern file instead
# of
listing the patterns here.
#
mynetworks = 133.41.35.0/24,
127.0.0.1/32(ここからのIPの
み中継可能?)
#mynetworks
= $config_directory/mynetworks
# The relay_domains parameter
restricts what clients this mail system
# will relay mail from, or
what destinations this system will relay
# mail to. See the
smtpd_recipient_restrictions restriction in the
# file
sample-smtpd.cf for detailed information.
#
# By default,
Postfix relays mail
# - from "trusted" clients whose IP
address matches $mynetworks,
# - from "trusted" clients
matching $relay_domains or subdomains thereof,
# - from untrusted
clients to destinations that match $relay_domains
# or subdomains
thereof, except addresses with sender-specified routing.
# The
default relay_domains value is $mydestination.
#
# In addition
to the above, the Postfix SMTP server by default accepts mail
#
that Postfix is final destination for:
# - destinations that match
$inet_interfaces,
# - destinations that match $mydestination
#
- destinations that match $virtual_maps.
# These destinations do
not need to be listed in $relay_domains.
#
# Specify a list of
hosts or domains, /file/name patterns or type:name
# lookup
tables, separated by commas and/or whitespace. Continue
# long
lines by starting the next line with whitespace. A file name
# is
replaced by its contents; a type:name table is matched when a
#
(parent) domain appears as lookup key.
#
# NOTE: Postfix will
not automatically forward mail for domains that
# list this system
as their primary or backup MX host. See the
# permit_mx_backup
restriction in the file sample-smtpd.cf.
#
#relay_domains =
$mydestination
# INTERNET OR INTRANET
# The relayhost
parameter specifies the default host to send mail to
# when no
entry is matched in the optional transport(5) table. When
# no
relayhost is given, mail is routed directly to the destination.
#
#
On an intranet, specify the organizational domain name. If your
#
internal DNS uses no MX records, specify the name of the intranet
#
gateway host instead.
#
# In the case of SMTP, specify a
domain, host, host:port, [host]:port,
# [address] or
[address]:port; the form [host] turns off MX lookups.
# If you
specify multiple SMTP destinations, Postfix will try them
# in the
specified order.
#
# If you're connected via UUCP, see also the
default_transport parameter.
#
# relayhost = $mydomain
#
relayhost = gateway.my.domain
# relayhost = uucphost
#
relayhost = [an.ip.add.ress]
# REJECTING UNKNOWN LOCAL
USERS
#
# The local_recipient_maps parameter specifies optional
lookup tables
# with all users that are local with respect to
$mydestination and
# $inet_interfaces. If this parameter is
defined, then the SMTP server
# will reject mail for unknown local
users.
#
# If you use the default Postfix local delivery agent
for local
# delivery, uncomment the definition below.
#
#
Beware: if the Postfix SMTP server runs chrooted, you may have to
#
copy the passwd (not shadow) database into the jail. This is
#
system dependent.
#
#local_recipient_maps = $alias_maps
unix:passwd.byname
# ADDRESS REWRITING
#
# Insert text
from sample-rewrite.cf if you need to do address
#
masquerading.
#
# Insert text from sample-canonical.cf if you
need to do address
# rewriting, or if you need
username->Firstname.Lastname mapping.
# ADDRESS REDIRECTION
(VIRTUAL DOMAIN)
#
# Insert text from sample-virtual.cf if you
need virtual domain support.
# "USER HAS MOVED"
BOUNCE MESSAGES
#
# Insert text from sample-relocated.cf if you
need "user has moved"
# style bounce messages.
Alternatively, you can bounce recipients
# with an SMTP server
access table. See sample-smtpd.cf.
# TRANSPORT MAP
#
#
Insert text from sample-transport.cf if you need explicit routing.
#
ALIAS DATABASE
#
# The alias_maps parameter specifies the list
of alias databases used
# by the local delivery agent. The default
list is system dependent.
# On systems with NIS, the default is to
search the local alias
# database, then the NIS alias database.
See aliases(5) for syntax
# details.
#
# If you change the
alias database, run "postalias /etc/aliases" (or
#
wherever your system stores the mail alias file), or simply run
#
"newaliases" to build the necessary DBM or DB file.
#
#
It will take a minute or so before changes become visible. Use
#
"postfix reload" to eliminate the delay.
#
#alias_maps
= dbm:/etc/aliases
alias_maps =
hash:/etc/postfix/aliases
#alias_maps = hash:/etc/aliases,
nis:mail.aliases
#alias_maps = netinfo:/aliases
# The
alias_database parameter specifies the alias database(s) that
#
are built with "newaliases" or "sendmail -bi".
This is a separate
# configuration parameter, because alias_maps
(see above) may specify
# tables that are not necessarily all
under control by Postfix.
#
#alias_database =
dbm:/etc/aliases
#alias_database =
dbm:/etc/mail/aliases
#alias_database =
hash:/etc/aliases
#alias_database = hash:/etc/aliases,
hash:/opt/majordomo/aliases
# ADDRESS EXTENSIONS (e.g.,
user+foo)
#
# The recipient_delimiter parameter specifies the
separator between
# user names and address extensions (user+foo).
See canonical(5),
# local(8), relocated(5) and virtual(5) for the
effects this has on
# aliases, canonical, virtual, relocated and
.forward file lookups.
# Basically, the software tries user+foo
and .forward+foo before
# trying user and .forward.
#
#
recipient_delimiter = +
# DELIVERY TO MAILBOX
#
# The
home_mailbox parameter specifies the optional pathname of a
#
mailbox file relative to a user's home directory. The default
#
mailbox file is /var/spool/mail/user or /var/mail/user. Specify
#
"Maildir/" for qmail-style delivery (the / is
required).
#
#home_mailbox = Mailbox
#home_mailbox =
Maildir/
# The mail_spool_directory parameter specifies the
directory where
# UNIX-style mailboxes are kept. The default
setting depends on the
# system type.
#
#
mail_spool_directory = /var/mail
mail_spool_directory =
/var/spool/mail
# The mailbox_command parameter specifies the
optional external
# command to use instead of mailbox delivery.
The command is run as
# the recipient with proper HOME, SHELL and
LOGNAME environment settings.
# Exception: delivery for root is
done as $default_user.
#
# Other environment variables of
interest: USER (recipient username),
# EXTENSION (address
extension), DOMAIN (domain part of address),
# and LOCAL (the
address localpart).
#
# Unlike other Postfix configuration
parameters, the mailbox_command
# parameter is not subjected to
$parameter substitutions. This is to
# make it easier to specify
shell syntax (see example below).
#
# Avoid shell meta
characters because they will force Postfix to run
# an expensive
shell process. Procmail alone is expensive enough.
#
# IF YOU
USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN
# ALIAS
THAT FORWARDS MAIL FOR ROOT TO A REAL USER.
#
#mailbox_command
= /some/where/procmail
#mailbox_command = /some/where/procmail -a
"$EXTENSION"
mailbox_command = /usr/bin/procmail -a
$DOMAIN -d $LOGNAME
# The mailbox_transport specifies the
optional transport in master.cf
# to use after processing aliases
and .forward files. This parameter
# has precedence over the
mailbox_command, fallback_transport and
# luser_relay
parameters.
#
# Specify a string of the form transport:nexthop,
where transport is
# the name of a mail delivery transport defined
in master.cf. The
# :nexthop part is optional. For more details
see the sample transport
# configuration
file.
#
#mailbox_transport =
lmtp:unix:/file/name
#mailbox_transport = cyrus
# The
fallback_transport specifies the optional transport in master.cf
#
to use for recipients that are not found in the UNIX passwd
database.
# This parameter has precedence over the luser_relay
parameter.
#
# Specify a string of the form transport:nexthop,
where transport is
# the name of a mail delivery transport defined
in master.cf. The
# :nexthop part is optional. For more details
see the sample transport
# configuration
file.
#
#fallback_transport =
lmtp:unix:/file/name
#fallback_transport =
cyrus
#fallback_transport =
# The luser_relay parameter
specifies an optional destination address
# for unknown
recipients. By default, mail for unknown local recipients
# is
bounced.
#
# The following expansions are done on luser_relay:
$user (recipient
# username), $shell (recipient shell), $home
(recipient home directory),
# $recipient (full recipient address),
$extension (recipient address
# extension), $domain (recipient
domain), $local (entire recipient
# localpart),
$recipient_delimiter. Specify ${name?value} or
# ${name:value} to
expand value only when $name does (does not) exist.
#
#
luser_relay works only for the default Postfix local delivery
agent.
#
# luser_relay = $user@other.host
# luser_relay =
$local@other.host
# luser_relay = admin+$local
# JUNK MAIL
CONTROLS
#
# The controls listed here are only a very small
subset. See the file
# sample-smtpd.cf for an elaborate list of
anti-UCE controls.
# The header_checks parameter restricts
what may appear in message
# headers. This requires that POSIX or
PCRE regular expression support
# is built-in. Specify
"/^header-name: stuff you do not want/ REJECT"
# in the
pattern file. Patterns are case-insensitive by default. Note:
#
specify only patterns ending in REJECT (reject entire message) or
#
IGNORE (silently discard this header). Patterns ending in OK are
#
mostly a waste of cycles.
#
#header_checks =
regexp:/etc/postfix/filename
#header_checks =
pcre:/etc/postfix/filename
# FAST ETRN SERVICE
#
#
Postfix maintains per-destination logfiles with information about
#
deferred mail, so that mail can be flushed quickly with the SMTP
#
"ETRN domain.name" command, or by executing "sendmail
-qRdomain.name".
#
# By default, Postfix maintains
deferred mail logfile information
# only for destinations that
Postfix is willing to relay to (as
# specified in the
relay_domains parameter). For other destinations,
# Postfix
attempts to deliver ALL queued mail after receiving the
# SMTP
"ETRN domain.name" command, or after execution of
"sendmail
# -qRdomain.name". This can be slow when a lot
of mail is queued.
#
# The fast_flush_domains parameter
controls what destinations are
# eligible for this "fast
ETRN/sendmail -qR" service.
#
#fast_flush_domains =
$relay_domains
#fast_flush_domains =
# SHOW SOFTWARE
VERSION OR NOT
#
# The smtpd_banner parameter specifies the
text that follows the 220
# code in the SMTP server's greeting
banner. Some people like to see
# the mail version advertised. By
default, Postfix shows no version.
#
# You MUST specify
$myhostname at the start of the text. That is an
# RFC
requirement. Postfix itself does not care.
#
#smtpd_banner =
$myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP
$mail_name ($mail_version)
smtpd_banner = $myhostname ESMTP
$mail_name ($mail_version) (Vine Linux)
# PARALLEL DELIVERY TO
THE SAME DESTINATION
#
# How many parallel deliveries to the
same user or domain? With local
# delivery, it does not make sense
to do massively parallel delivery
# to the same user, because
mailbox updates must happen sequentially,
# and expensive
pipelines in .forward files can cause disasters when
# too many
are run at the same time. With SMTP deliveries, 10
# simultaneous
connections to the same domain could be sufficient to
# raise
eyebrows.
#
# Each message delivery transport has its
XXX_destination_concurrency_limit
# parameter. The default is
$default_destination_concurrency_limit for
# most delivery
transports. For the local delivery agent the default is
2.
#local_destination_concurrency_limit =
2
#default_destination_concurrency_limit = 10
# DEBUGGING
CONTROL
#
# The debug_peer_level parameter specifies the
increment in verbose
# logging level when an SMTP client or server
host name or address
# matches a pattern in the debug_peer_list
parameter.
#
debug_peer_level = 2
# The debug_peer_list
parameter specifies an optional list of domain
# or network
patterns, /file/name patterns or type:name tables. When
# an SMTP
client or server host name or address matches a pattern,
#
increase the verbose logging level by the amount specified in the
#
debug_peer_level parameter.
#
# debug_peer_list = 127.0.0.1
#
debug_peer_list = some.domain
# The debugger_command specifies
the external command that is executed
# when a Postfix daemon
program is run with the -D option.
#
# Use "command .. &
sleep 5" so that the debugger can attach before
# the process
marches on. If you use an X-based debugger, be sure to
# set up
your XAUTHORITY environment variable before starting
Postfix.
#
debugger_command
=
PATH=/usr/bin:/usr/X11R6/bin
xxgdb
$daemon_directory/$process_name $process_id & sleep 5
#
Other configurable parameters.
allow_percent_hack = no
Red
Hat8
Vsftpd起動
cd
/sbin
./chkconfig --list | grep vsftpd
vsftpd:オン、オフの確認
./chkconfig
--level 35 vsftpd on
でvsftpd起動
WebDAVを使ってWebフォルダーから更新
RedHat8.0ではWebDAVが初めから組み込まれてるみたいなので
#/etc/httpd/confのhttpd.confを編集
Section
3の前ぐらい1000行あたりに以下を追加
<Directory
/var/www/html/dav>
DAV On
AuthType Basic
AuthName "webDAV
Access"
AuthUserFile /var/www/etc/htpasswd
<Limit
DELETE PROPFIND PROPPATCH COPY MOVE PUT LOCK UNLOCK>
Require
user
david
</Limit>
</Directory>
一応Basic認証でユーザーを作成
#/var/www/etcフォルダーを作成
#htpasswd
-c /var/www/etc/htpasswd
david(davidがユーザー名)
これで新しいパスワードを聞かれるので入力
その後/var/www/etc/htpasswd
ができるのでこのパーミッションを755に変更
#chmod
755
htpasswd
確認のため/var/www/html/davに適当なindex.htmlを作成
http://133.41.*.*/dav/で何か表示されるはず…
クライアント側でファイル更新
ME,98共に最新のIEが入っていればWebフォルダなるものがあるはず
MEの場合マイネットワーク内のネットワークブレースの追加で
http://133.41.*.*/davを入力そうしたら133.41.*.*上のdavができるのでダブルクリック
ユーザー名とパスワードが聞かれるのでユーザー名davidを入力、パスワドは先ほど作成
したのを入力これでフォルダーが見えてファイルの更新削除が出来ればOK!
#Basicなのでパスワードは暗号化されてません(SSHやらわかんないし…)
RedHat8.0でDVDを見る。
他HPの受け売りですがxineに必要なrpmを落して来ます。
libSDL1.2-1.2.5-6mdk.i586.rpm
nas-1.2p5-3.i386.rpm
Mesa-glut-3.1-1.i386.rpm
xine-0.9.13-2asp.i386.rpm
alsa-lib-0.9.0rc6-1.amd-k6.rpm
xine-libs-0.9.13-2asp.i386.rpm
rpm -ihv でインストール
けど簡単に/etc/apt/source.listを編集
追加で
# Red Hat Linux 8.0
rpm http://ayo.freshrpms.net redhat/8.0/i386 os updates freshrpms
#rpm-src http://ayo.freshrpms.net redhat/8.0/i386 os updates freshrpms
rpm http://apt.freshrpms.net redhat/8.0/en/i386 os updates freshrpms
rpm-src http://apt.freshrpms.net redhat/8.0/en/i386 os updates freshrpms
としました。
後は、#apt-get install xine
# xine &で起動で簡単に出来たと思う
Redhat8.0ではxmmsでいきなりmp3は再生出来ないのでhttp://staff.xmms.org/priv/redhat8/
から
xmms-1.2.7-13.i386.rpm
xmms-mpg123-1.2.7-13.i386.rpm
(mpg123 plugin)
xmms-skins-1.2.7-13.i386.rpm (skin
package)
xmms-devel-1.2.7-13.i386.rpm (devel
package)
を落して来ました。後はインストするだけ
HD増設
IDEケーブルに増設HDを接続、IDEマスターがhda、スレーブがhdb、IDEセカンダリーがhdc、スレーブがhddとなるので
fdisk -l にて状況確認そしてfdiskでHDの領域確保、決して動作してるHDの領域を解放しないように(何度泣いたことか…)
新規ディスクの場合は「n」コマンドで新規パテーションを作り「p」コマンドでp
primary(1-4)を選ぶ
パテーションは4つまで作れるらしい?今回は1つのパテーションでいいので1を選択
mコマンドでhelp分からなかったらman fdiskで詳しく説明が出てくる
wで書き込み
その後フォーマット
/sbin/mkfs -t ext2 /dev/hdc1
フォーマット形式はext2、dosでもできるらしい、DOSでフォーマットしたHDをつないでマウントも出来るがrootでしか何故か書き込みできない?
マウントは mount -t ext2 /dev/hdc1 /mnt/test(マウントするフォルダ)
起動のたびマウントするのはめんどくさいので
/etc/fstab を編集
/dev/hdc1 /mnt/test defaults 0 0
ちゃんとマウントされてるか確認、sambaなどで他のユーザーが読み書きできるようにchown、chgrpで権限を変更でないと共有で読み込みは出来るが書き込みが出来ない、何故かDOSでは権限も変更できない??
まだまだ使いこなせないです。
RedHat8.0でCGIをユーザーから実行(長い間分からなくて悩んでました。)
Apache/2.0.40のバージョンにおいてCGIがユーザーデレクトリから実行できない?httpd.confもいじくるがよく分からない?
結局、Suexecなるプログラムが邪魔みたい(セキュリティ関連らしい)
なので/usr/sbin/suexec をsuexec.bakなどに変更してApacheを再起動、これで動作するはず。ダメならパーミッション設定を疑う
telnetのバージョンを隠す。(RedHat)
telnet時のバージョンを隠します。
/etc/issue.netを編集
Red Hat Linux release 9 (Shrike)
Kernel \r on an \m
を消す。
[root@ /root]# chkconfig smb on [root@ /root]# chkconfig --list smb smb 0:off 1:off 2:off 3:on 4:on 5:on 6:off |
namazuの変更(Vine2.6)
/usr/share/namazu/plの
conf.plを変更
#
# This is a Namazu configuration file for mknmz.
#
package conf; # Don't remove this line!
#===================================================================
#
# Administrator's email address
#
$ADDRESS = 'hoge@pc98-dx.expac.hiroshima-u.ac.jp';(メール設定)
.namazurcを変更
# /home/httpd/cgi-bin/.namazurc for Vine Linux
#
# Each item is must be separated by one or more SPACE or TAB characters.
# You can use a double-quoted string for represanting a string which
# contains SPACE or TAB characters like "foo bar baz".
##
## Index: Specify the default directory.
##
Index /usr/share/namazu/index(indexをおくところ)
# This is the directory in which Vine namazu_*db packages are installed.
##
## Template: Set the template directory containing
## NMZ.{head,foot,body,tips,result} files.
##
Template /usr/share/namazu/index
# This is the directory in which Vine namazu templates are installed.
##
## Replace: Replace TARGET with REPLACEMENT in URIs in search
## results.
##
## TARGET is specified by perl-like regular expressions.
## You can caputure sub-strings in TARGET by surrounding them
## with `(' and `)'and use them later as backreferences by
## \1, \2, \3,... \9.
##
## To use meta characters literally such as `*', `+', `?', `|',
## `[', `]', `{', `}', `(', `)', escape them with `\'.
##
## e.g.,
##
## Replace /home/foo/public_html/ http://www.foobar.jp/~foo/
## Replace /home/(.*)/public_html/ http://www.foobar.jp/\1/
## Replace /C\|/foo/ http://www.foobar.jp/
##
## If you do not want to do the processing on command line use,
## run namazu with -U option.
##
Replace /home/httpd/hoge http://hoge.expac.hiroshima-u.ac.jp
(パスの指定)
--------------------------------------------------------------------------
つづく
後は、indexを置くフォルダ(/usr/share/namazu/index)に移動して
mknmz /home/httpd/hogeでOK
定期的にインデックスを作成
namazu.shを作成
cd /usr/share/namazu/index(namazuのインデックスに移動)
mknmz '--exclude=/home/hoge/public_html/01/seacret/.*' /home/hoge/public_html
(/home/hoge/public_html内を検索してindexを作成、けど/home/hoge/public_html/01/seacret/.*の中身は除外する。)
crontabを編集、/dev/null 2>&1 /dev/nullは何のためにあるかは?です。(こうしないと動かなかったので)
10 */1 * * * /etc/namazu.sh >/dev/null 2>&1 /dev/null(1時間10分おきにindexを作成)
完全に理解していないので不安
Fedora Core2でグラフィカルログイン出来なくなったとき
/etc/inittab を編集
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:(ランレベル3にする)
Postfixにおける内蔵フィルタリング機能を有効にする。
/etc/postfix/main.cfを編集
header_checks = regexp:/etc/postfix/header_checks_regexを追加
/etc/postfix/header_checks_regexをviで編集
フィルタリングのルールは、
/正規表現/{OK|IGNORE|REJECT}
となっており
OK 許可
IGNORE 受信するけど配信せず破棄
REJECT エラー扱いで受信否定(DNSは500番台を返す)
/name=.*\.src/ IGNORE
/name=.*\.exe/ IGNORE
/name=.*\.pif/ IGNORE
と、当方のサーバ設定では添付ファイルはsrc,exe,pifは受信しても配信せずと設定しました。
REJECTと設定すると送り主にエラーメールが送られるのでやめました。
Subjectやメール内容によってspamメールから免れるように設定してみましたが、本来のメールがうまく受信できなくな
り
残念ですが、ウィルス対策として添付ファイルを退けるだけの設定にしました。
後ドメイン指定で
/.com/ REJECT
/info@*.com/ REJECT
等指定すればいくらかspamも減ると思いますが、重要なメールが退けられたら嫌なのでやめました。
最後に
/etc/rc.d/init.d/postfix restart
しないといけないです。
VineLinux3.2でcorega製PCCB-11を動作させる。
メルコの無線LANカードWLI-PCM-L11がWEP64bitまでにしか対応していないためcorega製PCCB-11を認識させる。
(WLI-PCM-L11の128bit対応化は有償とのこと裏技で無料で出来る方法もあるらしいが当方は挫折)
カード情報の表示に以下のコマンドを利用します。
# cardctl ident
すると
Socket 0:
no product info available
Socket 1:
product info: "corega_K.K.", "Wireless_LAN_PCCB-11", "Version 01.02", ""
manfid: 0xc00f, 0x0000
function: 6 (network)
と出てくるので
#vi/etc/pcmcia/vine.confを編集
coregaのカードの部分を探す。
# corega Wireless LAN PCC-11
の部分を以下に書き換える。
# corega Wireless LAN PCC-11
card "Corega Wireless_LAN_PCCB-11"
version "corega_K.K.", "Wireless_LAN_PCCB-11", "Version 01.02", ""
# bind "wvlan_cs"
bind "orinoco_cs"
_(アンダーバー)等間違えないようにする。(これではまりました。)
再起動 /etc/rc.d/init.d/pcmcia restart
/etc/sysconfig/network-scripts/ifcfg-eth0を編集
BOOTPROTO=dhcp
ONBOOT=yes
USERCTL=yes
NAME="corega-lan"
ESSID=hogehoge
KEY=WEPキー16進で
DEVICE=eth0
PEERDNS=yes
再起動 /etc/rc.d/init.d/network restart
ifconfigにてeth0が出来てるか確認pingも通るか確認
eth0 リンク方法:イーサネット ハードウェアアドレス 00:09:41:1B:2F:79
inetアドレス:192.168.0.32 ブロードキャスト:192.168.0.255 マスク:255.255.255.0
FedoraCore2でqpopperを使用する。
FedoraCore2のサーバに接続してメールの送受信がやりたい…
Cyrus-imapdがインストールされているからこれを使用したいのだが認証ではねられてしまう?
調べてCyrusが使えるようになったがユーザー設定で駄目になる。
cyrus-imapd の管理コマンド cyradmが何故か使えない?
仕方ないので、qpopperを使用 Qpopperで最新版をゲット
解凍
#tar xvfz qpopper3.1.2.tar.gz
#cd qpopper3.1.2
#./configure
#make
コピー
cd popper
cp popper /usr/local/lib
して
/etc/xinetd.d の下に下記内容で popper という名前のファイルを作成します.
service pop-3
{
disable = no
socket_type =stream
wait = no
user = root
server = /usr/sbin/popper
server_args = -s
}
作成出来たら xinetd を再起動します.
# /etc/init.d/xinetd restart
これでqpopperが使えるようになります。(と思う)