Install and solve SNORT source code in Ubuntu9.10

Source: Internet
Author: User
Install and solve the SNORT source code in Ubuntu9.10: first, install Libpcap in Linux. refer to the following article. libpcap is a network packet capture function package on unix/linux platforms. Libpcap provides a system-independent user-level network packet capture interface, fully considering the portability of applications. The Libpcap package can be downloaded from www.tcpdump.org/. then, install the following three commands, as shown in

Install and solve the SNORT source code in Ubuntu 9.10:

FirstTo correctly install Linux Libpcap, refer to the following article.

Libpcap is a network packet capture function package on unix/linux platforms.

Libpcap provides a system-independent user-level network packet capture interface, fully considering the portability of applications. The Libpcap package can be downloaded from www.tcpdump.org/And then installed by executing the following three commands. However, if you want libpcap to work properly on linux, you must enable the kernel to support the "packet" protocol, that is, enable CONFIG_PACKET when compiling the kernel (the option is enabled by default ).
Then, run the following command:
(Sudo)./configure
(Sudo) make
Sudo make install
Note: The brackets are optional.

Well, let's talk about it. Now let's get started.

1. Open the web site: www.tcpdump.org/download the libpcap-1.0.0.tar.gz (512.0KB) package, unzip the file with the command tar zxvf libpcap-1.0.0.tar.gz, and put it in a custom installation directory.
2. Open the web site: flex.sourceforge.net/download the flex-2.5.35.tar.gz (1.40 MB) package, decompress the file through the tar zxvf flex-2.5.35.tar.gz, and put it in the preceding custom installation directory.
Note: If this file is not compiled and installed, an error message "configure: error: Your operating system's lex is insufficient to compile libpcap." appears when you compile and install libpcap.
3. Open the URL: ftp.gnu.org/gnu/bison/ download the bison-2.4.1.tar.gz (1.9 MB) package, unzip the file through the tar zxvf bison-2.4.1.tar.gz, and put it in the aforementioned custom installation directory.
Note: If this file is not compiled and installed, "configure: WARNING: don't have both flex and bison" will appear when libpcap is compiled and installed; reverting to lex/yacc checking for capable lex... insufficient "error message.
4. Open the web site: ftp.gnu.org/gnu/m4/ download the m4-1.4.13.tar.gz (1.2 MB) package, unzip the file through the tar zxvf m4-1.4.13.tar.gz, and put it in the above custom installation directory.
Note: If this file is not compiled and installed, the "configure: error: GNU M4 2.4.1 is required" error message will appear when you compile and install bison-1.4.
Then go to the directory m4-1.4.13, bison-2.4.1, flex-2.5.35, libpcap-1.0.0 and execute the following command:
(Sudo)./configure
(Sudo) make
(Sudo) make install
Note: The brackets are optional.

After the command is complete, libpcap network packet capture interface can be used.
Note: The above versions are the latest version. We do not recommend that you use the same version as the one I listed. We recommend that you use the latest version! The installation process is the same.

In addition:
When compiling source files, you need to specify the Link Library for compiling.
# Gcc test. c-o test-lpcap
Note: When running such programs, you must run them as root because the system does not allow non-root users to perform network operations.

SecondDownload the source code pcre-8.00.tar.bz2 and decompress it. Then run the following commands in sequence:./configure, make check, and sudo make install to install the dependency file.

Finally, go to the directory where the Snort source code is located and execute./configure, make check, and sudo make install to install Snort.

Success ~!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.