2,187
edits
(→Troubleshooting: Added "Reboot Required?") |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Depreciated|category=Ubuntu}} | |||
== Initial Setup == | == Initial Setup == | ||
Much of this section is ''borrowed'' from http://www.howtoforge.com/perfect-server-ubuntu8.04-lts and http://www.howtoforge.com/how-to-install-ubuntu8.04-with-software-raid1, they are well worth a read! | Much of this section is ''borrowed'' from http://www.howtoforge.com/perfect-server-ubuntu8.04-lts and http://www.howtoforge.com/how-to-install-ubuntu8.04-with-software-raid1, they are well worth a read! | ||
Line 161: | Line 163: | ||
#* <code> server 2.europe.pool.ntp.org </code> | #* <code> server 2.europe.pool.ntp.org </code> | ||
#* <code> server 3.europe.pool.ntp.org </code> | #* <code> server 3.europe.pool.ntp.org </code> | ||
# Restart the NTP service | # Restart the NTP service | ||
#* <code> service ntp restart </code> | #* <code> service ntp restart </code> | ||
Line 231: | Line 232: | ||
== Packages == | == Packages == | ||
=== Commands === | === Commands === | ||
{| | {|class="vwikitable" | ||
|- | |- | ||
! Command !! Purpose | ! Command !! Purpose | ||
|- | |- | ||
Line 261: | Line 262: | ||
Changes are applied immediately. Once you've added your first rule there's an implied deny all. | Changes are applied immediately. Once you've added your first rule there's an implied deny all. | ||
{| | {|class="vwikitable" | ||
|- | |- | ||
! Command !! Purpose | ! Command !! Purpose | ||
|- | |- | ||
Line 447: | Line 448: | ||
# Get the module's package name (eg for Net::XWhois) | # Get the module's package name (eg for Net::XWhois) | ||
# * <code> sudo apt-cache search perl net::xwhois </code> | #* <code> sudo apt-cache search perl net::xwhois </code> | ||
# Then install the package | # Then install the package | ||
# * <code> sudo apt-get install libnet-xwhois-perl </code> | #* <code> sudo apt-get install libnet-xwhois-perl </code> | ||
=== Check Module(s) Installed === | |||
To check for a specific module use (checking for <code>Net::XWhois</code>) | |||
perl -MNet::XWhois -e "print \"Module installed.\\n\";" | |||
To list all installed modules | |||
perl -MFile::Find=find -MFile::Spec::Functions -Tlwe \ | |||
'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC' | |||
Source: http://www.linuxquestions.org/questions/linux-general-1/how-to-list-all-installed-perl-modules-216603/ | |||
== Python == | == Python == | ||
Line 525: | Line 536: | ||
** Updates can only be added in chronological order, therefore you may need to delete the data file for a particular month, and rebuild it entirely. | ** Updates can only be added in chronological order, therefore you may need to delete the data file for a particular month, and rebuild it entirely. | ||
Scheduled updates are configured in <code> /etc/cron.d/awstats </code> | Scheduled updates are configured in <code> /etc/cron.d/awstats </code> | ||
== Syslog to MySQL Database == | |||
This procedure achieves three things... | |||
# Allows remote hosts to use the local server as a syslog destination | |||
# Directs syslogs to MySQL database on the server | |||
# Allows viewing of syslogged events through [http://loganalyzer.adiscon.com/ LogAnalyser] web front end | |||
...it is assumed that you already have a local MySQL and Apache server running! | |||
# '''Set-up your server to send syslog messages to a MySQL database''' | |||
#* <code> apt-get install rsyslog-mysql </code> | |||
#* Enter the root password to your MySQL instance when prompted | |||
# '''Update the <code> rsyslog </code> config (<code>/etc/rsyslog.conf</code>) to receive syslog data, and to route messages through a queue''' | |||
## Uncoment the following.. | |||
##* <code>$ModLoad ommysql # load the output driver (use ompgsql for PostgreSQL)</code> | |||
##* <code>$ModLoad imudp # network reception</code> | |||
##* <code>$UDPServerRun 514 # start a udp server at port 514</code> | |||
## Add the following... | |||
##* <code>$WorkDirectory /rsyslog/work # default location for work (spool) files</code> | |||
##* <code>$ActionQueueType LinkedList # use asynchronous processing</code> | |||
##* <code>$ActionQueueFileName dbq # set file name, also enables disk mode</code> | |||
##* <code>$ActionResumeRetryCount -1 # infinite retries on insert failure</code> | |||
## Restart the service | |||
##* <code> service rsyslog restart </code> | |||
# '''Install LogAnalyser''' | |||
## Download latest build from http://loganalyzer.adiscon.com/downloads | |||
##* EG <code>wget http://download.adiscon.com/loganalyzer/loganalyzer-3.5.0.tar.gz</code> | |||
## Uncompress | |||
##* EG <code>tar xf loganalyzer-3.5.0.tar.gz</code> | |||
## Move the contents or <code>/src</code> to webserver | |||
##* EG <code> mkdir /var/www/syslog </code> | |||
##* EG <code> mv /src/* /var/www/syslog/ </code> | |||
## Move utility scripts to same folder | |||
##* EG <code> mv /contrib/* /var/www/syslog/ </code> | |||
## Make them both executable, | |||
##* EG <code> chmod +x /var/www/syslog/*.sh </code> | |||
## Run the config script in the directory | |||
##* EG <code> /var/www/syslog# ./configure.sh </code> | |||
## Browse to webpage | |||
##* EG http://your-www-svr/syslog/index.php | |||
## Ignore the error, and follow the link to install (configure) | |||
## Accept defaults until step 7, where you change the following | |||
##* Name of the Source - ''your name for the local syslog db'' | |||
##* Source Type - MySQL Native | |||
##* Database Name - Syslog | |||
##* Database Tablename - SystemEvents | |||
##* Database User - rsyslog | |||
##* Database Password - rsyslog | |||
## Config completed! | |||
== Troubleshooting == | == Troubleshooting == | ||
Line 565: | Line 624: | ||
To see which packages caused this to be set, inspect the contents of... | To see which packages caused this to be set, inspect the contents of... | ||
/var/run/reboot-required.pkgs | /var/run/reboot-required.pkgs | ||