hints:misc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
hints:misc [2023/07/08 20:57] – [Building BGPDUMP] philip | hints:misc [2023/08/19 07:20] (current) – [Building a Looking Glass] philip | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Building BGPDUMP ===== | ===== Building BGPDUMP ===== | ||
+ | |||
+ | [[https:// | ||
First off, we clone the git repo locally. Go to the place where you normally do your development work (for example, **/ | First off, we clone the git repo locally. Go to the place where you normally do your development work (for example, **/ | ||
Line 37: | Line 39: | ||
which will put **bgpdump** into **/ | which will put **bgpdump** into **/ | ||
+ | |||
+ | You can now take your MRT files, eg as produce by [[http:// | ||
+ | |||
+ | ===== Building a Looking Glass ===== | ||
+ | |||
+ | These instructions cover how to put together the [[https:// | ||
+ | |||
+ | First off, grab the few files you need off the repo - you could clone it, but there are only a few files, and they haven' | ||
+ | |||
+ | Assuming a basic install of Ubuntu 22.04, we need to add a few packages, including a compiler. | ||
+ | < | ||
+ | sudo apt install apache2 make gcc libexpat1-dev | ||
+ | </ | ||
+ | |||
+ | Next we need to install a few extra perl modules to support the looking glass. Assuming we don't have CPAN already set up, we need to do: | ||
+ | < | ||
+ | cpan App:: | ||
+ | </ | ||
+ | This installs the basic CPAN environment to make adding in modules simpler. Once the CPAN environment is in place, you then need to run: | ||
+ | < | ||
+ | cpan install CPAN:: | ||
+ | cpan install XML::Parser | ||
+ | cpan install Net::Telnet | ||
+ | </ | ||
+ | which will install the XML parser and telnet support for Perl. This should all complete successfully - you'll see these two packages and all the supporting modules being automatically installed. | ||
+ | |||
+ | With the Apache2 webserver installed in its default configuration, | ||
+ | < | ||
+ | sudo mkdir -p / | ||
+ | </ | ||
+ | And then copy the required components into place. | ||
+ | < | ||
+ | sudo cp -p favicon.ico index.html lg.cgi lg.conf / | ||
+ | </ | ||
+ | |||
+ | Next we need to create the Apache site configuration: | ||
+ | < | ||
+ | cd / | ||
+ | </ | ||
+ | and create a new config file with the URL of your site, for example, **lg.my.site.conf** with the following contents: | ||
+ | < | ||
+ | < | ||
+ | ServerName | ||
+ | |||
+ | DocumentRoot / | ||
+ | |||
+ | Alias / | ||
+ | Alias /libraries / | ||
+ | ScriptAlias /lg / | ||
+ | |||
+ | < | ||
+ | AllowOverride None | ||
+ | Options +ExecCGI | ||
+ | AddHandler cgi-script .cgi .pl | ||
+ | Require all granted | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | We need to turn on support for CGI: | ||
+ | < | ||
+ | sudo a2enmod cgid | ||
+ | </ | ||
+ | |||
+ | Then we need to enable the site: | ||
+ | < | ||
+ | sudo a2ensite lg.my.site | ||
+ | </ | ||
+ | and then restart Apache2 for it to go live: | ||
+ | < | ||
+ | sudo systemctl restart apache2 | ||
+ | </ | ||
hints/misc.1688813866.txt.gz · Last modified: 2023/07/08 20:57 by philip