blob: 9c6c82fafaecbdf30757e686aac1d4971384cb92 (
plain)
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
|
Autogenerated on 2012-11-29
from - https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Installation_with_CUDA_on_Ubuntu_server_1104
Installation with CUDA on Ubuntu server 11.04
THIS WOULD NOT WORK ON A VIRTUAL MACHINE!
This guide is written using:
Ubuntu Server 11.04
Linux ubuntu 2.6.38-8-generic x86_64 GNU/Linux
Pre installation requirements
apt-get update
apt-get upgrade
Get the CUDA toolkit
http://developer.nvidia.com/cuda-toolkit-40
Pick up the correct NVIDIA drivers for your card and system
http://www.nvidia.com/Download/index.aspx?lang=en-us
Go to your download directory
and chmod the 2 *.run files that you just downloaded.
Example:
chmod 655 cudatoolkit_4.0.17_linux_64_ubuntu10.10.run
chmod 655 NVIDIA-Linux-x86_64-280.13.run
sudo apt-get -y install libpcre3 libpcre3-dbg libpcre3-dev \
build-essential autoconf automake libtool libpcap-dev libnet1-dev \
libyaml-0-2 libyaml-dev zlib1g zlib1g-dev libcap-ng-dev libcap-ng0 \
make flex bison git
Run the cuda toolkit installation package:
sudo ./cudatoolkit_4.0.17_linux_64_ubuntu10.10.run
Close all windows and as you are logged in press:
Ctr+Alt+F1
Log in with your credentials
sudo -i
And enter your password
Stop the x server:
/etc/init.d/gdm stop
Uninstall xserver video drivers:
apt-get remove --purge xserver-xorg-video-nouveau
Go to the directory where you downloaded nvidia/cuda drivers.
Run the NVIDIA*******.run:
./NVIDIA********.run
Ok and yes your way out.
At some point it will ask you to make a special configuration file to disable a
"nouveau"
driver that the system is currently using and prevents the NVIDIA drivers to be
installed - say yes!
Reboot:
shutdown -r now
After reboot log in as you would normally through the GUI
Log in as you would normally.
Go to shell:
Ctrl+Alt+F1
Type in your credentials and pass
sudo -i
Stop the xserver again:
/etc/init.d/gdm stop
Run the NVIDIA driver again.
This time it would finish and be successful....
Reboot:
shutdown -r now
After start you would notice that the display has much better resolution - it
is a good thing.
Log in as you would normally.
Because the 11.04 Ubuntu comes with gcc version 4.5 by default we need to
install gcc 4.4 since we must use 4.4 for the cuda compilation:
apt-get install gcc-4.4 gcc-4.4-base g++-4.4
Then we switch and make ubuntu use the gcc 4.4 by default:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.5 40 --
slave /usr/bin/g++ g++ /usr/bin/g++-4.5
udo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 60 --
slave /usr/bin/g++ g++ /usr/bin/g++-4.4
We make sure that this is the case:
sudo update-alternatives --config gcc
""
update-alternatives --config gcc (as root)
There are 2 choices for the alternative gcc (providing /usr/bin/gcc).
* 0 /usr/bin/gcc-4.4 60 auto mode
1 /usr/bin/gcc-4.4 60 manual mode
2 /usr/bin/gcc-4.5 40 manual mode
Selection Path Priority Status
------------------------------------------------------------
Press enter to keep the current choice[*], or type selection number:
""
Suricata
Enter the following in your download directory:
git clone git://phalanx.openinfosecfoundation.org/oisf.git
cd oisf/
./autogen.sh
./configure --enable-gccprotect --enable-profiling --enable-cuda \
--with-cuda-includes=/usr/local/cuda/include --with-cuda-libraries=/usr/
local/cuda/lib64/
After that you should get the following result:
""
Suricata Configuration:
NFQueue support: no
IPFW support: no
PF_RING support: no
Prelude support: no
Unit tests enabled: no
Debug output enabled: no
Debug validation enabled: no
CUDA enabled: yes
DAG enabled: no
Profiling enabled: yes
GCC Protect enabled: yes
GCC march native enabled: yes
GCC Profile enabled: no
Unified native time: no
Non-bundled htp: no
PCRE sljit: no
""
make && make install
ldconfig
Proceed with Basic_Setup
After you start suricata , you should see cuda
example :
""
suricata -c suricata.yaml -i eth0
[12406] 13/8/2011 -- 10:14:39 - (suricata.c:622) <Info> (main) -- This is
Suricata version 1.1beta2 (rev b3f7e6a)
[12406] 13/8/2011 -- 10:14:39 - (util-cpu.c:171) <Info> (UtilCpuPrintSummary)
-- CPUs/cores online: 8
[12406] 13/8/2011 -- 10:14:39 - (util-cuda.c:4504) <Info>
(SCCudaPrintBasicDeviceInfo) -- GPU Device 1: GeForce 310M, 2
Multiprocessors, 1468MHz, CUDA Compute Capability 1.2...................
........................
""
|