How Do I set up a UNix dev environment


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How Do I set up a UNix dev environment
Prev   Next
# 1  
Old 09-13-2001
Question How Do I set up a UNix dev environment

Hello,
I am totally new to Unix. My current contract requires me to build an intranet site (nothing fancy, no forms, no cgi scripts, no search engine) for a unix platform.
I develop on an NT environment using dreamweaver.
I am considering buying Red Hat Linux, install that on the NT machine: Dell Laptop and then install Netscape Fasttrack webserver as my development and qa environment.
question: Is this a good strategy? Should I invest 80 dollars in Red Hat Linux? Will the Fasttrack on Linux on Dell Laptop be a reasonable development environment for a Production environment with Unix? Am I asking the right questions?
Thank you.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Os not coming up after i set mount -o remount,rw /dev/hda8

on RHEL 5.3 i did mount -o remount,rw /dev/hda8 ( this is /tmp directory ) now OS not coming up. How to resolve ?? ---------- Post updated at 04:57 PM ---------- Previous update was at 03:36 PM ---------- one of my friend told me that you have changed sticky bit permissions on /tmp... (6 Replies)
Discussion started by: rehantayyab82
6 Replies

2. Solaris

ndd -set /dev/tcp tcp_host_param

Following command was set up in startup script on Solaris 8 servers - improved network transfers of files from one server to the another (doubled transfer speed). ndd -set /dev/tcp tcp_host_param '10.140.20.10 sendspace 279600 recvspace 279600 timestamp 1' Now they are getting a new server... (15 Replies)
Discussion started by: RTM
15 Replies

3. Shell Programming and Scripting

Set environment

Hi, I can run shell script from the command line using $ . set If the run the script inside perl script using $var = system("set"); print $var; This prints 0. This command sets up the environment from command line. But when used inside the shell script or perl script it... (2 Replies)
Discussion started by: sandy1028
2 Replies

4. UNIX for Dummies Questions & Answers

Linux Dev environment for c/c++ on Fedora 10

Hello I have never used linux before and I am a bit confused as to what I am doing. I have been asked to port over some of our in house sdk to linux. Currently I am using .Net and c++. I have installed Fedora 10 on my computer and got that up and running nicely. I also installed eclipse for my... (1 Reply)
Discussion started by: morty346
1 Replies

5. Linux

How do i set environment variable

Hi, I am quite new to Linux. And I have doubt how to set new environment variable with value to a C executable. Let say I have a environment variable $Hack ; I would like to load a value for this variable; so that when the C executable is executed, the $Hack would set the variable value. ... (4 Replies)
Discussion started by: ahjiefreak
4 Replies

6. UNIX for Advanced & Expert Users

Building UX Server for Dev Environment

Hello. I am asked to build a new UNIX Server for Development environment before we could ask the high level experts to build production environment. Could you please let me know what all must I have to know and the steps inorder to build ux server? Thank you! (2 Replies)
Discussion started by: panchpan
2 Replies

7. Solaris

Building UX Server for Dev Environment

Hello. I am asked to build a new UNIX Server for Development environment before we could ask the high level experts to build production environment. Could you please let me know what all must I have to know and the steps inorder to build ux server? Thank you! (0 Replies)
Discussion started by: panchpan
0 Replies

8. UNIX for Advanced & Expert Users

by using c++ how to set environment variables in unix

hi, I am writing c++ code in unix operating system.In that i need to set the environment variable in unix. suppose previously i have environment variable like path="something" now i need to change the path value to some othervalue . so that some other program will access that path value... (1 Reply)
Discussion started by: sada@123
1 Replies

9. UNIX for Advanced & Expert Users

set environment variable?

Installed a program, need to set the system up so that when the executable is entered, it finds the path to the executable. In Windows, set under system properties, advanced, environmental variables. How do I do this with Unix? Specifically using Solaris 9. I have tried: env... (3 Replies)
Discussion started by: kohoutek
3 Replies

10. UNIX for Advanced & Expert Users

Set up the own Unix ENvironment at home

