ๆญฏ๊ฐ•์˜๋…ธํŠธ.PDF

Similar documents
GNU/Linux 1, GNU/Linux MS-DOS LOADLIN DOS-MBR LILO DOS-MBR LILO... 6

Copyright 2004 Sun Microsystems, Inc Network Circle, Santa Clara, CA U.S.A..,,. Sun. Sun. Berkeley BSD. UNIX X/Open Company, Ltd.. Sun, Su

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

์Šฌ๋ผ์ด๋“œ ์ œ๋ชฉ ์—†์Œ

MySQL-Ch10

untitled

Sun Java System Messaging Server 63 64

Gentoo linux ์„ค์น˜๊ธฐ๋ก

แ„’แ…ฑแ†ฏแ„‰แ…ฆแ„†แ…ตแ„‚แ…ก3 ver0.4

Mango220 Android How to compile and Transfer image to Target

untitled

CD-RW_Advanced.PDF

๋ง๊ณ 100 ๋ณด๋“œ๋กœ ๋†€์•„๋ณด์ž-4

ๆญฏ467_final.PDF

LXR ์„ค์น˜ ๋ฐ ์‚ฌ์šฉ๋ฒ•.doc

Microsoft PowerPoint - 03-Development-Environment-2.ppt

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

1217 WebTrafMon II

05ร€รฅ

untitled

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

Network seminar.key

Solaris Express Developer Edition

๋ณธ๋ฌธ์„œ๋Š” ์ดˆ๊ธ‰์ž๋“ค์„ ๋Œ€์ƒ์œผ๋กœ ์ตœ๋Œ€ํ•œ ์‰ฝ๊ฒŒ ์ž‘์„ฑํ•˜์˜€์Šต๋‹ˆ๋‹ค. ๋ณธ๋ฌธ์„œ์—์„œ๋Š” ์„ค์น˜๋ฐฉ๋ฒ•๋งŒ ๊ธฐ์ˆ ํ–ˆ์œผ๋ฉฐ ์ž์„ธํ•œ ์„ค์ •๋ฐฉ๋ฒ•์€ ๊ฒ€์ƒ‰์„ ํ†ตํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค. 1. ์„ค์น˜๊ฐœ์š” ์›Œ๋“œํ”„๋ ˆ์Šค๋Š” ๋ธ”๋กœ๊ทธ ํ˜•ํƒœ์˜ ํ™ˆํŽ˜์ด์ง€๋ฅผ ๋น ๋ฅด๊ฒŒ ๋งŒ๋“ค์ˆ˜ ์žˆ๊ฒŒ ํ•ด ์ฃผ๋Š” ํ”„๋กœ๊ทธ๋žจ์ž…๋‹ˆ๋‹ค. ๋‹ค์–‘ํ•œ ๊ธฐ๋Šฅ์„ ํ•˜๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ๊ณผ ๋””์ž์ธ

6์ฃผ์ฐจ.key

๋ง๊ณ 100 ๋ณด๋“œ๋กœ ๋†€์•„๋ณด์ž -13

PCServerMgmt7

LN_5_Rootfs

์†Œ๊ฐœ TeraStation ์„ ๊ตฌ์ž…ํ•ด ์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! ์ด ์‚ฌ์šฉ ์„ค๋ช…์„œ๋Š” TeraStation ๊ตฌ์„ฑ ์ •๋ณด๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์ œํ’ˆ์€ ๊ณ„์† ์—…๋ฐ์ดํŠธ๋˜๋ฏ€๋กœ, ์ด ์„ค๋ช…์„œ์˜ ์ด๋ฏธ์ง€ ๋ฐ ํ…์ŠคํŠธ๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ๋ณด์œ  ์ค‘์ธ TeraStation ์— ํ‘œ์‹œ ๋œ ์ด๋ฏธ์ง€ ๋ฐ ํ…์ŠคํŠธ์™€ ์•ฝ๊ฐ„ ๋‹ค๋ฅผ ์ˆ˜

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

