Distribuce programu je ulo‘ena v souboru
saczechUj.tar.gzDistribuci je t©eba rozbalit pou‘it¡m p©¡kazu
gunzip < saczechUj.tar.gz | tar xvf -Soubory budou rozbaleny do podadres ©e saczechUj. Pot‚ n sleduje f ze p©izp–soben¡ va¨im konkr‚tn¡m podm¡nk m. Ve¨ker‚ z sahy se t˜kaj¡ souboru make, kter˜ je sou‡ st¡ distribuce. Je t©eba jednak zkontrolovat jeho prvn¡ © dek (za‡¡naj¡c¡ znaky #!), zda obsahuje platn˜ p©¡kaz pro spu¨tˆn¡ interpretu jazyka Perl. D le v tomto souboru n sleduj¡ promˆnn‚, jejich‘ hodnoty mo‘n uzn te za vhodn‚ zmˆnit. Jsou to:
NechŸ nap©. login adres © u‘ivatele je /home/group/USER,
WWW ko©en tohoto u‘ivatele je /home/group/USER/www
a t‚to UNIXov‚ cestˆ odpov¡d virtu ln¡ URL cesta http://www.kdesi.ca/~USER/
(tj., v¨echny soubory, kter‚ u‘ivatel um¡st¡ do jak‚holiv podadres ©e pod /home/group/USER/www jsou k dispozici cel‚mu svˆtu - pokud to u‘ivatel dovol¡ vhodn˜m nastaven¡m m¢du jejich p©¡stupu - vˆtven¡m z tohoto URL). NechŸ u‘ivatel um¡st¡ sv‚ CGI skripty do
/home/group/USER/www/cgi-bin,
vnej¨¡ svˆt je pak m–‘e vyvol vat jako
http://www.kdesi.ca/~USER/cgi-bin/toASCII.cgi/..., etc.
V tomto p©¡padˆ je nutno t©i v˜¨e uveden‚ promˆnn‚ nastavit takto:$homedir="/home/group/USER";(uv dˆjte bez z vˆre‡n˜ch zpˆtn˜ch lom¡tek).
$user="/~USER";
$cgipath="/~USER/cgi-bin";Pokud je mo‘no skripty instalovat na serveru glob lnˆ (implicitnˆ do /www/cgi-bin), co‘ je situace odpov¡daj¡c¡ p–vodn¡mu SaCzechu, budou vol ny jako http://www.kdesi.ca/cgi-bin/toASCII.cgi/~USER/..., etc.
a nastaven¡ p©¡slu¨n˜ch promˆnn˜ch je:$homedir="";
$user="";
$cgipath="/cgi-bin";
SaCzech-Uj definuje tyto promˆnnˆ a pole n sledovˆ:if ( $names eq "WWWdia" ) { $cgiprefix="to"; # nadpisy kodu ve whichcode $codename{"ASCII"}="ASCII"; $codename{"CP1250"}="MS Win"; $codename{"CP852"}="PC Latin 2"; $codename{"ISO-8859-2"}="ISO Latin 2"; $codename{"ISO-8859-1"}="ISO Latin 1"; $codename{"KEYBCS2"}="KEYBCS2"; $codename{"KOI8-CS"}="KOI8-CS"; $codename{"MAC"}="Mac"; @codes= ("ASCII","CP1250","MAC","ISO-8859-2","ISO-8859-1","CP852","KEYBCS2","KOI8-CS"); %abcNames=("ASCII","ASCII","CP1250","CP1250","MAC","MAC", "ISO-8859-2","ISO-8859-2","ISO-8859-1","ISO-8859-1","CP852","CP852", "KEYBCS2","KEYBCS2","KOI8-CS","KOI8-CS"); %altCodes=("ASCII","ascii","CP1250","1250","MAC","mac","ISO-8859-2","iso", "ISO-8859-1","iso1","CP852","852","KEYBCS2","kam","KOI8-CS","koi8-cs"); } elsif ( $names eq "EUnet") { $cgiprefix=""; # nadpisy kodu ve whichcode $codename{"ascii"}="Ascii"; $codename{"1250"}="CP1250"; $codename{"852"}="PC Latin 2"; $codename{"iso"}="ISO Latin 2"; $codename{"iso1"}="ISO Latin 1"; $codename{"kam"}="Kamenicti"; $codename{"koi8-cs"}="KOI8-CS"; $codename{"mac"}="Mac"; @codes=("ascii","1250","mac","iso","iso1","852","kam","koi8-cs"); %abcNames=("ascii","ASCII","1250","CP1250","mac","MAC","iso","ISO-8859-2", "iso1","ISO-8859-1","852","CP852","kam","KEYBCS2","koi8-cs","KOI8-CS"); %altCodes=%abcNames; } else { die '$names'." v 'make' se musi rovnat bud \"WWWdia\" nebo \"EUnet\"\n"; }
Volba je ur‡ena p©edev¨¡m pro opera‡n¡ syst‚my jin‚ ne‘ Unix, ve kter‚m by funkce stat mˆla fungovat bez probl‚m–. U odli¨n˜ch syst‚m– je t©eba vˆc vyzkou¨et.
T¡m je ukon‡ena konfigura‡n¡ f ze. Jako dal¨¡ krok spusŸte
./makeJeho v˜sledkem by mˆla b˜t skupina soubor– (toXXX[.cgi] nebo yyy[.cgi] a soubor whichcode[.cgi]. Tyto soubory p©esu¤te do adres ©e s CGI skripty tak, aby jejich um¡stˆn¡ vyhovovalo identifikaci, uveden‚ ve v˜¨e zmi¤ovan˜ch promˆnn˜ch $cgipath a $homedir - nap©¡klad
mv *.cgi ~/www/cgi-bin/Doporu‡uji nav¡c pro skript whichcode zav‚st synonyma to__CHARSET__ (__CHARSET__) a to, proto‘e SaCzech-Uj neprov d¡ ‘ dnou substituci za __CHARSET__. Doty‡n synonyma zajist¡ p©¡kazy
cd ~/www/cgi-binp©¡padnˆ
ln -s whichcode to__CHARSET__
ln -s whichcode to
ln -s whichcode.cgi __CHARSET__.cgiT¡m je instalace ukon‡ena.
ln -s whichcode.cgi to.cgi
a podobnˆ.