(1) (FTTH DSL CATV) (2) IP DHCP / (3) (4) 2 ( ) FFFTP FFFTP Download ffftp-1.92.exe (620,256 ) http://www2.biglobe.ne.jp/~sota/ffftp.html 2



Similar documents
付録B

スマートアヴェニュー ご利用マニュアル

Samba_HowTo.doc

インストール取扱説明書

インストール取扱説明書

インストール取扱説明書

forum.dvi

UNIX

LHD-LAN_E_G_PDF.}.j...A...p65


InternetWeek2005-T16

mvd_nas_2.0.5_release_notes_v1_ja.doc

RouteMagic Controller( RMC ) 3.6 RMC RouteMagic RouteMagic Controller RouteMagic Controller MP1200 / MP200 Version 3.6 RouteMagic Controller Version 3

unix.dvi

橡環境設定.PDF

untitled

LHD-LAN ...[.U.[.Y.}.j...A.. V05.p65

In This Lesson

Samba とは Windows NT 互換のサーバ サーバ機能を提供 ファイル 印刷サーバをはじめ 各種の機能を提供 各種 UNIX 互換 OS(Linux, FreeBSD 等 ) 上で動作 オープンソース (GPL 準拠 ) オープンソース 誰でもソースの解析や 改良が可能 無償で入手が可能

¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°ÆÃÏÀ

CMS入門

RouteMagic Controller RMC-MP200 / MP Version

橡C16.PDF

RouteMagic Controller RMC-MP200 / MP Version

Logitec NAS シリーズ ソフトウェアマニュアル

Microsoft PowerPoint OSC2009Sendai-final.ppt

Logitec NAS シリーズ ソフトウェアマニュアル

橡F&e Web Server開発環境の構築方法

C G I 入 門 講 座

# mv httpd tar.gz /usr/local/src /usr/local/src # tar zxvf httpd tar.gz make #./configure # make # make install Apache # /usr/local/apac

Northern Lights Server

Logitec NAS シリーズ ソフトウェアマニュアル

ビジネスサーバ設定マニュアル_.htaccess編(VPS・PRO)

CentOSv2_furoku

Microsoft Word - マニュアル4.1J

Si-R180 ご利用にあたって

HP Server tc2120 Microsoft Windows 2000 Server SP3 HP P

SR-X526R1 サーバ収容スイッチ ご利用にあたって

Mac OS X Server Windows NTからの移行

A/B WWW MTA/MSP sendmail POP/IMAP apache WWW 1 1 sendmail uw imap apache WWW host host subnet1: /24 IF1: router & server mail and

w w w 2

CLUSTERPRO ファイルサーバ監視オプション編

ビジネスサーバ設定マニュアル_.htaccess編(Standard)

橡不正アクセス環境別詳細対策集.PDF

dvi

DSASのやりくり

w w 2

SR-X324T1/316T1 サーバ収容スイッチ ご利用にあたって

Oracle Application Server 10g(9

untitled

GA-1190J

1-index.PDF


CONTENTS Web

WebDAV WebDAV Apache Apache WebDAV Red Hat Debia

untitled

_‚Ofl¼

PostgreSQLによる データベースサーバ構築技法

このとき 位置セレクタウィンドウの表示は ネットワークなら network:/// Windous ネットワークなら smb:/// となっている thunar で ネットワーク上の PC を直接選ぶには smb:// *.** または smb://hostname と 相手 PC を

使用説明書

Microsoft PowerPoint OSC2009Oita-final.ppt

SR-S224PS1 セキュアスイッチ ご利用にあたって

FUJITSU Network Si-R Si-R Gシリーズ Si-R G200 ご利用にあたって

SR-X324T2/316T2 サーバ収容スイッチ ご利用にあたって

PowerGres on Linuxマニュアル

debian_manual.dvi

DocuWide 2051/2051MF 補足説明書

SR-X340TR1 サーバ収容スイッチ ご利用にあたって

証明書検証サーバの概要

debian_install.dvi

PushCornインストールマニュアル

1. 2. ( ) Secure Secure Shell ssh 5. (xinetd TCP wrappers) 6. (IPsec) 7. Firewall 2

2008, 2009 TOSHIBA TEC CORPORATION All rights reserved

CAS Yale Open Source software Authentication Authorization (nu-cas) Backend Database Authentication Authorization Powered by A

symbolic links and aliases may be used to point to other locations. DocumentRoot "/var/www/html/arcade" This should be changed to whatever you set Doc

Solarisフリーソフトウェア導入手順書 -Samba編-

DianaScope インストレーションマニュアル

SystemDirector Developer's Studio(V3.2) 適用ガイド

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

Web apache

etrust Access Control etrust Access Control UNIX(Linux, Windows) 2

FUJITSU Network SR-M SR-M20AP1 ご利用にあたって

shibasaki(印刷用)

Xen入門 ppt

Xen入門 ppt

FUJITSU Network Si-R Si-R Gシリーズ Si-R G100 ご利用にあたって

fx-9860G Manager PLUS_J

ksocket Documentation

<Documents Title Here>

... 4 DPM... 6 ICMB... 7 DPM ( ) DPM DHCP DPM

1 1.1 PC PC PC PC PC workstation PC hardsoft PC PC CPU 1 Gustavb, Wikimedia Commons.

FUJITSU Network Si-R Si-Rシリーズ Si-R240B ご利用にあたって

konicaminolta.co.jp PageScope Net Care

FortiGate Ver.4.0MR3Patch14 Information 1

EPSON Offirio SynergyWare PrintDirector 取扱説明書 導入ガイド

橡ホームページの作り方

(O) (N) (V) (N) kuins-pptp (N) 2


untitled

第3回_416.ppt

Transcription:

Linux Star and Moon...2 Vine Linux 2.5...3 (1)...3 (2)...3 (3)...11 IP...12 Apache...13 4.1 Apache...13 4.3 PHP...17 4.4...17 4.5...17 4.6...17 4.7...21 4.8 Apache...26 Webmin...28 Samba...30 6.1 Samba...30 6.2...30 6.4 samba...31 6.5 /etc/samba/smb.conf...31 6.6...33 6.7...33 6.8 Samba...35 6.9...35 6.10 Samba...35 6.11 Samba...35 6.12 Samba...35 6.13 Windos...37 6.14...38 6.15 Samba security( )...38 SWAT...41 7.1 WEB Samba (SWAT)...41 7.2 SWAT...41 7.3 Windows...48 7.4 Samba...49 Anonymous FTP...51 8.1 Vine Linux 2.6...51 8.2 Linux Anonymous FTP...51 8.3 ProFTPD...51 telnet...54 10...55 10.1...55 10.2...55 1 H15/11/6

(1) (FTTH DSL CATV) (2) IP DHCP / (3) (4) 2 ( ) FFFTP FFFTP Download ffftp-1.92.exe (620,256 ) http://www2.biglobe.ne.jp/~sota/ffftp.html 2

Vine Linux 2.5 Star and Moon VineLinux (1) VineLinux FDD VineLinux2.5 CD-ROM CD-ROM F12 CD-ROM 1 Windows Linux ( ) CDROM BIOS CDROM Vine CDROM Linux CDROM PCMCIA CDROM 1.44M DOS (CDROM e )e: >cd dosutils ( a ) e: >rawrite.exe -n -f e: images boot.img -d a: Linux (2) a. FDD VineLinux boot: Enter 3

b. VineLinux Japnese c. Japanese 106-key Japanes d. VineLinux e. Gene 2 Button Mouse(PS/2) 3 4

f. System Installer g. h. Disk Druid i. /dev/hda6 Linux /boot ex2 / ex2 /dev/hda1 14339MB NTFS /dev/hda2 /dev/hda5 vfat 39MB ex2 /boot /dev/hda6 swap 926MB swap SWAP /dev/hda7 vfat 2047MB ex2 / /dev/hda8 vfat 47MB vfat SYSSL 5

j. /hda5 6

k Asia/Tokyo l root 7

m :[MD5 ] [ ] [NIS ] NIS l. m. Generic Multisync(Hsync 31-64KHz) TFT Generic LCD Panel 1024 768 8

n. [X ] o. p. 9

q. r. VineLinux2.5 Linux System Selectore2 FDD System Selectore2 (U) System Selectore System Selectore OK 10

(3) Star and Moon Vine Linux Mozill Mozill ( ) Vine Linux [kterm.sh] #apt-get update apt-get update #apt-get upgrade apt-get getupgrade [Y]Enter apt-get getupgrade # ( 1 ) Webmin 11

IP Star and Moon kterm Window ifconfig IP 192.168.0.200 Network Configuration Network Configuration IP Linux linux.server.org Window IP 192.168.0.200 ( ) IP linux.server( ) Linux( ) IP /etc/hosts eth0 IP 192.168.0.200 ( IP ) 255.255.255.0 ON dhcp none IP ifconfig IP 12

Apache Star and Moon Apache (Redhat /etc/httpd/conf) httpd.conf ServerAdmin you@domain.co.jp conf log ServerRoot /usr/local/apache ErrorLog logs/error_log TransferLog logs/access_log PidFile /var/run/httpd.pid DNS ServerName www.domain.co.jp HTML DocumentRoot "/home/httpd/html" Apache httpd.conf srm.conf access.conf Apache Apache magic mime.type Apache Apache 4.1 Apache Apache1.3 httpd.conf httpd httpd.conf Directory Files AllowOverride Options DirectoryIndex AddModule VirtualHost.htaccess WebDAV mod_rewrite mod_setenvif mod gzip mod bandwidth (1) apache nobody nobody apache nobody Apache apache Apache FTP upload # useradd -s /bin/false -d /home/html/apache apache /home/html/apache apache apache apache root apache # chown -R apache /home/html /apache 13

4.2 apache(httpd) apache httpd.conf Star and Moon LockFile /usr/apache/run/httpd.lock PidFile /usr/apache/run/httpd.pid ScoreBoardFile /usr/apache/run/httpd.scoreboard User apache Group apache # ServerName ServerAdmin admin@syns.net ServerName www.syns.net apachectl restart nobody httpd apache httpd <Directory directory>... </Directory> <Directory> </Directory> Directory? * <Directory /usr/local/httpd/htdocs> Options Indexes FollowSymLinks </Directory> /usr/local/httpd/htdocs Options Indexes" "FollowSymLinks" "" "" Document Root <Directory ~ "^/www/.*/[0-9]{3}"> Document Root /www/ <Files filename>... </Files> <Files> <Directory> </Files> <Directory>.htaccess <Location> filename ~ <Files ~ ".(gif jpe?g png)$">.htaccess <Directory> <Location> <Files> AllowOverride.htaccess AccessFileName.htaccess Override None.htaccess Override All Override AuthConfig (AuthDBMGroupFile, AuthDBMUserFile, AuthGroupFile, AuthName, AuthType, AuthUserFile and require). FileInfo 14

(AddEncoding, AddLanguage, AddType, Star and Moon DefaultType and LanguagePriority). Indexes (AddDescription, AddIcon, AddIconByEncoding, AddIconByType, DefaultIcon, DirectoryIndex, FancyIndexing, HeaderName, IndexIgnore, IndexOptions and ReadmeName). Limit (allow, deny and order) iria1.07s9a BrowserMatch "Iria/1.07s9a" bbroken ( ) <Limit GET POST> order allow,deny deny from env=bbroken allow from all </Limit> 192.168.0.0/24 deny from 192.168.0. allow from all Options (Options and XBitHack). <Directory /usr/local/httpd/htdocs> AllowOverride None </Directory> Override.htaccess None All Options [+ -]option [+ -]option.. Options option None All MultiViews ExecCGI CGI FollowSymLinks Includes IncludesNOEXEC #exe CGI #include Indexes URL DirectoryIndex index.html MultiViews Content negotiated MultiViews 15

SymLinksIfOwnerMatch ID Option option Options all + - all option + option options - option option, + - : <Directory /web/docs> Options Indexes FollowSymLinks </Directory> <Directory /web/docs/spec> Options Includes </Directory> Includes /web/docs/spec Options + - <Directory /web/docs> Options Indexes FollowSymLinks </Directory> <Directory /web/docs/spec> Options +Includes -Indexes </Directory> FollowSymLinks Includes /web/docs/spec DirectoryIndex File File... URL "/index.html" "/" File index.html DirectoryIndex index.html index.shtml index.htm index.html index.shtml index.htm "/" 3 AddModule module module... Compatibility: AddModule Apache1.2 ClearModuleList VirtualHost Apache mod_vhost_alias.so LoadModule vhost_alias_module libexec/mod_vhost_alias.so AddModule mod_vhost_alias.c NameVirtualHost 192.168.0.1 <VirtualHost 192.168.0.5> DocumentRoot /var/apache/htdocs/www ServerName www.syns.net </VirtualHost> <VirtualHost 192.168.0.5> DocumentRoot /var/apache/htdocs/host-a/ ServerName host.syns.net </VirtualHost> 1 IP (non-ip-virtualhost) IP WWW NIC NameVirtualHost IP VirtualHost 192.168.0.5 ServerName IP Web IP non-ip 16

<VirtualHost172.16.0.6> DocumentRoot /var/apache/htdocs/www ServerNamewww.syns.net </VirtualHost> <VirtualHost172.16.0.5> DocumentRoot/var/apache/htdocs/host-a/ ServerNamehost.syns.net </VirtualHost> VirtualHost IP IP IP WWW NIC IP.htaccess.htaccess httpd.conf web httpd.conf httpd.conf htaccess AccessFileName.htaccess.htaccess 1) CGI SSI CGI SSI OK.htaccess Options Includes execcgi AddType text/x-server-parsed-html.shtml AddType application/x-httpd-cgi.cgi.pl 4.3 PHP DirectoryIndex index.phtml index.html AddType application/x-httpd-php3.php3 4.4 HTML <meta http-equiv=" "> Redirect / http://hogehoge.com/ Redirect /fuga/ http://hogehoge.com/hoge/ 4.5 auth ( ) URL "401 Authorization Required" ) ErrorDocument 401 /auth_err.html ErrorDocument 403 "403 " 4.6 ID htpasswd AuthUserFile /home/mydir/public_html/ htpasswd AuthGroupFile /dev/null AuthName "Authorization Users" AuthType Basic <Limit POST GET PUT> require valid-user </Limit> <Files.htaccess> order deny,allow deny from all </File> 17

18 Star and Moon WebDAV :dav_mod ( )mod_dav-1.0.2-1.3.6.tar.gz $./configure --with-apxs=/usr/apache/bin/apxs 1.0.3 webdav apxs ( NetBSD ) $ make $ su # make install httpd.conf LoadModule dav_module /usr/apache/libexec/libdav.so AddModule mod_dav.c mod_dav DAVLockDB /usr/apache/run/davlock <Location /DAV> DAV On </Location> DAV On <Location> <Direvtry> SSL SSL <Location> <LimitExcept GET HEAD OPTIONS></LimitExcept> <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> </Limit> <LimitExcept GET HEAD OPTIONS> AuthType Basic AuthName "WebDAV Secutity" AuthUserFile /etc/apache/davuser Require valid-user </LimitExcept> Apache.htaccess DAV mod_rewrite mod_setenvif CGI JAVA Apache mod_rewrite mod_setenvif mod_rewrite Solaris apache [ RefereURL] URL RefererURL RewriteEngine on RewriteCond %{HTTP_REFERER} ^$ RewriteCond %{HTTP_REFERER}!^[ RefererURL1].*$ [NC] RewriteCond %{HTTP_REFERER}!^[ RefererURL2].*$ [NC] RewriteRule ^(.*)$ - [F] RewriteRule.*.gz$ - [F].gz RewriteRule ^/$ /www/ [R] URL"/" /www/ HTTP_REFERER HTTP_USER_AGENT REQUEST_FILENAME,HTTP_HOST mod_setenvif Apache1.3.12 mod_setenvif Apache [ Referer URL] SetEnvIf REFERER "[ Referer URL]" Lilith Order deny,allow

deny from all allow from env=lilith [ Referer URL] SetEnvIf REFERER "[ Referer URL]" Lilith Order Allow,Deny allow from all deny from env=lilith.htaccess httpd.conf <Directory /usr/local/httpd/htdocs/direct_limit> Options Indexes FollowSymLinks RewriteEngine on RewriteCond %{HTTP_REFERER} ^$ RewriteCond %{HTTP_REFERER}!^[ RefererURL].*$ [NC] RewriteRule ^(.*)$ - [F] </Directory> mod_setenvif mod_rewite mod gzip mod_gzip.c apache (patch & update) # /usr/apache/bin/apxs -i -a -c mod_gzip.c Solaris /usr/ucb/cc Sun gcc # mv /usr/ucb/cc /usr/ucb/cc_old # ln -s /usr/local/bin/gcc /usr/ucb/cc # /usr/apache/bin/apxs -i -a -c mod_gzip.c # rm /usr/ucb/cc # mv /usr/ucb/cc_old /usr/ucb/cc LogFormat LogFormat "%h %l %u %t "%r " %>s %b mod_gzip: %{mod_gzip_compression_ratio}npct." common_with_mod_gzip ( ) CustomLog IfModule CustomLog /var/apache/logs/access_log common_with_mod_gzip <IfModule mod_gzip.c> mod_gzip_on Yes mod_gzip_minimum_file_size 300 mod_gzip_maximum_file_size 0 mod_gzip_maximum_inmem_size 100000 mod_gzip_keep_workfiles No mod_gzip_temp_dir /tmp mod_gzip_item_include file.html$ mod_gzip_item_include file.jsp$ mod_gzip_item_include file.php$ mod_gzip_item_include file.cgi$ mod_gzip_item_include file.txt$ mod_gzip_item_include file.shtml$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-httpd-php mod_gzip_item_include mime ^httpd/unix-directory$ mod_gzip_item_include handler ^perl-script$ mod_gzip_item_include handler ^server-status$ mod_gzip_item_include handler ^server-info$ mod_gzip_item_exclude file.css$ 19

mod_gzip_item_exclude file.js$ mod_gzip_item_exclude mime ^image/.* </IfModule> ( ) access_log mod_gzip: 73pct. 73% gif mod gzip mod bandwidth http # /usr/apache/bin/apxs -c mod_bandwidth.c # /usr/apache/bin/apxs -i -a mod_bandwidth.so apx apx httpd.conf mod_bandwidth # mkdir /usr/apache/bindwidth # mkdir mkdir /usr/apache/bindwidth/link # mkdir mkdir /usr/apache/bindwidth/master # chown -R apache:apache mkdir /usr/apache/bindwidth httpd.conf LoadModule bandwidth_module libexec/mod_bandwidth.so AddModule mod_bandwidth.c <IfModule mod_bandwidth.c> BandWidthModule On BandWidthDataDir /usr/apache/bindwidth BandWidthPulse 1000000 </IfModule> <Directory "/var/apahce/htdocs/bandlimit_dir"> BandWidth 192.168.0.0/24 0 BandWidth all 8388608 </Directory> <Directory "/var/apahce/htdocs/file"> LargeFileLimit 1000 8388608 MinBandWidth all 10240 </Directory> bandlimit_dir 192.168.0.0/24 8Mbyte/sec file 1000KByte 8Mbyte/sec BandWidthPulse BandWidth IP IP / rate 0 MinBandWidth rate 0 256 LargeFileLimit filesize KBytes 20

4.7 Star and Moon (1) Perl URL URL Netscape Explorer access_log URL referer_log agent_log agent_log TransferLog LogFormat 3 CustomLog LogFormat # TransferLog logs/access_log # # LogFormat <format_string> <command> LogFormat "%h %l %u %t "%r " %>s %b" common LogFormat "%{Referer}i -> %U" referer # agent_log # LogFormat "%{User-agent}i" agent CustomLog access_log common CustomLog referer_log referer # agent # CustiomLog agent_log agent (2)GIF/JPG GIF JPG HTML GIF/JPG # GIF/JPG object-is-image SetEnvIf Request_URI ".(gif) (jpg)$" object-is-image # object-is-image # CustomLog <directory> <command> <ENV> CustomLog access_log common env=!object-is-image CustomLog referer_log referer env=!object-is-image (3)CGI AddHandler <Direcotry> Options ExecCGI CGI <Directory> <Directory > </Directory> <Directory> Options None/All / Options Includes SSI Options ExecCGI ServerName www.domain.co.jp ScriptAlias /cgi-bin/ "/home/httpd/html/cgi-bin" AccessConfig /dev/null ResourceConfig /dev/null 21

AddHandler cgi-script.cgi Star and Moon # CGI ExecCGI <Directory "/home/httpd/html"> Options Indexes FollowSymLinks ExecCGI AllowOverride None Order allow,deny Allow from all </Directory> (4) FlollowSymLinks/FlollowSymLinksIfOwnerMatch FollowSymLinks SymLinksIfOwnerMatch <Directory "/home/httpd/html"> # Options Indexes FollowSymLinks ExecCGI Options Indexes -FollowSymLinks +SymLinksIfOwnerMatch ExecCGI AllowOverride None Order allow,deny Allow from all </Directory> (5) FlollowSymLinks/FlollowSymLinksIfOwnerMatch FlollowSymLinks FlollowSymLinksIfOwnerMatch <Directory /> Options FollowSymLinks </Directory> <Directory /home/httpd/html> Options -FollowSymLinks +SymLinksIfOwnerMatch </Directory> DocumentRoot Alias RewriteRule AllowOverride URL overrides (.htaccess Apache.htaccess AllowOverride None <Directory /> AllowOverride None </Directory> (6) DirectoryIndex index DirectoryIndex index.html index.shtml (7) MaxRequestsPerChild MaxRequestPerChild 22

23 Star and Moon MaxRequestsPerChild 0 30 10,000 KeepAliveTimeout 60 # httpd.conf # # standalone( )/Inetd( ) ServerType standalone # Apache # httpd.conf ServerRoot ServerRoot "/usr/local/apache" # PidFile /usr/local/apache/logs/httpd.pid # # NFS # #LockFile /var/run/httpd.lock # Timeout 300 # Port 80 # webuser webgroup apache # webuser web User webuser Group webgroup # ServerAdmin info@domain.co.jp # DNS ServerName www.domain.co.jp # HTML DocumentRoot "/home/httpd/html" <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory "/home/httpd/html"> Options Indexes -FollowSymLinks ExecCGI AllowOverride None Order allow,deny Allow from all </Directory> # UserDir public_html <Directory "/home/*/public_html">

Options Indexes ExecCGI AllowOverride None order deny,allow allow from all </Directory> Star and Moon # URL DirectoryIndex index.html # # AccessFileName access.conf # AccessFileName.htaccess <Files ~ "^.ht"> Order allow,deny Deny from all </Files> DefaultType text/plain # DNS # on off IP (on/off) # on == DNS, off == DNS HostnameLookups on # ErrorLog /usr/local/apache/logs/error_log # # TransferLog logs/access_log # error_log LogLevel warn # # CustomLog <directory> <command> LogFormat "%h %l %u %t "%r " %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent #.gif,.jpg SetEnvIf Request_URI ".(gif) (jpg)$" object-is-image CustomLog access_log common env=!object-is-image CustomLog referer_log referer env=!object-is-image CustomLog agent_log agent env=!object-is-image # ScriptAlias /cgi-bin/ "/home/httpd/html/cgi-bin/" <Directory "/home/httpd/html/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> # INDEX ReadmeName 24

HeaderName ReadmeName README HeaderName HEADER # AddType application/x-tar.tgz # handler-name #.cgi CGI AddHandler cgi-script.cgi AddType text/html.shtml AddHandler server-parsed.shtml 25

4.8 Apache VineLinux Apache www Apache httpd.conf /etc/httpd/conf httpd.conf (gedit) /etc/httpd/conf httpd.conf root / etc httpd conf httpd.conf httpd.cont httpd.conf #ServerName ServerName www.net.co.jp www.net.co.jp www.net.co.jp Apache apachectl Apache [root]# /usr/local/apache/bin/apachectl configtest Syntax OK [root]# Syntax OK ServerName SererName [root@]# /usr/local/apache/bin/apachectl configtest Syntax error on line 274 of /usr/local/apache/conf/httpd.conf: Invalid command 'SererName', perhaps mis-spelled or defined by a module not included in the server configuration [root@]# Warning Apache Apache Apache Apache apachectl [root]# /usr/local/apache/bin/apachectl start [root]# ServerName ServerName httpd: cannot determine local host name. Use the ServerName directive to set it manually. /usr/local/apache/bin/apachectl start: httpd could not be started It Worked! The Apache Web Server is Installed on this Web Site! Apache 26

User apache HostnameLookups off HostnameLookups on #AddHandler cgi-script.cgi # httpd kterm.sh [httpd.start] httpd [httpd.restart] Star and Moon www Apache httpd.conf [/root]#setup [ ] [Tab] [ ] httpd [Space] [httpd] * [Tab] [ ] 27

Webmin Star and Moon Webmin Vine Linux Webmin DNS Samba NFS Apache Postfix Web Webmin URL https://localhost:10000/! Window Window OK Webmin Window root root Window OK Window OK Webmin Window Webmin Webmin webmin Webmin www.webmin.com webmin http://www.aquacities.2y.net/linux_webmin.html Webmin [localhost:10000] Webmin 28

29 Star and Moon

Samba Samba( ) UNIX UNIX Windows NT/2000 / GPL(GNU General Public License) Samba Andrew Tridgell 1992 Linux Linux Sun HP UNIX Samba 1000 UNIX Samba Linux Windows NT/2000 Samba Quantum Andrew Tridgell VA Software Jeremy Allison ( ) Samba 3.0 Windows Active Directory Linux Window users Windows XP Vine Linux Linux user TIGGER PC:windowsXP/2000/98/ME IP:192.168.0,10 Samba user share Linux Vine Linux IP:192.168.0.1 6.1 Samba Samba # rpm -qa grep samba samba-2.0.10_ja_1.2-0vl1 samba-client-2.0.10_ja_1.2-0vl1 samba-common-2.0.10_ja_1.2-0vl1 6.2 Samba Samba http://www.samba.gr.jp/ Samba X samba-2.2.4.ja-12.i586.rpm X Samba 30

6.3 ( ) [root]# rpm -qa grep samba samba-2.0.10_ja_1.2-0vl1 samba-client-2.0.10_ja_1.2-0vl1 samba-common-2.0.10_ja_1.2-0vl1 (3 ) rpm -e rpm -e rpm -qa grep samba [root]# rpm -e samba-2.2.2.ja-10 [root]# rpm -e samba-client-2.2.2.ja-10 [root]# rpm -e samba-common-2.2.2.ja-10 6.4 samba (1)Samba CD-ROM [ ] [ ] [CD ] CD CD Auto-run CD [OK] (2)CD-ROM(samba-2.2.4.ja-12.i586.rpm) (3) /tmp (4)CD-ROM CD-ROM CD-ROM [root]# umount /dev/cdrom [root]#cd /tmp (4) / samba-2.2.4.ja-12.i586.rpm Samba root [root]# rpm -ivh samba-2.2.4.ja-12.i586.rpm Preparing... ########################################### [100%] 1:samba ########################################### [100%] [root]# 6.5 /etc/samba/smb.conf Linux Samba FTP Samba Web Samba smb.conf(/etc /etc/samba ) SWAT Web Samba smb.conf [global] workgroup = N-GROUP --> (1) Windows server string = Samba Server --> (2) security = user --> (3) 31

encrypt passwords = yes --> (4) socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 --> (5) ; interfaces = 192.168.12.2/24 192.168.13.2/24 --> (6) map to guest = Bad User --> (7) guest ok = Yes coding system = euc --> (8) client code page = 932 --> (9) [homes] --> (10) LINUX comment = Home Directories browseable = no --> Windows Windows home ( yes) writable = yes --> [samba] comment = Kyoyu -->(11) path = /home/samba --> (a) read only = no --> (b) guest only = yes --> (c) guest ok = yes --> (d) [public] comment = Public space; anyone can write any files. path = /home/samba/public force group = public writeable = Yes force create mode = 0664 force directory mode = 0775 guest ok = Yes (1) Windows (2) Windows Linux "Samba Server" "Samba %h" (3) user: Linux (Samba ) share: Linux (Samba ) domain: Windows (4) Windows95 OSR2,Windows98,Windows Me,WindowsNT4.0/2000 (5) (6) NIC ; 32

(7) guest Bad User: Never: (8) euc: Linux "????" sjis: Windows Shift JIS Linux cap: Machintosh,Netatalk (9) Windows 932 (10) [homes] Linux (11) Linux samba /home/samba (a) Windows Linux (b) (c) guest ok = yes guest (d) yes Samba smb.conf smb.conf SWAT 6.6 smb.conf testparm #testparm samba 6.7 Windows95 Linux /etc/passwd Windows98 WindowsNT 4.0 Windows2000 Windows Linux 2 Windows samba JB Windows samba samba Windows Linux Windows98 SAMBA Samba /etc/passwd 33

Samba Samba Samba Samba Linux samba # useradd -m share share # smbpasswd -a share New SMB password:xxxxxx Retype New SMB password:xxxxxx Password changed for user share. Linux Samba (smb.conf ) /etc/samba /etc # mksmbpasswd.sh < /etc/passwd > /etc/samba/smbpasswd # chmod 600 /etc/samba/smbpasswd share # smbpasswd share New SMB password:xxxxxx Retype New SMB password:xxxxxx Password changed for user share. Samba Linux Samba Samba /etc/passwd ---------------------------------------- cat /etc/passwd mksmbpasswd.sh > /etc/samba/smbpasswd chmod 600 /etc/samba/smbpasswd root / Samba Samba smbpasswd username (username ) Samba Samba Samba smb.conf encrypt password = yes smb passwd file = /etc/samba/smbpasswd service smb restart smb smb ntsysv chkconfig serviceconf passwd Samba pam_smbpass PAM passwd Linux Samba 34

pam_cracklib.so /etc/pam.d/system-auth password required /lib/security/pam_smbpass.so nullok use_authtok try_first_pass 6.8 Samba Samba Samba # /etc/rc.d/init.d/smb start Windows Linux 6.9 # ntsysv smb 6.10 Samba [root]# /usr/sbin/smbd -D [root]# /usr/sbin/nmbd -D 6.11 Samba [root]# smbclient -L Linux( ) 6.12 Samba smbstatus utmp Samba Samba smbstatus Samba : smbstatus [root]# smbstatus Samba version 2.2.4.ja-12 Service uid gid pid machine ---------------------------------------------- monyo monyo monyo 26361 misa (192.168.221.128) Fri Jun 22 00:44:18 2001 Locked files: Pid DenyMode R/W Oplock Name -------------------------------------------------- 26361 DENY_NONE RDWR EXCLUSIVE+BATCH /home/monyo/lion.txt Fri Jun 22 00:45:07 2001 26361 DENY_NONE RDWR EXCLUSIVE+BATCH /home/monyo/.txt Fri Jun 22 00:46:05 2001 26361 DENY_WRITE RDONLY EXCLUSIVE+BATCH /home/monyo/chargen.exe Fri Jun 22 00:44:43 2001 Share mode memory usage (bytes): 1048176(99%) free + 296(0%) used + 104(0%) overhead = 1048576(100%) total 35

SWAT (STATUS) Samba smbstatus cron Samba 2.0.7 utmp Samba 2.0.7 utmp utmp configure --with-utmp configure Samba 2.0.7 Linux Samba 2.0.7 Samba 2.2.0 --with-utmp Samba smb.conf 1 utmp [global] utmp = yes last 2 Samba Samba : last last grep smb monyo smb/0 misa Sun Jun 1710:28-11:36 (01:08) smbguest smb/2 misa Sun Jun 1710:27-11:36 (01:08) monyo smb/0 misa Sun Jun 1710:27-10:27 (00:00) smbguest smb/0 mayuka Sat Jun 1623:05-23:15 (00:10) smbguest smb/1 yukako Sat Jun 1622:48-11:36 (12:48) smbguest smb/0 yukako Sat Jun 1622:48-22:58 (00:10) Samba utmp directory [global] utmp = yes utmp directory = /var/log/samba/ utmpx wtmpx touch /var/log/samba/utmpx last -f : last -f %last -f /var/log/samba/utmpx tako smb/1 misa Thu Jun 2123:54 still logged in utmp utmp smbguest : ac 36

%ac -d smbguest Jun 2 total 1.81 Jun 3 total 0.95 Jun 4 total 0.30 Jun 6 total 0.05 Jun 9 total 7.03 Jun 16 total 2.35 Jun 17 total 13.24 6.13 Windos Windows Samba TCP/IP Microsoft Samba WindowsXP Samba Windows XP [ ] [ ] [ ] [ ] " : " " Wondows98/WindowsNT(ServicePack3 samba root Windows95/98 lmhosts Windows lmhosts 192.168.0.1 Vine Linux samba VSL samba WindowsNT Winodws95 lmhosts Winnt system32 WINS LMHOSTS ON LMHOSTS ServicePack3 (Service pack3 VSL PC ) [HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services Rdr Parameters] 37

"EnablePlainTextPassword"=dword:00000001 6.14 Check 1 VlineLinux Check 2 VlineLinux Check 3 windows Check 4 Samba 6.15 Samba security( ) 4 user share server domain security = user / / uid security = share tree connection ( ) security = server Samba SMB Samba PDC Windows NT Server Samba smb.conf Samba NT Samba NT encrypt passwords = yes smbpasswd smb.conf [global] security = server workgroup = EXAMPLE password server = HOST1PASSSERV2 EXAMPLE NT HOST1 NT PASSSERV2 DNS NetBIOS 38

NT UNIX samba security = domain Samba Windows (SAM) NT NT Samba security = server Samba Remote Procedure Call(RPC) SAMBA NT Samba WindowsNT (SRVMGR.EXE) WindowsNT SAMBA NetBIOS Samba NT smbpasswd -j GROUP -r PDCname GROUP NT PDCname NT smbpasswd: Joined domain GROUP. /etc/samba/smb.conf [global] security = domain domain logins = yes encrypt passwords = yes workgroup = GROUP password server = PDCname GROUP NT PDCname NT SAMBA PDC PDC SAMBA SAMBA PDC Samba Samba /etc/samba/smb.conf [global] security = user domain logins = yes WindowsNT OS encrypt passwd = yes 39

smb passwd file = /etc/samba/smbpasswd os level = 34 3 local master = yes preferred master = yes domain master = yes logon script = %U.bat PATH [netlogon] comment = The domain logon service path = /export/samba/logon public = no writeable = no browsable = no touch /export/samba logon smb restart 40

SWAT 7.1 WEB Samba (SWAT) swat xinetd SWAT F/W xinetd xinetd xinetd /etc/xinetd.d/swat /etc/xinetd.d/swat [root]# cd /etc/xinetd.d [root]# more swat service swat { disable = no port = 901 socket_type = stream wait = no only_from = 127.0.0.1 user = root server = /usr/sbin/swat log_on_failure += USERID } only_from SWAT SWAT only_from only_from = 192.168.1.0/24 192.168.1.xxx /etc/xinetd.d/swat root [root]# chkconfig swat on [root]# service xinetd restart xinetd : [ OK ] xinetd : [ OK ] 7.2 SWAT Vine Linux 2.1.5 SWAT (1)/etc/inetd.conf swat stream tcp nowait.400 root /usr/sbin/swat swat (2) # /etc/rc.d/init.d/inet restart (3)/etc/hosts.allow swat: 192.168.0.200 (4) #cd /var #mkdir share #chmod a+w #chown share share #chgrp share share 41

(5) Vine Linux (Mozilla) http://192.168.0.200:901 Windows samba IP LAN http://192.168.0.1:901 root Linux root SWAT 42

GLOBALS coding system euc client code page 932 workgroup N-GROUP netbios name SMBATALK server string %L: Samba %v on %h 43

interfaces security USER encrypt passwords Yes Star and Moon [ SHARE] Linux share [ ] (share Linux /var/share ) 44

share path /var/share guest account nobody writeable Yes guest ok Yes [ STATUS] (PASSWORD) share 111111 45

---------------------------------------------- smbd smbd nmbd nmbd smbd/nmbd share ******** ******** LinuxSmba] share 46

