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.
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.
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".
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.
Move to the main RealServer directory and type the following at a command line and then press Enter:
Bin\rmserver rmserver.cfg
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.
rmserver.exe -import[:key
]configuration_file
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
|
rmserver.exe -install[:ServiceName
] "parameters
"
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.
ServiceName
, and click Start.
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
.
Under Windows NT, the following option is available:
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.
rmserver.exe registry:key
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
.
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.
Instructions in this section describe how to start and stop RealServer running under 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".
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.
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.
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.
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.