upgrade_notes:bt02srv_january_2011
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| upgrade_notes:bt02srv_january_2011 [2011/02/21 12:28] – [System tweaks and cleanup] aorth | upgrade_notes:bt02srv_january_2011 [2011/12/01 08:42] (current) – removed aorth | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== bt02srv upgrade notes ====== | ||
| - | The '' | ||
| - | ===== Backup ===== | ||
| - | ==== Existing system files ==== | ||
| - | Manually copy several system directories to a safe location just to be safe. These will be useful when setting system services up after the installation. | ||
| - | < | ||
| - | sudo cp -a /etc /opt /var/www /boot /root / | ||
| - | ==== List of installed packages ==== | ||
| - | Capture a list of all currently-installed packages, just in case. | ||
| - | < | ||
| - | |||
| - | ===== Installation ===== | ||
| - | We're installing Ubuntu 10.04 Server x86_64 LTS (Long-term support). | ||
| - | |||
| - | During installation make sure use " | ||
| - | |||
| - | ===== Post installation ===== | ||
| - | |||
| - | ==== Run all upgrades ==== | ||
| - | After installation it is a good idea to immediately install all software updates. | ||
| - | < | ||
| - | $ sudo apt-get dist-upgrade | ||
| - | $ sudo reboot</ | ||
| - | |||
| - | ==== Install RAID tools ==== | ||
| - | We need to install the tools requires to mount the software RAID 5. | ||
| - | < | ||
| - | * plug in RAID tower eSATA | ||
| - | * reboot (probably optional) | ||
| - | < | ||
| - | $ sudo mount /dev/md0 /mnt | ||
| - | $ sudo mv / | ||
| - | $ sudo cp / | ||
| - | * add /dev/md0 to fstab | ||
| - | * reboot to test | ||
| - | |||
| - | ===== Install system packages ===== | ||
| - | Some system packages we might need later on (to build perl modules, for example). | ||
| - | |||
| - | < | ||
| - | |||
| - | ====== SSH Keys ====== | ||
| - | Copy the system' | ||
| - | < | ||
| - | sudo service ssh stop | ||
| - | sudo cp / | ||
| - | sudo service ssh start</ | ||
| - | ====== Copy root's home folder ====== | ||
| - | < | ||
| - | cd / | ||
| - | mv root root.orig | ||
| - | mv root/ root.orig | ||
| - | cp -a / | ||
| - | |||
| - | ====== Install apt-cacher-ng ====== | ||
| - | Install the apt-cacher-ng package and make sure our existing package cache is owned by the new user and group. | ||
| - | < | ||
| - | $ sudo chown -R apt-cacher-ng: | ||
| - | ==== Edit configuration ==== | ||
| - | Edit the configuration to point the '' | ||
| - | |||
| - | /// | ||
| - | < | ||
| - | ==== Restart apt-cacher-ng daemon ==== | ||
| - | < | ||
| - | ====== BackupPC ====== | ||
| - | ==== Install BackupPC from apt ==== | ||
| - | < | ||
| - | (automatically-generated password: 0FY25aM2) | ||
| - | |||
| - | Change the password for the '' | ||
| - | < | ||
| - | |||
| - | ==== BackupPC home directory ==== | ||
| - | < | ||
| - | sudo mv backuppc/ backuppc.orig | ||
| - | sudo ln -s / | ||
| - | ==== Restore configuration ==== | ||
| - | < | ||
| - | sudo cp / | ||
| - | sudo cp / | ||
| - | sudo chown -R backuppc: | ||
| - | sudo chown -R backuppc: | ||
| - | sudo usermod -s /bin/bash backuppc | ||
| - | ps aux | grep " | ||
| - | sudo killall -HUP 7442</ | ||
| - | |||
| - | ==== Web interface authentication ==== | ||
| - | We'll point BackupPC' | ||
| - | |||
| - | ==== Install AuthenMSAD ==== | ||
| - | < | ||
| - | sudo cpan | ||
| - | install Apache2:: | ||
| - | exit</ | ||
| - | |||
| - | ==== Set up Apache to use AD auth ==== | ||
| - | < | ||
| - | |||
| - | < | ||
| - | AuthType Basic | ||
| - | |||
| - | PerlAuthenHandler Apache2:: | ||
| - | PerlSetVar MSADDomain ilri.cgiarad.org | ||
| - | PerlSetVar MSADServer 172.26.0.218 | ||
| - | |||
| - | require valid-user | ||
| - | #require user aorth akihara</ | ||
| - | ==== Enable the Apache module ==== | ||
| - | < | ||
| - | sudo apache2ctl graceful</ | ||
| - | ===== Email alerts ===== | ||
| - | BackupPC can send emails to notify of failed backups, etc. We will use postfix' | ||
| - | |||
| - | Postfix is installed by default when you install BackupPC, but it's not configured. | ||
| - | < | ||
| - | |||
| - | After that the emails should be working. | ||
| - | < | ||
| - | / | ||
| - | |||
| - | ===== Redmine ===== | ||
| - | ==== Install system dependencies ==== | ||
| - | < | ||
| - | ==== Install ruby dependencies ==== | ||
| - | < | ||
| - | $ sudo apt-get install libsqlite3-dev | ||
| - | $ sudo gem install sqlite3-ruby | ||
| - | $ sudo gem install fastthread | ||
| - | $ sudo gem install -v=0.4.2 i18n</ | ||
| - | ==== Copy existing Redmine installation back ==== | ||
| - | < | ||
| - | ==== Test using the standalone Ruby web server ==== | ||
| - | < | ||
| - | |||
| - | ====== Passenger (mod_rails) ====== | ||
| - | Install Phusion Passenger, aka " | ||
| - | |||
| - | < | ||
| - | wget -q -O - http:// | ||
| - | sudo apt-get update | ||
| - | sudo apt-get install libapache2-mod-passenger</ | ||
| - | |||
| - | ==== Configuration ==== | ||
| - | Create /// | ||
| - | < | ||
| - | RailsEnv production | ||
| - | |||
| - | < | ||
| - | AllowOverride all | ||
| - | Options -MultiViews | ||
| - | #Options Indexes ExecCGI FollowSymLinks | ||
| - | Order allow,deny | ||
| - | Allow from all | ||
| - | </ | ||
| - | |||
| - | ==== Create symbolic link to redmine ==== | ||
| - | < | ||
| - | ====== Apache SSL ====== | ||
| - | Force all HTTP -> HTTPS using '' | ||
| - | |||
| - | ===== Enable Apache modules ====== | ||
| - | < | ||
| - | |||
| - | ===== Copy SSL settings ===== | ||
| - | Copy the keys and Apache configuration for SSL from the old machine. | ||
| - | |||
| - | The "snake oil" certificate is the self-signed certificate we generated ourselves. | ||
| - | |||
| - | < | ||
| - | sudo cp -a /etc/ssl / | ||
| - | cp / | ||
| - | cp / | ||
| - | ===== Set up redirect for HTTP -> HTTPS ===== | ||
| - | /// | ||
| - | < | ||
| - | RewriteEngine On | ||
| - | RewriteCond %{HTTPS} off | ||
| - | # rewrite only trac login pages to HTTPS | ||
| - | # | ||
| - | # grab the request minus the / (we place a slash in the rewritten URL) | ||
| - | RewriteRule ^/(.*)$ https:// | ||
| - | </ | ||
| - | * add " | ||
| - | * Restart Apache | ||
| - | * < | ||
| - | ====== git repositories ====== | ||
| - | Set up git repositories from the old system by creating a '' | ||
| - | *< | ||
| - | adduser --system --group --shell /bin/bash --disabled-password --home / | ||
| - | cp -a backup.0/ | ||
| - | chown -R git:git / | ||
| - | |||
| - | ====== Add users from old system ====== | ||
| - | Here I add a user for Solomon Kihara: | ||
| - | * < | ||
| - | $ sudo adduser --shell /bin/bash --home / | ||
| - | $ sudo chown -R akihara: | ||
| - | $ sudo gpasswd -a akihara admin</ | ||
| - | |||
| - | ====== Automatic security updates ====== | ||
| - | Installed [[: | ||
| - | ====== System tweaks and cleanup ====== | ||
| - | * add '' | ||
| - | * Remove '' | ||
| - | * < | ||
| - | * Remove unneeded/ | ||
| - | * < | ||
upgrade_notes/bt02srv_january_2011.1298291330.txt.gz · Last modified: by aorth
