Next Previous Contents

2. Egkatastash toy HTTP server

Otan katebazete (download) ton server, exete duo epiloges: Na parete ton kwdika kai na kanete metaglwttish (compile) monoi sas, h na parete ta prometaglwttismena ektelesima arxeia. Ta prometaglwttismena ektelesima arxeia gia ekdosh Linux (ELF) briskontai sto NCSA alla oxi kai oi palaioteres ekdoseis toys.

2.1 Proetoimasia prin to downloading

O server sto NCSA 8a sas odhghsei mesw bhmatwn stis diafores epiloges ry8misewn kai 8a etoimasei ta diafora arxeia gia sas. Alla prin epixeirhsete to download toy HTTPd na eiste etoimoi na apanthsete stis akoloy8es erwthseis.

To Leitoyrgiko Susthma

Prwta prepei na dialejete an 8a katebasete ton kwdika h thn prometaglwttismenh ekdosh. An to sygkekrimeno susthma sas den emfanizetai sto menou, tote prepei na parete to proka8orismeno kwdika, kai na kanete metaglwttish monoi sas.

Gia na elegjete thn ekdosh toy Linux sas phgainete sth grammh entolhs, sto Linux mhxanhma sas kai plhktrologhste:

  linux:~$  uname -a
kai 8a apokri8ei me mia grammh poy moiazei me thn ejhs :
   linux:~$  uname -a
   Linux linux 2.0.29 #4 Tue Sep 13 04:05:51 CDT 1994 i586
   linux:~$

H ekdosh toy Linux einai 2.0.29.

Oi ypoloipes parametroi mporoun na ka8oristoun prin to downloading, h na ry8mistoun argotera, tropopoiwntas to arxeio srm.conf poy brisketai ston katalogo /usr/local/etc/httpd/conf . Ta onomata twn pragmatikwn directives poy emfanizontai sto arxeio httpd.conf fainontai mesa se agkules (brackets). H monh ejairesh einai to directive DocumentRoot to opoio emfanizetai sto arxeio srm.conf

Tupos ths Diergasias (ServerType)

Ayto ka8orizei pws 8a trejei to mhxanhma sas ton HTTPd server. H protimoterh me8odos einai "standalone". Ayto kanei ton daimona HTTP na trexei synexws. An dialejete na trejete ton HTTPd me "inetd", tote o server 8a janafortwnetai sthn mnhmh me ka8e klhsh toy, to opoio 8a meiwsei thn taxuthta toy server sas.

Binding Port (Port)

Ayto ka8orizei se pio port toy mhxanhmatos sas o daimonas HTTPd 8a proskollh8ei (bind) kai 8a akouei(listen) gia aithseis tupoy HTTP. An mporeite mpeite san "root", xrhsimopoihste thn proka8orismenh timh poy einai to 80, alliws dialejte kati metaju 1025 kai 65535.

Taytothta xrhsth toy Server user identity (User)

Ayth einai h taytothta toy xrhsth ston opoio 8a allazei o server otan apanta se aithseis kai prosbash se arxeia. Ayth h erwthsh xreiazetai na apanth8ei mono an trexete server san "standalone". An eiste kapoios xwris dikaiwmata root, apla xrhsimopoihste to diko sas onoma xrhsth. An eiste o diaxeirisths toy systhmatos, mporei na 8elete na dhmioyrghsete ena eidiko xrhsth wste na mporeite na elegxete ta dikaiwmata twn arxeiwn.

Taytothta group toy xrhsth toy Server(Group)

Ayth einai h taytothta toy group (group id) poy o server 8a xrhsimopoihsei otan apantaei se aithseis kai energei panw se arxeia. Einai paromoia me thn Server User identity kai efarmozetai mono an trexete ton server se "standalone".

An den exete dikaiwmata root, xrhsimopoihste to onoma toy kyrioy group sas. Mporeite na breite to diko sas group plhktrologwntas groups sth grammh entolhs toy Linux.

Dieu8ynsh email toy diaxeiristh toy Server (ServerAdmin)

Ayth einai h dieu8ynsh email sthn opoia o xrhsths 8a prepei na stelnei email otan 8elei na anaferei ena problhma me ton server. Mporeite na balete thn proswpikh sas e-mail dieu8ynsh .

Topo8esia toy katalogoy toy server(ServerRoot)

Edw einai to meros poy o server "ka8etai" sto susthma sas. An exete root permissions afhste ton sthn proteinomenh topo8esia /usr/local/etc/httpd. An den mporeite na mpeite san root, dialejte enan ypo-katalogo sto diko sas monopati (home path). Mporeite na breite to path toy home katalogoy sas me thn entolh pwd.

Topo8esia twn arxeiwn HTML (DocumentRoot)

Edw einai to meros opoy briskontai ta arxeia HTML poy 8a parexontai. H proka8orismenh topo8esia toys einai sto /usr/local/etc/httpd/htdocs. 8a mporousate, parola ayta, na to orisete na einai o home katalogos toy eidikou xrhsth poy epilejate sto Server user identity, h kapoios ypo-katalogos toy dikou sas home katalogoy, an den mporeite na mpeite san root.

Otan exete amfibolies, xrhsimopoihste tis proka8orismenes times. Twra poy exete tis apanthseis stis parapanw erwthseis, mporeite na kanete Download to NCSA HTTPd apo to http://hoohoo.ncsa.uiuc.edu/docs/setup/OneStep.html. 8a prepei epishs na diabasete thn tekmhriwsh toy HTTPd sto http://hoohoo.ncsa.uiuc.edu/docs/ prin jekinhsete thn egkatastash. An sxediazete na kanete metaglwttish toy kwdika, tote prepei na tropopoihsete ta makefiles se ka8ena apo toys treis katalogoys support, src, cgi-src. An h ekdosh toy Linux einai hdh yposthrizomenh, tote 8a prepei na plhktrologhsete make linux ston panw katalogo (i.e. /usr/local/etc/httpd)

2.2 Metaglwttish toy HTTPd

H metaglwttish einai aplh, apla plhktrologhste make linux sthn endeijh (prompt), ston arxiko katalogo toy server. Shmeiwsh: Oi xrhstes toy pre-ELF Linux prepei na bgaloyn ta sxolia sto #define NO_PASS, apo to arxeio portability.h kai na 8esoyn DBM_LIBS= -ldbm sto Makefile prin kanoyn metaglwttish toy HTTPd.


Next Previous Contents