Project

General

Profile

Preparing a Linux machine for Bilder » History » Version 17

John Cary, 01/07/2018 09:41 AM
remove gstreamer stuff.

1 1 Redmine Admin
# Preparing a Linux machine for Bilder
2
3 15 John Cary
__If all you need is python and sphinx__ (e.g., for builds of documentation), then you need only
4 1 Redmine Admin
5 15 John Cary
* CMake (probably present)
6
* Python (probably present)
7 16 Ted Sume
* Python-dev or Python-devel (on Fedora)
8 15 John Cary
* Latex as installed below
9 1 Redmine Admin
10 15 John Cary
and then you can add the arguments,  -W python,cmake, and your installed Python and CMake will be used if your path is correct.
11
12
## Java
13
14
At least one package (Babel) needs Oracle's java, so we recommend installing it.
15
16 1 Redmine Admin
## GCC
17 15 John Cary
18
It is often useful to get a newer gcc that has mmintrinsics.
19 1 Redmine Admin
20
Below are the instructions for building gcc-4.9.3.
21
22
### Make sure 32bit glibc-devel is installed
23
24
~~~~~~
25
yum -y install glibc-devel.i686
26
zypper install glibc-devel-32bit  (SLES 11 SP3)
27
~~~~~~
28
29
### Get the source packages
30
31
~~~~~~
32
export GCCVER=4.9.3
33
wget ftp://ftp.gnu.org/gnu/gcc/gcc-${GCCVER}/gcc-${GCCVER}.tar.bz2
34
~~~~~~
35
36
### Build
37
38
Define CONTRIB_DIR to be your tarball installation directory, e.g.,
39
40
~~~~~~
41
export CONTRIB_DIR=/contrib
42
~~~~~~
43
44
Usually CONTRIB_DIR=/contrib, but if one does not have root access, one has to put this in a user area. If one does have root access, one should execute the following commands:
45
46
~~~~~~
47
mkdir /internal /contrib /volatile
48
chmod 775 /internal /contrib /volatile
49
~~~~~~
50
51
Unpack gcc, go into the gcc source directory, and build according to the instructions below.
52
53
**gcc:**
54
55
~~~~~~
56
tar xjf gcc-${GCCVER}.tar.bz2 && cd gcc-${GCCVER}
57
./contrib/download_prerequisites
58
mkdir build && cd build
59
../configure --prefix=$CONTRIB_DIR/gcc-${GCCVER} \
60
  --enable-languages=c,c++,fortran --with-pic
61
env LD_RUN_PATH=$CONTRIB_DIR/gcc-${GCCVER}/lib64 make -j 4
62
make install
63
# Alias as desired.
64
mkdir -p $CONTRIB_DIR/bin && cd $CONTRIB_DIR/bin
65
ln -s $CONTRIB_DIR/gcc-${GCCVER}/bin/{c,g}* .
66
~~~~~~
67
68
### Fix permissions
69
70
~~~~~~
71
chmod -R g+rwX $CONTRIB_DIR/gcc-${GCCVER}
72
chmod -R o+rX $CONTRIB_DIR/gcc-${GCCVER}
73
find $CONTRIB_DIR/gcc-${GCCVER} -type d -exec chmod g+rs '{}' \;
74
~~~~~~
75
76
77
## Java
78
79
Install Oracle's Java.
80
81
Once it is installed, you will need to modify your path to include /usr/java/default/bin before /usr/bin or use the alternatives package:
82
83
~~~~~~
84
for i in java jar javac; do
85
  alternatives --install /usr/bin/$i j$i /usr/java/jdk1.6.0_16/bin/$i 3
86
done
87
alternatives --config java # Pick 3
88
~~~~~~
89
90
On SLES , Install using the tar package from Oracle, then change into the installation directory
91
92
~~~~~~
93
for i in java jar javac; do
94
  /usr/sbin/update-alternatives --install /usr/bin/$i $i <installation directory>/bin/$i 3