47 Star and Moon

7.3 Windows Star and Moon smb.conf TCP/IP IP WindowsNT Linux Samba Linux (1) Windows98 Microsoft " Microsoft TCP/IP(NIC) TCP/IP IP DNS Linux smb.conf Windows98 Samba Windows98 (2) Windows2000 Samba Windows2000 Samba Samba 2.0.7 (3) : Linux NetBIOS Server /home/public Server public (4) Linux (Samba) Windows98/Me SMB ( ) Windows NT OS Linux UNIX OS SMB Samba Windows98 [ ] [ ] regedit HKEY_LOCAL_MACHNE System CurrentControlSet Services VxD Vnetsup [ ] [ ] [DWORD ] EnablePlainTextPassword Windows Samba Windows98 WindowsNT4.0 Windows2000 SAMBA http://www.cityfujisawa.ne.jp/~odagiri/book/encrypt-passwd.htm 48

7.4 Samba Star and Moon Windows Linux ( ) Linux Windows (1) 1.samba-client-2.0.10_ja_1.2_ovl1 2.samba-common-2.0.10_ja_1.2_ovl1 3.samba-2.0.10_ja_1.2_ovl1 #rpm-ivh/mnt/cdrom/vine/rpms/ samba-2.0.10_ja_1.2_ovl1.i386.rpm (2) #mkdir /home/public (3) 777 #chmod 1777 /home/public 777 #ls -al /home/public (4)Samba smb.conf /etc/smb.conf global home pninters [global] coding system = SJIS Shift JIS EUC Extended UNIX Code JIS7 CAP Macintosh ecrypt passwords client code page = 932 map to guest workgroup = Windows security = share encrypt passwords = yes socket options server string dns proxy DNS guest account os level [public] path = writeable = yes force user = root create mask = 0666 guest ok = yes (5)smb.com #testparm 49

