root/documentation/ossie/user-guide-0.7.0/Installation.tex @ 8146

Revision 8146, 17.9 KB (checked in by mcarrick, 5 years ago)

removing redudancy

  • Property svn:eol-style set to native
Line 
1% ------------------------------------------------------------------
2%
3%   TITLE: OSSIE 0.7.0 Installation Guide
4% AUTHORS: Matt Carrick, Drew Cormier, Christopher Covington,
5%          Carl B. Dietrich, Joseph Gaeddert, C. Ian Phelps,
6%          Haris Volos, Shereef Sayed
7% CREATED:
8% REVISED:
9%     URL: http://ossie.wireless.vt.edu/
10%
11% ------------------------------------------------------------------
12
13\newpage
14\section{Installation}
15\label{section:installation}
16Installing OSSIE on Fedora 9 via the supplied build script is the recommend
17method of installing and running OSSIE on your native Linux system. Running OSSIE on Ubuntu 8.04 as well as Linux
18in a virtual VMware image as described in the Quick Start Guide
19(Section~\ref{section:quickstartguide}) is also officially supported. Although we
20do not yet provide and support installation packages for more Linux
21distributions, compiling OSSIE from source on them should be possible. Compiling
22from source in general has some advantages over using the VMware image, such as
23saving disk space and download time and not needing the resources necessary to
24run two operating systems concurrently. Additionally, you may install OSSIE via Fedora's
25'yum' package manager. The use of 'yum' is preferred if you are an OSSIE application developer.
26If you would like to commit changes to the OSSIE framework or tool suite, then you should
27install from source as described below.
28
29\subsection{Installing OSSIE via YUM}
30\label{section:installation:yum}
31In order to install OSSIE via the YUM repository, you must first edit your '/etc/yum.conf' to
32add the OSSIE repository to the YUM search list.
33\begin{lstlisting}[]
34# su -
35# vim /etc/yum.conf
36\end{lstlisting}
37Add the following lines at the bottom of the file:
38\begin{lstlisting}[]
39[ossie-vt]
40name = OSSIE-VT
41baseurl=http://ossie.wireless.vt.edu/yum/ossie-vt/
42gpgcheck=0
43\end{lstlisting}
44Now install OSSIE via yum by typing:
45\begin{lstlisting}[]
46# yum install ossie
47# exit
48\end{lstlisting}
49
50\subsection{Notes on Linux Installation}
51\label{section:installation:notesonlinux}
52This section on installation assumes that the user is familiar with basic
53Linux commands such as {\tt cd} and {\tt ls}.
54Commands run with root permissions are prefixed with {\tt \#}, while others
55are prefixed with {\tt \$}.
56Additionally this guide assumes that the target system has basic development
57tools necessary for compiling source code. If you did not install Fedora Core 9
58with the software development option checked, please refer
59to Appendix~\ref{appendix:develpackages} for the list of packages you will need
60to install. Due to the differences between the Fedora and Ubuntu platforms, the dependency installation methods will be different. The Fedora instructions are listed first and use {\tt yum}, while Ubuntu is listed second and uses {\tt aptitude}.
61
62\subsection{Fedora 9 Dependencies}
63\label{section:installation:fedorainstallation}
64
65\subsubsection{Notes on Dependencies}
66\label{section:installation:dependencies}
67The first step in installing OSSIE is to install the dependencies.
68Under Fedora Core 9, the dependencies can be installed via {\tt yum}.
69
70\subsubsection{Xerces}
71\label{section:installation:dependencies:xerces}
72Xerces is a C++ XML parser.  The OSSIE framework uses this package to interpret
73the XML files that define resources and waveforms, among other things.
74\begin{lstlisting}[]
75# yum install xerces-c-devel
76\end{lstlisting}
77You will be prompted to answer some questions.  Answer {\tt yes (y)} to proceed.
78
79\subsubsection{omniORB}
80\label{section:installation:dependencies:omniorb}
81omniORB handles most of the CORBA implementation for your system.  See alternative instructions below if the following does not work.
82
83%TODO: describe CORBA
84\begin{lstlisting}[]
85 # rpmbuild --rebuild \
86    http://www.fourpalms.org/pub/omniORB/SRPMS/omniORB-4.1.0-1.src.rpm
87 # cd /usr/src/redhat/RPMS/i386
88 # rpm -Uhv omniORB-4.1.0-1.i386.rpm
89 # rpm -Uhv omniORB-devel-4.1.0-1.i386.rpm
90 # rpm -Uhv omniORB-utils-4.1.0-1.i386.rpm
91 # rpm -Uhv omniORB-servers-4.1.0-1.i386.rpm
92 # rpm -Uhv omniORB-bootscripts-4.1.0-1.i386.rpm
93\end{lstlisting}
94
95If you are unable to download the file from fourpalms.org, try using:
96
97\begin{lstlisting}[]
98 # rpmbuild --rebuild \
99    http://opensource.nederland.net/omniORB/downloads/4.1.0/SRPMS/omniORB-4.1.0-1.src.rpm
100\end{lstlisting}
101
102and then continue as above.
103
104Configure omniORB by editing {\tt /etc/omniORB.cfg} as root.
105Around line 313 you should see:
106\begin{lstlisting}[]
107 InitRef = NameService=corbaname::my.host.name
108\end{lstlisting}
109Uncomment the line by deleting the pound or hash character `\#' and change
110it to:
111\begin{lstlisting}[]
112 InitRef = NameService=corbaname::127.0.0.1
113\end{lstlisting}
114Before running the framework you will need to start the naming service.
115{\tt omniNames} will automatically start when you restart your machine. Refer
116to Appendix~\ref{appendix:services} for instructions on how to start the
117omniNames service without restarting your machine or set whether the service
118starts automatically at boot.
119\footnote{You may also manually start a source-compiled tarball package of
120omniNames {\tt omniNames} with the script described in
121Appendix~\ref{appendix:omninamessh}}
122
123\subsubsection{omniORBpy}
124\label{section:installation:dependencies:omniorbpy}
125The omniORBpy package provides a Python interface for omniORB.  It is used for
126both the Python tools (OWD, ALF, wavLoader.py) and Python components.
127\begin{lstlisting}[]
128 # rpmbuild --rebuild \
129     http://www.fourpalms.org/pub/omniORB/SRPMS/omniORBpy-3.0-1.src.rpm
130 # cd /usr/src/redhat/RPMS/i386
131 # rpm -Uhv omniORBpy-3.0-1.i386.rpm
132 # rpm -Uhv --force omniORBpy-standard-3.0-1.i386.rpm
133 # rpm -Uhv omniORBpy-devel-3.0-1.i386.rpm
134\end{lstlisting}
135
136\subsubsection{wxPython}
137\label{section:installation:dependencies:wxpython}
138wxPython is a Python interface for the wxWidgets graphical user interface
139library. The graphical Python tools, as well as many graphical Python
140components, utilize the wxPython package to create their graphical user interfaces.
141\begin{lstlisting}[]
142 # yum install wxPython-devel
143\end{lstlisting}
144
145\subsubsection{numpy}
146\label{section:installation:dependencies:numpy}
147numpy is a Python numerical library that the tools use.  It is only
148necessary for running the tools.
149\begin{lstlisting}[]
150 # yum install numpy
151\end{lstlisting}
152
153At this time it is a good idea to restart your machine.
154
155\subsection{Ubuntu 8.04 Dependencies}
156\label{section:installation:ubuntuinstallation}
157
158\subsubsection{Dependencies Setup}
159\label{section:installation:ubuntudependencies}
160Edit the sources.list file through the GUI or by manually editing the file. To edit the file through the GUI, on the toolbar select System : Administration : Software Sources and enter the adminstrator password. Under the "Ubuntu Software" tab, make sure all of the boxes are selected which have the following tags at the end: (main), (universe), (restricted), and (multiverse). Then close the window and select "Reload" to update the package list.
161
162To update the list manually, open the source.list file:
163\begin{lstlisting}[]
164$ sudo vim /etc/apt/sources.list
165\end{lstlisting}
166Make sure the following lines are uncommented:
167\begin{lstlisting}[]
168deb http://us.archive.ubuntu.com/ubuntu/ hardy universe
169deb-src http://us.archive.ubuntu.com/ubuntu hardy universe
170...
171deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
172deb-src http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
173...
174deb http://security.ubuntu.com/ubuntu hardy-security main restricted
175deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted
176\end{lstlisting}
177
178\subsubsection{Install Dependencies}
179\label{section:installation:installubuntudependencies}
180
181Update the local dpkg cache and upgrade:
182\begin{lstlisting}[]
183$ sudo aptitude update
184$ sudo aptitude upgrade
185\end{lstlisting}
186
187Install all of the following packages:
188\begin{lstlisting}[]
189$ sudo aptitude install gcc build_essential
190$ sudo aptitude -y install omniorb4 libomniorb4-dev omniidl4-python \
191omniorb4-nameserver python-omniorb2 libgtk2.0-dev freeglut3-dev \
192libxerces27-dev libxerces27 python-wxgtk2.8 python-wxversion \
193python-wxtools python-numpy python-numpy-ext python-numpy-dev g++ \
194automake libtool subversion python-dev fftw3-dev libcppunit-dev \
195libboost-dev sdcc libusb-dev libasound2-dev libsdl1.2-dev subversion \
196guile-1.8 libqt3-mt-dev swig libboost-filesystem-dev
197\end{lstlisting}
198This is the entire dependency list, so some of these packages may already be installed by default.
199
200At this time, it is a good idea to restart your machine.
201
202\subsection{OSSIE Core Framework}
203\label{section:installation:ossiecf}
204OSSIE 0.7.0 is packaged with a convenient Python script to automatically
205configure and build the packages necessary for the framework, tools, and other
206libraries.
207Before running the script, however, it is necessary to perform a few
208preliminary steps.
209
210\subsubsection{Allowing Root Access for {\tt make install} with {\tt sudo}}
211\label{section:installation:ossiecf:sudoers}
212In order for the script to run uninterrupted, the {\tt sudo} command must be
213able to execute {\tt make install}.
214As root, edit the {\tt sudoers} file\footnote{By default the sudoers file must
215be edited with the {\tt visudo} command}
216\begin{lstlisting}[]
217 # /usr/sbin/visudo
218\end{lstlisting}
219
220At the end of the file, add the following line:
221\begin{lstlisting}[]
222 ALL ALL = NOPASSWD: /usr/bin/make install
223\end{lstlisting}
224
225Save and quit ({\tt :wq}).  If you made an error, visudo will tell you. We
226recommend that you comment this line out by putting a pound character (`\#') in
227front of it once you have finished installing OSSIE.
228%TODO: Have a more secure (wheel group only?) method
229
230\subsubsection{Creating {\tt /sdr}}
231\label{section:installation:ossiecf:sdr}
232By default, the installation directory of the OSSIE platform is {\tt /sdr}.  In
233order to install new source code and binaries into this directory
234without root permissions, you need to create and change the ownership of {\tt
235/sdr}.
236\begin{lstlisting}[]
237 # mkdir /sdr
238 # chown -R username.username /sdr
239\end{lstlisting}
240where {\tt username} is your user name.
241
242\subsubsection{Running {\tt build.py}}
243\label{section:installation:ossiecf:buildpy}
244The included {\tt build.py} script automates the building and installation of
245the OSSIE packages.
246Because OSSIE is built as a set of dependent libraries it is
247necessary to build and install each one separately so that
248they can link properly. This script takes care of that for you.
249
250Download the latest tarball from
251\href{http://ossie.wireless.vt.edu/download/tarballs/0.7.0/}{http://ossie.wireless.vt.edu/download/tarballs/0.7.0/}
252\\ and unpack {\tt ossie-0.7.0.tar.bz2}:
253\begin{lstlisting}[]
254 $ wget http://ossie.wireless.vt.edu/download/tarballs/0.7.0/ossie-0.7.0.tar.bz2
255 $ tar -xvjf ossie-0.7.0.tar.bz2
256\end{lstlisting}
257%
258To run the installation script, navigate to the {\tt ossie-0.7.0} directory and
259run {\tt build.py}:
260\begin{lstlisting}[]
261 $ cd ossie-0.7.0/
262 $ python build.py
263\end{lstlisting}
264Depending on the speed of your system this might take several minutes. You may
265be asked for a password during the first {\tt make install} command. Because we
266are using {\tt sudo}, this prompt is asking for your user password, not the
267root password. If successful, the prompt should say:
268\begin{lstlisting}[]
269*********************************************************
270
271  Complete installation of OSSIE 0.7.0 finished!
272
273*********************************************************
274\end{lstlisting}
275
276\subsubsection{Linking the Libraries with {\tt /sbin/ldconfig}}
277\label{section:installation:ossiecf:ldconfig}
278Once the OSSIE libraries are installed, they need to be linked.
279As root edit the file {\tt /etc/ld.so.conf}, adding the line
280\begin{lstlisting}[]
281 /usr/local/lib
282\end{lstlisting}
283Now run:
284\begin{lstlisting}[]
285 # /sbin/ldconfig
286\end{lstlisting}
287
288OSSIE should now be successfully installed on your system. You can skip to
289Section~\ref{section:runningwaveforms} to learn how to run waveforms.
290
291\subsection{Installation of OSSIE Eclipse Feature}
292\label{section:installation:oefinstall}
293Installation of the OSSIE Eclipse Feature (OEF) requires the intallation of OSSIE, Java, and Eclipse.
294
295\subsubsection{Installing Java}
296\label{section:installation:javainstall}
297If installing OEF on Fedora 9, this step can be skipped as Java is already installed. However on other platforms this step may need to be performed.
298
299Eclipse is written in Java, so you must have it installed to run Eclipse and OEF. Install the full Java Software Development Kit (SDK) for best results. The GNU gcc implementation of Java, gcj, will not work and therefore Sun's JDK must be used instead. To install, go to the \href{http://java.sun.com/javase/downloads/index.jsp}{Java SE download page} and download the latest JDK update that is available. Do not download the NetBeans IDE bundle or the JRE distribution.
300
301On the next page, check the radio button to agree to the license terms and choose either the RPM or the standard self-extracting executable. Execute the installer file you downloaded to install the Java SE JDK. If you downloaded the RPM version, the file will expand into several RPM files. Use your package manager to install them next.
302
303Confirm that the installation is in place. From the command line, enter:
304\begin{lstlisting}[]
305$ java -version
306\end{lstlisting}
307If java is not found, the version number is different than the one that was downloaded, or if the response indicates that gcj is being used, then the {\tt .bashrc} file needs to be updated. Locate the where the Sun Java distribution has been installed:
308\begin{lstlisting}[]
309$ ls /usr/lib | grep java
310\end{lstlisting}
311Open the {\tt .bashrc} file and add the path to it.
312\begin{lstlisting}[]
313$ vim /home/username/.bashrc
314\end{lstlisting}
315For example, add {\tt /usr/lib/java-1.7.0/} to the end of the file:
316\begin{lstlisting}[]
317export PATH=$PATH:/usr/lib/java-1.7.0/
318\end{lstlisting}
319
320Within the same terminal, update the PATH variable:
321\begin{lstlisting}[]
322$ . ~/.bashrc
323\end{lstlisting}
324
325Java is now installed.
326
327\subsubsection{Installing Eclipse}
328\label{section:installation:eclipseinstall}
329Install the Eclipse IDE for Java Developers. Go to the \href{http://www.eclipse.org/downloads/}{Eclipse Download Center} and download an Eclipse distribution for your platform.
330
331Eclipse is distributed as a tar file that you install in a location of your choice. Pick a location that is appropriate for your platform and simply unpack the contents. There is no self-installer, just untar the distribution. Do not install Eclipse in a directory that has spaces anywhere in its full path name.
332
333\subsubsection{Installing OEF}
334\label{section:installation:oefinstall}
335Now that the dependencies have been installed, OEF can be installed.
336
337Move into the unpacked eclipse directory, and start eclipse:
338\begin{lstlisting}[]
339$ cd /path/to/eclipse
340$ ./eclipse
341\end{lstlisting}
342
343After Eclipse starts, on the toolbar select Help : Software Updates : Find and Install. Choose "Search for new features to install" and click Next. Add a new entry by selecting "New Remote Site". Enter "OSSIE" as the name and {\tt http://ossie.wireless.vt.edu/eclipse/} as the URL, and select OK. Make sure there is a check next to OSSIE in the window, and select Finish.
344
345Eclipse will then display the OSSIE feature. Select the check mark next to the name and select Next. Accept the GNU license agreement and select Next. Then select Finish to install the feature. Select Install All when prompted to install the unsigned feature. Allow eclipse to restart so the changes take effect.
346
347Now that OEF has been installed, select the OSSIE perspective within Eclipse. On the toolbar, select Window : Open Perspective : Other. In the new window, select OSSIE which will then open the OSSIE perspective. On the toolbar, select File : New : OSSIE Waveform, or OSSIE Component to start developing.
348
349These same instructions used for installing OEF can be used later to update it to newer versions.
350
351\subsection{Using a VMware Image on Any Platform}
352A VMware image of a complete Fedora Core 9-based Linux system with all necessary
353dependencies and a complete install of OSSIE 0.7.0 is available at \\
354\href{http://ossie.wireless.vt.edu/trac/wiki/Downloads}{http://ossie.wireless.vt.edu/trac/wiki/Downloads}.
355All that is needed to run the virtual image is the VM­Ware Player, available
356for no fee from \\
357\href{http://www.vmware.com/download/player/}{http://www.vmware.com/download/player/}.
358Versions of the player are available for both Windows and Linux.
359
360Install VMware Player on your system, unzip the virtual image and open it.
361For full instructions on installing and using VMware player, please
362consult the VMWare Player User Guide~\cite{vmware:web}.
363
364It is recommended that you keep a copy of the zipped virtual image so that you do
365not need to download the image a second time to start with a fresh copy. Changes
366that you make from within the image will alter it, and in the event of drastic
367unwanted changes, starting afresh is easy if you have an extra copy of the image
368on your hard drive.
369
370% \subsection{Via Ebuild on Gentoo Linux}
371% Support for installation via Gentoo's Portage package management system has not
372% yet been thoroughly tested but ebuilds do exist.
373%
374% To access the ebuilds, install and configure layman if you haven't already:
375% \begin{figure}
376% \begin{lstlisting}[]
377% # emerge layman
378% # echo "source /usr/portage/local/layman/make.conf" >> /etc/make.conf
379% \end{lstlisting}
380% \end{figure}
381%
382% Then, add ossie-overlay to your locally-stored overlays:
383% \begin{figure}
384% \begin{lstlisting}[]
385% # layman -a -o https://ossie.wireless.vt.edu/repos/ossie/experimental/scripts/gentoo/ossie-overlay.xml
386% \end{lstlisting}
387% \end{figure}
388%
389% You can then proceed with installing OSSIE:
390% \begin{figure}
391% \begin{lstlisting}[]
392% # emerge -av ossie
393% \end{lstlisting}
394% \end{figure}
395%
396% After sucessful compiliation of the OSSIE framework and its dependencies, skip
397% to section X.
398
399%\subsection{Embedded Platforms}
400%While installation on embedded platforms is not officially supported in the
401%0.6.2 release, work has been done (MENTION WORK) on porting OSSIE to embedded
402%platforms and we are interested in promoting more work in this area.
403
404
Note: See TracBrowser for help on using the browser.