Download the Snort source from:

http://www.snort.org/releases/snort-1.8.2.tar.gz

------------
You'll need "lex" and "yacc" or the gnu versions "flex" and "bison". If you receive errors while building snort or libpcap that refer to "lex" or "yacc", you can build the gnu versions by following the directions in "INSTALL-flexbison"


------------
You'll need libpcap, if you receive errors stating this while trying to build snort, follow the instructions in "INSTALL-libpcap"

------------


# tar zxvf snort-1.8.2.tar.gz

# cd snort-1.8.2

To see all configure options:
# ./configure --help

# ./configure --with-mysql=/usr/local/mysql/

# make
# make install


You should now test your snort binary with the following command:
# snort -T

 ------------
if you receive the following error:

snort: error while loading shared libraries: libmysqlclient.so.10: cannot open shared object file: No such file or directory

then you can perform the following workaround:

# cp /usr/local/mysql/lib/mysql/libmysqlclient.so.10 /usr/lib
# /sbin/ldconfig

 ------------
if you receive an error such as :

fopen: No such file or directory
spp_portscan: logfile open error (/var/log/snort/portscan.log)

you can get fix this by executing:

# mkdir /var/log/snort

 ------------
if you receive an error such as :

ERROR: Unable to open rules file:...

then don't worry... snort is built just fine!