(6)Samba #/etc/rc.d/init.d/smb start Star and Moon Samba #/etc/rc.d/init.d/smb stop (7)Samba [/root]#setup [ ] [Tab] [ ] Enter httpd [Space] [smb] * [Tab] Enter [Tab] [ ] Enter Samba /etc/hosts 127.0.0.1 localhost.localdomain localhost 192.168.0.1 sam.domein.com sam 2 IP 50

Anonymous FTP Star and Moon Anonymous FTP FTP 8.1 Vine Linux 2.6 XXXXXXX IP 192.168.0.200 LAN URL YYYYYYYYYY ZZZZZZZZZZ 8.2 Linux Anonymous FTP Vine Linux anonymous ftp ftp ProFTPD /etc/inetd.conf FTP /etc/inetd.conf (upgrade ) Vine ProFTPD inetd /etc/inetd.conf ftp (Vine ) ftp # #ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l-a #ftp stream tcp nowait root /usr/sbin/tcpd in.proftpd -l-a # /etc/rc.d/init.d/inet restart 8.3 ProFTPD /etc/rc.d/init.d/proftpd start Vine ProFTPD /sbin/chkconfig --add proftpd ProFTPD Vine 2.0 wu-ftpd FTP Apache ProFTPD ProFTPD unix unix OS FTP ProFTPD GNU Public License(GPL) 51

