
| RPM パッケージの情報を知る |
rpm -qa
BIND の RPM パッケージが入っているかを調べるには、
rpm -qa | grep bind
のようにする。
インストール先を確認するには、以下のように行う。
たとえば、パッケージ名が hogehoge の場合
rpm -qs hogehoge
| RPM パッケージをインストール/アンインストールする |
rpm -ivh fooinstall.rpm
rpm -e fooerase.rpm
| Vine Linux でエプソンのプリンターを使う |
| runlevel
を変更する |
インストールしたときに、グラフィカルログインを選ぶと、runlevel というものが
自動的に 5 となります。これをテキストログインにしたい場合は、 /etc/inittab を編集します。
をid:5:initdefault:
とします。id:3:initdefault:
| 仮想コンソールの数を減らす |
| ブートフロッピーを作成する |
| #
ls /lib/modules 2.2.20-0vl10 2.4.19-0vl11smp |
| # mkbootdisk 2.4.19-0vl11smp |
| dhcp サーバーをインストールする (dhcpd) |
パッケージを取得する。
rpm -ivh dhcp-2.0pl5-6vl1.i386.rpm
vi /etc/dhcpd.conf
| option
domain-name "nakifumi.com"; option domain-name-servers 192.168.0.1; option routers 192.168.0.1; option subnet-mask 255.255.255.0; option broadcast-address 192.168.0.255; option netbios-name-servers 192.168.0.1; default-lease-time 600; max-lease-time 7200; subnet 192.168.0.0 netmask 255.255.255.0 { host venus { hardware ethernet xx:xx:xx:xx:xx:xx; fixed-address 192.168.0.150; } range 192.168.0.100 192.168.0.119; } |
デバイス eth1 のみを対象としたいので /etc/sysconfig/dhcpd に以下を設定します。
DHCPDARGS=eth1
起動します。
/etc/rc.d/init.d/dhcpd
ブート時に自動実行したいので対応するランレベル(今回は3)の設定を変更します。
/etc/rc.d/rc3.d/K35dhcpd というファイルがあるので。
mv /etc/rc.d/rc3.d/K35dhcpd /etc/rc.d/rc3.d/S35dhcpd
として先頭をSとします。(「S」とすると自動実行対象になるらしい ...)
| SSH
の設定 (OpenSSH) |
パッケージを取得する。 OpenSSH のホームはここ。
| DNS
キャッシュを設定する |
パッケージを取得する。(bind
は、セキュリティホールの関係で頻繁に更新されるので随時チェックを!)
| ファイル名 |
主な機能 |
| /etc/resolve.conf |
名前解決の順序を設定 |
| /etc/named.conf |
bind の設定ファイル |
| /var/named/named.ca |
キャッシュ。最新のルートファイルをもってくる。(named.ca
にコピーするなりする) |
| /var/named/named.local |
キャッシュ。たぶん特になにもしなくて良い? |
| /var/named/named.zone |
ローカル用設定ファイル。名前からIPアドレスを引くため |
| /var/named/named.rev |
ローカル用設定ファイル。IPアドレスから名前の逆引を行うため |
| /etc/resolve.conf |
| search nakifumi.com nameserver 127.0.0.1 |
| /etc/named.conf |
| // 検索を許可する端末 acl allowed-hosts{ 192.168.0.0/24; localhost; }; options { directory "/var/named"; // プロバイダのDNS forwarders{ xxx.xxx.xxx.xxx; xxx.xxx.xxx.xxx; }; allow-transfer{ allowed-hosts; }; allow-query{ allowed-hosts; }; }; zone "." { type hint; file "named.ca"; }; zone "nakifumi.com" { type master; file "named.zone"; allow-query{ allowed-hosts; }; }; zone "0.0.127.in-addr.arpa" { type master; file "named.local"; }; zone "0.168.192.in-addr.arpa" { type master; file "named.rev"; allow-query{ allowed-hosts; }; }; |
| /var/named/named.zone |
| ; Written by Nakamura at
2003/04/17 ; ; DNSサーバの名前、サーバの管理者のメールアドレス @ IN SOA hydra.nakifumi.com. root.hydra.nakifumi.com. ( 2003041900 ; serial 連続番号変更時は以前より大きく 43200 ; refresh 3600 ; retry 3600000 ; expire 360000 ; default_ttl ) ; DNS サーバを指定する IN NS hydra.nakifumi.com. ; メールサーバの名前を指定する ;IN MX 10 hydra.nakifumi.com. ; ; localhosts ; localhost IN A 127.0.0.1 loghost IN CNAME localhost. ; ; ; local ネットワーク内の端末名を列記する ; hydra IN A 192.168.0.1 venus IN A 192.168.0.150 ; ; 別名を定義する dns IN CNAME hydra.nakifumi.com. www IN CNAME hydra.nakifumi.com. |
| /var/named/named.rev |
| ; ; named.rev Written By Nakamura at 2003/04/17 ; @ IN SOA hydra.nakifumi.com root.hydra.nakifumi.com. ( 2003041800 ; serial 連続番号変更時は以前より大きく 43200 ; refresh 3600 ; retry 3600000 ; expire 360000 ; default_ttl ) @ IN NS hydra.nakifumi.com. @ IN PTR nakifumi.com. ; ; Other Hosts ; 1 IN PTR hydra.nakifumi.com. 150 IN PTR venus.nakifumi.com. |
| TCP Wrapper |
| ssh stream tcp nowait root /usr/sbin/tcpd sshd -i |
| ALL: ALL |
| ALL
: 192.168.0.0/255.255.255.0 ALL : 127.0.0.1 sshd: x.x.x.x |
| Linux をルーター代わりに使う |
| echo
1 > /proc/sys/net/ipv4/ip_forward /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # FinalFantasy XI /sbin/iptables -t nat -A PREROUTING -p tcp --dport 1100:2000 -i eth0 -j DNAT --to 192.168.0.150 |
| DDNS (Dynamic DNS) を使う |

