1 / 14

Lab 2

Lab 2. System and Network Administration. Chulmin Kim cmkim@core.kaist.ac.kr Computer Engineering Research Lab. EECS, KAIST. Contents. 1. Objectives. 2. Environment Configuration. 3. Guide for Experiment. 4. Guide for Problems. 5. Summary and Policies. Objectives of Lab2.

nuncio
Download Presentation

Lab 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lab 2 System and Network Administration Chulmin Kim cmkim@core.kaist.ac.kr Computer Engineering Research Lab. EECS, KAIST

  2. Contents 1 Objectives 2 Environment Configuration 3 Guide for Experiment 4 Guide for Problems 5 Summary and Policies

  3. Objectives of Lab2 • Many ways to utilize Linux Machine • Making a server for… • Licensed Work (Exp, Tools …) • Web server • File server • DB server and etc… • Mainly…. T.A. job!  (It’s a joke !!) • A Server consists of … • Networking • Storage • CPU Main Concerns of Server Configuration

  4. Objectives of Lab2 • List of your learning from Lab 2 • Authorization • Filesystem • Network & Filesystem • Firewall for Proper Networking • Make

  5. Environment • How to Access? • Gate Machine : 143.248.165.188 • Id : ee505 pw: 1234 • One machine per each team. (rearrange) • IP of the machine Will be Announced soon. • Different with LAB1 machines you used. • Backup your work frequently in elsewhere! Your Instance Machine (a machine with private IP will be given to each team) SSH (Command) Your Window Computer SSH (Putty) GateMachine of CCIU Your Instance Machine Your Instance Machine

  6. Guide for Experiment • Authorization • Admin (Administrator) : root • User addition : `useradd <user1>` command • Password setting : `passwd <user1>` • User deletion : `userdel <user1>` • Configuration of user • Options of `useradd` : during creation of the user • Modifying ‘/etc/passwd`: after the creation • Related commands • Su <user1> : changing the current user • Ex. Su <user1> : I want to use user1 id. • Chmod, chown : changing the authority of files or directories. (allowed to whom? What operations allowed) • Ex. Chmod 707 test.sh -> for the execution of shell script in LAB1. • Unless, you would get `permission denied` message.

  7. Guide for Experiment • Filesystem • using disks to store your valuable files,,, • Filesystem manages your files in their own structure • Their structure efficiently use disk spaces, rapidly read/write files and manages files hierarchically. • Checking the disks your machine has.. • In /dev directory,,, find entries starting with ‘sd’ or ‘hd’ • Ex. /dev/sda1 • Using `df’, you can check it is mounted already or not. • For the un-mounted disk, make a filesystem for the disk and mount it on the directory you made. • Mkfs –t ext3 /dev/sda1 • Mkdir /mnt/test && Mount /dev/sda1 /mnt/test • Unmount your disk • Umount /dev/sda1 or umount /mnt/test

  8. Guide for Experiment • Network Filesystem • /etc/exports • /opt/nfs 143.248.165.0/255.255.255.0(rw,no_root_squash,sync) • /home    143.248.165.0/255.255.255.0(rw,no_root_squash,sync) • Options • rw – Write Permission • ro – Read Only • sync – data goes to disk synchronously. • Checking Portmapper • /etc/rc.d/init.d/portmap status • /etc/rc.d/init.d/nfs restart

  9. Guide for Experiment • Firewall • Block all ports from 0 to 1023 • #!/bin/sh • iptables -F • iptables -A INPUT -p tcp --dport 0:1023 -j REJECT • sleep 3 • iptables -F • Allow port 23 to the Nodes with 143.248.165.xxx • #!/bin/sh • iptables -F • iptables -A INPUT -p tcp -s 143.248.165.0/24 --dport 23 -j  ACCEPT • iptables -A INPUT -p tcp --dport 0:1023 -j REJECT • sleep 3

  10. Guide for Experiment • Make utility • When you compilemain.c iodat.c dorun.c and lo.s to make program finally, • $ cc -c main.c • $ cc -c iodat.c • $ cc -c dorun.c • $ as -o lo.o lo.s • $ cc -o program main.o iodat.o dorun.o lo.o • When you modified iodat.c, • $ cc -c iodat.c • $ cc -o program main.o iodat.o dorun.o lo.o • Make help you to do this job automatically by dependency check when you modified some code lines in your codes.

  11. Guide for Problems 3.1 • Macro in Makefile • CC=/usr/local/arm-linux/bin/arm-linux-gcc • CFLAGS=-O2 • OBJS= main.o iodat.o dorun.o • program: ${OBJS} •    ${CC} -o program ${CFLAGS} ${OBJS} • Environment Variable in Shell • $ XGCC_DIR=/usr/local/arm-linux/bin • $ export XGCC_DIR • Using Macros… • Make your compile codes simpler as much as you can. • In the compile codes, • Same compiler -> gcc • Same flags -> wall, O2, … • Only difference is filenames of sources and binaries

  12. Guide for Problems 3.2 • Local Filesystem • Ext3, ext2, xfs, … • Contents of your pre-report • Bonnie? • http://core.kaist.ac.kr/~ee505/download/benchmark.pdf • Microbenchmark testing read/write operations • We’ve learn how to use NFS • Sequential • Read/write data in a sequence. • Random • Result • Throughput, cpu usage, network speed • Think about when nfs can get advantage.

  13. Policies of LAB2 • Pre-Report • 1 per each group and whole lab2. (1 pre-report for 2 weeks) • Due Date : Before you finish your experiment. • Page Limit : 4 pages • Main-Report • 1 per each group and whole lab2. (1 Main-Report for 2 weeks) • Due Date : 5/7 • Page Limit : 10 pages (except figures, tables) • Grading Policy • Total 50 points • Average : 30 points • If there is no global policy, • Pre : 20%, Demo(+attendance(5%)) : 40%, Main & Source Code: 40% • Report Delay : 10%/day • Copy : 0 points without exception. (both sides)

  14. Thank You ! Please, check the board and reply your team information at the notice. (http://core.kaist.ac.kr/~ee505)

More Related