mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 15:45:25 +02:00
186 lines
9.1 KiB
HTML
Executable file
186 lines
9.1 KiB
HTML
Executable file
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page."/>
|
|
<link rel="stylesheet" type="text/css" href="../book.css"/>
|
|
<title>Connecting to a remote Linux or UNIX server</title>
|
|
</head>
|
|
|
|
<body id="tbeginlinux">
|
|
<a name="tbeginlinux"><!-- --></a>
|
|
<h1 class="topictitle1">Connecting to a remote Linux or UNIX server</h1>
|
|
<p>The following documentation explains how to install the Linux or UNIX server
|
|
code, start the server daemon, and make a connection to a remote Linux
|
|
or UNIX server. Look <a href="tbeginwindows.html">here</a> for setting up
|
|
a server on <a href="tbeginwindows.html">Windows</a>.</p>
|
|
<div>
|
|
<div class="p">
|
|
<p><b>Prerequisites</b></p>
|
|
<p>To use the Remote System Explorer communications server daemon you need
|
|
to install Perl. Using the daemon helps eliminate some of the manual steps
|
|
when you connect to the server.</p>
|
|
<p><b>Installing the server code</b></p>
|
|
<div class="p">
|
|
<ol>
|
|
<li>
|
|
Find the package that contains the server.
|
|
The server code is usually packaged with the containing product and you should refer to that
|
|
product's documentation for finding and installing the server package.
|
|
The server is also available, however, on the Eclipse DSDP
|
|
<a href="http://download.eclipse.org/dsdp/tm/downloads/">Target Management download site</a>
|
|
as the package <b>rseserver-<version>-<os>.tar</b>. For example, rseserver-2.0-linux.tar contains the release 2.0 server
|
|
for Linux. There are servers for Linux, AIX, a generic Unix version that can be tailored to your particular flavor
|
|
of Unix, and an experimental Mac OS X version.</li>
|
|
<li>Ensure that Perl is installed.</li>
|
|
<li>Ensure that a Java Runtime Environment (JRE) version 1.4 or higher is installed.
|
|
An IBM, Sun or equivalent JRE is required; The gcj-based jvm shipped with most Linux
|
|
distributions does not work. If in doubt, run the command <br/><tt>java -version</tt> (see
|
|
below) and check if there is a reference to gcj. You can download a Sun JRE from
|
|
<a href="http://java.sun.com">http://java.sun.com</a>.</li>
|
|
<li>Create a directory where you want to install the server code. The remainder
|
|
of these instructions will assume the directory /opt/rseserver (suitable for
|
|
team sharing), but you are free to use any directory.</li>
|
|
<li>Upload the server package to this directory. You can use FTP.</li>
|
|
<li>Switch to the /opt/rseserver directory by typing:
|
|
<pre>cd /opt/rseserver</pre>
|
|
</li>
|
|
<li>Run the following command in the /opt/rseserver directory to extract the
|
|
server code from the package appropriate to your operating system. For linux this command is:
|
|
<pre>tar -xf rseserver-2.0-linux.tar</pre>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
|
|
<p><b>Starting the server</b></p>
|
|
<div class="p">You can start the RSE communications
|
|
server with the server daemon, or manually. Before starting the server, make
|
|
sure the Java command is in your path, you can do this by running the following
|
|
command:<pre>java -version</pre>
|
|
</div>
|
|
<div class="p">You should see something
|
|
similar to the following:<pre>java version "1.4.1"
|
|
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1)
|
|
Classic VM (build 1.4.1, J2RE 1.4.1 IBM build cxppc321411-20040301 (JIT enabled: jitc))</pre>
|
|
</div>
|
|
<div class="p">If
|
|
you receive a "command not found" error, then try creating a symbolic link
|
|
to the java command in /usr/bin by running the following command:<pre>ln -s /opt/IBMJava2-141/jre/bin/java /usr/bin/java</pre>
|
|
</div>
|
|
<div class="p"><b>To start the server with the server daemon</b>
|
|
<ol>
|
|
<li>Ensure that you are running using the root user ID. (If the daemon is
|
|
not run under root, it will be unable to authenticate connecting users.) Run
|
|
the following commands:<pre>su -l root
|
|
cd /opt/rseserver
|
|
perl ./daemon.pl [daemonPort] [serverPortRange]</pre>
|
|
</li>
|
|
</ol>
|
|
Note that the server daemon runs on port 4075 by default. You can pass the optional
|
|
daemonPort argument to force a different port if you want.<br/>
|
|
If your daemon runs behind a firewall, you may want to specify the optional
|
|
<i>serverPortRange</i> argument to restrict selected server ports to the
|
|
range given:<pre>
|
|
perl ./daemon.pl 4075 10000-10010</pre>
|
|
|
|
<p><b>To start the server manually</b></p>
|
|
<div class="p">
|
|
<div class="note">
|
|
Note: In the following discussion we assume that the RSE server has been installed on Linux.
|
|
If you are running on a UNIX system the script name is "server.sh" rather than "server.pl".
|
|
</div>
|
|
If you do not have root access on a remote machine, you can start the server manually for your particular user id only.
|
|
Run the following commands:
|
|
<pre>
|
|
cd /opt/rseserver
|
|
perl ./server.pl [port]
|
|
</pre>
|
|
These commands run the server.pl script located in the /opt/rseserver directory. The port parameter to the server.pl script is
|
|
optional. If you do not specify a port, then the server will pick the first
|
|
one available and print the port number to standard out. By default, it is
|
|
usually 4033. If you would like to use a different port, you will then have
|
|
to enter this port number in port property for the Files subsystem for your
|
|
connection in the Remote System Explorer (see <span class="uicontrol">Connecting to the
|
|
Remote Server</span>, below). Otherwise, you do not need to change this
|
|
property.</div>
|
|
<div class="p"><div class="note">
|
|
Note: When you connect RSE to the server, the server will terminate as
|
|
soon as you disconnect the client. The daemon, however, will not terminate.
|
|
</div></div>
|
|
|
|
<p><b>Rexec Server Launcher</b></p>
|
|
<div class="p">If you have Rexec access enabled to your remote system, you
|
|
can also have the server started automatically by an Rexec command from the
|
|
client, when you connect. To do so, use the Server Launcher Properties in
|
|
the New Connection Wizard.
|
|
</div>
|
|
<p><b>Running the daemon at startup</b></p>
|
|
<div class="p">You might instead want
|
|
to configure the daemon to run at start up for Linux. To do so, you need to
|
|
append a call to the daemon to your startup script. Add the following lines
|
|
to the bottom of the /etc/rc.d/rc.local file:<pre>cd /opt/rseserver
|
|
perl ./daemon.pl &</pre>
|
|
</div>
|
|
<p><b>SSL Encryption and Firewalls</b></p>
|
|
<div class="p">By default the RSE DStore connection is unencrypted. You
|
|
can, however, configure it to use SSL encryption.
|
|
<p>Because all dstore data transfer is done through a single TCP/IP
|
|
connection, the connection can also be tunneled through an ssh channel.
|
|
In fact, the same ssh channel can also be used to start the server,
|
|
like in the following example:</p>
|
|
<pre>
|
|
ssh -l moberhuber build.eclipse.org -L27127:build.eclipse.org:27127 \
|
|
"sh -c 'cd ~/rseserver/latest; perl ./server.pl 27127'"
|
|
</pre>
|
|
<p>
|
|
Here, the RSE Server is started on port 27127 through an ssh connection,
|
|
and at the same time port 27127 is forwarded through ssh to the local
|
|
host. You can now connect RSE to localhost:27127, and the connection
|
|
will transparently be forwarded to the remote system.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div><br></br>
|
|
<p><b>Connecting to the Remote Server</b></p>
|
|
<div class="p">To make a connection
|
|
to your remote server:</div>
|
|
<ol>
|
|
<li><span>Switch to the Remote System Explorer perspective. From the workbench
|
|
menu, click <span class="menucascade"><span class="uicontrol">Window </span> > <span class="uicontrol">Open Perspective </span> > <span class="uicontrol">Remote System Explorer</span></span>.</span></li>
|
|
<li><span>In the Remote Systems view, <b>New Connection</b> is automatically
|
|
expanded to show the various remote systems you can connect to through the
|
|
Remote System Explorer. Expand <b>Linux</b> or <b>Unix</b> to
|
|
invoke the new connection dialog box and configure a connection.</span></li>
|
|
<li><span>Enter a name for your first profile and click <b>Next</b>. (This
|
|
step only occurs if you have never defined a connection before.)</span></li>
|
|
<li><span>Enter a connection name. This name displays in your tree view and
|
|
must be unique to the profile.</span></li>
|
|
<li><span>Enter the name or TCP/IP address of your Linux server in the <b>Host
|
|
name</b> field, for example, LINUX_A.</span></li>
|
|
<li><span>(Optional) Enter a <b>Description</b>. The description appears
|
|
in the Properties view after the connection is created.</span></li>
|
|
<li><span>Click <b>Finish</b> to define your system. </span></li>
|
|
</ol>
|
|
<div class="skipspace">
|
|
<div class="attention"><span class="attentiontitle">Attention: </span>To check your port number, right-click your
|
|
connection or subsystem from the Remote Systems view and select <b>Properties</b>.
|
|
Click <b>Subsystem</b> to view the relevant information. If your port is "0,"
|
|
then your Remote System Explorer communications server will pick any free
|
|
port on the server. If you specified a port number when starting the server,
|
|
you need to enter it here, for example, to work with a firewall.</div>
|
|
</div>
|
|
<div class="p">
|
|
<div class="note"></div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<p><b class="reltaskshd">Related tasks</b>
|
|
<a href="tbeginwindows.html" title="">Connecting to a remote Windows
|
|
server</a>
|
|
<!-- TODO SSL configuration -->
|
|
</p>
|
|
</div>
|
|
</body>
|
|
</html>
|