| Windows とファイルを共有する(Samba) |
| # ./configure --prefix=/usr
--localstatedir=/var --with-lockdir=/var/lock/samba \ --libdir=/etc/samba --with-configdir=/etc/samba \ --with-privatedir=/etc/samba --with-codepagedir=/usr/share/samba/codepages \ --with-fhs --with-sambabook=/usr/share/swat/using_samba \ --with-swatdir=/usr/share/swat --with-quotas --with-syslog --with-utmp \ --with-msdfs --with-vfs --with-i18n-swat --with-pam --with-pam_smbpass # make # make install |
| [global] workgroup = WORKGROUP # server string is the equivalent of the NT Description field server string = hydra ; hosts allow = 192.168.1. 192.168.2.0./24 192.168.3.0/255.255.255.0 127.0.0.1 hosts allow = 192.168.0. 127.0.0.1 # Uncomment this if you want a guest account, you must add this to /etc/passwd # otherwise the user "nobody" is used ; guest account = pcguest # this tells Samba to use a separate log file for each machine # that connects log file = /usr/local/samba/var/log.%m log level = 1 # Put a capping on the size of the log files (in Kb). max log size = 50 # Security mode. Most people will want user level security. See # security_level.txt for details. security = share ; include = /usr/local/samba/lib/smb.conf.%m socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 ; interfaces = 192.168.12.2/24 192.168.13.2/24 # Should smbd report that it has MS-DFS Capabilities? Only available # if --with-msdfs was passed to ./configure ; host msdfs = yes ## Network Browsing # set local master to no if you don't want Samba to become a master # browser on your network. Otherwise the normal election rules apply local master = yes # OS Level determines the precedence of this server in master browser # elections. The default value (20) should be reasonable ; os level = 20 # Domain Master specifies Samba to be the Domain Master Browser. This # allows Samba to collate browse lists between subnets. Don't use this # if you already have a Windows NT domain controller doing this job ; domain master = yes # Preferred Master causes Samba to force a local browser election on startup # and gives it a slightly higher chance of winning the election ; preferred master = yes ## WINS & Name Resolution ; wins support = yes ; wins server = w.x.y.z ; wins proxy = yes dns proxy = no ## Passwords & Authentication # Use password server option only with security = server # The argument list may include: # password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name] # or to auto-locate the domain controller/s ; password server = * ; password server = <NT-Server-Name> encrypt passwords = yes ; obey pam restrictions = yes # When using encrypted passwords, Samba can synchronize the local # UNIX password as well. You will also need the "passwd chat" parameters ; unix password sync = yes # how should smbd talk to the local system when changing a UNIX # password? See smb.conf(5) for details ; passwd chat = <custom chat string> # This is only available if you compiled Samba to include --with-pam # Use PAM for changing the password ; pam password change = yes ## Domain Control ; domain logons = yes ; logon script = %m.bat ; logon script = %U.bat ; logon path = \\%L\Profiles\%U # UNC path specifying the network location of the user's home directory # only used when acting as a DC for WinNT/2k/XP. Ignored by Win9x clients ; logon home = \\%L\%U # What drive should the "logon home" be mounted at upon login ? # only used when acting as a DC for WinNT/2k/XP. Ignored by Win9x clients ; logon drive = H: ## Printing # If you want to automatically load your printer list rather # than setting them up individually then you'll need this load printers = yes ; printcap name = /etc/printcap ; printcap name = lpstat ; printing = bsd ; disable spoolss = yes ; printer admin = root, +ntadmin ## Winbind ; winbind uid = 10000-65000 ; winbind gid = 10000-65000 ; winbind template homedir = /home/%D/%U ; winbind template shell = /bin/sh ; winbind separator = + #============================ Share Definitions ============================== [homes] comment = Home Directories browseable = no writable = yes valid users = %S [web] comment = Web Directory path = /usr/local/apache2/htdocs browseable = yes writeable = yes guest ok = yes # Un-comment the following and create the netlogon directory for Domain Logons ; [netlogon] ; comment = Network Logon Service ; path = /usr/local/samba/lib/netlogon ; guest ok = yes ; writable = no ; share modes = no # Un-comment the following to provide a specific roving profile share # the default is to use the user's home directory ;[Profiles] ; path = /usr/local/samba/profiles ; browseable = no ; guest ok = yes # NOTE: If you have a BSD-style print system there is no need to # specifically define each individual printer [printers] comment = All Printers path = /usr/spool/samba browseable = no # Set public = yes to allow user 'guest account' to print guest ok = no writable = no printable = yes [tmp] comment = Temporary file space path = /tmp read only = no public = yes |
| netbios-ssn
stream tcp nowait root /usr/sbin/smbd smbd netbios-ns dgram udp wait root /usr/sbin/nmbd nmbd swat stream tcp nowait.400 root /usr/sbin/swat swat |
| # /sbin/service inet reload |
| NTP
クライアントとサーバ |
| PostgreSQL
をインストールする |
| # su - # useradd postgres # mkdir /usr/local/pgsql # chown postgres:postgres /usr/local/pgsql # su - postgres # tar zxvf postgresql-7.3.2.tar.gz # cd postgresql-7.3.2 # ./configure --enable-mutilbyte=EUC_JP # make # make install |
| PATH=$PATH:$HOME/bin:/usr/local/pgsql/bin export POSTGRES_HOME=/usr/local/pgsql export PGDATA=/home/postgres/data export PGLIB=/usr/local/pgsql/lib export LD_LIBRARY_PATH=/usr/local/pgsql/lib |
| if [ -x
/usr/local/pgsql/bin/postmaster ]; then rm -f /tmp/.s.PGSQL.5432 su - postgres -c "/usr/local/pgsql/bin/postmaster -D /home/postgres/data -o -i &" else echo -n 'postmaster ' fi |
| Oracle 8i をインストールする |
| Apache の BASIC 認証 の設定 |
| # cd /usr/local/apache2/htdocs/ecos # /usr/local/apache2/bin/htpasswd -c .htpasswd demouser New password: Re-type new password: Adding password for user demouser |
| AuthUserFile"/usr/local/apache2/htdocs/bin/.htpasswd" AuthGroupFile "/dev/null" AuthName "E-Commerce Site Demo" AuthType Basic <Limit GET> require user demouser </Limit> |
| #AllowOverride
None AllowOverride Limit AuthConfig FileInfo |
| osCommerce をインストールする |
| 今回使用したバージョン |
|
| MySQL |
4.0.13(mysql-standard-4.0.13-pc-linux-i686.tar.gz)
[バイナリ版] |
| PHP |
4.3.2(php-4.3.2.tar.gz) |
| Apache |
2.0.46(httpd-2.0.46.tar.gz) |
| OpenSSL |
0.9.7b(openssl-0.9.7b.tar.gz)
[rpm 版] |
| osCommerce |
osCommerce 2.2 MS1 (2003年2月19日版)
[2003/6/3 版] |
| #
groupadd mysql # adduser -g mysql -d /usr/local/var mysql |
| #
cd /usr/local # tar zxvf mysql-standard-4.0.13-pc-linux-i686.tar.gz # ln -s mysql-standard-4.0.13-pc-linux-i686/ mysql/ # cd mysql |
| # tar zxvf httpd-2.0.46.tar.gz # cd httpd-2.0.46 # ./configure --enable-modules="so ssl rewrite expires" # make # make install |
| #
tar zxvf php-4.3.2 # ./configure --enable-track-vars --enable-trans-sid --with-mysql --disable-debug --enable-mbstring \ --with-apxs2=/usr/local/apache2/bin/apxs -with-pgsql # make # make install # cp php.ini-dist /usr/local/lib/php.ini |
| [PHP] output_buffering = Off register_globals = On [mbstring] mbstring.language = Japanese mbstring.encoding_translation = On mbstring.http_input = auto mbstring.http_output = EUC-JP mbstring.internal_encoding = EUC-JP mbstring.detect_order = auto mbstring.substitute_character = none; |
| LoadModule php4_module
libexec/libphp4.so AddType application/x-httpd-php .php |
| DirectoryIndex index.html index.html.var index.php |
| #
mkdir /usr/local/apache2/conf/ssl.crt # cd ssl.crt/ |
| #
openssl genrsa -des3 -out ca.key 1024 Generating RSA private key, 1024 bit long modulus ...++++++ ........................................++++++ e is 65537 (0x10001) Enter PEM pass phrase: Verifying password - Enter PEM pass phrase: |
| # openssl req -new -x509 -days 365
-key ca.key -out ca.crt Using configuration from /usr/share/ssl/openssl.cnf Enter PEM pass phrase: You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:JP State or Province Name (full name) [Some-State]:Saitama Locality Name (eg, city) []:Hatogaya Organization Name (eg, company) [Internet Widgits Pty Ltd]:DynaForge Organization Organizational Unit Name (eg, section) []: Common Name (eg, your name or your server's hostname) []:www.nakifumi.com Email Address []:nakifumi@fsinet.or.jp |
| #
openssl genrsa -des3 -out server.key 1024 Generating RSA private key, 1024 bit long modulus ..............++++++ ..........++++++ e is 65537 (0x10001) Enter PEM pass phrase: Verifying password - Enter PEM pass phrase: |
| # openssl req -new -key server.key
-out server.csr Using configuration from /usr/share/ssl/openssl.cnf Enter PEM pass phrase: You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:JP State or Province Name (full name) [Some-State]:Saitama Locality Name (eg, city) []:Hatogaya Organization Name (eg, company) [Internet Widgits Pty Ltd]:DynaForege Oragnization Organizational Unit Name (eg, section) []: Common Name (eg, your name or your server's hostname) []:www.nakifumi.com Email Address []:nakifumi@fsinet.or.jp Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []: |
| #
./sign.sh server.csr CA signing: server.csr -> server.crt: Using configuration from ca.config Enter PEM pass phrase: Check that the request matches the signature Signature ok The Subjects Distinguished Name is as follows countryName :PRINTABLE:'JP' stateOrProvinceName :PRINTABLE:'Saitama' localityName :PRINTABLE:'Hatogaya' organizationName :PRINTABLE:'DynaForege Oragnization' commonName :PRINTABLE:'www.nakifumi.com' emailAddress :IA5STRING:'nakifumi@fsinet.or.jp' Certificate is to be certified until Jun 27 11:12:34 2004 GMT (365 days) Sign the certificate? [y/n]:y 1 out of 1 certificate requests certified, commit? [y/n]y Write out database with 1 new entries Data Base Updated CA verifying: server.crt <-> CA cert server.crt: OK |
| # openssl req -noout -text -in server.csr |
| # mkdir /usr/local/apache2/conf/ssl.key # cp ssk.key /usr/local/apache2/conf/ssl.key # chmod 400 ca.key # chmod 400 server.key |
| #!/bin/sh echo '任意のPassPhraseを入力' |
| SSLPassPhraseDialogexec:/usr/local/apache2/conf/passphrase |
| # /usr/local/apache2/bin/apachectl startssl |
#
/usr/local/bin/mysqld_safe --user=mysql & |
| #
su - mysql $ /usr/local/mysql/bin/mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 4.0.13-standard Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> update mysql.user -> set Password=PASSWORD('hogehoge') -> where User='root'; Query OK, 2 rows affected (0.00 sec) Rows matched: 2 Changed: 2 Warnings: 0 mysql> commit; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> delete from mysql.user where user=''; Query OK, 2 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> \q Bye |
| $
/usr/local/mysql/bin/mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 to server version: 3.23.56 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> grant all on *.* to shopdemo identified by 'xxxxxxxx'; Query OK, 0 rows affected (0.00 sec) |
| #
cd /usr/local/src # wget http://downloads.sourceforge.jp/tep-j/3606/oscommerce-2.2ms1j-R1.tar.gz # tar zxvf oscommerce-2.2ms1j-R1.tar.gz # cd oscommerce-2.2ms1j # cp -R catalog /usr/local/apache2/htdocs/shopdemo # cp -R admin /usr/local/apache2/htdocs/shopdemo # chmod 706 /usr/local/apache2/htdocs/shopdemo/catalog/includes/configure.php # chmod 706 /usr/local/apache2/htdocs/shopdemo/admin/includes/configure.php |
| # chmod 644
/usr/local/apache2/htdocs/shopdemo/catalog/includes/configure.php # chmod 644 /usr/local/apache2/htdocs/shopdemo/admin/includes/configure.php |
| # rm -R -f /usr/local/apache2/htdocs/shopdemo/catalog/install/ |
| Postfix + qpopper でメールの送受信をする |
| # rpm -ivh
postfix-1.1.12-0vl0.26.i386.rpm |
| #
SOFT BOUNCE #soft_bounce = no # LOCAL PATHNAME INFORMATION 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 mail_owner = postfix default_privs = nobody # INTERNET HOST AND DOMAIN NAMES myhostname = nakifumi.com mydomain = nakifumi.com # SENDING MAIL #myorigin = $myhostname #myorigin = $mydomain # RECEIVING MAIL inet_interfaces = all mydestination = $myhostname, localhost.$mydomain $mydomain #mydestination = $myhostname, localhost.$mydomain, $mydomain, # mail.$mydomain, www.$mydomain, ftp.$mydomain # TRUST AND RELAY CONTROL #mynetworks_style = class #mynetworks_style = subnet #mynetworks_style = host mynetworks = 192.168.0.0/24, 127.0.0.0/8 #mynetworks = $config_directory/mynetworks #mynetworks = hash:/etc/postfix/network_table allow_mail_to_commands = alias,forward,include #relay_domains = $mydestination # INTERNET OR INTRANET #relayhost = $mydomain #relayhost = gateway.my.domain #relayhost = uucphost #relayhost = [an.ip.add.ress] # REJECTING UNKNOWN LOCAL USERS #local_recipient_maps = $alias_maps unix:passwd.byname # INPUT RATE CONTROL #in_flow_delay = 1s # ADDRESS REWRITING # TRANSPORT MAP # # Insert text from sample-transport.cf if you need explicit routing. # ALIAS DATABASE # #alias_maps = dbm:/etc/aliases alias_maps = hash:/etc/postfix/aliases #alias_maps = hash:/etc/aliases, nis:mail.aliases #alias_maps = netinfo:/aliases alias_database = hash:/etc/postfix/aliases # ADDRESS EXTENSIONS (e.g., user+foo) # #recipient_delimiter = + # DELIVERY TO MAILBOX # #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 #mailbox_command = /some/where/procmail #mailbox_command = /some/where/procmail -a "$EXTENSION" #mailbox_transport = lmtp:unix:/file/name #mailbox_transport = cyrus #fallback_transport = lmtp:unix:/file/name #fallback_transport = cyrus #fallback_transport = #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 specifies an optional table with patterns # that each logical message header is matched against, including # headers that span multiple physical lines. Patterns are matched # in the specified order, and the search stops upon the first match. # When a pattern matches, what happens next depends on the associated # action that is specified in the right-hand side of the table: # # REJECT the entire message is rejected. # REJECT text.... The text is sent to the originator. # IGNORE the header line is silently discarded. # WARN the header is logged (not rejected) with a warning message. # WARN text... as above, and the text is logged, too. # # These patterns do not apply to MIME headers in the message body. # # See also the body_checks example in the sample-filter.cf file. # #header_checks = regexp:/etc/postfix/header_checks # 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.tld" command, or by executing "sendmail -qRdomain.tld". # # 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.tld" command, or after execution of "sendmail # -qRdomain.tld". 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) # 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 # INSTALL-TIME CONFIGURATION INFORMATION # # The following parameters are used when installing a new Postfix version. # # sendmail_path: The full pathname of the Postfix sendmail command. # This is the Sendmail-compatible mail posting interface. # sendmail_path = /usr/lib/sendmail # newaliases_path: The full pathname of the Postfix newaliases command. # This is the Sendmail-compatible command to build alias databases. # #newaliases_path = /usr/bin/newaliases # mailq_path: The full pathname of the Postfix mailq command. This # is the Sendmail-compatible mail queue listing command. # mailq_path = /usr/bin/mailq # setgid_group: The group for mail submission and queue management # commands. This must be a group name with a numerical group ID that # is not shared with other accounts, not even with the Postfix account. # #setgid_group = postdrop # manpage_directory: The location of the Postfix on-line manual pages. # #manpage_directory = # sample_directory: The location of the Postfix sample configuration files. # #sample_directory = # readme_directory: The location of the Postfix README files. # #readme_directory = # Other configurable parameters. # The allow_percent_hack parameter controls the rewriting of the form # "user%domain" to "user@domain". This is enabled by default. # allow_percent_hack = no |
| # /usr/sbin/postfix start |
| SNMP+MRTG で状態を監視する |
| #
tar zxvf ucd-snmp-4.2.6.tar.gz # cd ucd-snmp-4.2.6 # ./configure |
| #
make scapi.c: In function `sc_encrypt': scapi.c:612: incompatible types in initialization scapi.c:612: incompatible types in initialization scapi.c:612: incompatible types in initialization scapi.c:612: incompatible type for argument 1 of `memset' scapi.c: In function `sc_decrypt': scapi.c:725: incompatible types in initialization scapi.c:725: incompatible types in initialization scapi.c:725: incompatible types in initialization scapi.c:725: incompatible type for argument 1 of `memset' make[1]: *** [scapi.lo] エラー 1 |
| #
tar zxvf net-snmp-5.0.7.tar.gz # cd net-snmp-5.0.7 # ./configure (...) -Press return to continue- disabling above prompt for future runs... yes checking Default version of SNMP to use... *** Default SNMP Version: Starting with Net-SNMP 5.0, you can choose the default version of the SNMP protocol to use when no version is given explicitly on the command line, or via an 'snmp.conf' file. In the past this was set to SNMPv1, but you can use this to switch to SNMPv3 if desired. SNMPv3 will provide a more secure management environment (and thus you're encouraged to switch to SNMPv3), but may break existing scripts that rely on the old behaviour. (Though such scripts will probably need to be changed to use the '-c' community flag anyway, as the SNMPv1 command line usage has changed as well.). At this prompt you can select "1", "2" (for SNMPv2c), or "3" as the default version for the command tools (snmpget, ...) to use. This can always be overridden at runtime using the -v flag to the tools, or by using the "defVersion" token in your snmp.conf file. Default version of SNMP to use (3): setting Default version of SNMP to use to... 3 checking System Contact Information... *** System Contact Information: Describes who should be contacted about the host the agent is running on. This information is available in the MIB-II tree. This can also be over-ridden using the "syscontact" syntax in the agent's configuration files. System Contact Information (root@): nakifumi@fsinet.or.jp setting System Contact Information to... nakifumi@fsinet.or.jp checking System Location... *** System Location: Describes the location of the system. This information is available in the MIB-II tree. this can also be over-ridden using the "syslocation" syntax in the agent's configuration files. System Location (Unknown): HydraServer@Saitama.Japan setting System Location to... HydraServer@Saitama.Japan checking Location to write logfile... *** Logfile location: Enter the default location for the snmpd agent to dump information & errors to. If not defined (enter the keyword "none" at the prompt below) the agent will use stdout and stderr instead. (Note: This value can be over-ridden using command line options.) Location to write logfile (/var/log/snmpd.log): setting Location to write logfile to... /var/log/snmpd.log checking Location to write persistent information... *** snmpd persistent storage location: Enter a directory for the SNMP library to store persistent data in the form of a configuration file. This default location is different than the old default location (which was for ucd-snmp). If you stay with the new path, I'll ask you in a second if you wish to copy your files over to the new location (once only). If you pick some other path than the default, you'll have to copy them yourself. There is nothing wrong with picking the old path (/var/ucd-snmp) if you'd rather. Location to write persistent information (/var/net-snmp): setting Location to write persistent information to... /var/net-snmp checking If we should copy the old persistent directory... *** Copying old ucd-snmp persistent files to net-snmp persistent directory: Would you like to copy the older ucd-snmp persistent files into your new net-snmp persistent file path? This will functionally save all your ucd-snmp data and let it be used within the net-snmp tools. This will only be done once when you run make install. If you wish to do this, enter yes at the prompt. Copy ucd-snmp data into the net-snmp data directory (yes): yes (...) # make # umask 022 # make install |
| # su - # cp /usr/local/src/net-snmp-5.0.8/EXAMPLE.conf /usr/local/share/snmp/snmpd.conf # vi /usr/local/share/snmp/snmpd.conf |
| #
Access Control # First, map the community name (COMMUNITY) into a security name # sec.name source community com2sec local localhost private com2sec mynetwork 192.168.0.0/24 public # Second, map the security names into group names: # sec.model sec.name ##group MyRWGroup v1 local #group MyRWGroup v2c local #group MyRWGroup usm local group MyROGroup v1 mynetwork group MyROGroup v2c mynetwork group MyROGroup usm mynetwork # Third, create a view for us to let the groups have rights to: # incl/excl subtree mask view all included .1 80 #### # Finally, grant the 2 groups access to the 1 view with different # write permissions: # context sec.model sec.level match read write notif access MyROGroup "" any noauth exact all none none access MyRWGroup "" any noauth exact all all none # ----------------------------------------------------------------------------- # System contact information syslocation Hydra Server syscontact Akifumi Nakamura <nakifumi@fsinet.or.jp> # ----------------------------------------------------------------------------- # Process checks. # Make sure mountd is running proc mountd # Make sure there are no more than 4 ntalkds running, but 0 is ok too. proc ntalkd 4 # Make sure at least one sendmail, but less than or equal to 10 are running. proc sendmail 10 1 # a simple hello world exec echotest /bin/echo hello world # disk checks # The agent can check the amount of available disk space, and make # sure it is above a set limit. # disk PATH [MIN=DEFDISKMINIMUMSPACE] # # PATH: mount path to the disk in question. # MIN: Disks with space below this value will have the Mib's errorFlag set. # Default value = DEFDISKMINIMUMSPACE. # Check the / partition and make sure it contains at least 10 megs. disk / 10000 # load average checks # load [1MAX=DEFMAXLOADAVE] [5MAX=DEFMAXLOADAVE] [15MAX=DEFMAXLOADAVE] # # 1MAX: If the 1 minute load average is above this limit at query # time, the errorFlag will be set. # 5MAX: Similar, but for 5 min average. # 15MAX: Similar, but for 15 min average. # Check for loads: load 12 14 14 |
| # snmpd # snmpwalk -v 1 -c public 192.168.0.2 |
| #
/usr/local/mrtg-2/bin/cfgmaker public@192.168.0.2 > mrtg.cfg |
| # for UNIX WorkDir: /usr/local/apache2/htdocs/stats |
| HotSoNIC を使う |
| # wget
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.0.42.tar.gz # tar zxvf rrdtool-1.0.42.tar.gz # cd rrdtool-1.0.42 # ./configure # make; make install # make site-perl-install # cd /usr/local # wget http://hotsanic.sourceforge.net/archive/HotSaNIC-0.4/HotSaNIC-0.4.0.tgz # tar zxvf HotSaNIC-0.4.0.tgz # cd HotSaNIC # ./setup.pl |
| SkyBoard をインストールする |
| Linux を PPTP サーバーにする |
| # cd /usr/src # wget ftp://ring.asahi-net.or.jp/pub/linux/Vine/Vine-2.6/SRPMS/SRPMS/kernel-2.4.19-0vl11.src.rpm # wget http://public.planetmirror.com/pub/mppe/linux-2.4.19-openssl-0.9.6b-mppe.patch.gz # rpm -ivh kernel-2.4.19-0vl11.src.rpm # cd linux-2.4.19 # zcat ../linux-2.4.19-openssl-0.9.6b-mppe.patch.gz | patch -p1 |
| # make oldconfig |
| # make menuconfig |
| # make dep # make clean # make bzImage # make modules |
| # cd /boot # mv System.map-2.4.19-0vl11smp System.map-2.4.19-0vl11smp.org # mv vmlinuz-2.4.19-0vl11smp vmlinuz-2.4.19-0vl11smp.org |
| #
cp -p /usr/local/src/linux-2.4.19/arch/i386/boot/bzImage
/boot/vmlinuz-2.4.19-3smp # cp -p /usr/local/src/linux-2.4.19/System.map System.map-2.4.19-3smp # make modules_install |
| # installkernel VER-REL arch/i386/boot/bzImage System.map |
| title
Vine Linux_SMP (vmlinuz-2.4.19-3smp) root (hd0,0) kernel /vmlinuz-2.4.19-3smp ro root=/dev/hda2 |
| Tomcat をインストールする |
| #
cd /usr/local/ # chmod +x j2sdk-1_4_1_02-linux-i586-rpm.bin # ./j2sdk-1_4_1_02-linux-i586-rpm.bin # rpm -ivh j2sdk-1_4_1_02-fcs-linux-i586.rpm # ln -s /usr/java/j2sdk1.4.1_02/ /usr/java/jdk |
| #
cd /usr/local # tar zxvf /usr/local/src/tomcat-4.1.24-LE-jdk14.tar.gz # ln -s jakarta-tomcat-4.1.24-LE-jdk14/ tomcat |
| export JAVA_HOME=/usr/java/jdk export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/lib export TOMCAT_HOME=/usr/local/tomcat |
| # source /etc/profile |
| # /usr/local/tomcat/bin/startup.sh Using CATALINA_BASE: /usr/local/tomcat Using CATALINA_HOME: /usr/local/tomcat Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JAVA_HOME: /usr/java/jdk |
| # /usr/local/tomcat/bin/shutdown.sh Using CATALINA_BASE: /usr/local/tomcat Using CATALINA_HOME: /usr/local/tomcat Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JAVA_HOME: /usr/java/jdk |
| LoadModule jk2_module
modules/mod_jk2.so |
| [channel.socket:localhost:8009] info=Ajp13 forwarding over socket tomcatId=localhost:8009 debug=0 [uri:/examples/*] [uri:/examples/servlet/*] info=Map the whole webapp [shm] file=${serverRoot}/logs/shm.file size=1048576 |
| FML をインストールする |
| #
groupadd fml # useradd -g fml fml # mkdir /usr/local/fml # mkdir /var/spool/ml # chown fml /usr/local/fml # chown fml /var/spool/ml |
| # tar zxvf
fml-4.0-stable-20030510.tar.gz # cd fml-4.0-stable-20030510 # make install perl ./makefml install unshift(@INC, /usr/local/src/fml-4.0-stable-20030510/src) ---NOT USING configuration file (for the first time) THIS HOST (hydra.nakifumi.com) IS [i686-pc-linux-gnu] ---Please Define Your Fml System Configurations Personal Use or ML-Admin-Group-Shared or fmlserv you use? Personal, Group, Fmlserv (personal/group/fmlserv) [personal] DOMAIN NAME [nakifumi.com] FQDN [hydra.nakifumi.com] www.nakifumi.com EXEC FILES DIRECTORY [/usr/local/fml] TOP LEVEL ML DIRECTORY [/var/spool/ml] Language (Japanese or English) [English] Japanese TimeZone (TZ: e.g. +0900, -0300) [+0900] --- summary --- DOMAIN: nakifumi.com FQDN: www.nakifumi.com EXEC_DIR: /usr/local/fml ML_DIR: /var/spool/ml Language: Japanese TimeZone: +0900 The current configuration is saved in /usr/local/fml/.fml/system ---Install the Fml system to /usr/local/fml. (y/n) [n] y ... -- Enjoy Internetworking! |
| allow_mail_to_commands = alias,forward,include |
| # postfix reload |
| Courier-imap + SquirrelMail をインストールする |
| $ cd /usr/local/src $ wget http://keihanna.dl.sourceforge.net/sourceforge/courier/courier-imap-1.7.3.tar.bz2 $ tar zxvf courier-imap-1.7.3.tar.bz2 $ cd courier-imap-1.7.3 $ ./configure --without-pgsql $ make $ make check $ su - # cd /usr/local/src/courier-imap-1.7.3 # make install # make install-configure |
| #home_mailbox
= Mailbox #home_mailbox = Maildir/ ... #mail_spool_directory = /var/mail mail_spool_directory = /var/spool/mail |
| #home_mailbox
= Mailbox home_mailbox = Maildir/ ... #mail_spool_directory = /var/mail #mail_spool_directory = /var/spool/mail |
| $
cd ~ $ /usr/lib/courier-imap/bin/maildirmake Maildir |