çµæãšããŠåŸãããã®ãšæ¹æ³ïŒ
-ãã©ãã·ã¥ãã©ã€ãããã®ã³ã³ãœãŒã«OSã€ã³ã¹ããŒã«ã
-ã³ã³ãœãŒã«ç®¡çã¹ãã«ã
-ç¬èªã®ãªããžããªã®äœæã
-FTP / SFTPãä»ãããªã¢ãŒãã¢ã¯ã»ã¹ã®æäŸã
-SSHãããã³ã«ãä»ãããªã¢ãŒãã³ã³ãããŒã«ã®æäŸã
-ã«ãŒã¿ãŒã®èåŸã«ãããµãŒããŒã®ãªã¢ãŒãå å«ã
-WebãµãŒããŒã®åäœæ¡ä»¶ã®äœæïŒçæ³çã«ã¯ãnginx + apacheã®æïŒã
ã€ã³ã¿ãŒãããäžã§ãäžé£ã®æ®µéçãªæ瀺ã æã è¿·æãªééããããããŸã linuxoidãšsnottyãæã£ãŠãããªããäœåãªæãããããå¿ èŠãªãããšãç解ããããã«æ°æéãè²»ããããšãã§ããŸã-Linuxã§ã¯ãã¹ãŠãéèŠã§ãïŒ ä»¥äžã¯ãå²ãåœãŠãããã¿ã¹ã¯ã®å®éçãªç®çã®ããã«è¡ãããŸã-ãã¹ãŠãçå£ãªãµãŒããŒãäœæããããã®çå£ãªæ瀺ãšããŠãšãå¿ èŠã¯ãããŸããã ç¹ã«ãçµéšã®å埩ãã®éçšã§ãç§ããšã©ãŒãæ±ããŠãããããããŸãã...
-ã¿ã€ã ãº
ãã®ãããåšèŸºæ©åšãæ¥ç¶ããã空ã®ã³ã³ãã¥ãŒã¿ãŒããããŸãã ãŸããOSèªäœãã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã ãã¹ãŠã®Debian 6.0.0å®å®ãã£ã¹ã¯ã®ã€ã¡ãŒãžããããŸãã ç§ã¯ã¬ãŒã¶ãŒãã£ãªã¢ãã€ãŸã ã€ã³ã¹ããŒã«ããã«ã¯ãèµ·åå¯èœãªUSBãã©ãã·ã¥ãã©ã€ããäœæããå¿ èŠããããŸãã ãã©ãã·ã¥ãã©ã€ãã¯2Gbã§èŠã€ãããŸããã æ€çŽ¢åŸãLinuxç°å¢èªäœããäœæããããšãå¯èœã§ããããšãå€æããŸããã æåã®ãã£ã¹ã¯ã®ã€ã¡ãŒãžããDebianãä»®æ³ãã·ã³ã«ã€ã³ã¹ããŒã«ããå¿ èŠããããŸããïŒä»®æ³CD-ROMãšããŠã€ã¡ãŒãžãä»®æ³ãã·ã³ã«æ¥ç¶ããã€ã³ã¹ããŒã«ã¯ã¬ãŒã¶ãŒãã£ã¹ã¯ããã®ããã«ãæ£çŽã«ãå®è¡ãããŸãïŒã ãäžæ¬ãã€ã³ã¹ããŒã«-ã€ãŸã ãŸããGUIïŒããŒãžã§ã³6ã§ã¯GNOMEã®ã¿ããããŸããïŒã ããã§ãããã¹ãŠãå®äºããããdabianãããŒãããUSBãã©ãã·ã¥ãã©ã€ããä»®æ³ãã·ã³ã«æ¥ç¶ããŠãã³ã³ãœãŒã«ãéããŸãã
ã³ãã³ããå®è¡ããŸãïŒ
ïŒdmesg
次ã®ãããªãã®ã衚瀺ãããŸãã
[373982.581725] sd 8:0:0:0: [sdc] 4001760 512-byte hardware sectors (2049 MB) [373982.582718] sd 8:0:0:0: [sdc] Write Protect is off [373982.582718] sd 8:0:0:0: [sdc] Mode Sense: 03 00 00 00 [373982.582718] sd 8:0:0:0: [sdc] Assuming drive cache: write through [373982.584152] sd 8:0:0:0: [sdc] 4001760 512-byte hardware sectors (2049 MB) [373982.585718] sd 8:0:0:0: [sdc] Write Protect is off [373982.585718] sd 8:0:0:0: [sdc] Mode Sense: 03 00 00 00 [373982.585718] sd 8:0:0:0: [sdc] Assuming drive cache: write through [373982.585718] sdc: [373982.589280] sd 8:0:0:0: [sdc] Attached SCSI disk
ããã¯ããã©ãã·ã¥ãã©ã€ããã·ã¹ãã ã§å®çŸ©ãããŠããããšãæå³ããŸãã
ç®çã®ã¢ãŒããã¯ãã£ïŒç§ã®å Žåã¯i386ïŒã®boot.img.gzãã¡ã€ã«ïŒdebian.orgïŒãããŠã³ããŒããããã£ã¬ã¯ããªã«ã³ããŒããŸãã 次ã«ããã®ãã£ã¬ã¯ããªããã³ãã³ããå®è¡ããŸãã
ïŒzcat boot.img.gz> / dev / sdc
次ã«ãæ°ããæ§é /ããŒãã£ã·ã§ã³ããŒãã«ãèªèãããããã«ãUSBãã©ãã·ã¥ãã©ã€ããåŒãåºããŠæ¥ç¶ããå¿ èŠããããŸãã ããã«ãããudevãä¿æããããŒãã£ã·ã§ã³ããŒãã«ãæŽæ°ãããŸãã 確èªããã«ã¯ã次ã®ã³ãã³ããå®è¡ããŸãã
ïŒmkdir / mnt
ïŒmount / dev / sdc / mnt /
ïŒls / mnt
syslinux.cfgãsetup.exeãªã©ã®ã€ã³ã¹ããŒã«ãã¡ã€ã«ã衚瀺ãããŸãã ãã©ãã·ã¥ãã©ã€ããããŠã³ããããŸããã
次ã«ã察å¿ããã¢ãŒããã¯ãã£ïŒç§ã®å Žåã¯i386ïŒã®ãµã€ãº150-180MBã®netinstall ISOã€ã¡ãŒãžïŒdebian.orgïŒãããŠã³ããŒãããŸãã Netinstallã¯ããŒã¹ã·ã¹ãã ãã€ã³ã¹ããŒã«ããŸãããããã¯ãŒã¯ã¯å¿ èŠãããŸããã ãã®ã€ã¡ãŒãžãããã€ãã®ãã£ã¬ã¯ããªã«ã³ããŒãããã®ãã£ã¬ã¯ããªããUSBãã©ãã·ã¥ãã©ã€ããå®è¡ããŠã¢ã³ããŠã³ãããŸãã
ïŒcp debian-6.0.1a-i386-netinst / mnt
ïŒumount / dev /sd
ãµã çŸåšãç§ã¯ãã€ãã€ã³ã¹ããŒã«çšã®ãã©ãã·ã¥ãã©ã€ããæã£ãŠããŸãã
ä»ã®OSãæèŒããUSBãã©ãã·ã¥ãã©ã€ãã§ãã®ãããªã€ã³ã¹ããŒã©ãŒãæå¹ã«ããå¿ èŠãããå Žåã¯ãgrubããŒãããŒããŒã䜿çšã§ããŸãã ç§ã¯ãã§ã«grub4dosã§èµ·åå¯èœãªãã©ãã·ã¥ãã©ã€ããæã£ãŠããŸãã ãã©ãã·ã¥ãã©ã€ãã®ã«ãŒãã«debianãã©ã«ããŒãäœæããããã«ããããããŸãïŒdebian-6.0.1a-i386-netinst.isoãinitrd.gzãinitrdg.gzãlinux-æåŸã®3ã€ã®ãã¡ã€ã«ã¯ãDebian 6.0.0å®å®çã®æåã®ã€ã³ã¹ããŒã«ãã£ã¹ã¯ããåãåºããïŒdebian .orgïŒã ãããŠãgrub'aã¡ãã¥ãŒïŒmenu.lstïŒã§ä»¥äžãè¿œå ããå¿ èŠããããŸãïŒ
title Debian 6.0.1a - Netinstall (Basic System, VGA Install)
kernel /debian/linux video=vesa:ywrap,mtrr vga=788 -- quiet
initrd /debian/initrdg.gz
title Debian 6.0.1a - Netinstall (Basic System, TXT Install)
kernel /debian/linux -- quiet
initrd /debian/initrd.gz
次ã«ãBIOSã䜿çšããŠUSBãã©ãã·ã¥ãã©ã€ããå³èãµãŒããŒã«æ¿å ¥ããUSBãã©ãã·ã¥ãã©ã€ãããããŒããéžæããŠãDebianãé©åã«ã€ã³ã¹ããŒã«ããŸãã ã€ã³ã¹ããŒã«æã«ãç¹å¥ãªãã®ã¯èŠã€ãããŸããã§ãããã°ã©ãã£ã«ã«ã€ã³ã¿ãŒãã§ã€ã¹ã䜿çšããŠã€ã³ã¹ããŒã«ãéžæãã次ã«ãã€ã¢ãã°ã¢ãŒããéžæããŸããã ãã¡ã€ã«ã·ã¹ãã ãèªåçã«ããŒã¯ã¢ããããããšãã§ããŸã-åããŠãããè¡ããŸãã ãã°ã€ã³ãšåæ§ã«ã€ã³ã¹ããŒã«ãšåèµ·ååŸãã³ãã³ãããã³ããã衚瀺ãããé»ãç»é¢ã衚瀺ãããŸããåºæ¬çãªã€ã³ã¹ããŒã«ã¯å®äºã§ãã
-2
次ã«ãSSHãããã³ã«ãžã®ã¢ã¯ã»ã¹ãšå¶åŸ¡ãä¿èšŒããå¿ èŠããããŸãã ãŸããã³ã³ãœãŒã«ã«ããã»ã©å¿é ããªãããã«ã¯ãmcïŒããããã€ãã³ãã³ããŒïŒ-DOSã®ncïŒããŒãã³ã³ãã³ããŒïŒãŸãã¯Windowsã®tcïŒTotalCommanderïŒã®é¡äŒŒç©ãã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã ãã ããã€ã³ã¹ããŒã«ããå Žåã¯ããããã¯ãŒã¯ããããã±ãŒãžãã³ããŒããŠã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã ãããã¯ãŒã¯ããããŸããã åæã«ãå¿ èŠãªãœãããŠã§ã¢ã®ã»ãšãã©ãã¹ãŠãDebian 6.0.0å®å®ãã£ã¹ã¯ã§å©çšå¯èœã§ãïŒ6ã€ã®ãã£ã¹ã¯ãããããã§ãïŒã ãããããã£ã¹ã¯ã®äœ¿çšãæåŠããŸããã ãããã¯ãŒã¯ãæ§æããå ¬åŒã®ãããã¯ãŒã¯ãªããžããªã䜿çšã§ããŸã-æ¹æ³ã¯ã©ãã§ãç°¡åã§ãã ãããããã®è§£æ±ºçã¯ç§ãã¡ã®ããã§ã¯ãããŸãã-æåã®æ®µéã§å¹ åºãèªåŸæ§ãå¿ èŠã§ãã ãããŠãã€ããç°¡åãªæ¹æ³ã§é²ãã®ã-ç¥äººã¯èªç¶çã§ã®ç 究ã§ããããšã«å€ããã¯ãããŸããã ãã®ãããããŒã«ã«ãªããžããªãäœæããå¿ èŠããããŸãã
1ïŒæºå...
åã³ä»®æ³ãã·ã³ã«æ»ãå¿ èŠããããŸãã ã³ã³ãœãŒã«ãã«ãŒããšããŠå ¥åããŸãïŒå°æ¥ããã¹ãŠã®ãã³ã»ã³ã¹ã«ã«ãŒããèŒãããšããªãããã«ããµãŒããŒäžã§sudoãæ§æããŸãïŒã ãã£ã¬ã¯ããªãäœæããŸãã
ïŒmkdir debian / pool
ïŒmkdir debian / pool / contrib
ïŒmkdir debian / pool / main
ãããã®ãã£ã¬ã¯ããªã§ããã¹ãŠã®ãã©ã€ãããåãååã®ãã£ã¬ã¯ããªã®å 容ãã³ããŒããŸãã 30 GBã®å®¹éãæã€1人ã®ããã«ãªããŸãã ãã¹ãŠã®ãã£ã¹ã¯ã®å 容ãã³ããŒãããåŸããªããžããªã«é¢ããããã±ãŒãžã«é¢ããæ å ±ãä¿åããããã®ãã£ã¬ã¯ããªãäœæããŸãã
ïŒcd / debian
ïŒmkdir -p debian / dists / stable / contrib / binary-i386
ïŒmkdir -p debian / dists / stable / main / binary-i386
ããã«ããã¹ãŠã®ã³ãã³ãã¯çŸåšã®debianãã£ã¬ã¯ããªã«åºã¥ããŠå®è¡ãããŸã-ã©ãã«ãè¡ããŸããïŒ ããã±ãŒãžãªã¹ããåéããŸãã
ïŒapt-ftparchive packages pool / main /> dists / stable / main / binary-i386 /ããã±ãŒãž
ïŒapt-ftparchive packages pool / contrib /> dists / stable / contrib / binary-i386 /ããã±ãŒãž
ãªã¹ãã®å§çž®ïŒ
ïŒgzip -c dists / stable / contrib / binary-i386 /ããã±ãŒãž> dists / stable / contrib / binary-i386 / Packages.gz
ïŒgzip -c dists / stable / main / binary-i386 /ããã±ãŒãž> dists / stable / main / binary-i386 / Packages.gz
ãªãªãŒã¹ãã¡ã€ã«ã®äœæïŒ
ïŒapt-ftparchive release pool / contrib /> dists / stable / contrib / binary-i386 /ãªãªãŒã¹
ïŒapt-ftparchive release pool / main /> dists / stable / main / binary-i386 /ãªãªãŒã¹
ïŒcd / debian / pool / dists / stable
ïŒapt-ftparchiveãªãªãŒã¹ã >ãªãªãŒã¹
ããã§ã/ debianãã©ã«ããŒãããŒããã©ã€ãã«ã³ããŒããå¿ èŠã«å¿ããŠãä»ã®ã·ã¹ãã ã®ããŒã«ã«ãªããžããªãæ¥ç¶ããã³æŽçã§ããŸãã ç§ãã¡ãããŠããããš-ãã©ã«ãããªã ãŒããã«USBããŒãã«ã³ããŒããŸãã
2ïŒæ¥ç¶...ã«ãŒããšããŠãµãŒããŒã«ã¢ã¯ã»ã¹ããŸã
USBããŒãããµãŒããŒã«æ¥ç¶ããŸãã 次ã«ãããŒããã©ã®ããã«æ±ºå®ãããããç解ããŸãã
ïŒdmesg
ãããããŠã³ããã以åã«è¡ã£ããã¹ãŠãããŒãžããŸãã
ïŒmount / dev / sda1 / mnt /
ïŒmkdir / dpool
ïŒcp -r / mnt / * / dpool
ãã¡ã€ã«/etc/apt/sources.listãç·šéããŸã-ãã¹ãŠã®ãªããžããªã«ã³ã¡ã³ãããç§ãã¡ã®ãã®ãåŠæ¹ããŸãïŒ
debãã¡ã€ã«ïŒ/ debian / stable contrib main
ããã§ãç°¡åãªäœè«ãããå¿ èŠããããŸãã ã³ã³ãœãŒã«ã1ã€ã®å Žåã«ãã¡ã€ã«ãä¿®æ£ããæ¹æ³ã¯ïŒ ããã«ã¯viãšãã£ã¿ãŒããããŸãã
ïŒcd / etc / apt
ïŒsudo vi sources.list
次ã«ãå¿ èŠãªããšãè¡ããŸããç®çã®äœçœ®ã«ã«ãŒãœã«ã移åãããiããæŒããŸãã ãããå ¥åã¢ãŒãã§ãã å¿ èŠãªããšãè¡ããŸãã å®äºããESCãæŒããŠã³ãã³ãã¢ãŒãã«æ»ããŸãã 次-ããäžåºŠã ãã¹ãŠãå®äºãããããESCïŒwïŒ âãå ¥åãããšãå€æŽãä¿åããŠæ»ãã³ãã³ãã«ãªããŸãã æã mcãã€ã³ã¹ããŒã«ãããšãã©ã€ããç°¡çŽ åãããŸã...
æŽæ°ãè¡ããŸãïŒ
ïŒapt-get update
ïŒapt-cache gencaches
ããŒã«ã«ã¹ãã¬ãŒãžãå®äºããŸããïŒ
-3
ããŠãããããSSHã«è¿ã¥ããã
1ïŒroot'omã®ä»äºã®äžã§ã®ãã¹ãŠã®äººç...
ããããæåã«ãããªãã®äººçãå°ã楜ã«ããŸã-sudoãèšå®ããŸã Sudo-ç¹å®ã®ç¹æš©ãªãœãŒã¹ãäœæ¥ãã°ã§ãŠãŒã¶ãŒã«å§ä»»ã§ããã·ã¹ãã ã ç°¡åã«èšãã°ããŠãŒã¶ãŒã¯å ã rootã«ãã£ãŠã®ã¿å®è¡ãããããšãæå³ããŠããã¢ã¯ã·ã§ã³ãå®è¡ã§ããŸãã
ã«ãŒããšããŠãµãŒããŒã«ã¢ã¯ã»ã¹ãããã¡ã€ã«/ etc / sudoersãéããŸãã ç¹°ãè¿ããŸãããviãšãã£ã¿ãŒã䜿çšããŸãã
ïŒcd / etc
ïŒvi sudoers
è¡ãæ¢ããŠããŸãïŒ
ã«ãŒãALL =ïŒãã¹ãŠïŒALL
ãããŠãã®äžã«è¿œå ããŸãïŒ
ãŠãŒã¶ãŒALL =ïŒALLïŒALL
ä¿åããŠçµäºããŸãã ã§ããïŒ ããã§ãŠãŒã¶ãŒãšããŠãã°ã€ã³ã§ããŸãããéèŠãªã³ãã³ããå®è¡ãããšãã¯ãã³ãã³ãã®åã«ãsudoããè¿œå ããã ãã§ãã ã·ã¹ãã ãèå¥ã®ããã«çŸåšã®ãã¹ã¯ãŒããæåã«èŠæ±ãããšãã ã·ã¹ãã ãçµäºãããŠãŒã¶ãŒã®äžã«ç§»åããŸãã ã«ãŒããã¹ã¯ãŒããçŽã«æžã蟌ããããã«ãªããŸãã-ãŸãã«ãã䜿çšããŸããããå¿ããããšããããŸãïŒ
2ïŒã³ã³ãœãŒã«ãšviãæ·åããŸãã...
ããã±ãŒãžã眮ããŸãïŒ
ïŒsudo apt-get install mc
ã€ã³ã¹ããŒã«åŸãã³ãã³ããå ¥åããŸã
ïŒmc
ããã§ãmkdirãcpãlsãcdã³ãã³ããããã³viã®ã³ã³ãœãŒã«ç®¡çã«ã€ããŠåã¶ããšãã§ããŸãã F4ã䜿çšããŠãã¡ã€ã«ãç·šéã§ããããã«ãªããŸããã 2000幎代ã®æããã-ãã®åŸã386æ¥ç®ã«ã¯æšæºã䜿çšããŸãã...
3ïŒæåŸã«SSH ...
ããã±ãŒãžã眮ããŸãïŒ
ïŒsudo apt-get install ssh
ã€ã³ã¹ããŒã«ãæåãããã/ etc / ssh / sshd_configãã¡ã€ã«ã®æåŸã«è¡ãè¿œå ããŠãã¢ã¯ã»ã¹ãå¶éããŸãã
AllowUsers rootãuser
ç§ãã¡ã¯å®æœããŸãïŒ
ïŒsudo mc
次ã«ãæå®ããããã¹ã«ç§»åãããã¡ã€ã«ãç·šéããŸãã ç·šéåŸãä¿åã«åé¡ã¯ãããŸãã-mcã¯rootãšããŠå®è¡ãããŠããŸãã ç·šéåŸãsshãµãŒãã¹ãæŽæ°ããå¿ èŠããããŸã-ã³ã³ãœãŒã«ã«ç§»åããŠããµãŒãã¹ãåèµ·åããŸãã
ïŒsudo /etc/init.d/ssh restart
-4
1ïŒãããã¯ãŒã¯...
æåŸã«ããªã¢ãŒãã³ã³ãããŒã«ã«åãæ¿ããåã«ããããã¯ãŒã¯ãæ§æããã ãã§æžã¿ãŸãã ç§ã®ç¶æ³ã¯ç°¡åã§ããã³ã³ãã¥ãŒã¿ãŒã¯æç·ã§ã«ãŒã¿ãŒã«æ¥ç¶ãããŠããŸãã DHCPã¯ã«ãŒã¿ãŒã§æå¹ã«ãªã£ãŠãããããã€ã³ã¿ãŒãããã¯èªåçã«ååŸãããŸãã
ãããã¯ãŒã¯ã€ã³ã¿ãŒãã§ãŒã¹èšå®ã¯ãã¡ã€ã«ã«ä¿åãããŸãïŒ/ etc / network / interfaces
ãã¡ã€ã«ã®äœæ¥å 容ã®äŸã次ã«ç€ºããŸãã
# The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 10.0.0.10 netmask 255.0.0.0 network 10.0.0.0 broadcast 10.255.255.255 gateway 10.0.0.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.0.0.1 dns-search debian
mcãsudoããèµ·åãããããã¯ãŒã¯ã«é©ãããããã¯ãŒã¯èšå®ã«åŸã£ãŠãã®ãã¡ã€ã«ãä¿®æ£ããŸãã
ãµãŒããŒåãšãã¹ãã®èšå®ïŒ/ etc / hostnameã/ etc / hosts
ãµãŒããŒããdebianããšåŒã°ããå Žåã¯ã次ã確èªããŠãã ããã
ãã¹ãåã®æå³ã¯æ¬¡ã®ãšããã§ãã
ããã¢ã³
ãããŠããã¹ãã®æåã®è¡ïŒ
127.0.0.1 localhost debian
10.0.0.10 debian.localhost debian
ãã®ãã¹ãŠã®åŸãã³ã³ãã¥ãŒã¿ãŒãæ¶æ» ãããŸãã
ïŒsudo poweroff
2ïŒãªã¢ã³ã³...
ãã¹ãŠã®ã±ãŒãã«ãå€ãããµãŒããŒãäžçªé ãè§ã«åŒããŠãã³ã³ã»ã³ããšãããã¯ãŒã¯ã«å·®ã蟌ã¿ãŸãã åæã«ãããŒããŒããšããŠã¹ãæ€åºãããªãããšã«é©ããåŸãããŒã段éã§ãanyããšããååã®ãã¿ã³ãæŒãããã®ãBIOSãåŸ ããªãããã«ãäºåã«æ³šæããå¿ èŠããããŸãã é»æºãã¿ã³ãæŒããŠã皌åäžã®ã³ã³ãã¥ãŒã¿ãŒã«æ»ããŸãã ãã®ã³ã³ãã¥ãŒã¿ãŒã«WindowsããããŸãã ä»ãããµãŒããŒã«æ¥ç¶ããæ¹æ³ã¯ïŒ
ãã®ãããªããããã°ã©ã ããããŸãã ã€ã³ã¿ãŒãããã§å ¥æã§ããŸãã èµ·ååŸã[ã»ãã·ã§ã³]ã¿ãã§ãµãŒããŒã®IPã¢ãã¬ã¹ãæå®ããããŒããšããŠ22ãæ®ããŸãïŒããã¯ã·ã§ã«ã®æšæºããŒãã§ãïŒã ã翻蚳ãã¿ãã§UTF-8ãèšå®ãããŠããããšã確èªããŸããããã«ãããããªã«æåã衚瀺ãããšãã«ã²ã³ãå ¥ããªãããã«ãªããŸãã ãã»ãã·ã§ã³ãã«æ»ãããã£ã³ãã«ãéããŸãïŒãéããã æ¥ç¶åŸãæ¥ç¶ããŒã®äœæã確èªããããæ±ããããŸã-確èªããŸãã ãã°ã€ã³ïŒãŠãŒã¶ãŒãå ¥åããŸãã 次ã«ããã¹ã¯ãŒããå ¥åããŸã-å ¥åæã«ãã¹ã¯ãŒãã¯è¡šç€ºãããŸããã ããã¯æ£åžžã§ãã æ¥ç¶åŸããµãŒããŒã®æåŸ ç¶ãšãã€ãã£ãã³ã³ãœãŒã«ããã¢ãã¿ãŒå šäœã ãã§ãªããå°ããªãŠã£ã³ããŠã«è¡šç€ºãããŸãããã®ãŠã£ã³ããŠã¯ãããŠã¹ã§æ¯ãããšãã§ããŸãã ããã¯ãã»ãã仲éïŒããšããæå³ã§ãã
-5
ååãšããŠãWinSCPã䜿çšããŠãã¡ã€ã«ã·ã¹ãã ã«ã¢ã¯ã»ã¹ã§ããŸãã ããã«ããããã·ã³éã§ãã¡ã€ã«ãã³ããŒã§ããããã«ãªããŸãã ããããããã¯ããŸãæ£ãããããŸããããªããªã SSHèªèšŒåŸãã·ã¹ãã å šäœãžã®ã¢ã¯ã»ã¹ãéãããŸãã çæ³çã«ã¯ããµãŒããŒäžã«1ã€ã®ãããã¯ãŒã¯ãã©ã«ããŒãäœæãããã®ãã©ã«ããŒã«ã¢ã¯ã»ã¹ã§ããããã«ãããã ãã§ãã ãããŠãããã«å¯Ÿãã解決çããããŸãã
ããã±ãŒãžã眮ããŸãïŒ
ïŒsudo apt-get install samba
ãã¡ã€ã«/etc/samba/smb.confãç·šéããŸãã äœæ¥ã³ã³ãã³ãã®äŸã次ã«ç€ºããŸãã
[global] workgroup = WORKGROUP server string = %h server dns proxy = no log file = /var/log/samba/log.%m max log size = 1000 syslog = 0 panic action = /usr/share/samba/panic-action %d security = share encrypt passwords = true passdb backend = tdbsam obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . pam password change = yes [homes] comment = Home Directories browseable = no read only = yes create mask = 0700 directory mask = 0700 valid users = %S [printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = no read only = yes create mask = 0700 [print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no [user] path = /ftp/pub readonly = no guest ok = yes
ã³ã¡ã³ããšããŠã次ã®ããšãããããŸãã
-Windowsãã·ã³ãåäœããã¯ãŒãã³ã°ã°ã«ãŒããæå®ããå¿ èŠããããŸãã
-ã»ãã¥ãªãã£ãã©ã¡ãŒã¿ã¯å ±æã«èšå®ããå¿ èŠããããŸãã
-ããŠãŒã¶ãŒãã»ã¯ã·ã§ã³ã§ã¯ãå®éã®ãã¹ãæå®ããŠã²ã¹ãã¢ã¯ã»ã¹ãèš±å¯ããå¿ èŠããããŸããå®éã«ãã®ã»ã¯ã·ã§ã³ããã¡ã€ã«ã«è¿œå ããŸãã
ãã®ãã¹ãŠã®åŸã次ã®ãã£ã¬ã¯ããªãäœæããŸãã
ïŒmkdir / ftp
ïŒmkdir / ftp / pub
ãããŠããããã®ãã©ã«ããŒã«å¯Ÿããæš©å©ãæ±ããŸãïŒ
ïŒsudo chmod 0755 / ftp
ïŒsudo chmod 0777 / ftp / pub
ïŒsudo chown -R root / ftp
ãã®å Žåãftpãã©ã«ããŒãžã®ã¢ã¯ã»ã¹ãè¡ãããŸãããå€æŽã¯ã§ããŸããã ããããpubãã©ã«ããŒã§-äœã§ãããŸãã åœç¶ããããæšãŠãŠftpã®æš©éã調æŽããããšã§ããã¹ãŠãåçŽåã§ããŸã...
æåŸã«ããã¹ãŠã®èšå®ãæ©èœããããã«ãµãŒãã¹ãåèµ·åããŸãã
ïŒsudo /etc/init.d/samba restart
-6
ä»ããããã¯ãŒã¯äžã§èµ€ã¡ããã解æŸããæã§ãïŒïŒïŒ
æå§ãã«ããããã¯ãŒã¯äžã®ã©ãããã§ããããã¯ãŒã¯ãã¡ã€ã«ã«ã¢ã¯ã»ã¹ããŠå¶åŸ¡ã§ããããã«ãããšäŸ¿å©ã§ãã ããããããããžã«ã¯äœããããŸããïŒ
éçãªå®IPã¢ãã¬ã¹ã§ã€ã³ã¿ãŒãããã«ã¢ã¯ã»ã¹ã§ããå¿ èŠããããŸãã ã€ãŸã å€éšããã®ã¢ã¯ã»ã¹ã¯ããããã€ããŒã®ã¹ã€ããã³ã°ãããã¯ãŒã¯çµç±ã§ã¯ãªããçŽæ¥å®è¡ããå¿ èŠããããŸãã ããšãã°ãRamnetãŠãŒã¶ãŒã¯ãã¹ãŠå€§ããªNATã«åº§ã£ãŠããŸãããªããªãã ããã€ãã®ããŒã«ãä»ããŠãªã³ã©ã€ã³ã«ãªããŸãã ããã¯ãç»é²äžã«çºè¡ãããIPããããšãã°ãµã€ãã«ã¢ã¯ã»ã¹ãããšãã«ãå°å·ããããIPãšäžèŽããªãããšãæå³ããŸãã å®éã®IPã¯ãééããªããããã¯ãŒã¯ã¢ããã¿ãŒãã©ã€ããŒã®ãããã¯ãŒã¯èšå®ã§æå®ãããIPã§ãã å®éã®IPã確èªããããã«ãIPã¢ãã¬ã¹ã衚瀺ããã€ã³ã¿ãŒãããäžã®ãããã¯ãŒã¯ãµãŒãã¹ã䜿çšã§ããŸãã å®éã®IPããããšããŸãããã
ããã«ããããã¯ãŒã¯ã¯ã€ã€ããµãŒããŒã«çŽæ¥æ¥ç¶ãããŠããå Žåãæ¢ã«ç¹å¥ãªåé¡ã¯ãããŸããããµãŒããŒã¯æ¢ã«ãããã¯ãŒã¯äžã«ãããŸãã ãŸããã«ãŒãã£ã³ã°ããã€ã¹ïŒã«ãŒã¿ãŒããŸãã¯åãLinuxããŒã¹ã®äžéã¹ããªãã¿ãŒã¹ã€ããïŒãããå Žåã¯ã©ãã§ããããã ãã®å ŽåãNATã®èåŸã«æ¢ã«ååšããŠãããããå°ãããŒããã©ã¯ãŒãã£ã³ã°ãæ§æããå¿ èŠããããŸãã ãã·ã³äžã®åãããã¯ãŒã¯ãµãŒãã¹ã«ããŒãããããŸãïŒSSH-22ãFTP-21ãã€ãŸããã«ãŒã¿ãŒã¯ãå®éã®IPãä»ããŠããŒãã«ã¢ã¯ã»ã¹ãããšãã«ããã®ããŒãã§ãµãŒããŒã«ã¢ã¯ã»ã¹ããããã«æ§æããå¿ èŠããããŸãã ãµãŒããŒã®ã¢ãã¬ã¹ã10.0.0.10ã§ããããã€ããŒã®å®éã®IPã172.122.34.89ã®å Žåãã«ãŒã¿ãŒã¯ããŒãïŒããŒã転éïŒ21ããã³22ãå€éšïŒ172.122.34.89ïŒãããµãŒããŒïŒ10.0.0.10ïŒã«è»¢éããå¿ èŠããããŸãã ã«ãŒã¿ãŒã®ç®¡çããã«ã§æ°è¡ãèšå®ããããäžéã®Linuxã¹ã€ããã®ããŒãã³ã°ããŒãã«ãç·šéããã ãã§ãã ã¿ããªããã£ããšããŸãããã
ãã®å ŽåãPuttyãä»ããSSHã¢ã¯ã»ã¹ã®å Žåãå®éã®IPã¢ãã¬ã¹ã§ããããŒã22ãæå®ããã ãã§ãïŒäžèšãåç §ããŠãã ãããããã¯ãå°ããªPuttyã¯ã©ã€ã¢ã³ãã®ã»ããã¢ããã«ã€ããŠèª¬æããŠããŸãïŒã ãã°ã€ã³ããŠãµãŒããŒã³ã³ãœãŒã«ã«ã¢ã¯ã»ã¹ããŸãã
ãããŠãã¡ã€ã«ã¢ã¯ã»ã¹ïŒ ããã¯å°ãé£ããã§ãã WinSCPã䜿çšã§ããŸãããæ¢ã«è¿°ã¹ãããã«ãããã¯ç§ãã¡ã®æ¹æ³ã§ã¯ãããŸããã Sambaã¯LANã§ã®ã¿åäœããŸãã FTPã¢ã¯ã»ã¹ãæ§æããå¿ èŠããããŸã...
FTPã§ã¯ãproftpdãµãŒãã¹ã䜿çšããŸãã ããã±ãŒãžã眮ããŸãïŒ
ïŒsudo apt-get install proftpd
èšå®ãã¡ã€ã«ã¯æ¬¡ã®ãšããã§ãïŒ/etc/proftpd/proftpd.confã äœæ¥ãã¡ã€ã«ã®äŸã次ã«ç€ºããŸãã
Include /etc/proftpd/modules.conf ServerName "Debian" ServerType standalone DeferWelcome off MultilineRFC2228 on DefaultServer on ShowSymlinks on TimeoutNoTransfer 600 TimeoutStalled 600 TimeoutIdle 1200 DisplayLogin welcome.msg DisplayChdir .message true ListOptions "-l" DenyFilter \*.*/ DefaultRoot ~ RequireValidShell off Port 21 <IfModule mod_dynmasq.c> # DynMasqRefresh 28800 </IfModule> MaxInstances 10 User nobody Group nogroup Umask 022 022 AllowOverwrite on TransferLog /var/log/proftpd/xferlog SystemLog /var/log/proftpd/proftpd.log <IfModule mod_quotatab.c> QuotaEngine off </IfModule> <IfModule mod_ratio.c> Ratios off </IfModule> <IfModule mod_delay.c> DelayEngine on </IfModule> <IfModule mod_ctrls.c> ControlsEngine off ControlsMaxClients 2 ControlsLog /var/log/proftpd/controls.log ControlsInterval 5 ControlsSocket /var/run/proftpd/proftpd.sock </IfModule> <IfModule mod_ctrls_admin.c> AdminControlsEngine off </IfModule> <Anonymous /home/ftp/pub> User user1 Group nogroup UserAlias anonymous user1 #RequireValidShell off MaxClients 10 TransferRate RETR,STOR 4096 <Limit LOGIN> AllowAll </Limit> <Limit READ> AllowAll </Limit> <Limit WRITE> AllowAll </Limit> </Anonymous> <Anonymous /home/ftp/pub> User user2 Group nogroup #UserAlias anonymous user2 #RequireValidShell off MaxClients 3 #TransferRate RETR,STOR 4096 <Limit LOGIN> AllowAll </Limit> <Limit READ> AllowAll </Limit> <Limit WRITE> AllowAll </Limit> </Anonymous></code> : - FTP "standalone", ; - "Anonymous" : user1 4/ 10, user2 , 3. ftp-: <b># sudo /etc/init.d/proftpd restart</b> FTP- . , 21 . / /. . : <b># sudo useradd user1 # sudo useradd user2</b> : <b># sudo passwd user1 # sudo passwd user2</b> - - ))) SFTP . proftpd mod_sftp. (3 ) . 10 , . . SFTP SSH - . , .. , , . SFTP ( FTP , ), . - mod_sftp. , SSH: <source lang="bash"><IfModule mod_sftp.c> SFTPEngine on SFTPLog /var/log/proftpd/sftp.log TransferLog /var/log/proftpd/xferlog-sftp.log Port 2220 SFTPHostKey /etc/ssh/ssh_host_rsa_key SFTPHostKey /etc/ssh/ssh_host_dsa_key SFTPAuthorizedUserKeys file:~/.sftp/authorized_keys SFTPCompression delayed MaxLoginAttempts 6 </IfModule>
ãã®ã±ãŒã¹ã¯proftpd.confã«æ¿å ¥ãããã¢ã¯ã»ã¹ã¯ããŒã2220ãä»ããŠè¡ãããŸãããããåæã«ãmod_sftpã¯proftpdãšãšãã«ã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã éåžžã®ãªããžããªã§ã¯ãproftpdã¯mod_sftpãªãã§æ§ç¯ãããŸãã åå¥ã«ãå®æãããå¿ èŠããããŸãã ç§ã¯è±èªã®æ瀺ã«åŸã£ãŠãã¹ã¿ãã¯ãããŸãã-ããèŠããŠããŸããã ãã®ããã»ã¹ã¯ãç¬èªã®ãªããžããªãäœæããã®ãšåããããåµé çã§ãããçµæã¯ãŸã æºè¶³ãããŠããªãã®ã§ããã¹ãŠã説æããã€ããã¯ãããŸããã
-7
ããã§ãFTPãã»ããã¢ããããŸããã ããã§ãå¿ èŠã«å¿ããŠãµãŒããŒã®é»æºãå ¥ããããšãã§ããŸãã ããšãã°ããããã¯ãŒã¯ãã©ã«ãããäœããååŸããå¿ èŠããããŸãã
埮åŠãªç¹ã1ã€ãããŸãã ãµãŒããŒã«ã¯é»æºãšãããã¯ãŒã¯ã®ã¿ãæ¥ç¶ãããŠããŸãã ãããããããã¯ãŒã¯ã«ãŒãã¯é·ãéã³ã³ãã¥ãŒã¿ãŒããèµ·åãããããšãåŠã³ãŸãããã³ã³ãã¥ãŒã¿ãŒã®BIOSã§ãã®ãããªãµããŒãããªã³ã«ããŠããããžãã¯ããã±ããïŒããžãã¯ãã±ããïŒãéä¿¡ããã ãã§ãã ãŠã£ãããã£ã¢ã§èªãïŒ
ããžãã¯ãã±ããã¯ãããŒã«ã«ãããã¯ãŒã¯ãæ£åžžã«ééããããã«UDPãŸãã¯IPXãã±ããã«æ¿å ¥ã§ããç¹æ®ãªãã€ãã·ãŒã±ã³ã¹ã§ãã éåžžãWOLã®å Žåãæäžäœã®ãããã³ã«ãã±ããã¯ãããŒããã£ã¹ããããŸããããã¯ãåçãªã¢ãã¬ã¹å²ãåœãŠã®å Žåãã©ã®IPã¢ãã¬ã¹ãã©ã®MACã¢ãã¬ã¹ã«å¯Ÿå¿ããããããããªãããã§ãã ãã ãããããŒããã£ã¹ããã±ãããçŠæ¢ããã«ãŒã¿ãŒãæ£ããééãããã«ã¯ãç¹å®ã®ã¢ãã¬ã¹ã«ãã±ãããéä¿¡ã§ããŸãã
ããžãã¯ãã±ããæ§æ
ãŸãããããããåæãã§ãŒã³ãããããŸãã6ãã€ãã¯0xFFã«çžåœããŸãã 次ã«ããããã¯ãŒã¯ã«ãŒãã®MACã¢ãã¬ã¹ã16åç¹°ãè¿ãããŸããã ã€ãŸããããŒãã®ã¢ãã¬ã¹ã01ïŒ02ïŒ03ïŒ04ïŒ05ïŒ06ã®ããã«èŠããå Žåãããžãã¯ãã±ããã¯æ¬¡ã®ããã«ãªããŸãã
FFFFFFFFFFFF010203040506010203040506010203040506010203040506 010203040506010203040506010203040506010203040506010203040506 010203040506010203040506010203040506010203040506010203040506 010203040506010203040506
æå®ãããIPã«ãã®ãããªãã±ããã圢æããŠéä¿¡ããããã°ã©ã ã®æãããããã®ååã¯æ©èœãããã1ã€ã¯æ©èœããŸããã ãã ããããã¯ããŒã«ã«ãããã¯ãŒã¯ã§ã®ã¿åœãŠã¯ãŸããŸãã ããããå®éã®IPãããããããã±ãããéä¿¡ããã ãã§ããã®ãã±ããããµãŒããŒã«äžç¶ããããã«ã«ãŒã¿ãŒãæ§æã§ããŸãã ãŠã§ã€ã¯ã¢ãããã±ããã¯éåžžãããŒã7ãŸãã¯9ã§éä¿¡ãããŸããã«ãŒã¿ãŒãä»ããŠIPãµãŒããŒã«è»¢éããŸãã 次ã«ãwakeonlan.ruãããã¯ãŒã¯ãªãœãŒã¹ã䜿çšããã®ãæãç°¡åã§ãããµãŒããŒã®ãããã¯ãŒã¯ã«ãŒãã®å®éã®IPã¢ãã¬ã¹ãšMACã¢ãã¬ã¹ãå ¥åããŸãã ãã³ã³ãã¥ãŒã¿ãŒã®é»æºãå ¥ããŠãã ããïŒããã¿ã³ãã¯ãªãã¯ããŸããæ°åéä¿¡ããåŸãã·ã¹ãã ã¯é»æºãªã³ã®å€±æã«ã€ããŠæžãåºãããšããããŸãããµãŒããŒã¯ãŸã NATã®èåŸã«ãããã«ãŒã¿ãŒèšå®ã§ã«ãŒã¿ãŒãžã®pingã«å¯Ÿããå¿çããªãã«ããæ¹ãåççã§ãããã®å å«æ¹æ³ã¯äŸ¿å©ã§ãããIPãšMACââãèŠããŠããå¿ èŠããããŸããããããååãªèšæ¶åããããŸã-å°ãªããšã32æåã®æ£ãããã¹ã¯ãŒããèããŠèŠããŠããŸããïŒïŒããããä»ã§ã¯æºåž¯é»è©±ãããµãŒããŒã®é»æºãå ¥ããããšãã§ããŸãïŒãã©ãŠã¶ãšGPRSã¢ã¯ã»ã¹ãããã°ïŒã
ã«ãŒã¿ãŒã§èå³æ·±ãããšãåºãŠããŸãããå®éã«ã¯ããµãŒããŒã®é»æºãå ¥ã£ãŠããéãã«ãŒã¿ãŒã¯ãã®ãµãŒããŒãæ¥ç¶ãããŠããããŒããæ£ç¢ºã«èªèããŠããŸãããããããµãŒããŒãã·ã£ããããŠã³ãããšããã«ãã«ãŒã¿ãŒã¯ãã®äºå®ãå®å šã«å¿ããŸããã«ãŒã¿ãŒã«ãã¹ãŠã®ããŒãã§ããžãã¯ãã±ããããããŒããã£ã¹ããããããšãã§ããŸããã§ãããç§ã¯è£å€ã«ããªãã®æéãè²»ãããªããã°ãªããŸããã§ããããã®çµæãã«ãŒã¿ãŒã«DD-WRTãã¡ãŒã ãŠã§ã¢ãã€ã³ã¹ããŒã«ããŸããããã¡ãŒã ãŠã§ã¢ã¯ãéåžžã®ãã®ãšæ¯èŒããŠãæ©èœæ§ã«åªããŠããŸããæããã«åé·ã§ãïŒãããã圌女ã¯ãã§ã«ããŒããå¿ããŠããŸããããæ¢ã«ãã±ããããããŒããã£ã¹ãã§ããŸããïŒäœããã®çç±ã§ã³ã³ãã¥ãŒã¿ãŒã®é»æºããªã³ã«ãªããŸããã§ããïŒãã«ãŒã¿ãŒã®ä»£ããã«Linux switch-compããã£ãå Žåã次ã«ãã«ãŒãã£ã³ã°ããŒãã«ãšããžãã¹ãç·šéããã ãã§æžã¿ãŸããåæ§ã«ãããã§ã¯ãã«ãŒã¿ãŒã®ARPããŒãã«ã«å€æŽãå ããå¿ èŠããããŸãããã®ãã¡ãŒã ãŠã§ã¢ã«ã¯ç¹å®ã®ã³ã³ãœãŒã«ããããã«ãŒã¿ãŒã®èµ·åæã«èµ·åã¹ã¯ãªãããè¿œå ã§ããŸããç§ãã¡ãããŠããããšãããã¿ã¯æ¬¡ã®ãšããã§ãã
ip neigh change 10.0.0.10 lladdr 00:10:20:1F:C4:57 nud permanent dev br0
ip neigh add 10.0.0.10 lladdr 00:10:20:1F:C4:57 nud permanent dev br0
ç©çããŒããŠã§ã¢ã¬ãã«ã§ã¯ãã«ãŒã¿ãŒã®ããŒããšããŒãã¯MACã¢ãã¬ã¹ã«ãã£ãŠãçžäºã«èªèãããïŒé»æºãäŸçµŠããããšåžžã«éä¿¡ããŸãïŒãã«ãŒã¿ãŒã¯äžèšã®IPshnikããã®ã¢ãã¬ã¹ã«å±ããããšããæšæž¬ãããŸãïŒã³ã³ãã¥ãŒã¿ãŒããªã³ã«ãªããŸã§ïŒãããã¯ãŒã¯ã¬ãã«ã®ã€ã³ã¿ãŒãã§ãŒã¹ããŸã ãªããããã«ãŒã¿ãŒã¯ãã®ç¥èã«ã¢ã¯ã»ã¹ã§ããŸããããã ããã¹ã€ããããªã³ã«ããåŸããã®ç¥èã¯ARPã«ããŒããããšãã«èšå®ããŸããã
ããŠããããç§ã®Linuxã®æåã®ç¥ãåããçµãããšããã§ããããã誰ããå©ããå Žå-åžžã«æè¿ããŸãã