28 THE ASIAN JOURNAL OF TEX [2] ko.tex [5]

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

FlightGear 2.10

Sena Technologies, Inc. HelloDevice Super 1.1.0

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

์šด์˜์ฒด์ œ์‹ค์Šต_๋ช…๋ น์–ด

untitled

Snort Install Manual Ad2m VMware libnet tar.gz DebianOS libpcap tar.gz Putty snort tar.gz WinSCP snort rules 1. ์ฒซ๋ฒˆ์งธ๋กœ๋„คํŠธ์›Œํฌ์„ค์ • 1) ifconf

๋ชฉ์ฐจ BUG offline replicator ์—์„œ์œ ํšจํ•˜์ง€์•Š์€๋กœ๊ทธ๋ฅผ์ฝ์„๊ฒฝ์šฐ๋น„์ •์ƒ์ข…๋ฃŒํ• ์ˆ˜์žˆ๋‹ค... 3 BUG ๊ฐ partition ์ด์„œ๋กœ๋‹ค๋ฅธ tablespace ๋ฅผ๊ฐ€์ง€๊ณ , column type ์ด CLOB ์ด๋ฉฐ, ํ•ด๋‹น table ์„ truncate

APOGEE Insight_KR_Base_3P11

Backup Exec

ร€ยฉยตยตยณร—ร†ยฎยฟรทร‡รยทรŽยฑร—ยทยกยนร–4ร€รฅ_รƒร–รยพ

1. efolder ์‹œ์Šคํ…œ๊ตฌ์„ฑ A. DB B. apache - mod-perl - PHP C. SphinxSearch ( ๊ฒ€์ƒ‰์„œ๋น„์Šค ) D. File Storage 2. efolder ์„ค์น˜์ˆœ์„œ A. DB (MySQL) B. efolder Service - efolder

2 CentOS 6 Minimal ์„ค์น˜ 1.2 ์„ค์น˜ DVD ๋กœ๋ถ€ํŒ… DVD ๋ฅผ๋“œ๋ผ์ด๋ธŒ์—๋„ฃ๊ณ  BIOS ์„ค์ •์„ DVD ์—์„œ๋ถ€ํŠธํ•˜๋„๋ก์„ค์ •์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋ฉด๋‹ค์Œ๊ณผ๊ฐ™์€์‹œ์ž‘์˜ต์…˜์ด์žˆ์Šต ๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์—์„œ Install or upgrade an exissting system ์„์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

์ œ1์žฅ Unix๋ž€ ๋ฌด์—‡์ธ๊ฐ€?

K7VT2_QIG_v3

Remote UI Guide

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D D382E687770>

vi ์‚ฌ์šฉ๋ฒ•

๋ชฉ ์ฐจ

์Šฌ๋ผ์ด๋“œ 1

Solaris 9 (x86) Installation Guide for VMware 7 Writer : ์ด๊ฒฝํ˜ธ

2009๋…„ ์ƒ๋ฐ˜๊ธฐ ์‚ฌ์—…๊ณ„ํš

Assign an IP Address and Access the Video Stream - Installation Guide

์†Œํ”„ํŠธ์›จ์–ด์„ค์น˜ 1. ์†Œํ”„ํŠธ์›จ์–ด์„ค์น˜๋ฐ์ œ๊ฑฐ ( ์†Œ์Šค์ฝ”๋“œ ) ์†Œ์Šค์ฝ”๋“œ์ปดํŒŒ์ผ์„์ด์šฉํ•œ S/W ์„ค์น˜ 1. ์†Œ์Šค์ฝ”๋“œ๋‹ค์šด๋กœ๋“œ - ์˜ˆ ) httpd tar.gz - ์••์ถ•ํ•ด์ œ : #tar xzvf httpd tar.gz - INSTALL ๋˜๋Š” READMEํŒŒ์ผ์ฐธ์กฐ

