Difference between revisions of "SAC:Debian System Administration"

From OSGeo
Jump to navigation Jump to search
(Takes this as a start and try to *migrate* related content here)
 
(Sudo)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
''Take this as a start and try to '''migrate''' related content here.''
 +
 
= Upgrading OSGeo Debian6 (Squeeze) VM's to Debian7 (Wheezy) =
 
= Upgrading OSGeo Debian6 (Squeeze) VM's to Debian7 (Wheezy) =
 +
''The procedure to upgrade to Debian8 or Debian9 is pretty similar.''
 +
 +
=== NOTE ===
 +
 +
Some of the "aptitude"-commands suggest removal of numerous packages.
  
== NOTE: ==
 
Some of the "aptitude"-commands suggest removal of numerous packages
 
 
Do not accept these suggestions but instead ask Aptitude for better ones, which, in most cases, replace removal of a package by upgrading.
 
Do not accept these suggestions but instead ask Aptitude for better ones, which, in most cases, replace removal of a package by upgrading.
 +
 
If you can't avoid removing packages - installing/upgrading "apt-transport-https" doesn't work without - , then make sure you understand which ones are being removed.
 
If you can't avoid removing packages - installing/upgrading "apt-transport-https" doesn't work without - , then make sure you understand which ones are being removed.
 
Make a note and check, which ones require later re-installation (apt-listchanges) and which ones are obsolete.
 
Make a note and check, which ones require later re-installation (apt-listchanges) and which ones are obsolete.
  
* First, make sure required Debian keys are in place to pull package lists
+
=== Procedure ===
  
 +
* First, make sure required Debian keys are in place to pull package lists<br />
 
~# aptitude install debian-archive-keyring
 
~# aptitude install debian-archive-keyring
  
* Upgrade basic foundation to prevent later version mismatches
+
* Upgrade basic foundation to prevent later version mismatches<br />
 
 
 
~# aptitude install libc6 dpkg locales locales-all
 
~# aptitude install libc6 dpkg locales locales-all
  
* Be future-proof, will upgrade quite a few dependencies
+
* Upgrade encryption<br />
 +
~# aptitude install openssl openssl-blacklist openssl-blacklist-extra openssh-client openssh-server openssh-blacklist openssh-blacklist-extra
  
 +
* Be future-proof, will upgrade quite a few dependencies<br />
 
~# aptitude install apt apt-transport-https
 
~# aptitude install apt apt-transport-https
  
* These may get lost when introducing "apt-transport-https"
+
* These may get lost when introducing "apt-transport-https"<br />
 
 
 
~# aptitude install aptitude apt-listchanges libapt-pkg-perl python-apt
 
~# aptitude install aptitude apt-listchanges libapt-pkg-perl python-apt
  
* Finally, upgrade
+
* Estimate, if there'll be sufficient disk space after downloading all upgrade packages<br />
 +
~# aptitude dist-upgrade -d
  
 +
* Finally, upgrade<br />
 
~# aptitude dist-upgrade
 
~# aptitude dist-upgrade
  
== Extras: ==
+
* Take extra care for having a working GRUB on OSGeo's VM's<br />
* It is not mandatory to upgrade Trac, but we need to make it available to the default Python.
+
~# aptitude install grub-legacy<br />
Unpack current Trac stable release into temp directory and install:
+
~# grub-install --recheck /dev/vda<br />
 +
~# update-grub
 +
 
 +
=== Extra ===
 +
 
 +
==== Software: Trac ====
 +
 
 +
* It is not mandatory to upgrade Trac, but we need to make it available to the default Python. Unpack current Trac stable release into temp directory and install:
  
 
/tmp/Trac-1.2.2# python ./setup.py install --prefix=/usr/local
 
/tmp/Trac-1.2.2# python ./setup.py install --prefix=/usr/local
  