95
done
96
~~~~~~
97
98
where <installation directory\> is the absolute path to where Java was just installed  
99
100
## Version control systems
101
102
Make sure git, mercurial, and subversion are all installed.
103
104
## LaTeX
105
106
Install the texlive-latex package. You may need to install other packages over time. For gui usage, see texworks: http://www.tug.org/texworks
107
108
If you cannot install in the system area, you can download
109
110
~~~~~~
111
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
112
tar xzf install-tl-unx.tar.gz
113
cd install-tl-20150411 (date might be different)
114
./install-tl -no-gui
115
~~~~~~
116
117
This is now interactive, so set
118 11 Matt Copper
 
119 10 Matt Copper
* Set scheme to basic
120
** To do this type 'S' and hit enter.
121
** Then enter 'd' to set the scheme to basic.
122
** Type 'R' and hit enter to return to the main configuration page.
123 1 Redmine Admin
124 10 Matt Copper
* Set TEXDIR = $CONTRIB_DIR/texlive
125
** Start by typing 'D' and hit enter.
126
** Then enter '1' to change TEXDIR.
127
** Type $CONTRIB_DIR/texlive and hit return.
128
** To return to configuration type 'R' and return.
129 1 Redmine Admin
130 10 Matt Copper
* Set page size to Letter size
131
** Type 'O' and hit enter.
132
** Enter 'P'
133
** Return to main menu by typing 'R' and enter. 
134
135
* Install
136
** Type 'I' and hit enter to install.
137
138
* Put your texlive in your PATH.
139
** Edit you bashrc (vim ~/.bashrc)
140
** Add "export PATH=$PATH:<$CONTRIB_DIR>/texlive/bin/x86_64-linux/" (enter the full CONTRIB_DIR value)
141
** Exit and save. Then source ~/.bashrc.
142
143
To ensure you are using the correct texlive installation type "which pdflatex" and make sure it 
144
the one in $CONTRIB_DIR/texlive/bin/x86_64-linux/. If it is not the correct pdflatex, you may
145
have to remove the system version (sudo yum remove texlive). 
146 1 Redmine Admin
147
and then
148
149
~~~~~~
150 12 John Cary
    for i in breakurl capt-of cmap comment courier ec eepic environ epstopdf eqparbox \
151
fancybox fancyvrb framed footnote framed fricychap gensymb helvetic lineno mdwtools mmap \
152
mptopdf multirow newfloat overpic palatino parskip pdftex pifont revtex4 siunitx subfiles \
153
symbol tabulary threeparttable titlesec trimspaces txfonts units upquote url wrapfig \
154
xcite xcolor xypic zapfding; do
155 1 Redmine Admin
     tlmgr install $i
156
    done
157
~~~~~~
158
159
You may also want to install some of the fonts, avantgar bookman charter cmextra courier euro-ce eurosym marvosym mathpazo ncntrsbk pxfonts rsfs symbol times txfonts utopia wasy zapfchan zapfding.
160
161
## Fedora
162
163
The following packages are needed for Fedora
164
165
~~~~~~
166
   bison
167
   glib2-devel
168
   libxml2-devel
169 2 Matt Copper
   openssl-devel
170 1 Redmine Admin
   zlib-devel
171
   patch
172
~~~~~~
173
174 9 David Alexander
You may also need
175
176
~~~~~~
177
   libblas-devel
178
   lapack-devel
179
~~~~~~
180
181 1 Redmine Admin
## Ubuntu
182
183
The following packages are needed for Ubuntu
184
185
~~~~~~
186
   ace-netsvcs
187
   bison
188
   flex
189
   gfortran
190
   graphviz
191
   graphviz-dev
192
   heirloom-mailx
193
   libblas-dev
194
   libfreetype6-dev
195
   libgl1-mesa-dev
196
   libglu1-mesa-dev
197
   liblapack-dev
198
   libntlm0
199
   libpng12-dev
200
   libxext-dev
201
   libxrender-dev
202
   libxtst-dev
203
   libzzip-dev
204
   mailutils
205
   python2.6
206
   python2.6-dev
207 14 Jonathan Smith
   zlib-dev *
