previous next

Chapter 6: Starting and Stopping RealServer

This chapter gives information on starting and stopping RealServer on both Windows and UNIX platforms. As soon as you start RealServer, it is ready to begin streaming.

Windows

In Windows NT, RealServer is automatically installed as a service, named RMServer, unless you cleared that option during setup. As a service, RealServer is always running in the background.

Starting RealServer Manually

You can start RealServer from the Start menu or from a command line.

If RealServer is already running as a service, do not try to start it a second time. If you want multiple instances of RealServer, use the instructions in "Running Multiple Servers on One System Under Windows NT".

To start RealServer from the Start menu:

On the Start menu, click Programs>Real>RealServer 8. This starts the rmserver.exe program.

If this is the first time you have run RealServer, it loads the default configuration file.

To start RealServer from a command line:

Move to the main RealServer directory and type the following at a command line and then press Enter:


Bin\rmserver   rmserver.cfg

Setting Up RealServer as a Service Under Windows NT

RealServer on Windows NT can be run as a service; an option during setup configures this automatically. Instructions in this section describe how to add RealServer to the services list if you did not instruct setup to do so.

To install RealServer as a service:

  1. At a command prompt, move to the RealServer Bin directory.

  2. Import the configuration file you want to use into a specific key in the registry by typing the following:
    
    rmserver.exe -import[:key] configuration_file
    

    where:

    key is the Registry key name you want to use. If you omit it, the default name Config is substituted.

    configuration_file is the path and configuration file you want to import.

    Note
    The configuration file you use must contain absolute paths for variables such as BasePath. Relative paths will not be recognized by RealServer when it is run as a service.

    For example, the following command:

    
    rmserver.exe -import:Server1   ../rmserver.cfg
    

    imports all the values in the rmserver.cfg file into the following key of the Windows NT registry:

    HKEY_CLASSES_ROOT\Software\RealNetworks\RealMedia Server\7.0\Server1

    Note
    You must supply the path to the configuration file. If RealServer cannot find the configuration file, it may not start.

    Tip
    You can now start RealServer using this configuration by typing the following at a command line:
    rmserver.exe registry:Server1

  3. Install the service by typing the following command at a command prompt:
    
    rmserver.exe -install[:ServiceName] "parameters"
    

    where:

    ServiceName is the name that will appear in the Services dialog box. If you omit ServiceName, RMServer is substituted.

    parameters is either the name of the configuration file, or the registry and key name, as entered in Step 2. The format of the registry and key name is registry:key. Any command line parameters can be used.

    Note
    The quotation marks surrounding parameters are required.

    The next time you start RealServer from the Services dialog box, it will use the settings specified in parameters, and will be configured to start automatically.

    For example, the following command:

    
    rmserver.exe -install:RMInternet "Server1"
    

    installs RealServer with the service name "RMInternet" and uses the settings in the Server1 key.

  4. Start the service. In the Services control panel, select the name you used for ServiceName, and click Start.

To remove any RealServer from the services list:

At a command prompt, type the following:


rmserver.exe -remove[:ServiceName]

where ServiceName is the optional name of the service. If you omitted a service name when you installed the service, you can omit it here, and RealServer will use RMServer.

Additional Options for Windows NT

Under Windows NT, the following option is available:

Running Multiple Servers on One System Under Windows NT

You can load different configuration files into different Windows NT registry keys, and connect them to different instances of RealServer running as separate services. Multiple services of RealServer can be useful if you want to switch between a production and a test configuration file, for example.

To import a configuration file into a specific key in the registry:

  1. Follow the instructions in Step 2 of "Setting Up RealServer as a Service Under Windows NT" to import a particular configuration file into a specific registry key.

  2. Start RealServer by typing the following:
    
    rmserver.exe registry:key
    

    where:

    key is name you want to use for the configuration. RealServer places the configuration information in HKEY_CLASSES_ROOT\Software\RealNetworks\RealMedia Server\7.0\Key.

    In the example from Step 2 of "Setting Up RealServer as a Service Under Windows NT", in which the configuration settings are loaded into the "Server1" key, the full key name would be HKEY_CLASSES_ROOT\Software\RealNetworks\RealMedia Server\7.0\Server1.

Stopping RealServer on Windows NT

If RealServer was started from the Start menu or the command prompt, switch to the command window and press CTRL+C.

In Windows NT, if RealServer was started as a service, stop RealServer through the Services control panel. Click Start>Settings>Control Panel. Double-click Services. Locate RMServer on the list (your service name may be different), highlight it, and click Stop.

UNIX

Instructions in this section describe how to start and stop RealServer running under UNIX.

Starting RealServer on UNIX

Start RealServer initially with the default configuration file; later, you can create other configuration files and start RealServer using those.

RealServer includes one default port setting that is lower than 1000 (port 554 for the RTSP Port). Because the use of ports lower than 1000 requires that the person starting RealServer have root privileges, you must log in as root before you can start RealServer.

To run RealServer as a specific user, configure the User and Group variables with the appropriate User and Group names. Although your RealServer will start as root, it will automatically be switched to use the User and Group names you indicated. Refer to "UNIX-Only Features".

To start RealServer under UNIX:

Move to the main RealServer directory and type the following:


Bin/rmserver   rmserver.cfg

If you do not start from the Bin directory, RealServer cannot understand the relative paths in the configuration file.

To start RealServer in the background:

Type the following from the main RealServer directory:


Bin/rmserver   rmserver.cfg &

If you have other configuration files, you can substitute their names for rmserver.cfg and RealServer will use the settings in the file you name.

To limit the amount of memory that RealServer uses:

Start RealServer with the -m parameter:


Bin/rmserver   rmserver.cfg -m 32

where the number after -m can be any amount of memory in megabytes, 32 or greater.

Stopping RealServer on UNIX

To stop RealServer under UNIX, obtain the parent process identification number, and then issue the kill command with that process number. The process ID is stored in the rmserver.pid file, which is usually kept in the Logs directory. The PIDPath variable specifies this location.

You can perform both actions with one command. Move to the directory that contains the RealServer PID file, and type the following:


kill `cat pidfile`

where pidfile is the name of the RealServer PID file, as shown in the PIDPath variable.


Copyright © 2000 RealNetworks
For information on RealNetworks' technical support, click here.
Comments on this document? Click here.
This file last updated on 11/28/00 at 17:34:48.
previous next