* Do likewise with the plugins listed at: https://wiki.osgeo.org/wiki/Trac#Plugins
+
* Do likewise with the following [[Trac#Plugins|Trac Plugins]]:
/tmp/tracldapemailresolverplugin# python setup.py install
+
 
/tmp/tracstats-master# python setup.py install
+
/tmp/tracldapemailresolverplugin# python setup.py install<br />
/tmp/spam-filter# python setup.py install
+
/tmp/tracstats-master# python setup.py install<br />
/tmp/spam-filter/Doxygen# python setup.py install
+
/tmp/spam-filter# python setup.py install<br />
/tmp/sectioneditplugin/1.2# python setup.py install
+
/tmp/spam-filter/Doxygen# python setup.py install<br />
 +
/tmp/sectioneditplugin/1.2# python setup.py install<br />
 
/tmp/sectioneditplugin/tocmacro/0.11# python setup.py install
 
/tmp/sectioneditplugin/tocmacro/0.11# python setup.py install
  
* While we're at it, upgrading PostgreSQL is usually a good idea as long as PostGIS isn't being used
+
==== Software: PostgreSQL ====
  
~# aptitude install postgresql-10 postgresql-client-10 postgresql-contrib
+
* While we're at it, upgrading PostgreSQL is usually a good idea as long as PostGIS isn't being used.
~# pg_dropcluster --stop 10 main
+
~# aptitude install postgresql-10 postgresql-client-10 postgresql-contrib<br />
 +
~# pg_dropcluster --stop 10 main<br />
 
~# pg_upgradecluster 9.5 main
 
~# pg_upgradecluster 9.5 main
  
*
+
==== Misc ====
 +
 
 +
* Not directly related to the upgrade, but required to let "awstats" read Apache log files (unless someone messes with their permissions):
  
 
~# adduser www-data adm
 
~# adduser www-data adm
  
* Remove python2.5, libdb4.8 and related packages
+
=== Cleanup ===
 +
* Remove python2.5, libdb4.8 and related packages.<br />
 
Remove /usr/local/lib/python2.5/
 
Remove /usr/local/lib/python2.5/
  
* Check for old GCC packages as well as packages containing "squeeze" in the version tag
+
* Check for old GCC packages as well as packages containing "squeeze" in the version tag and remove appropriately.
 +
 
 +
* For backwards compatibility reasons, a ancient "sudo" package was kept on some VM's. Please revise "/etc/apt/preferences.d/sudo.pref", preferrably remove it and port the sudoers file accordingly.

Latest revision as of 15:04, 3 March 2018

Take this as a start and try to migrate related content here.

Upgrading OSGeo Debian6 (Squeeze) VM's to Debian7 (Wheezy)

The procedure to upgrade to Debian8 or Debian9 is pretty similar.

NOTE

Some of the "aptitude"-commands suggest removal of numerous packages.

Do not accept these suggestions but instead ask Aptitude for better ones, which, in most cases, replace removal of a package by upgrading.

If you can't avoid removing packages - installing/upgrading "apt-transport-https" doesn't work without - , then make sure you understand which ones are being removed. Make a note and check, which ones require later re-installation (apt-listchanges) and which ones are obsolete.

Procedure

  • First, make sure required Debian keys are in place to pull package lists

~# aptitude install debian-archive-keyring

  • Upgrade basic foundation to prevent later version mismatches

~# aptitude install libc6 dpkg locales locales-all

  • Upgrade encryption

~# aptitude install openssl openssl-blacklist openssl-blacklist-extra openssh-client openssh-server openssh-blacklist openssh-blacklist-extra

  • Be future-proof, will upgrade quite a few dependencies

~# aptitude install apt apt-transport-https

  • These may get lost when introducing "apt-transport-https"

~# aptitude install aptitude apt-listchanges libapt-pkg-perl python-apt

  • Estimate, if there'll be sufficient disk space after downloading all upgrade packages

~# aptitude dist-upgrade -d

  • Finally, upgrade

~# aptitude dist-upgrade

  • Take extra care for having a working GRUB on OSGeo's VM's

~# aptitude install grub-legacy
~# grub-install --recheck /dev/vda
~# update-grub

Extra

Software: Trac

  • It is not mandatory to upgrade Trac, but we need to make it available to the default Python. Unpack current Trac stable release into temp directory and install:

/tmp/Trac-1.2.2# python ./setup.py install --prefix=/usr/local

/tmp/tracldapemailresolverplugin# python setup.py install
/tmp/tracstats-master# python setup.py install
/tmp/spam-filter# python setup.py install
/tmp/spam-filter/Doxygen# python setup.py install
/tmp/sectioneditplugin/1.2# python setup.py install
/tmp/sectioneditplugin/tocmacro/0.11# python setup.py install

Software: PostgreSQL

  • While we're at it, upgrading PostgreSQL is usually a good idea as long as PostGIS isn't being used.

~# aptitude install postgresql-10 postgresql-client-10 postgresql-contrib
~# pg_dropcluster --stop 10 main
~# pg_upgradecluster 9.5 main

Misc

  • Not directly related to the upgrade, but required to let "awstats" read Apache log files (unless someone messes with their permissions):

~# adduser www-data adm

Cleanup

  • Remove python2.5, libdb4.8 and related packages.

Remove /usr/local/lib/python2.5/

  • Check for old GCC packages as well as packages containing "squeeze" in the version tag and remove appropriately.
  • For backwards compatibility reasons, a ancient "sudo" package was kept on some VM's. Please revise "/etc/apt/preferences.d/sudo.pref", preferrably remove it and port the sudoers file accordingly.