home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / caravan.zip / install.txt < prev    next >
Text File  |  2002-11-10  |  13KB  |  348 lines

  1. Caravan in brief:
  2. ---------------------------------
  3. Caravan is an application server which has built-in http, smtp, ftp and database engines. It also provides 
  4. a scripting langauge, a dynamic compiler and  basic features needed to develop , test and run applications.
  5.  
  6. Caravan can parse xml documents and publish information about its database tables in xml format.
  7.  
  8. Caravan language provides a sophisticated platform for creating applications using various objects like files, folders
  9. queues, mail, ftp, xml and database tables. It has a built-in search engine integerated with the database.
  10.  
  11. Caravan runs on mutli-threaded, 32bit operating systems -- OS/2, Windows98 /NT/2000 and Linux.
  12.  
  13. Caravan is available for os/2, windows and linux ---  all data and code are compatible across the platforms
  14. supported. In effect caravan applications are platform independent. 
  15.  
  16. Caravan code is  embedded in .html files which are placed in the templates directory.
  17.  
  18. Caravan is a stand-alone system, using bare  essential operating system features , everything being
  19. built from scratch so that it can be as independent as possible from the OS. Caravan features and operations
  20. are identical on all platforms.
  21.  
  22. In essence caravan is like having apache, jsp/php ,oracle and lot more in one neat package.
  23.  
  24. The advantage of caravan is that it is a powerful, integrated and platform independent solution for internet/intranet.
  25.  
  26. Caravan is written in c++ and compiled using watcom c++ 10.6 for os/2.
  27.  
  28. The development of caravan is an ongoing effort, there are still some rough edges!
  29.  
  30. Note: Caravan is being made free for OS/2 users only.
  31. --------------------------------------------------------------------------------------------------------------------------------------------------------------------
  32.  
  33.  
  34.  
  35.  
  36.  
  37. Getting Started -- installation
  38. -----------------------
  39. Caravan needs to know the basic settings during startup. These are defined in a file named httpd.cnf. The path of this
  40. file is set by the environment variable "CARAVAN". 
  41.  
  42. Example.
  43. If the configuration file httpd.cnf is in the c:\caravan path set the ewnvironment  variable by the following  cmd:
  44.  
  45. set caravan=c:\caravan
  46.  
  47. To run caravan open an os/2 window and use the folloing commands:
  48.  
  49.         C:>set caravan=<path where httpd.cnf is located>
  50.  
  51.         C:>caravan
  52.  
  53. Creating the httpd.cnf file.
  54.  
  55. #Following is the contents of a sample httpd.cnf file:
  56. #lines starting with a # are comments.
  57. #-----------------------
  58. html  text/html
  59. htm  text/html
  60. #mime content-type for files with extention html
  61. gif     image/gif
  62. jpg     image/gif
  63.  
  64. #mime content-type for files with extention jpg/gif
  65. #content-type for those not defined here default to unknown/unknown
  66. #these are necessary for the browser to understand the documents served by caravan.
  67.  
  68. location London
  69. #the location property of this server. can be used in application logic.
  70.  
  71. templates c:\caravan\templates
  72. #caravan script files are located in the templates directory defined above.
  73. #please create before running caravan
  74.  
  75. dbhome c:\caravan\dbase
  76. #caravan database home directory is created in the directory defined above.
  77. #please create before running caravan
  78.  
  79. documents c:\caravan\doc
  80. #caravan will look for static documents in the directory defined above.
  81. #please create before running caravan
  82.  
  83. bin c:\caravan\exe
  84. #caravan looks for binary executable here
  85.  
  86. datacache 16M
  87.  
  88. #memory caravan uses for caching database records. defaults to 1M.
  89.  
  90. caravan-http 80
  91.  
  92. #caravan with use this port number  for http services.
  93. #caravan will not start http services if this is not available; This is necessary.
  94.  
  95.  
  96.  
  97. smtp 25
  98.  
  99. #caravan with use the port defined here for smtp services.
  100. #caravan will not start smtp services if this is not available/defined
  101.  
  102. ftp 21
  103.  
  104. #caravan with use the port defined here for ftp services.
  105. #caravan will not start ftp services if this is not available/defined
  106.  
  107.  
  108. domain mydomain.com
  109.  
  110. #caravan will use the above domain in smtp transactions
  111.  
  112. nameserver 124.89.89.8
  113. nameserver 124.89.89.88
  114. #caravan can pickup this information from etc/resolv also.
  115. #multiple entries are allowed for nameserver;
  116. #needed for smtp to work properly
  117.  
  118. ---------------------------------- end  of httpd.cnf--------------------------------
  119.  
  120. The downloaded zip file contains the folowing.
  121.  
  122. caravan.exe for os/2
  123. sample httpd.cnf
  124. user.html -- a utiliy written in caravan script for managing users.
  125.  
  126. -----------------------------------------------------------------------------------------
  127. To install caravan :
  128.  
  129. 1. Create a directory say c:\caravan
  130. 2. Create the  following subdirectories 
  131.     c:\caravan\templates -- for dynamic scripts 
  132.     c:\caravan\dbase  ---- for caravan databases
  133.     c:\caravan\doc - for static pages
  134.     c:\caravan\exe --  for external applications which can be run from caravan script.
  135.  
  136. 3.copy the httpd.cnf file to c:\caravan
  137. 4. set the env "Set caravan=c:\caravan" in config.sys or in a batch file
  138. 5.run caravan executable from any window.
  139.  
  140.  
  141. Note : Caravan also needs the tmp and etc paths which are already defined in the OS/2 environment. 
  142. The above also applies to Linux and windows, though "\" is now "/" for linux users.
  143.  
  144.  
  145. Something like the following will be displayed:
  146.  
  147. [c:\caravan]caravan
  148. location=Bombay
  149. caravan-http Server Started, listening on port: 80
  150. CARAVAN ENTERPRISE SERVER v2.00/03D
  151. Copyright (c) 1999,2000,2001 : Niti Telecom Consultancy (www.nititelecom.com)
  152. All rights are reserved.
  153. SMTP Server Started, listening on port: 25
  154. FTP Server Started, listening on port: 21
  155. caravan-http:Ready to accept connections
  156. FTP:Ready to accept connections
  157. SMTP:Ready to accept connections
  158.  
  159. --------------------------------------------------- ......--------------------
  160.  
  161. Press 'q'  to exit caravan .
  162.  
  163.  
  164.  
  165. Getting Started - Caravan menu.
  166.  
  167. Open a browser window and type http://localhost/caravan.html
  168.  
  169. You will be asked for a user name and password.
  170.  
  171. The default username is "admin" and password is "password"
  172.  
  173. The following  menu will be displayed:
  174.  
  175.         Caravan Enterprise Server
  176.                                 One stop solution for the web
  177.                                 All Rights Reserved
  178.  
  179.                                                Configure Caravan Server ------disabled
  180.                                                Restart Server -----------------------disabled
  181.                                                Server Information -----------------disabled
  182.                                                Logout
  183.                                                Caravan Data Base Manager
  184.                                                Create A User
  185.                                                Edit
  186.                                                Change Password.
  187.  
  188.  
  189. Select "change password" - other items will not work with the default password.
  190.  
  191. Once you have changed the password you can select other links and explore.
  192.  
  193. 1. You can use create a user to create more users. The domain field in the user form defines the user's access rights. The domain for 
  194.  admin is "admin".
  195.  
  196. 2. Edit --  you can edit or create caravan scripts using the edit link.
  197.  
  198. 3. Change password  --- change the password. The link is "password.html"
  199.  
  200. 4. Logout - to sign off.
  201.  
  202. Note : you may use "127.0.0.1" in case   "localhost" is not defined.
  203.  
  204. Using the ftp server:
  205.  
  206. 1. To use the ftp server of caravan , be sure the port defined in httpd.cnf (21) is available and  caravan ftp server has started.
  207.  ---- See if caravan has printed somthing like this on the console:
  208. >FTP Server Started, listening on port: 21
  209.  
  210. 2. Create a new user - use any domain -  say "ftpuser". Go to the caravan database manager menu. select caravan database and users table. find the user you
  211. have just created , and in the ftpDirectory field enter the home directory for this user's ftp access. 
  212.  
  213. 3. logout
  214. 4.open http://localhost/login.html
  215. 5. login with the new user name and default password "password"
  216. 6. if login was successful , open http://password.html
  217. 7. change password --  caravan does not allow ftp access unless the default password has been changed.
  218.  
  219. 8. open an ftp client and access the caravan ftp port using the new  username and password .
  220.   -- in an os/2 window type : 
  221.       ftp localhost
  222.  
  223. >IBM TCP/IP for OS/2 - FTP Client ver 22:15:24 on Sep 22 1997
  224. >Connected to localhost.
  225. >220 caravan ftp server ready
  226. >Name (localhost):
  227.  
  228.  
  229. If you have done this successfully -- you can now access any database record , create users and modify fields in database tables.
  230. You now have a new ftp server for os/2.
  231.  
  232. Getting Started  with caravan script.
  233.  
  234. Most of the functionality of caravan will be evident only when  the user learns the caravan scripting langauge.
  235.  
  236. Caravan script is embedded in html files which are to be located in the templates path defined in the httpd.cnf file.
  237.  
  238. To start with lets make a very simple dynamic html.
  239.  
  240. Caravan looks for *.html files in the "templates" directory and compiles them at startup. Please note that the extention is "html"  not "htm".
  241. Files which are in the documents path is served as static files. You can also create new templates online by the following method:
  242.  
  243. 1. goto caravan menu
  244. 2. select edit
  245.    you will see that location is http://127.0.0.1/edit_tmpl.html
  246. 3.instead enter : " http://127.0.0.1/edit_tmpl.html?c=test.html"  in the location and press enter; 
  247.   test.html is the name of the new file you want to create. click on "create file"
  248.   ----  please dont ask why !
  249. 4. You will be given a text box in which to enter the script:
  250.  
  251. type the following in  the text box -- you can cut and paste
  252.  
  253.  
  254.     <html><body bgcolor=gray text=white>
  255.     <caravan>
  256.         time x
  257.         "<b>It is now</b>";" ";x(hour);":";x(minute);" on ";x(day);" ";x(month);" ";x(date);" ";x(year);"<br>"
  258.     </caravan>
  259.     </body></html>
  260.  
  261. Press the "Save File" button . You will see the name test.html in the list of templates you can edit from the template manager.
  262. Now you have created a dynamic html document. 
  263.  
  264. In the location of the browser, type :" http://localhost/test.html" and press enter:
  265. Time will be displayed something like:
  266.  
  267. It is now 10:48 on Wed Nov 06 2002.
  268.  
  269. If you have come this far you know how to create and edit the caravan scripts!
  270.  
  271. Caravan script begins with the tag <caravan> and ends with the tag </caravan>
  272. Caravan script can be anywhere in the html file.
  273. Some variations of the above which produce essentially the same output.
  274.  
  275. ------
  276. 1. Constant strings are either outside caravan script or are quoted.
  277.      Comments start after ";" with "//"; ";" or end of line is used to seperate caravan statements;
  278.  
  279. <caravan>
  280.     "<html><body bgcolor=gray text=white>\r\n"
  281.     time x ;// x is a variable of type time . 
  282.     "<b>It is now</b>";" ";x(hour);":";x(minute);" on ";x(day);" ";x(month);" ";x(date);" ";x(year);"<br>" ;// month, date, day etc are properties of time
  283.     "</body></html>\r\n"
  284. </caravan>
  285.  
  286. 1. You can end and restart caravan script anywhere. The flow of logic is not affected!
  287.      Comments start after ";" with "//". Caravan language is not case sensitive.
  288.  
  289. <caravan>
  290.     "<html><body bgcolor=gray text=white>\r\n"
  291.     Time x ;// x is a (object) variable of type time . 
  292.     "<b>It is now</b>";" ";x(hour);":";x(minute);</caravan>" on "<caravan>x(day);" ";x(month);" ";x(date);" ";x(year);"<br>" ;// month, date, day etc are properties of time
  293.     "</body></html>\r\n"
  294. </caravan>
  295.  
  296. Time is a predefined caravan object type; x is an instance of time. It has the property of the current time;
  297.  
  298. Similarly caravan uses the following object types:
  299.  
  300. 1.user        object having the properties of the caravan user
  301. 2.table        object having the properties of a caravan database table
  302. 3.file        object of type file
  303. 4.folder    represents a directory on the file system
  304. 5.var        a user defined object having user defined properties
  305. 6.ftp        an object used to access ftp servers
  306. 7.form        an object similar to var but which can be posted to other http servers
  307. 8.mail        an object representing mail which can be posted to smtp servers
  308. 9.queue        a user defined event queue - which is linked to a 
  309.         user created eventhandler, which is also a caravan script file in the templates directory.
  310. 10.time        an object representing time.
  311.  
  312. etc.. etc..
  313.  
  314. In addition caravan has conditional statements, iteration, assignment, scheduling and security features.
  315. I will be posting various utilities  and updated files on www.response4u.com/os2.html. user.html is one
  316. such utility which I am including with this package. In this concepts like iteration, user object and 
  317. contitional statements are used.
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.