PRO1_04E [์ฝ๊ธฐ ์ „์šฉ]

ยฐรธยฐยณยผร’ร‡รร†ยฎ-8รˆยฃ

Interstage5 SOAP์„œ๋น„์Šค ์„ค์ • ๊ฐ€์ด๋“œ

PWR PWR HDD HDD USB USB Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl Cable PC PC DDNS (

untitled

Microsoft PowerPoint - em8-๋ฆฌ๋ˆ…์Šค์„ค์น˜.ppt

<C1B9BEF7B3EDB9AE2E687770>

Copyright 2012, Oracle and/or its affiliates. All rights reserved.,.,,,,,,,,,,,,.,...,. U.S. GOVERNMENT END USERS. Oracle programs, including any oper

chapter1,2.doc

๋ชฉ์ฐจ ๊ฐœ๋ฐœํ™˜๊ฒฝ JTAG Bootp TFTP NFS 1

Copyright 2012, Oracle and/or its affiliates. All rights reserved.,,,,,,,,,,,,,.,..., U.S. GOVERNMENT END USERS. Oracle programs, including any operat

์‹œ์Šค์ฝ” ๋ฌด์„ ๋žœ ์„ค์น˜์šด์˜ ๋งค๋‰ด์–ผ(AP1200s_v1.1)

FreeBSD Handbook

๋””์ง€ํ„ธํฌ๋ Œ์‹ํ•™ํšŒ ๋…ผ๋ฌธ์–‘์‹

๋ฌด์‹œํ•˜๊ณ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค. $ sudo rootstock -d precise --seed ubuntu-standard -x en_us.utf-8 -f ubuntu -l ubuntu -p ubuntu -i 2G I: Running on a x86_64 machine I: Cre

Microsoft Word - Network Programming_NewVersion_01_.docx

Microsoft Word - KPMC-400,401 SW ์‚ฌ์šฉ ์„ค๋ช…์„œ

s SINUMERIK 840C Service and User Manual DATA SAVING & LOADING & & /

์ œ1์žฅ Unix๋ž€ ๋ฌด์—‡์ธ๊ฐ€?

SMB_ICMP_UDP(huichang).PDF

USB USB DV25 DV25 REC SRN-475S REC SRN-475S LAN POWER LAN POWER Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl C

ODS-FM1

Copyright 2009 Sun Microsystems, Inc Network Circle, Santa Clara, CA U.S.A.. Sun Microsystems, Inc... - Sun Microsystems, Inc. (FAR).. Ber

DE1-SoC Board

๋ฌธ์„œ ๋Œ€์ œ๋ชฉ

10.

/chroot/lib/ /chroot/etc/

์Šฌ๋ผ์ด๋“œ 1

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

Mars OS System Administration Guide

PowerPoint Presentation

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

Something that can be seen, touched or otherwise sensed

๊ต์œก์ง€์› IT์‹œ์Šคํ…œ ์„ ์ง„ํ™”

1. PVR Overview PVR (Personal Video Recorder), CPU, OS, ( 320 GB) 100 TV,,, Source: MindBranch , /, (Ad skip) Setop BoxDVD Combo

Microsoft Word - HD-35 ๋ฉ”๋‰ด์–ผ_0429_.doc


์•Œ์•„ ๋‘˜ ์‚ฌํ•ญ ์•„์ด์˜ค๋“œ ์ œ์กฐ์‚ฌ๋Š” ๋ณธ ๊ธฐ๊ธฐ์— ํ•˜๋“œ๋””์Šคํฌ๋ฅผ ํฌํ•จํ•˜์—ฌ ์ถœ๊ณ ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ํ•˜๋“œ๋””์Šคํฌ์— ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•  ๊ฒฝ์šฐ, ๊ตฌ๋งค์ฒ˜ ๋˜๋Š” ํ•ด๋‹น ํ•˜๋“œ๋””์Šคํฌ ์„œ๋น„ ์Šค์„ผํ„ฐ์— ๋ฌธ์˜ ํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค. ์ •ํ•ด์ง„ ์šฉ๋„ ์™ธ์˜ ์‚ฌ์šฉ์œผ๋กœ ๋ฐœ์ƒํ•œ ๋ฌธ์ œ์— ๋Œ€ํ•ด์„œ, ๋‹น์‚ฌ๋Š” ์–ด๋– ํ•œ ์ฑ…์ž„๋„ ์ง€์ง€

Microsoft PowerPoint - Building.pptx

1. What is AX1 AX1 Program์€ WIZnet ์‚ฌ์˜ Hardwired TCP/IP Chip์ธ iinchip ๋“ค์˜์„ฑ๋Šฅํ‰๊ฐ€๋ฐ Test๋ฅผ์œ„ํ•ด์ œ์ž‘๋œ Windows ๊ธฐ๋ฐ˜์˜ PC Program์ด๋‹ค. AX1์€ Internet์„ํ†ตํ•ด iinchip Evaluation

ETL_project_best_practice1.ppt

untitled

Microsoft PowerPoint - chap9 [ํ˜ธํ™˜ ๋ชจ๋“œ]

Simplify your Job Automatic Storage Management DB TSC

Transcription:

LINUX 1. Linux install 2. Booting sequence 3. Kernel rebuilding 4. Patch 5. RPM (Red Hat Package Manager) 6. NFS (Network File System) 7. NIS (Network Information System) 8. Cluster 9. Daemon programming 10. Review -

1. Linux install 1. Repartition partition table - MBR(master boot record) primary, extended, logical partition tablesize 4 1 driveprimary partition extended - logical partition container Dual OS system: MS-DOS partitionlinux OS repartition 1. MS-DOS fdisk MS-DOS size partition and MS-DOS format 2. fips - partition paririon ** data ** maginpartition Drives and partitions under Linux First floppy - /dev/fd0 Second floppy - /dev/fd1 First hard disk (entire) - /dev/hda First hard disk, primary partition 1 - /dev/hda1 First hard disk, primary partition 2 - /dev/hda2 First hard disk, primary partition 3 - /dev/hda3 First hard disk, primary partition 4 - /dev/hda4 First hard disk, logical partition 1 - /dev/hda5 First hard disk, logical partition 2 - /dev/hda6... Second hard disk -- hda -> hdb SCSI -- hda -> sda First MS-DOS partition (C:) - /dev/hda1 Second MS-DOS partition (D:) - /dev/hda2 First Linux logical partition - /dev/hda5 Second Linux logical partition - /dev/hda6 2. Boot the Linux installation media * CD booting boot floppy - rawrite small Linux diskette

: rawrite boot.img a: 3. Create Linux partition # fdisk /dev/hda 4. Create filesystems (formatting) # mke2fs -c /dev/hda2 82080! second extended filesystem make 82080 blocks(1024bytes) on /dev/hda2 # mount -t ext2 /dev/hda2 /home /etc/fstab boot mount 5. Create swap space swap space - virtual space filesystem # mkswap -c partition size # swapon partition # mkswap -c /dev/hda3 10336 # swapon /dev/hda3 6. Install the software on the new filesystems 7. Booting using LILO (1) /etc/lilo.conf :boot=/dev/hda map=/boot/map install=/boot/boot.b prompt timeout=5 image=/boot/vmlinuz-2.2.5-22 # Linux kernel label=linux root=/dev/hda2 # root partition other=/dev/hda1 # partition table=/dev/hda # partition table for /dev/hda1 label=win98 (2) # lilo Install Xfree86

X server, mouse, keyboard # xf86config /etc/x11/xf86config /usr/x11r6/bin/x : X server driver link file # ls -l X lrwxrwxrwx 1 root root 8 Mar 23 22:53 X -> XF86_Mach64 # ln -s /usr/x11r6/bin/xf86_mono /usr/x11r6/bin/x Network Configuration 1. hostname /etc/hostname hpc.kangnung.ac.kr 2. IP addres /etc/hosts 127.0.0.1 localhost localhost.localdomain 211.114.217.xxx hpc.kangnung.ac.kr hpc 3. nameserver /etc/resolv.conf nameserver 211.114.216.1 4. router(gateway) /etc/sysconfig/network NETWORKING=yes FORWARD_IPV4=no HOSTNAME=hpc.kangnung.ac.kr DOMAINNAME=kangnung.ac.kr GATEWAY=211.114.217.98 GATEWAYDEV=eth0 * # route add * UNIX - /etc/defaultrouter

5. network interface /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 IPADDR=211.114.217.xxx NETMASK=255.255.255.0 NETWORK=211.114.225.0 BROADCAST=211.114.225.255 ONBOOT=yes BOOTPROTO=none USERCTL=no /etc/sysconfig/network-scripts/ifcfg-lo DEVICE=lo IPADDR=127.0.0.1 NETMASK=255.0.0.0 NETWORK=127.0.0.0 BROADCAST=127.255.255.255 ONBOOT=yes BOOTPROTO=none * # ifconfig *** # netcfg Add an user 1. user id /etc/passwd ykim::1000:1000:youngtae Kim:/home/ykim:/bin/tcsh /etc/shadow ykim:143:0:99999:7:::134535364 2. user home directory # cd /home # mkdir ykim # chown ykim ykim # chgrp 1000 ykim ** delete an user

2. Booting sequence Booting sequence (* lilo booting) 1. /etc/lilo.conf Linux kernel booting 2. kernel /sbin/init /etc/inittab : init 2.1 /etc/rc.d/rc.sysinit 2.1.1 network <- /etc/sysconfig/network 2.2 /etc/rc.d/rc 5 2.2.2 /etc/rc.d/rc5.d /etc booting 2.2.2.1 /etc/rc.d/init.d (daemon) 2.2.2.1 /etc/rc.d/rc.local - /etc/inittab booting /sbin/init /etc/rc resource configuration /etc/fstab mount /etc/exports NFS network /etc/hosts /etc/resolv.conf /etc/sysconfig/network /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-lo user administration /etc/passwd /etc/shadow

directories /bin UNIX, ls. /usr/bin/ /bin.. /sbin /usr/sbin root. /boot Booting kernel. /etc networking, NFS, mount. /var log. /var/spool. /lib /usr/lib. -l directory. /usr/lib/x11 X windows. /usr/include C #include /usr/src source /home home directory

3. Kernel rebuilding Kernel rebuilding - upgrade, kernel, device 0. cd /usr/src/linux 1. driver configuration - make config 2. makefile file dependency - make dep 3. object - make clean 4. kernel compile - make bzimage /usr/src/linux-2.2.5/arch/i386/boot/bzimage 5. module - make modules, make modules_install ** lib/modules/2.2.5-22 object 6. Go have a coffee 7. Install the new kernel via LILO & rebooting kernel /etc/lilo.conf lilo /etc/lilo.conf image=/usr/src/linux-2.2.5/arch/i386/boot/bzimage label=linux_new root=/dev/hda1 read-only Loadable driver(module) # insmod module(object ) # lsmod # rmmod module # insmod /boot/ftape.o # lsmod Module: #pages ftape 40

# rmmod ftape

4. Patch,. A1: Hello World Happy Hours A2: Hello World HAPPY HOURS # diff -c A1 A2 > A.patch -- patch # patch -p0 < A.patch -- patch patching file `A1' -- A1 A2 0. kernel source down (2.2.5) 0.1 ftp.kernel.org/pub/linux/kernel/v2.2/linux-2.2.5.tar.gz /usr/src 0.2 tar zvxf linux-2.2.5.tar.gz http://sources.redhat.com/gdb/papers/linux/ 1. http://sources.redhat.com/gdb/papers/linux/jimb.linux-2.2.5-sse-ptrace-2.patch root userhome directory 2. $ cd /usr/src/linux 3. $ patch -p0 < ~/jimb.linux-2.2.12-sse-ptrace-2.patch 4. kernel recompile

5. RPM (Redhat Package Manager) Redhat Linux. ** Slakware *.tar.gz. (tar zvxf *.tar.gz - ) rpm : mc-4.5.39-0.91kr.i386.rpm mc: 4.5.39: version 0.91kr: release i386: architectre rpm: rpm rpm (-q) $ rpm -qa : rpm ** rpm -qa grep mc : mc $ rpm -qf /usr/bin/mc : /usr/bin/mc $ rpm -qi mc : mc $ rpm -qs mc : mc $ rpm -ql mc : mc rpm (-e) (a) $ rpm -e gmc $ rpm -e mc (b) mc dependency(gmcmc ). $ rpm -e --nodeps mc (dependency ) $ rpm -e gmc rpm _(-i) (CD )

1. mount CD ROM $ mount -t iso9660 /dev/cdrom /mnt/cdrom ** down. 2. $ cd mnt/cdrom/redhat/rpms 3. rpm. (a) $ rpm -ivh mc-4.5.39-0.91kr.i386.rpm $ rpm -ivh gmc-4.5.39-0.91kr.i386.rpm -v -h (b) mc gmc dependency. $ rpm -ivh --nodeps gmc-4.5.39-0.91kr.i386.rpm $ rpm -ivh mc-4.5.39-0.91kr.i386.rpm RPM RPM. *.src.rpm. 1. rpm source $ rpm --rebuild bitchx-75p3-1kr.src.rpm /usr/src/redhat/rpms/i386/bitchx-75p3-1kr.rpm 2. rpm $ rpm -ivh /usr/src/redhat/rpms/i386/bitchx-75p3-1kr.rpm

6. NFS (Network File System) NFS server (211.114.217.210) 1. /etc/exports (UNIX: /etc/dfs/dfstab) /root 211.114.217.214(rw) : 2. $ /etc/rc.d/init.d/nfs stop $ /etc/rc.d/init.d/nfs start ( $ /etc/rc.d/init.d/nfs restart) ** Booting nfs start. NFS client(211.114.217.214) 1. $ mkdir /root2 (/root2.) 2. $ mount -t nfs -o bg -o soft 211.114.217.210:/root /root2 ** /etc/fstab (UNIX: /etc/vfstab) booting mount. 211.114.217.210:/root /root2 nfs rw,bg,soft

7. NIS (Network Information System) -ID, yellowpage. NIS Server (211.114.217.210) 1. ypserv (rpm ) ** $ tftp hpc > get /tftpboot/ypserv-1.3.7-3.i386.rpm 2. /etc/sysconfig/network NISDOMAIN="210.kangnung.ac.kr" ** NISDOMAIN booting $ domainname 210.kangnung.ac.kr". 3. /etc/yp.config domain 210.kangnung.ac.kr server 211.114.217.210 4. NIS database $ /usr/lib/yp/ypinit -m 5. Daemon restart (ypserv) $ /etc/rc.d/init.d/ypserv stop $ /etc/rc.d/init.d/ypserv start ( $ /etc/rc.d/init.d/ypserv restart) *** User-ID /etc/passwd, /etc/shadow 4 & 5

NIS Client 1. /etc/sysconfig/network NISDOMAIN="210.kangnung.ac.kr" ** NISDOMAIN booting $ domainname 210.kangnung.ac.kr". 2. /etc/yp.conf domain 210.kangnung.ac.kr server 211.114.217.210 ** 1 & 2 "$ /usr/sbin/setup" Authentication configuration. 3. Daemon restart /etc/rc.d/init.d/ypbind stop /etc/rc.d/init.d/ypbind start ( /etc/rc.d/init.d/ypbind restart)

8. Cluster (message passing), - NFS, NIS - MPI(Message Passing Interface) (root user) 1. NFS, NIS 2. MPI (1) source down - http://www-unix.mcs.anl.gov/mpi/mpich/ mpich.tar.gz /usr/local directorydown (2) untar - $ tar zvxf mpich.tar.gz (3) $ cd mpich (4) $./configure $ make

( user) 1. (1) home directory.hosts ) user0 4.rhosts jauser10.kangnung.ac.kr user0 jauser11.kangnung.ac.kr user0 jauser12.kangnung.ac.kr user0 jauser14.kangnung.ac.kr user0 ** rsh(remote Shell). (2) directorymachines machines jauser10.kangnung.ac.kr jauser11.kangnung.ac.kr jauser12.kangnung.ac.kr jauser14.kangnung.ac.kr 2. test (1) $ tftp hpc -> get /tftpboot/greetings.c (sample program down) (2) $ /usr/local/mpich/bin/mpicc -o greetings greetings.c -lm (3) $ /usr/local/mpich/bin/mpirun -np 4 -machinefile machines greetings

