-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.notes
executable file
·835 lines (635 loc) · 28.3 KB
/
install.notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
# install R
R packages are available in the EPEL repositories. If you don’t have EPEL repository installed on your machine you can do it by typing:
sudo yum install epel-release
Copy
You will be prompted to accept the repository GPG key, type y and hit Enter.
Once the repository is added, install R by typing:
sudo yum install R
Copy
R is a meta package that contains all the necessary R components.
Verify the installation by typing the following command which will print the R version:
R --version
Copy
R version 3.5.0 (2018-04-23) -- "Joy in Playing"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.
# install spacy
python -m pip install -U socketIO-client
installs: socketIO-client requests six websocket-client idna certifi chardet urllib3
# neo4j - via standalone tarball
download latest at https://neo4j.com/download-center/
Extract the contents of the archive, using tar -xf <filename>
Refer to the top-level extracted directory as: NEO4J_HOME
Change directory to: $NEO4J_HOME
Run ./bin/neo4j console
open localhost:7474 in browser
connect to db with ":server connect" using neo4j/neo4j as user/password (uses
bolt:7687 to access dbms functions like login, new users, etc)
will prompt to change default password
CALL dbms.security.createUser("root", "NGA", false)
to create new root user
test nodejs connect with "node flex.js F1". Log should reflect good proxy.
# neo4j - via
yum
First, you'll want our key:
cd /tmp
wget http://debian.neo4j.org/neotechnology.gpg.key
rpm --import neotechnology.gpg.key
Then, you'll want to add our yum repo to /etc/yum.repos.d/neo4j.repo:
cat <<EOF> /etc/yum.repos.d/neo4j.repo
[neo4j]
name=Neo4j Yum Repo
baseurl=http://yum.neo4j.org/stable
enabled=1
gpgcheck=1
EOF
Finally, install a package
yum install neo4j
# start neo4j
2.2.3.2. Starting the service automatically on system start
If you installed the RPM package and want Neo4j to start automatically on system boot then you need to enable the service. On Debian-based distributions this is done for you at installation time.
systemctl enable neo4j
2.2.3.3. Controlling the service
System services are controlled with the systemctl command. It accepts a number of commands:
systemctl {start|stop|restart} neo4j
Service customizations can be placed in a service override file. To edit your specific options, do the following command which will open up an editor of the appropriate file:
systemctl edit neo4j
Then place any customizations under a [Service] section. The following example lists default values which may be interesting to change for some users:
[Service]
# The user and group which the service runs as.
User=neo4j
Group=neo4j
# If it takes longer than this then the shutdown is considered to have failed.
# This may need to be increased if the system serves long-running transactions.
TimeoutSec=120
You can print the effective service, including possible overrides, with:
systemctl cat neo4j
Remember to restart neo4j if you change any settings.
systemctl restart neo4j
### set intial password
rm /var/lib/neo4j/data/dbms/auth
neo4j-admin set-initial-password XXXX
# install docker
Step 1 — Installing Docker
First, install Docker if you haven't already. The quickest way to install Docker is to download and install their installation script (you'll be prompted for a sudo password).
wget -qO- https://get.docker.com/ | sh
The above command downloads and executes a small installation script written by the Docker team. If you don't trust third party scripts or want more details about what the script is doing check out the instructions in the DigitalOcean Docker tutorial or Docker's own installation documentation.
Working with Docker is a pain if your user is not configured correctly, so add your user to the docker group with the following command.
sudo usermod -aG docker $(whoami)
Log out and log in from your server to activate your new groups.
Set Docker to start automatically at boot time:
sudo systemctl enable docker.service
Finally, start the Docker service:
sudo systemctl start docker.service
# docker compose install
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0-rc1/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
# PKI certs
## converting pfx to crt-key
openssl pkcs12 -in keyStore.pfx -out keyStore.crt -nodes --nokeys
openssl pkcs12 -in keyStore.pfx -out keyStore.key -nodes --nocerts
# check that crt-key match
openssl x509 -noout -modulus -in certificate.crt | openssl md5
openssl rsa -noout -modulus -in privateKey.key | openssl md5
# notepadqq
wget -O /etc/yum.repos.d/sea-devel.repo "http://sea.fedorapeople.org/sea-devel.repo"
yum install notepadqq
# must explictly add epel repo and update for centos7.7 before qq install
yum install -y epel-release
yum -y update
######
> move from node5 to node8
> npm install lwip fails due to izlib issue https://github.com/EyalAr/lwip/issues/297
> change zlib VERNUM to 0x1280 (from 0x12b0) in ~/.node-gyp/8.9.4/include/node/zlib.h and reinstall lwip
> also installed jimp as potential lwip replacement
> socket.io-clusterhub wont install due to "inherits super constructor" problem.
> removed include from totem
> rebuilt all node_modules. integrated graceful_lwip into lwip. Added jimp.
> socket.io-clusterhub fails to be required due to misuse of util.inherits. Changed lib/store/store.js
under socket.io/clusterhub to "var EventEmitter = require("events").EventEmitter" vs "process.EventEmitter".
> moved sqldb under local and updated my.cnf
>> installed toobusy-js to replace toobusy
######
# initial setup
git config --global user.name "DEBE"
git config --global user.email "g5120089@trbvm.com"
git remote add origin git@git.geointapps.org:ACME/sigma.git
cd sigma
git init
git touch README.md
git add README.md
git commit -m "first commit"
git push -u origin master
# commit changes to local repo
git commit -am "sigma 36 extjs5 themes charts ui fixes"
# push local repo to master branch at gitlab service
git push -u origin master
# pull master branch at gitlab service into local repo
git pull origin master
# forget all changes and reprime codebase
git reset --hard HEAD
git clean -f
git pull origin master
# make git stop tracking files that are now ignored
git rm -r --caced .
git add .
git commit -am "Remove ignoed files"
# initial stuff (if not installied in base centos - doubt we need - only need cmake)
yum groupinstall "Development Tools" --setopt=group_package_types=mandatory,default,optional # centos 7.x
yum groupinstall "Development Tools" # centos 6.x
yum install cmake
yum install libaio # centos 6.x
# service iptables start # not sure why i noted this here
interface with git repo (end product name DEBE now known as geonode)
git config --global user.name "DEBE"
git config --global user.email "g500xxx@trbvm.com"
git remote add origin git@git.geointapps.org:ACME/sigma.git
git pull
.ssh/id_rsa shoould contain private key corresponding to git public key uploaded into https://git.geointapps.org
##### Folllowing gdal stuff never fully worked. gdal and OSSIM used to orthorectify images
determining fastest mirrors
* base: centos.mbni.med.umich.edu
* extras: mirrors.lga7.us.voxel.net
* updates: mirror.trouble-free.net
base | 3.7 kB 00:00
elgis | 3.4 kB 00:00
elgis/primary_db | 85 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 2.5 MB 00:04
yum list gdal*
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
* base: mirror.raystedman.net
* extras: mirrors.lga7.us.voxel.net
* updates: mirror.trouble-free.net
Available Packages
gdal.i386 1.8.1-1_0.el6 elgis
gdal.i686 1.9.2-4.el6 elgis
gdal-devel.i386 1.8.1-1_0.el6 elgis
gdal-devel.i686 1.9.2-4.el6 elgis
gdal-doc.i386 1.8.1-1_0.el6 elgis
gdal-doc.noarch 1.9.2-4.el6 elgis
gdal-java.i386 1.8.1-1_0.el6 elgis
gdal-java.i686 1.9.2-4.el6 elgis
gdal-javadoc.noarch 1.9.2-4.el6 elgis
gdal-libs.i686 1.9.2-4.el6 elgis
gdal-perl.i386 1.8.1-1_0.el6 elgis
gdal-perl.i686 1.9.2-4.el6 elgis
gdal-python.i386 1.8.1-1_0.el6 elgis
gdal-python.i686 1.9.2-4.el6 elgis
gdal-ruby.i386 1.8.1-1_0.el6 elgis
gdal-ruby.i686 1.9.2-4.el6 elgis
gdal-static.i386 1.8.1-1_0.el6 elgis
yum install gdal gdal-devel [gdal-java gdal-perl gdal-python]
yum --enablerepo=rpmforge install gdal
#### end gdal
## Getting Started - eg on how client d3/topojson is used
Include D3.js and Topojson on your page
Include Datamaps.js on your page
Add a container, set the height and width and position to relative
Create a new Datamaps(options), passing in at least an element option
Example:
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/topojson/1.6.9/topojson.min.js"></script>
<script src="/datamaps.world.min.js"></script>
<div id="container" style="position: relative; width: 500px; height: 300px;"></div>
<script>
var map = new Datamap({element: document.getElementById('container')});
</script>
#ruby etc - used for extjs sas custom css themes
yum install ruby rubygems ruby-devel
gem install compass
######## Start legacy - not used anymore)
mv newbuild ~/opencv
cp -r include/* ~/opencv/include
cp -r modules/core ~/opencv/modules
# legacy - for mergevec util - but dont need this util
#setup pkg config for compiler
export PKG_CONFIG_PATH=/home/jamesdb/opencv/unix-install/
pkg-config --cflags opencv # produces ...
-I/home/jamesdb/opencv/include/opencv -I/home/jamesdb/opencv/include
pkg-config --libs opencv # produces ...
-L/home/jamesdb/opencv/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
# to compile mergevec utility ...
cd ~/opencv/modules/haartraining
cp ~/sigma/opencv_util/mergevec.cpp .
g++ `pkg-config --cflags opencv` `pkg-config --libs opencv` -o mergevec mergevec.cpp cvboost.o cvcommon.o cvsamples.o cvhaarclassifier.o cvhaartraining.o #note .o (not .cpp)
####### end legacy
# for gtk support for opencv (needed for graphical/console functions)
sudo yum install gtk+-devel gtk2-devel
####### install mysql cluster
# tar xvf mysql cluster (7.3.6, 7.4.8, 7.5.5) from generic linux install package (not the .el versions)
# add missing english errmsg.sys
cd [mysql]
mkdir bin/share
cp share/english/errmsg.sys bin/share
# optional but advised to add a mysql user in a mysql group
groupadd mysql
useradd -g mysql mysql # ok if /home/mysql does not get created
# revise my.cnf as follows
cd [mysql]
vi my.cnf
[mysqld_safe]
datadir=/local/service/sqldb
basedir=/local/mysql/bin
socket=/tmp/mysql.sock
symbolic-links=0
log-error=/local/service/sqldb/mysqld.log
pid-file=/local/service/sqldb/mysqld.pid
sql-mode="" # ignored so spec on startup
# create / initialize the sqldb
cd [mysql]
# for >=7.5
./bin/mysqld --initialize-insecure --defaults-file=my.cnf
./bin/mysqld_safe --defaults-file=my.cnf &
./bin/mysql -u root --skip-password
alter user "root"@"localhost" identified by "new password" # instead of using mysqladmin
set global sql_mode = "" # if preferred over mysql_safe startup
# for <=7.4
./scripts/mysql_install_db --user=mysql --datadir=/local/service/sqldb
# to start service (7.5+ needs sql-mode="" to revert to traditional error checking)
cd [mysql]
./bin/mysqld_safe --defaults-file=my.cnf --sql-mode="" &
# follow instructions to change password
cd [mysql]
./bin/mysqladmin -u root password 'newpassword'
# secure the database following the usual "secure initial database" procedure
mysql -u root -p 'password'
select user,host,password from mysql.user;
update mysql.user set password=password('newpassword');
# add
# prime the database ...
create database openv;
create database app1;
cd sigma/admins/db
mysql -uroot -ppass openv <openv.sql
mysql -uroot -ppass app1 <app1.sql
mysql -uroot -ppass app1 <funcs.sql
# install pdftk
wget https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-1.el6.x86_64.rpm
sudo yum install libgcj
sudo rpm -i pdftk*.rpm
sudo yum install libgcj
sudo rpm -i pdftk-2.02-1.*.rpm
####### end mysql
####### LEGACY atlas install
bunzip2 -c ~/dload/atlas3.10.0.tar.bz2 | tar xfm -
cd ATLAS
mkdir build
cd build
# do not use doc example:
../configure -b 64 -D c -DPentiumCPS=2400 --prefix=/home/jamesdb/atlas-3.10
# instead, use:
../configure -b 64 --prefix=/home/jamesdb/atlas-3.10 --shared
make build
make check
make ptcheck
make time
make install
####### atlas
# centos vbox home
# to access dns server from arcade, add
[Resolve]
DNS1=82.163.142.7
DNS2=95.211.158.134
to /etc/systems/resolved.conf. When rebooted this will be reflected
in the /etc/resolv.conf, and there should then be connectivity. The
DNS addressed are discoveron the Windows via Startup | Control Panel | Network Setting | The Dom Site Guest Bridge | IPv4 | properties.
# system update
sudo yum -y update
sudo yum -y groupinstall "Development Tools"
sudo yum -y install kernel-devel kernel-headers dkms cmake
# legacy - nvidia gpu drivers (use cuda.run 2nd pass install only drivers)
yum install kernel-devel-$(uname -r) kernel-headers-$(uname -r)
lspci -vnn | grep VGA -A 12
# www.binarytides.com/linux-get-gpu-information
VGA compatible controller [0300]: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter [80ee:beef] (prog-if 00 [VGA controller])
Flags: bus master, fast devsel, latency 0, IRQ 11
Memory at e0000000 (32-bit, prefetchable) [size=16M]
Expansion ROM at <unassigned> [disabled]
[80ee = vedor, beef = pci id]
# ****>>> use the -noopengl switch when installing the driver
# to prevent desktop gnome from getting clobbered. Also
# skip the "update x11 driver" at end
sudo dmidecode -t baseboard | grep -i 'Product'
glxinfo | grep OpenGL
OpenGL vendor string: Mesa Project
OpenGL renderer string: Software Rasterizer
OpenGL version string: 2.1 Mesa 9.2.0-devel
OpenGL shading language version string: 1.20
OpenGL extensions:
modinfo nvidia
# do not do this ...
lsmod | grep -i nouveau # these drivers are the ones we will be deleteing
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
echo -e "\nblacklist nouveau\noptions nouveau modeset=0" | sudo tee -a /etc/modprobe.d/blacklist.conf
# some say this is advised:
#sudo mv -v /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
#sudo dracut -v /boot/initramfs-$(uname -r).img $(uname -r)
#sudo systemctl disable gdm # if gnome was installed
# reboot
# dont do this ...
sudo yum install kmod-nvidia # will take 10mins
# reboot
lsmod | grep -i nvidia # tada
############## can install desktop (but wont work with nvidia)
#### this no longer needed if -noopengl used
sudo nvidia-xconfig
vi /etc/X11/xorg.conf
# add 'Load "glx"' to 'Section "Module"'
sudo yum install tigervnc xrdp
sudo yum group install "X Window System" "gnome desktop"
sudo systemctl enable gdm
sudo systemctl set-default graphical.target
sudo yum install tigervnc-server
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo systemctl enable xrdp.service
vi /etc/systemd/system/vncserver@:1.service
# replace 2 <USER> tokens with <account> name
# ExecStart = /sbin/runuser -l <account> -c "/usr/bin/vncserver %i -geometry"
sudo systemctl start vncserver@:1.service
vi /etc/xrdp/xrdp.init
# ip = 127.0.0.1
# port = 5901
sudo systemctl start xrdp
echo -e "\nhald_enable='YES'\ndbus_enable='YES'" | sudo tee -a /etc/rc.conf
##################
#### selinux if installed
sestatus # get status
setenforce 0 # temp disable - did not work - had to perm disable
vi /etc/sysconfig/selinux # perm disable - set "enforcing" to "disabled"
# docker
sudo yum -y install docker docker-registry
sudo systemctl enable docker.service # start auto on boot
sudo systemctl start docker.service
sudo systemctl status docker.service
sudo docker pull centos
usermod -aG docker $(whoami)
# docker compose
sudo yum install epel-release
sudo yum install -y python-pip
systemctl start docker # starts
### dont know why i kept this
# move install rpms, zips etc to installs folder via winscp eg
####### cuda install
# cuda-nvidia compatibility: https://developer.nvidia.com/cuda-gpus
# K5000 compatibile with cuda 5.0 +
sudo sh cuda_X.X.run # X.X=7.5 or 8.0 dont install the nvidia drivers - only the toolkit
########### nvidia install
#sudo sh cuda_X.X.run # run again - this time install only the drivers - no. instead ...
#download latest .sh nvidia drivers and install
cd /cuda/samples
make # will take 20mins
cd bin/x86_64/linux/release
./deviceQuery # better work
./bandwidthTest # insightful info
########### end nvidia
####### end cuda
####### opencv install
# on centos 6.x we need to install opencv-2.x globally (as setting caffe Makefile.config includes/libs does not work):
# sudo yum install opencv-devel
#cp lib/libopencv* /usr/lib64 # on centos 6.x, caffe needs these copied here (despite explict override of its Makefile.config LIBRARY_DIRS)
# on centos 7.x we install opencv-3.x from downdload
cd opencv-3.x
# make sure cuda-8.0 installed as opencv defaults to these
# follow opencv.org standard install process
cd opencv
mkdir newbuild
cd newbuild
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/local/opencv ..
make # may get 2 errors re gpu/cuda support - ignore them - wont use these modules yet
sudo make install # should install w/o errors - likely because it includes its own cuda drivers
######## end opencv
######## caffe install
# install caffe dependencies
sudo yum install protobuf-devel leveldb-devel snappy-devel boost-devel hdf5-devel gflags-devel glog-devel lmdb-devel python-devel
cd /local
# repack protobuf
mkdir protobuf
mkdir protobuf/include
mkdir protobuf/lib64
cd protobuf
cp -r /usr/include/google include
cp /usr/lib64/libproto* lib64
# repack boost
mkdir boost
mkdir boost/include
mkdir boost/lib64
cd boost
cp -r /usr/include/boost include
cp /usr/lib64/libboost* lib64
# repack hdf5
mkdir hdf5
mkdir hdf5/include
mkdir hdf5/lib64
mkdir hdf5/bin
cd hdf5
cp -r /usr/include/hdf5* include
cp -r /usr/include/H5* include
cp /usr/lib64/libhdf5* lib64
cp /usr/bin/h5* bin
# repack leveldb
mkdir leveldb
mkdir leveldb/include
mkdir leveldb/lib64
cd leveldb
cp /usr/include/leveldb/* include
cp /usr/lib64/libleveldb* lib64
# repack lmdb
mkdir lmdb
mkdir lmdb/include
mkdir lmdb/lib64
cd lmdb
cp /usr/include/lmdb* include
cp /usr/lib64/liblmdb* lib64
# repack glog
mkdir glog
mkdir glog/include
mkdir glog/lib64
cd glog
cp -r /usr/include/glog include
cp /usr/lib64/libglog* lib64
# repack gflags
mkdir gflags
mkdir gflags/include
mkdir gflags/lib64
cd gflags
cp -r /usr/include/gflags include
cp /usr/lib64/libgflags* lib64
# repack snappy
mkdir snappy
mkdir snappy/include
mkdir snappy/lib64
cd snappy
cp -r /usr/include/snappy* include
cp /usr/lib64/libsnappy* lib64
# atlas install
sudo yum install atlas-devel
# centos 7.x renamed libs (cblas -> satlas and atlas -> tatlas) so need to revise caffe Makefile
# blas install centos 6.x only
# sudo yum install blas-devel
# repack atlas
mkdir atlas
mkdir atlas/include
mkdir atlas/lib64
cd atlas
cp -r /usr/include/atlas include # dont think we need the x68_64 stuff
cp /usr/include/cblas* include
cp /usr/include/clapack* include
cp /usr/lib64/atlas/* lib64
# cuDNN install
unzip cuDNN-x.x # could cp lib64/* and include/* to /usr/lib64 and /usr/include but, instead, I chose to ref these in caffe Makefile.conf via its LIBs and INCLUDEs
# setup symbolic links in /local/include and /local/lib64 for atlas, opencv, etc, for example:
cd /local/include
ln -s /local/atlas/include atlas
# caffe install
tar xvf caffe-master
mv caffe-master caffe
cd caffe
cp Makefile.config.example Makefile.config
vi Makefile.config # adjust ...
> CPU_ONLY := 0 # 1 if gpu-less laptop
> USE_OPENCV := 1
> USE_CUDNN := 1
> USE_LMDB := 1
> USE_LEVELD := 1
> CUDA_DIR := /local/cuda
> OPENCV_VERSION := 3
> ANACONDA_HOME := $(CONDA)
> PYTHON_LIB := $(CONDA)/lib
> BLAS_INCLUDE := /local/atlas/include and BLAS_LIB=/local/atlas/lib64
vi Makefile # replace cblas -> satlas and altas -> tatlas on all LIBRARIES += lines
# setup paths
export BASE=/local
export CONDA=/local/anaconda
export LIB=/local/lib64
make clean
make all # some glog and boost warnings generated
make test # may get a few 'undefined ref to regexec'
make runtest
# note during the make, INCLUDE_DIRS should look something like /local/atlas/include:/local/anaconda/bin:/local/include/python:/local/oxygen/bin:/opt/cmake:/local/anaconda/bin:/local/include/python:/local/oxygen/bin:/opt/cmake:/local/mysql/bin:/local/bin:/usr/bin:/local/sbin:/usr/sbin:/usr/local/share/gems/gems/jsduck-5.3.4/bin:/local/nodejs/bin:/local/include/opencv:/local/opencv/bin:/local/nodejs/bin:/local/include/opencv:/local/opencv/bin
# python interface
cd /local/caffe
make pycaffe
# we need python protobuf too (undocumented reqt)
cd /local/anaconda/bin
./pip install protobuf # use conda's version so it installs to conda's site pkgs
# most of this may not be needed as it is provided by anaconda
cd caffe/python
for req in $(cat requirements.txt); do pip install $req; done # some errors are generated
######## end caffe install
######## python code minifier
pip install pyminifier # --index-url= ..... (see gitadv)
# need to revise the pyminifier to reseed rvs so same var names produced. add to pyminifier the following:
# from random import seed
# seed(1234)
######## python connector for centos 7.x
#sudo rpm -Uvh mysql-connector-python-2.1.x.rpm
pip install mysql-connector-python # better (works on 1.9.1 anaconda but not on 4.3.1 - used ver from 1.9.1)
#sudo cp -r /usr/lib/python2.7/site-packages/mysql $CONDA/lib/python2.7/site-packages
######## end python connector
# python re-direct
#cd /usr/lib
#mv python2.7 _python2.7
#ln -s /local/anaconda/lib/python2.7 python2.7
cd /local/lib64
ln -s /local/anaconda/lib/python2.7 python
# docker nvidia image
sudo usermod -aG docker jamesdb
docker run -it $VOL docker.io/centos
yum update
yum install kmod-nvidia # see above for rpm setup. blacklisting nouveau not needed.
# base link to /usr/local
ln -s /usr/local /local
ln -s /usr/lib64 /local/caffe/lib
# git
# install per notes-git.txt
ssh-agent # allow service to push git cahnges w/o passwords
ssh-add ~/.ssh/id_rsa
# putty and putty gen
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
sudo rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
sudo yum --enablerepo=rpmforge install putty
# get putty source tar from www.chiark.greenend.org.uk/~sgtatham/putty/download.html
# is used "release" vs "develop" source. Dev src may be better but Im ok with just fixing puttgen
# download cmdgen patch from www.itefix.net
# unpack src tar, cd into it
# following patch to add -N option "works", but does not circumvent prompt for load passphrase
# so must ssh-genkey with no passphrase, then use pathced puttygen with -N passphrase
patch cmdgen.c < cmdgen.option-N.patch
./configure
make
mv puttygen /usr/bin
# general dev tools
# yum groupinstall "Development Tools"
# service iptables start
# yum install cmake
# yum install libaio
# git install
# git config --global user.name "DEBE"
# git config --global user.email "g500xxx@trbvm.com"
# git remote add origin git@git.geointapps.org:ACME/sigma.git
# git config --global http.sslverify false
# git pull
# .ssh/id_rsa should contain private key corresponding to git public key uploaded into https://git.geointapps.org
# npm config set strict-ssl false -g # needs to be set globally
# curl --insecure <url>
# find cert info for exmaple.com site that is failing with unsigne cert message
# openssl s_client -showcerts -connect example.com:443 < /dev/null
# then copy stuff bewteen BEGIN - END to a .crt that will get moved to /etc/ca-trust/source/anchores/exampleSite
# then sudo update-ca-trust
#
##############
# smop matlab to python compiler
# download smop-master.zip
unzip smop-master
cd smop-master
python setup.py install --user
# to test
cd smop
python main.py smop solver.m
############
# add users to vbox share
usermod -G vboxsf admin
# add epl to yum repo
sudo yum install epel-release
General dependencies
sudo yum install protobuf-devel leveldb-devel snappy-devel opencv-devel boost-devel hdf5-devel
Remaining dependencies, recent OS
sudo yum install gflags-devel glog-devel lmdb-devel
Remaining dependencies, if not found
# glog
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/google-glog/glog-0.3.3.tar.gz
tar zxvf glog-0.3.3.tar.gz
cd glog-0.3.3
./configure
make && make install
# gflags
wget https://github.com/schuhschuh/gflags/archive/master.zip
unzip master.zip
cd gflags-master
mkdir build && cd build
export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1
make && make install
# lmdb
git clone https://github.com/LMDB/lmdb
cd lmdb/libraries/liblmdb
make && make install
Note that glog does not compile with the most recent gflags version (2.1), so before that is resolved you will need to build with glog first.
CUDA: Install via the NVIDIA package instead of yum to be certain of the library and driver versions. Install the library and latest driver separately; the driver bundled with the library is usually out-of-date. + CentOS/RHEL/Fedora:
BLAS: install ATLAS by sudo yum install atlas-devel or install OpenBLAS or MKL for better CPU performance. For the Makefile build, uncomment and set BLAS_LIB accordingly as ATLAS is usually installed under /usr/lib[64]/atlas).
Python (optional): if you use the default Python you will need to sudo yum install the python-devel package to have the Python headers for building the pycaffe wrapper.
############ anaconda
bash ..../Anaconda-xxxx.sh
# place install at /local/anaconda-xxxx
# cd /local
# ln -s anaconda anaconda-xxxx
conda init # post install init
conda install -c plotly plotly # install plotly etc packages