GPL ProFTPD Apache ".htaccess" ".ftpaccess" FTP anonymous FTP Production Version: 1.2.5rc1 Released: 12/19/2001 ftp://ftp.infoscience.co.jp/pub/proftpd/distrib/ tar tar -xzf proftpd-1.0.1.tar.gz "proftpd-1.0.1" README configure make make install INSTALL /usr/local/sbin /etc /usr/local/bin configure --prefix=[prefix-dir] configure --prefix=/usr proftpd /usr/sbin /usr/bin /etc/proftpd.conf inetd (proftpd inetd ) FTP anonymous/guest proftpd.conf 52

8.4 FTP proftpd Vine Linux (gedit) proftpd #rpm -q proftpd Star and Moon proftpd #rpm -q proftpd proftpd-1.2.6-0vl1 (1)inetd.conf Vine Linux (gedit) inetd.conf inetd.conf /etc/inetd.conf inetd.conf #ftp stream tcp nowait root /usr/sbin/tcpdin.proftpd # (2)proftpd.conf /etc/proftpd.conf proftpd.conf ServerType standalone ServerType inetd (3)inetd /etc/rc.d/init.d/inetrestart FTP (4)proftpd [/root]#setup [ ] [Tab] [ ] httpd [Space] [proftpd] [*] [Tab] [ ] 53

telnet Telnet Vine Linux Windows Telnet Host Name 192.168.0.200 Linux ls root TELNET SSH TELNET /etc/inetd.conf telnet "#" # telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd inetd # /etc/rc.d/init.d/inet restart root ssh ssh root root /etc/ssh/sshd_config 38 PermitRootLogin yes PermitRootLogin no ssh reload # /etc/rc.d/init.d/sshd reload 54

10 Star and Moon 10.1 Windows Print Screen X xwd -root -out XWD XWD jpeg png RedHat7.3 ImageMagic import -? import -screen.jpg.jpg.png.gif.pct TIFF display GUI 10.2 WW URL GNOME -> -> ->gedit SHIFT SHIFT+SPACE 55