Untitled

 avatar
unknown
plain_text
4 years ago
1.3 kB
8
Indexable
Download judge sample, midterm sample, midterm sample win
Open judge sample folder
Open judge.vmx machine
Open midterm sample folder
Open midterm.vmx machine
*judge: copy; the rest: move

on window machine:
右鍵工具列網絡設定-》介面卡-〉右鍵唯一一張-》雙擊tcp/ipv4->打他的資料-〉載putty

midterm machine:
login: root
# examscore

# ifconfig em0 10.3.55.20 netmask …
# examscore
# route add default 10.3.55.30
# vi /etc/resolv.conf
add content: nameserver 8.8.8.8 
# hostname CSA-sample.localdomain
# reboot
//the above: all setting goes to waste after rebooting 

# vi /etc/rc.conf
add content:
ifconfig_em0=“inet 10.3.55.20 netmask 255.255.255.224”
defaultrouter=“(gateway)”
hostname=“(hostname)”
# reboot
—
cgi
root
# cd /usr/local/etc/apache24/
# vi https.conf
/ScriptAlias.   /cgi-bin/ ….
un-remark it
/mpm_prefork
in-remark both prefork and !prefork cgi_module
# service apache24 restart
# cd /usr/local/www/apache24/cgi-bin
# which perl
# vi printenv
edit Line 1 as “#!/usr/local/bin/perl
# chmod 755 printenv
# ls -l //check mod of printenv
key “ip/cgi-bin/printenv” see if anything shows
#which sh
# vi test-cgi
edit line 1 as “#!/bin/sh”
# chmod 755 test-cgi
# vi mycgil.c
copy ….
# cc -o mycgi mycgi.o
# ./mycgi
# man getenv
# 
Editor is loading...