About the linservs

These machines are for web based services that require internal and/or external access to the courant network that are more advanced than our standard web hosting. These services are an extension of our other web services. Please read the standard web hosting section for our policies before using these systems. The actual linserv machines are (there is only one currently in service): linserv1.cims.nyu.edu



Setting up an Apache Web Server

Warning: Running a web service has inherent security risks. Please be aware of such risks and adhere to standard good security procedures before proceeding.

 

To setup an Apache web server and access it from inside and outside the NYU network, follow the instructions below:

  1. Login to access.cims.nyu.edu

    ssh access.cims.nyu.edu
  2. Decide on a directory for your web server. This should NOT be in your public_html directory. We recommend creating a directory in your home folder just for this purpose, something like ~/httpd
    mkdir ~/httpd
  3. Connect to one of the linserv machines (linserv1). Since the linserv machines are not publicly accessible, you will have to ssh to them from access.cims.nyu.edu. From the UNIX prompt, just execute:
    ssh linserv1.cims.nyu.edu
  4. Install apache httpd. You can either copy over the local system copy of apache httpd, or download the most recent version from the web and extract it into your httpd directory.
    cp -r /usr/local/pkg/apache/current/* ~/httpd/
  5. Configure your server to know the location of it's root directory. To do this, edit the conf/httpd.conf file and change all occurrences of "/home/USER/httpd" to your server's directory. With our setup, the following example provided will work, provided you replace YOUR_USERNAMEwith your username.
    cat /usr/local/pkg/apache/current/conf/httpd.conf | 
    sed "s/USER/YOUR_USERNAME/g" > ~/httpd/conf/httpd.conf
  6. Pick a port number between 10000 and 49152 for your httpd server and make sure you remember it. For this example we'll use 25000, but others may already be using this, so please select some random high port address value that others are unlikely to pick. To set this port, you need to edit the ~/httpd/conf/httpd.conf file and change the occurences of 80to the port you have choosen. From the file:
    #Listen 80
    Listen 25000
  7. Start up the web server:
    ~/httpd/bin/apachectl -d ~/httpd/ -k start
  8. Test it out by visiting the corresponding server and port:
    http://linserv1.cims.nyu.edu:25000
  9. When you're done using it, you can shutdown your server by running:
    ~/httpd/bin/apachectl -d ~/httpd/ -k stop

For further information try consulting the Apache HTTPD documentation.

 


Setting up an Apache Tomcat Server

Warning: Running web service applications has inherent security risks. Please be aware of such risks and adhere to standard good security procedures before proceeding.

 

To setup an Apache Tomcat server and access it from inside and outside the NYU network, follow the instructions below:

  1. Login to access.cims.nyu.edu

    ssh access.cims.nyu.edu
  2. Decide on a directory for your tomcat server. This should NOT be in your public_html directory. We recommend creating a directory in your home folder just for this purpose, something like ~/tomcat
    mkdir ~/tomcat
  3. Connect to one of the linserv machines (linserv1). Since the linserv machines are not publicly accessible, you will have to ssh to them from access.cims.nyu.edu. From the UNIX prompt, just execute:
    ssh linserv1.cims.nyu.edu
  4. Install tomcat. You can either copy over the local system copy of tomcat, or download the most recent version from the web and extract it into your tomcat directory.
    cp -r /usr/local/pkg/tomcat/current/* ~/tomcat/
  5. Pick a port number between 10000 and 49152 for your Tomcat server and make sure you remember it. For this example we'll use 25000, but others may already be using this, so please select some random high port address value that others are unlikely to pick. To set this port, you need to edit the ~/tomcat/conf/server.xml file and change the occurence of 8080to the port you have choosen. From the file:
     <!--<Connector port="8080" protocol="HTTP/1.1"-->

    <Connector port="25000" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="8443" />
  6. Start up the Tomcat server:
    ~/tomcat/bin/startup.sh
  7. Test it out by visiting the corresponding server and port:
    http://linserv1.cims.nyu.edu:25000
  8. When you're done using it, you can shutdown your server by running:
    ~/tomcat/bin/shutdown.sh

For further information try consulting the ~/tomcat/RUNNING.txt documentation.

 


Setting up a Ruby on Rails Server

Warning: Running web service applications has inherent security risks. Please be aware of such risks and adhere to standard good security procedures before proceeding.

 

To setup Ruby on Rails Server and access it from inside and outside the NYU network, follow the instructions below:

  1. Login to access.cims.nyu.edu

    ssh access.cims.nyu.edu
  2. Decide on a directory for your new rails application. This should NOT be in your public_html directory. We recommend creating a directory in your home folder just for this purpose, something like ~/rails
    mkdir ~/rails
  3. Connect to one of the linserv machines (linserv1). Since the linserv machines are not publicly accessible, you will have to ssh to them from access.cims.nyu.edu. From the UNIX prompt, just execute:
    ssh linserv1.cims.nyu.edu
  4. Create the new applications:
    rails new ~/rails/application_name
  5. Change to that directory:
    cd ~/rails/application_name
  6. Create the database:
    rake db:create
  7. Pick a port number between 10000 and 49152 for your Rails server and make sure you remember it. For this example we'll use 25000, but others may already be using this, so please select some random high port address value that others are unlikely to pick. To set this port, you need to pass the startup script the -poption when you start your server like so:
    rails server -p 25000
  8. Test it out by visiting the corresponding server and port similar to:
    http://linserv1.cims.nyu.edu:25000
  9. When you're done using it, you can shutdown your server by hitting the following in your terminal on the server:
    [Ctrl] + c

For further information try consulting ruby on rails documentation.

 


Creating a MySQL Database

Warning: Allowing other users read access to a MySQL database may compromise your data integrity, always keep your data out of the public_html directory and never provide a link to it from your public_html directory.

Warning: If allowing web based content to a MySQL database, always be aware of the SQL Injection exploits that are possible.


Note: The Database Hosting Service is the preferred method of setting up and maintaining a database as it offers significant benefits (automatic backup, automatic restart after downtime).  Instructions on migrating from a self managed database to the Database Hosting Service are  here. Instructions for setting up a self managed mysql database are here.