9. Daemon programming daemon process client service server. **tip** fork() child processparent process, child process. Sample Program #include<stdio.h> #include<stdlib.h> #include<signal.h> #include<string.h> #include<sys/param.h> #include<sys/types.h> #include<sys/socket.h> #include<sys/stat.h> #include<netinet/in.h> #include<arpa/inet.h> #include<sys/file.h> #include<sys/ioctl.h> int main(int argc, char *argv[]) { int serverfd, clientfd; /* the file descriptors */ struct sockaddr_in server_addr, client_addr; int addr_length=sizeof(client_addr); int port=6001; int childpid; /* used for a daemon */ int dataleft; char data[100]; int index; signal(sigttou,sig_ign); signal(sigttin,sig_ign); signal(sigtstp,sig_ign); childpid = fork(); if (childpid > 0) exit(0); #ifdef SITSTP setgrp(0, getpid()); if((index=open("/dev/tty", O_RDWR))>=0) { ioctl(index, TIOCNOTTY, (char *)NULL); close(index); } #else setpgrp(); signal(sighup, SIG_IGN); childpid=fork(); if(childpid > 0) exit(0); #endif serverfd = socket(af_inet, SOCK_STREAM,0); bzero((char *) &server_addr, sizeof(server_addr)); server_addr.sin_family=af_inet; server_addr.sin_addr.s_addr=htonl(inaddr_any); server_addr.sin_port=htons(port); bind(serverfd,(struct sockaddr *) &server_addr, sizeof(server_addr)); listen(serverfd, 2); sprintf(data,"hello from ykim at 211.114.210.210"); while (1) { clientfd = accept(serverfd, (struct sockaddr *) &client_addr, &addr_length); dataleft=sizeof(data); while(dataleft>0) { dataleft-=send(clientfd,data,dataleft,0); } close(clientfd); } }

client #include<stdio.h> #include<unistd.h> #include<strings.h> #include<stdlib.h> #include<sys/types.h> #include<sys/socket.h> #include<netinet/in.h> #include<arpa/inet.h> int main(int argc, char *argv[]) { int index=0; int dataleft; struct sockaddr_in server_addr; int serverfd; int port=6001; char data[100]; bzero((char *) &server_addr, sizeof(server_addr)); /* usage: client -a address */ while((index=getopt(argc,argv,"a:"))!=-1) server_addr.sin_addr.s_addr=inet_addr(optarg); server_addr.sin_family=af_inet; server_addr.sin_port=htons(port); serverfd=socket(af_inet,sock_stream,0); connect(serverfd, (struct sockaddr *) &server_addr, sizeof(server_addr)); dataleft=sizeof(data); while(dataleft>0) dataleft-=recv(serverfd,&data,dataleft,0); printf("%s\n",data); close(serverfd); exit(0); }