Ubuntu Installation Notes #3


Following on from my previous notes, here’s some more. Again, if this isn’t interesting exits are located to the front, rear and sides. You may have to go backwards to reach the nearest exit.

Mail

apt-get install postfix procmail
Copy the main.cf file over, then as a test send a mail to an external address using “mail”.

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
 
 
# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
 
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
 
# appending .domain is the MUA's job.
append_dot_mydomain = no
 
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
 
readme_directory = no
 
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
 
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
 
myhostname = home.piku.org.uk
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = home.piku.org.uk, smeg.piku.lan, localhost.piku.lan, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

Gmail backups

apt-get install getmail4
Using the gmail-backup script which is in /data/backups/scripts/gmail-backup.sh
nano -w /etc/cron.d/james
Add the following:
7,17,27,37,47,57 * * * * james /data/backups/scripts/gmail-backup.sh

Automated backup scripts

nano -w /etc/cron.d/james
Add the following:
40 04 * * * james /data/backups/scripts/master-backup.sh
Then visudo and:

james ALL=(ALL) NOPASSWD:/bin/tar
james ALL=(ALL) NOPASSWD:/usr/bin/rsync

Mysql (2)

Since I’m using the AutoMySQLBackup script now, rather than dumping the entire database, restoring requires a little more effort. The following for each table to restore should do it, including the “mysql” table.
bzip2 -dc gallery2_2010-06-25_04h42m.Friday.sql.bz2 | mysql -u root -p
Don’t forget to do a “mysql_upgrade –force -p” too at the end.

Firefly/mt-daapd media server

apt-get install mt-daapd
Copy the /etc/mt-daapd.conf file from backup and restart the service… There is more information in this blog post.

Cacti

After installing Cacti, installing the database tables and making sure the apache config is correct seems to be enough. Also install snmpd and copy the config file from backup. If you’ve done this right, the graphs should appear (but will be empty, which is probably for the best, it’s a new server after all). Graphs not appearing means snmpd isn’t working.

TorrentfluxB4rt

Copy /etc/torrentflux from backup, symlink the apache config file into /etc/apache2/conf.
Copy the modified transmission from /usr/local/bin (if you don’t have these – i.e you’re not me – then details on how to create them are on this blog)

Logwatch

apt-get install logwatch

Screen

This should be safe inside your home directory, but here is the .screenrc
hardstatus alwayslastline "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %Y/%m/%d %0c:%s "
vbell off
nonblock on

I think that’ll do for now.

About James

I'm just a person who likes writing software in their spare time. I'm not an "indie games developer" and am not trying to escape my day job and live in the happy world of games dev. I'm more like one of those people that used to write games in their spare time in the 80s. My stuff would be PD or Shareware if this were the 80s or 90s. It's good to comment on the posts in here :)