Hello! All Unix Expert, I just graduated from college with Bachalor degree in Computer Information System, and decided to start my career in Unix System. I am trying to set up my own unix Environment at home so that I can get more hand on experience since the class offered by unix vendors are... (1 Reply)
Discussion started by: jung1975
1 Replies
Login or Register to Ask a Question
SEARCH.CGI(7)						User Contributed Perl Documentation					     SEARCH.CGI(7)

NAME
search.cgi -- Example Perl program for searching with Swish-e and SWISH::API DESCRIPTION
This is a very simple program that shows how to use the SWISH::API module in a CGI script or mod_perl handler using Template-Toolkit to generate output. This program is intended for programmers that want to create a custom search script. Unlike swish.cgi this script does not have many features, and provides no external configuration (with the execption of a few config options under mod_perl). So don't ask why it doesn't do something. The point is that this script is used as a starting point that YOU customize. REQUIREMENTS
You must have swish-e and the SWISH::API module installed. See the README and INSTALL documents in the swish-e distribution. As of this writing SWISH::API is part of the swish-e distribution, but in the future may be provided as a separate package (provided on the CPAN). In either case SWISH::API is a separate installation procedure from installing swish-e. The Storable module is also required if using mod_perl. This program does require that some modules are installed from CPAN. You will need Template-Toolkit and HTML::FillInForm (which depends on HTML::Parser). How those are installed depends on your computer's packaging system. You will need a web server, obviously. The discussion below assumes Apache is used. If you are using MS IIS take note that IIS works differently in a number of ways. OVERVIEW
The search.cgi script and related templates are installed when swish-e is installed. search.cgi is installed in $prefix/lib/swish-e/ and templates are installed in $prefix/share/swish-e/templates/. $prefix is /usr/local by default but can be changed when running the swish-e configure script. Upon installation search.cgi is updated with correct paths to your perl binary and When running as a CGI script search.cgi is copied or symlinked to the location of your CGI scripts (or any directory that allows CGI scripts). By default, the search.cgi script looks for the index index.swish-e in the current directory (that's what the web server considers the current directory). On Apache running mod-cgi that's the same place as the script. On IIS it's not. If your index is elsewhere you will need to modify the script. The script works by parsing the query, calling SWISH::API to run the actual search, then calls Template-Toolkit to generate the ouput. The script calls the search.tt template. This template generates the query form and the search results. The search.tt template uses a Template-Toolkit "WRAPPER" function to wrap the search form and results in your site's design. This design is in the page_layout template. The idea is if you use Template-Toolkit to manage your entire site then your entire site would be formatted by the same page_layout template. The page_layout template calls two other templates common_header and common_footer to generate a common header and footer for the site. Those are just demonstrating Template-Toolkit's features. The page_layout page only defines the basic structure of the site. The true design of the site is managed by style sheets. style.css defines the basic layout and markup.css sets fonts and colors. Note: these style sheets are included directly in the output of the CGI script. In production the style sheets would be stored as separate style sheet files and imported by the browser instead of directly included in the search results page. See the section MOD_PERL below for more on templates. Highlighting of search terms is provided by the SWISH::PhraseHighlight module. That is a very slow module, so you may wish to disable it if you expect a lot of traffic. INSTALLATION EXAMPLE
Enough talking, sometimes it's nice to see a complete example. Below swish-e is installed in the default location (/usr/local). The "$" is a normal user prompt, where "#" is a root prompt. Use ./configure --prefix to install in another location (e.g. if you do not have root access). Download and install swish-e $ wget -q http://swish-e.org/Download/latest.tar.gz $ tar zxf latest.tar.gz $ cd swish-e-2.x.x $ (./configure && make) >/dev/null $ make check $ su # make install # exit Install SWISH::API $ cd perl $ perl Makefile.PL && make && make test $ su # make install $ exit Install requried Perl modules. You can install via RPMs, Debs or directly from the CPAN or by using the CPAN shell. # su # perl -MCPAN -e 'install Template' # perl -MCPAN -e 'install HTML::FillInForm' # exit Now setup the script in someplace that allows CGI scripts. $ cd $HOME/apache $ ln -s /usr/local/lib/swish-e/search.cgi . $ cat .htaccess deny from all <files search.cgi> allow from all SetHandler cgi-script Options +ExecCGI </files> Create an index $ cat swish.config IndexOnly .htm .html DefaultContents HTML* StoreDescription HTML* <body> metanames swishtitle swishdocpath $ swish-e -c swish.config -i /usr/share/doc/apache-doc/manual Test the index and the CGI script: $ swish-e -w apache -m1 | grep hits # Number of hits: 152 $ lynx -dump http://localhost/apache/search.cgi?query=apache | grep hits Showing page 1 (1 - 10 of 152 hits) [3]Next 'hits' => 152, Now, the above isn't very helpful because the Apache documentation indexed is not in the web space. You would likely index content available on your web site. Using with SpeedyCGI Perl CGI script must be compiled for each request. SpeedyCGI is a tool to speed up scripts by running them persistently. To run search.cgi with SpeedyCGI install the program (you can Google, right?) and then change the first line of search.cgi to run the speedy program. For example: #!/usr/bin/speedy -w Using with MOD_PERL This script can be run directly as a mod_perl handler, and the same code can be used to run multiple sites by using separate Location directives and passing in a "site id." The script caches in memory different configurations based on this site id. Below is a complete httpd.conf file. It requires an Apache httpd that has mod_perl compiled in statically. It runs mod_perl on a high port (port 5000) listening to all interfaces. For testing I put this config file in a directory along with search.cgi, but that's just done to make the example simple (i.e. so I don't have to show any absolute paths). Normally the httpd.conf and the swish.cgi "module" would be in separate locations. # httpd.conf -- test file for search.cgi as mod_perl handler <ifModule mod_so.c> LoadModule mime_module /usr/lib/apache/1.3/mod_mime.so </IfModule> ErrorLog swish_error_log PidFile swish_httpd.pid Listen *:5000 <perl> push @PerlSetVar, [ index => Apache->server_root_relative( 'index.swish-e'), ]; $DocumentRoot = Apache->server_root_relative; require "search.cgi"; </perl> NameVirtualHost *:5000 <VirtualHost *:5000> ServerName localhost <Location /search> SetHandler perl-script PerlHandler SwishAPISearch </Location> <Location /othersite> SetHandler perl-script PerlHandler SwishAPISearch # Define this site PerlSetVar site_id othersite PerlSetVar title "Some other Site" </Location> </VirtualHost> The server is started using this command: $ /usr/sbin/apache-perl -d $(pwd) -f $(pwd)/httpd.conf which says to use the current directory as the ServerRoot. (See comments below.) Stop the server like: $ kill `cat swish_httpd.pid` Then access either: http://localhost:5000/search http://localhost:5000/othersite A few Notes: I like test configurations to not care where things are located. Thus, the above httpd.conf does a few tricks in the "Perl Section" shown. First, mod_perl, unlike CGI, doesn't set the working directory. So, the index file name must be absolute. This is accomplished by a PerlSetVar entry building the index file name from the ServerRoot. Second, the DocumentRoot is set to the same as the ServerRoot. The DocumentRoot needs to be set so search.cgi can figure out the path to the script (for creating next and previous links). Third, the script is loaded by a "require" statement. This works only because the current directory "." is in Perl's @INC path at Apache start up time and search.cgi is also in the current directory. Normally, set PERL5LIB on server startup or use a "use lib" line in your startup.pl file to point to the location of search.cgi. The "PerlSetVar" lines pass config information into the script. Note that they can be set globally or specific to a given Location. The following config options are currently available: site_id The site_id options allow caching of configurations on a per-site basis. It's overkill in this example, but normally you might have expensive configuration processes that you might want to do only once. But, since there is caching by this id it's a good id to set a site_id if using more than one Location directive. index This specifies the index file to use. The index file needs to be absolute as discussed above. Example: PerlSetVar index /usr/share/swish/site.index title This options sets the title that's passed into the template. template Sets the file name of the template use to generate the form. This might be useful if you want an "advanced" form, for example. template_path This can be used to update the path where templates are searched. Useful if you wish to override templates. page_size This allow changing the default number of results shown per page. SUPPORT
Not much support is provided. But what support is provided is ONLY provided via the Swish-e discussion list. http://swish-e.org/ AUTHOR
Bill Moseley LICENSE
Copyright 2003, 2004 Bill Moseley. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
SWISH::API, Template, HTML::FillInForm perl v5.14.2 2012-03-12 SEARCH.CGI(7)