208 1 Redmine Admin
~~~~~~
209 14 Jonathan Smith
* You will probably want a lightweight command line editor other than gedit, so "sudo apt-get install vim"  or "sudo apt-get install emacs" 
210
* zlib-dev doesn't exist on ubuntu 16.04 - use zlib1g-dev instead.
211
212
mailutils is necessary for configuring the system for jenkins. 
213
You'll be offered to choose:
214
* Internet site
215
* Internet with smarthost
216
* Satellite system
217
* Local only
218
219
Internet with smarthost is recommended.
220
221 1 Redmine Admin
222
The use of the following commands are helpful. To search for an available package dealing with a keyword, use:
223
224
~~~~~~
225
    $ sudo apt-cache search keyword
226
~~~~~~
227
228
To install a particular package, use:
229
230
~~~~~~
231
    $ sudo apt-get install libblah-dev
232
~~~~~~
233
234
Note: that development packages names typically end with "dev" not "devel" as in other flavors of linux.
235
236
## Suse Linux Enterprise Server (SLES)
237
238
The following packages are needed on SLES
239
240
~~~~~~
241
   bison
242
   blas-devel
243
   blas-devel-static
244
   libblas3
245
   flex
246
   freetype2-devel
247
   gcc
248
   gcc-32bit
249
   gcc-fortran
250
   git
251
   glibc-devel
252
   glibc-devel-32bit
253
   graphviz
254
   graphviz-devel
255
   gstreamer-0_10-devel
256
   gstreamer-0_10-plugins-base-devel
257 13 David Alexander
   libbz2-devel
258 1 Redmine Admin
   lapack-devel
259
   lapack-devel-static
260
   liblapack3
261
   libapr-util1 (needed to build subversion)
262
   libapr1      (needed to build subversion)
263
   libneon27    (needed to build subversion)
264
   libpng-devel
265
   libssh-devel
266
   libxml2-devel
267
   mailx
268
   mercurial
269
   Mesa-devel
270
   python-devel
271
   xorg-x11-devel
272
   xorg-x11-libXext-devel
273
   xorg-x11-libXrender-devel
274
   xorg-x11-libs
275
   zlib-devel
276
~~~~~~
277
278
To get blas-devel, blas-devel-static and lapack-devel, lapack-devel-static on SLES 11 SP3 , add the Science repository
279
280
~~~~~~
281
   zypper addrepo http://download.opensuse.org/repositories/science/SLE_11_SP3/science.repo
282
   zypper refresh
283
   zypper install blas-devel blas-devel-static lapack-devel lapack-devel-static
284
~~~~~~
285
286
## Vendor-specific version of graphics driver
287
288
If you are preparing a Linux machine for the VisIt Visualization package, the vendor-specific graphics driver for your graphics card should be installed.
289
290
By default, a generic graphics driver is installed.  On Fedora, the generic driver is "nouveau".
291
292
To determine if the nouveau driver is installed on your system, enter the command
293
294
~~~~~~
295
     lsmod | grep nouv
296
~~~~~~
297
298
You will need to download and install the appropriate driver from your graphics card vendor.  This generally uninstalls the nouveau drivers.
299 3 Matt Copper
300 4 Matt Copper
## NVIDIA CUDA Toolkit
301 3 Matt Copper
302
If you have a compatible GPU and wish to compile with nvcc code, you must first install the CUDA Toolkit. The linux installation page is 
303
304
~~~~~~
305
     https://developer.nvidia.com/cuda-toolkit-70
306
~~~~~~
307
308
Download the applicable file. Your Linux distribution may or may not be natively supported for version 7.0. You may alternatively use version 7.5 if supported or an older version if necessary. As an example, we will include the steps known to work for Fedora 22. On Fedora 22, download the Fedora 21 Local RPM package. 
309
310
~~~~~~
311
     cd <location of download>
312
     sudo rpm -i cuda-repo-fedora21-7-0-local-7.0-28.x86_64.rpm   #<or whatever file you downloaded> 
313
     sudo dnf install cuda
314
~~~~~~
315
316 5 Matt Copper
Different Linux distributions will have different package handlers (here we use dnf, ubuntu has apt-get, fedora < 22 uses yum). You should now have the directory /usr/local/cuda-7.0. Add /usr/local/cuda-7.0/bin to your path. To ensure you have gotten the necessary components, type:
317 3 Matt Copper
318
~~~~~~
319
     which nvcc
320
~~~~~~
321
322
The output should be /usr/local/cuda-7.0/bin/nvcc. This will allow bilder to build GPU c++ code.