Ubuntu Image Creation (THIS PAGE NEEDS UPDATING)
This TWIKI is current the standard for Research and GradPC images
*Note: The following two alternate documents are out as of date 16 Oct 2012
Ubuntu Releases
OLD documents
OldUbuntuImageNotes
Ubuntu Install Procedure
Before you install
Assumptions
- You need network access
- Windows Image has been installed first!
Install
- Do clean Install of Ubuntu X.XX with the AMD ALT CD - 32bit or 64bit
- Ignore network detection error and proceed
- Hostname: scspcxxx
- Manual disk partitioning and use /dev/sda5 for root
- Skip keyboard detection
- Create cscf-adm user (with /cscf-adm as home directory)
- Reboot when done
Post Install
Enable Automatic Updates
Machine Inventory
- After the machine is completely built and installed get an inventory of the hardware, settings and benchmarks
- sudo apt-get install hardinfo
- This creates a Gnome menu item Applications>System Tools>System Profiler and Benchmark
- Run it and save a report as either HTML or plain text
Users
- Create cscf-op user
- set root password - nomally this is the cscf-adm password
- create any other users
Ubuntu 10.04, 11.04, 11.10, 12.04 and 13.04
CS Specific Software and Configuration Updates
Ubuntu CSCF research image setup
Note: 10May2012: Phil using these instructions for Grad Workstation Linux creation.
LDAP - Active Directory
.
Scripting the Ubuntu install
Updated 25 June 2013 Tested on 13.04, 12.04LTS - May have minor issue with 10.04 .. 11.10 with Multimedia only
- See UbuntuScripts for additional documentation of scripts found in asimov:/coregroup1/images/ubuntu-scripts
- The following script will automatically update a *clean system to the combined CSCF standard except AD setup*
- You MUST be root to run the following scripts in a BASH shell window
-
Warning this ASSUMES you are setting up a clean install
- Some actions will overwrite config files examine the script first
- Location: cscf-adm@asimov:/coregroup1/images/ubuntu-scripts
- rsync -a cscf-adm@asimov:/coregroup1/images/ubuntu-scripts .
- cd ubuntu-scripts
- ./updates - answer yes - documentation for this script below
Automation
Script Source Files
25 June 2013 - ALWAYS get the latest files from ASIMOV cscf-adm@asimov:/coregroup1/images/ubuntu-scripts These are only for reference
Creating TWIKI docs from the updates2twiki script
- Get the scripts - previous steps and run
- make
- gcc updates2twiki.c -o updates2twiki
- ./updates2twiki -c -i updates -o twiki.txt
updates2twiki program options
- Usage: ./updates2twiki -c -i updates -o twiki.txt
- -i input file
- -o output file
- -c include each sections main "pause,if,else,fi" statements in the twiki.txt - see below
- Note: Running */updates2twiki -c -i updates -o twiki.txt is done automatically if you run make - see below
updates2twiki program syntax
*
Syntax of BASH keywords or functions recognized as input for the updates2twiki program
- What it does: The program reads a BASH shell script and interprets a specific set of keywords (shown below) to create twiki documentation*
- We show the BASH keyword and action in the table as follows:
- *Left side: BASH keyword, right side: how updates2twiki treats the BASH keyword when creating the twiki text
pause[_no|__yes] message... - starts a documentation section
- message is TWIKI title
- optionally displayed in twiki
if [ $? -eq 1 ] - optionally displayed in twiki
then
# === - starts or optionally terminates a documentation section
# - SHELL comment - verbatim
text - SHELL commands - verbatim
else - optionally displayed in twiki
# === - starts or optionally terminates a documentation section
# - SHELL comment - verbatim
text - SHELL commands - verbatim
fi - optionally displayed in twiki
END OF FILE - terminates all sections
- ) pause[_no|_yes] creates a header and starts a TWIKI verbatim section
- for pause_no if N is entered then return code of 1 is set
- for pause_yes if Y is entered then return code of 1 is set
- ) # === or pause or end of file - ends a verbatim section
- ) If any text is outside of a verbatim context it is ignored
updates script syntax
- *./updates [-y|-n] [-d]
- -y default answer is Y - if you hit enter or Y it will return with 1, else 0
- -n default answer is N - if you hit enter or N it will return with 0, else if Y return 1
- -d debug - only used for plain pause statements
pause[_no|__yes] message... displays message and waits for the user to type Y or N, Note Y=1, N=0
if [ $? -eq 1 ]
then
text - Yes section - SHELL commands
else - optional
text - NO section - SHELL commands
fi
START of updates script
- Note: update twiki.txt file the attachment table at the end of the section to update the included section below
- Not sure why we have to use the absolute path in the INCLUDE directive
Start of AUTOMATICALLY GENERATED section
- This section was created on: Tue Nov 26 19:40:33 2013
Update sources.list to mirror.cs
APT=/etc/apt/sources.list
# The new mirror site we want to use
MIRROR=mirror.cs.uwaterloo.ca
# Update Apt Repository Sources to use the CS sponsered local mirror
sed_file "s/..\.archive.ubuntu.com/$MIRROR/" "$APT"
# Update Package list
apt-get -y -q update >/dev/null 2>&1
apt-get -y -q install aptitude
Remove Network Manager Completely - Answer NO on laptops
*NOT USED BY DEFAULT*
apt-get -y purge network-manager-gnome network-manager-pptp network-manager-pptp-gnome
echo skipping
Make sure eth0 network interface is set to DHCP
echo After imaging eth0 can end up as a higher interface number
echo So Make sure the first interface ends up as eth0
echo Note: Change will take effect after rebooting
INTERFACES=/etc/network/interfaces
ETH0=`ifconfig -a | grep "^eth0"`
if [ -z "$ETH0" ]
then
echo "after reboot the main network will be eth0"
rm -f /etc/udev/rules.d/70-persistent-net.rules
fi
echo Update $INTERFACES if needed
ETH0=`grep "auto eth0" $INTERFACES >/dev/null`
if [ -z "$ETH0" ]
then
echo $INTERFACES already set to DHCP on eth0
else
echo "auto eth0" >>$INTERFACES
echo "iface eth0 inet dhcp" >>$INTERFACES
fi
DHCP Client update fix by Trevor Grove
# RT79425
# Trevor Grove
OPTION="option domain-search code 119 = string;"
# Note: dhclient.conf moves location between 10.04 and 11.04
# so we have to find it
DHCONF=`find /etc -type f -name dhclient.conf`
if [ -f "$DHCONF" ]
then
if grep "$OPTION" "$DHCONF" >/dev/null 2>&1
then
echo "$OPTION - ALREADY EXISTS "
else
echo "$OPTION;" >> "$DHCONF"
fi
else
echo "dhclient.conf file does not exist!"
fi
Disable Guest Account
# Phil Beldowski
OPTION="allow-guest=false"
LIGHTDM=/etc/lightdm/lightdm.conf
if [ -f "$LIGHTDM" ]
then
if grep "$OPTION" "$LIGHTDM" >/dev/null 2>&1
then
echo $OPTION - ALREADY EXISTS
else
echo "$OPTION" >> "$LIGHTDM"
fi
else
echo "$LIGHTDM file does not exist!"
fi
Allow manually typed userid entry at login
# Gordon Boerke
OPTION="greeter-show-manual-login=true"
LIGHTDM=/etc/lightdm/lightdm.conf
if [ -f "$LIGHTDM" ]
then
if grep "$OPTION" "$LIGHTDM" >/dev/null 2>&1
then
echo $OPTION - ALREADY EXISTS
else
echo "$OPTION" >> "$LIGHTDM"
fi
else
echo "$LIGHTDM file does not exist!"
fi
Allow unattended securitry updates
# Instal it
sudo apt-get install unattended-upgrades
# Enable it
dpkg-reconfigure -plow unattended-upgrades --default-priority
Add mozilla/thunderbird beta next repo - typically no
*NOT USED BY DEFAULT*
# Corrected Aug 30 2012
add-apt-repository ppa:mozillateam/firefox-next
add-apt-repository ppa:mozillateam/thunderbird-next
apt-get -y -q update >/dev/null 2>&1
Add medibuntu Repository
wget --no-check-certificate --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/`lsb_release -c -s`.list
apt-get -y -q update >/dev/null 2>&1
apt-get -y -q --allow-unauthenticated install medibuntu-keyring
apt-get -y -q update >/dev/null 2>&1
apt-get -y -q install app-install-data-medibuntu \
apport-hooks-medibuntu
Add Wine Repository
add-apt-repository ppa:ubuntu-wine/ppa
Add cononical Repository
add-apt-repository "deb http://archive.canonical.com/ `lsb_release -c -s` partner"
apt-get -y -q update >/dev/null 2>&1
Upgrade the system BEFORE we install any packages
# This permits fixes that did not get in the release to
# fix any issues in our install process later on in this script
aptitude -q -y safe-upgrade
Install debconf-utils so we can script installs
# This permits fixes that did not get in the release to
# fix any issues in our install process later on in this script
aptitude -q -y install debconf-utils
Install etckeeper so we can track /etc file changes
# This permits fixes that did not get in the release to
# fix any issues in our install process later on in this script
aptitude -q -y install etckeeper
Install apt-rdepends so we can kind what pakages depend on a package
# This permits fixes that did not get in the release to
# fix any issues in our install process later on in this script
aptitude -q -y install apt-rdepends
Install apt-file find the package a file belongs to even if not installed
# This permits fixes that did not get in the release to
# fix any issues in our install process later on in this script
aptitude -q -y install apt-rdepends
# Update its package list
apt-file update
Install Uwdir
aptitude -y -q install ldap-utils ldapscripts ldapvi
wget --no-check-certificate -q https://www.cs.uwaterloo.ca/twiki/pub/CF/UbuntuImageCreation/uwdir -O /usr/local/bin/uwdir
chmod 755 /usr/local/bin/uwdir
Install Will this System be part of AD - add Krbros and LDAP utils
*NOT USED BY DEFAULT*
# Note krb5-user also gets installed by Claytons script
aptitude -y -q install krb5-user libpam-krb5 libnss-ldap libpam-foreground
SSH and Remote Host Acce"> Install SSH and Remote Host Access
# See: https://help.ubuntu.com/community/SSHFS
# See: https://www.cs.uwaterloo.ca/twiki/view/CF/SshFs
aptitude -q -y --with-recommends install openssh-server \
sshfs openssh-client openssl sshmenu-gnome hotssh
SSH with local CS known h"> Update SSH with local CS known hosts
# Note: currently these ssh_known_hosts files are updated regularly three times per month.
wget --no-check-certificate -q -O /etc/ssh/ssh_known_hosts \
https://www.cs.uwaterloo.ca/cscf/software/ssh/data/ssh_known_hosts
wget --no-check-certificate -q -O /etc/ssh/ssh_known_hosts2 \
https://www.cs.uwaterloo.ca/cscf/software/ssh/data/ssh_known_hosts2
Add CSCF root key to root
# If root does not have a .ssh folder yet - make it
if [ ! -d /root/.ssh ]
then
mkdir -p /root/.ssh
chmod 700 /root/.ssh
fi
# NOTE We got they key on 1 Feb 2012 from cscf.cs
# Add cscf root PUBLIC key to the root authorized_keys2 file
# TODO Might want to consider where to get this key
SSHPUB=cscf-root-key.txt
SSHKEYS=/root/.ssh/authorized_keys2
# Check if the key is already there
if grep "`cat $SSHPUB`" $SSHKEYS >/dev/null
then
# echo has existing $SSHPUB in $SSHKEYS
echo -n
else
echo appending $SSHPUB to $SSHKEYS
cat $SSHPUB >> $SSHKEYS
fi
Install Sun Java
*NOT USED BY DEFAULT*
echo Sun Java is not available via updates and should not be used
# aptitude -y -q install sun-java6-bin sun-java6-jre sun-java6-plugin
Java,Perl,Python,TCL,TK Computer Languages
aptitude -q -y --with-recommends install openjdk-6-jdk openjdk-6-jre \
java-common java-wrappers perl perl-base perl-modules perlmagick \
python tcl tk
Acroread PDF
aptitude -q -y --with-recommends install acroread \
acroread-common acroread-fonts
# Non Existant
# acroread-plugins acroread-fonts acroread-dictionary-en
# acroread-l10n-en mozilla-acroread
Mail
#see CF.UbuntuEmail
echo Leave unconfigured local mail only for now
aptitude -q -y --with-recommends install bsdmainutils bsdutils postfix
Fonts
# aptitude -q -y --with-recommends install msttcorefonts ttf-mscorefonts-installer ttf-liberation x-ttcidfont-conf
echo we are haveing issues with MS fonts - so skipping install
echo - the updater keeps asking to fix them but never works
Install GNOME including Desktops
aptitude -q -y --with-recommends install gnome
Install Wine
# recommends creats a conflict
apt-get -q -y install wine
# aptitude -q -y --with-recommends install wine
Install Restricted Extras - Multimedia Suuport Base
apt-get -y -q install ubuntu-restricted-extras
Install Multimedia core support
# See http://smashingweb.ge6.org/things-to-do-after-installing-ubuntu-12-04-for-perfect-desktop/
# DVD
apt-get -q -y install libdvdread4
/usr/share/doc/libdvdread4/install-css.sh
apt-get -q -y install libdvdcss2 libdvdcss-dev
apt-get -q -y install mplayer mplayer-doc smplayer gnome-mplayer
apt-get -q -y install audacious
apt-get aptitude -q -y install clementine
# VLC
apt-get -q -y install vlc vlc-plugin-pulse
# Audacity
add-apt-repository ppa:audacity-team/daily
apt-get -y -q update >/dev/null 2>&1
apt-get -q -y install audacity lame libmp3lame0
# Handbreak
add-apt-repository ppa:stebbins/handbrake-snapshots
apt-get -y -q update >/dev/null 2>&1
apt-get -q -y install handbrake-gtk handbrake-cli
# XBMC
add-apt-repository ppa:team-xbmc
apt-get -y -q update >/dev/null 2>&1
apt-get -q -y install xbmc
# Openshot Video Editor
add-apt-repository ppa:jonoomph/openshot-edge
apt-get -y -q update >/dev/null 2>&1
apt-get -q -y install openshot openshot-doc
# GTKPOD
apt-get -q -y install gtkpod
# K3B - Blueray playing/burning
apt-get -q -y install k3b
# FFMpeg
apt-get -q -y install libxine1-ffmpeg gxine mencoder mpeg2dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 ffmpeg totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0 libjpeg-progs flac faac faad sox ffmpeg2theora libmpeg2-4 uudeview flac libmpeg3-1 mpeg3-utils mpegdemux liba52-0.7.4-dev libquicktime2
# Gstreamer
apt-get -q -y install gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-gnonlin gstreamer0.10-sdl gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly totem-plugins-extra gstreamer-dbus-media-service gstreamer-tools
# TOTEM
apt-get -q -y --with-recommends install \
totem totem-common totem-gstreamer totem-mozilla totem-plugins
apt-get -q -y --with-recommends install \
aacgain aacplusenc alsa-firmware \
pulseaudio pulseaudio-module-zeroconf \
pulseaudio-utils mencoder \
realplayer
Install Browsers
aptitude -q -y --with-recommends install chromium-browser firefox thunderbird \
chromium-codecs-ffmpeg-extra chromium-codecs-ffmpeg-nonfree \
ca-certificates ca-certificates-java
Install Flash
# or flashplugin-nonfree
aptitude -q -y --with-recommends install flashplugin-installer
Install Google Earth
aptitude -q -y --with-recommends install googleearth-package
Remote Desktop Utils
aptitude -q -y --with-recommends install xtightvncviewer xvnc4viewer
# Not on laptops
# vino vinagre xrdp
System Testing and Monitoring
aptitude -q -y --with-recommends install cpudyn sensors-applet cpuburn \
fancontrol hdparm hwinfo laptop-detect lm-sensors lshw \
notification-daemon notify-osd notify-osd-icons pm-utils \
smartmontools testdisk sysstat iotop hardinfo
Compilers and Development
aptitude -q -y --with-recommends install build-essential fakeroot gdb \
make patch git rcs subversion subversion-tools
OCAML Computer Languages
aptitude -q -y --with-recommends install ocaml ocaml-base ocaml-base-nox \
ocaml-compiler-libs ocaml-findlib ocaml-interp \
ocaml-native-compilers ocaml-nox ocaml-batteries-included \
ocaml-core ocaml-findlib-wizard ocaml-libs ocaml-mode \
ocaml-tools ocaml-ulex ocaml-ulex08 ocamldsort ocamlduce \
ocamlduce-base ocamlgraph-editor ocamlmakefile ocamlviz \
ocamlwc ocamlweb ocaml-book-en ocaml-doc
Install File System Utils
aptitude -q -y --with-recommends install reiserfsprogs ntfs-3g ntfsprogs \
rsnapshot rsync lvm2 mtools smbclient smbfs fuse-utils \
dosfstools chkconfig debsums diffutils findutils lsof
# For fuse users how what to access their sshfs share when becoming root
# Add /etc/fuse.conf and uncomment user_allow_other
if ! grep user_allow_other /etc/fuse.conf >/dev/null 2>&1
then
echo user_allow_other >>/etc/fuse.conf
fi
Graphics and scanners
aptitude -q -y --with-recommends install f-spot gimp gimp-data gimp-help-common \
gimp-help-en gscan2pdf imagemagick sane sane-utils transfig xsane \
xsane-common unpaper
Install DVD/CD tools
aptitude -q -y --with-recommends install dvd+rw-tools brasero brasero-common \
cdparanoia cdrdao dvd+rw-tools
Install USB tools
aptitude -q -y --with-recommends install usb-creator-common \
usb-creator-gtk usbmuxd
Archivers
aptitude -q -y --with-recommends install bzip2 gzip bzip2 gzip \
p7zip-full p7zip-rar unzip zip cpio tar cabextract
Torrent
*NOT USED BY DEFAULT*
aptitude -q -y --with-recommends install vuze tracker tracker-search-tool \
transmission-common transmission-gtk
Speech CODICs
aptitude -q -y --with-recommends install \
libopencore-amrnb-dev libopencore-amrnb0 libopencore-amrnb0-dbg \
libopencore-amrwb-dev libopencore-amrwb0 libopencore-amrwb0-dbg
Speech Synth
if compare_ge $RELEASENO 11.10
then
aptitude -q -y --with-recommends install espeak
else
aptitude -q -y --with-recommends install \
speech-dispatcher brltty-speechd cl-speech-dispatcher \
gnome-speech-swift libgnome-speech-dev libgnome-speech7 \
speech-dispatcher-festival speech-dispatcher-flite \
speech-tools speech-tools-doc speechd-el
fi
# ===================================================================
pause_yes Voip
if [ $? -eq 1 ]
then
echo gizmo5 may not exist - ignore the error
aptitude -q -y --with-recommends install gizmo5 skype
fi
Math
aptitude -q -y --with-recommends install dc bc units mathpiper \
apcalc apcalc-common apcalc-dev calcoo extcalc python-mpmath \
python-mpmath-doc rpncalc
Database Clients
aptitude -q -y --with-recommends install mysql-client sqlite sqlite3
PDF utilities
# PDF utils
aptitude -q -y --with-recommends install evince pdfedit gscan2pdf \
pdf2djvu pdf2svg pdfchain pdfcube pdfgrep pdfjam pdfmod \
pdfposter pdfsam pdfshuffler pdftk pod2pdf qpdf
# XPDF breaks cups
# xpdf xpdf-common xpdf-reader xpdf-utils
Libre Office Environmet
# Install Office - depending on version
RELEASENO=`lsb_release -rs`
if compare_ge $RELEASENO 10.04
then
echo Installing LibreOffice
# 13.04 or greater ?
if compare_ge $RELEASENO 13.04
then
aptitude -q -y --with-recommends install \
libreoffice-base \
libreoffice-base-core \
libreoffice-calc \
libreoffice-common \
libreoffice-core \
libreoffice-dbg \
libreoffice-dev \
libreoffice-dev-doc \
libreoffice-draw \
libreoffice-gnome \
libreoffice-gtk \
libreoffice-help-en-us \
libreoffice-help-fr \
libreoffice-impress \
libreoffice-java-common \
libreoffice-l10n-en-gb \
libreoffice-l10n-fr \
libreoffice-math \
libreoffice-nlpsolver \
libreoffice-officebean \
libreoffice-ogltrans \
libreoffice-pdfimport \
libreoffice-presentation-minimizer \
libreoffice-style-human \
libreoffice-style-tango \
libreoffice-writer \
browser-plugin-libreoffice \
docvert-libreoffice \
libreoffice \
libreoffice-dmaths \
libreoffice-emailmerge \
libreoffice-filter-mobiledev \
libreoffice-gtk3 \
libreoffice-kde \
libreoffice-librelogo \
libreoffice-lightproof-en \
libreoffice-mysql-connector \
libreoffice-presenter-console \
libreoffice-report-builder \
libreoffice-report-builder-bin \
libreoffice-script-provider-bsh \
libreoffice-script-provider-js \
libreoffice-script-provider-python \
libreoffice-sdbc-postgresql \
libreoffice-style-crystal \
libreoffice-style-galaxy \
libreoffice-style-hicontrast \
libreoffice-style-oxygen \
libreoffice-subsequentcheckbase \
libreoffice-templates \
libreoffice-wiki-publisher \
libreoffice-writer2latex \
libreoffice-writer2xhtml \
libreoffice-zemberek \
openclipart-libreoffice \
openclipart2-libreoffice \
else
aptitude -q -y --with-recommends install libreoffice \
libreoffice-writer2latex libreoffice-writer2xhtml \
libreoffice-pdfimport libreoffice-wiki-publisher \
libreoffice-emailmerge libreoffice-evolution \
libreoffice-java-common libreoffice-filter-mobiledev \
libreoffice-mysql-connector libreoffice-sdbc-postgresql
fi
else
echo Installing OpenOffice
aptitude -q -y --with-recommends install openoffice,org \
openoffice.org-writer2latex openoffice.org-writer2xhtml \
openoffice.org-pdfimport openoffice.org-wiki-publisher \
openoffice.org-emailmerge openoffice.org-evolution \
openoffice.org-java-common \
openoffice.org-filter-mobiledev \
openoffice.org-mysql-connector openoffice.org-sdbc-postgresql
fi
GEDIT
aptitude -q -y --with-recommends install gedit gedit-common \
gedit-dev gedit-developer-plugins gedit-latex-plugin gedit-plugins
Emacs
aptitude -q -y --with-recommends install emacs23 \
emacs23-bin-common emacs23-common emacs23-el
VIM
aptitude -q -y --with-recommends install vim vim-common vim-dbg \
vim-doc vim-gnome vim-gui-common vim-runtime vim-tiny \
vim-addon-manager vim-gtk vim-latexsuite \
vim-nox vim-rails vim-scripts vim-syntax-gtk vim-vimoutliner vim-puppet
Misc Editors
aptitude -q -y --with-recommends install groff-base less nano tomboy
Postscript
aptitude -q -y --with-recommends install ghostscript gv ps2eps antiword
Spelling
aptitude -q -y --with-recommends install aspell aspell-en dictionaries-common
Accounting
aptitude -q -y --with-recommends install acct adduser
Gnu PGP
aptitude -q -y --with-recommends install gnupg
if compare_ge $RELEASENO 13.04
then
aptitude -q -y --with-recommends install \
texlive \
texlive-base \
texlive-bibtex-extra \
texlive-binaries \
texlive-common \
texlive-doc-base \
texlive-extra-utils \
texlive-font-utils \
texlive-fonts-extra-doc \
texlive-fonts-recommended \
texlive-fonts-recommended-doc \
texlive-generic-recommended \
texlive-humanities-doc \
texlive-lang-german \
texlive-latex-base \
texlive-latex-base-doc \
texlive-latex-extra \
texlive-latex-extra-doc \
texlive-latex-recommended \
texlive-latex-recommended-doc \
texlive-luatex \
texlive-math-extra \
texlive-metapost-doc \
texlive-pictures \
texlive-pictures-doc \
texlive-pstricks \
texlive-pstricks-doc \
texlive-publishers-doc \
texlive-science-doc \
texlive-doc-base \
texlive-doc-en \
texlive-doc-fr \
texlive-fonts-extra \
texlive-formats-extra \
texlive-full \
texlive-games \
texlive-generic-extra \
texlive-humanities \
texlive-lang-all \
texlive-latex3 \
texlive-metapost \
texlive-music \
texlive-omega \
texlive-plain-extra \
texlive-publishers \
texlive-science \
texlive-xetex \
context mathtex biblatex biblatex-dw latex-make latex-mk \
latex2html latex2rtf latex2rtf-doc latexdiff latexdraw \
writer2latex writer2latex-manual \
texpower texpower-manual texpower-examples \
auctex \
dblatex \
doxygen-latex \
latex-beamer \
latex-xcolor \
latex2html \
linuxdoc-tools-latex \
preview-latex-style \
biblatex \
biblatex-dw \
c++-annotations-latex \
csv2latex \
cweb-latex \
fcitx-table-latex \
geany-plugin-latex \
gedit-latex-plugin \
gnuhtml2latex \
ibus-table-latex \
klatexformula \
latex-fonts-sipa-arundina \
latex-fonts-thai-tlwg \
latex-make \
latex-mk \
latex2rtf \
latex2rtf-doc \
latexdiff \
latexdraw \
latexila \
latexila-data \
latexmk \
latexml \
libjlatexmath-fop-java \
libjlatexmath-java \
libjlatexmath-java-doc \
libklatexformula3 \
libklatexformula3-dev \
liblatex-decode-perl \
liblatex-driver-perl \
liblatex-encode-perl \
liblatex-table-perl \
liblatex-tom-perl \
libtemplate-plugin-latex-perl \
libwriter2latex-java \
libwriter2latex-java-doc \
pidgin-latex \
r-base-core \
rcs-latex \
tomboy-latex \
vim-latexsuite \
writer2latex \
writer2latex-manual
else
aptitude -q -y --with-recommends install \
texlive texlive-base texlive-bibtex-extra texlive-common \
texlive-doc-base texlive-doc-en texlive-doc-fr texlive-extra-utils \
texlive-font-utils texlive-fonts-extra texlive-fonts-extra-doc \
texlive-fonts-recommended texlive-fonts-recommended-doc \
texlive-generic-recommended texlive-humanities-doc \
texlive-lang-all texlive-latex-base texlive-latex-base-doc \
texlive-latex-extra texlive-latex-extra-doc \
texlive-latex-recommended texlive-latex-recommended-doc \
texlive-luatex texlive-math-extra texlive-metapost-doc \
texlive-pictures texlive-pictures-doc texlive-pstricks \
texlive-pstricks-doc texlive-publishers \
texlive-publishers-doc texlive-science texlive-science-doc \
texlive-formats-extra texlive-full texlive-games \
texlive-generic-extra texlive-humanities texlive-latex3 \
texlive-metapost texlive-music texlive-omega texlive-plain-extra \
texlive-xetex texlive-binaries latex-beamer \
biblatex biblatex-dw latex-make latex-mk \
latex2html latex2rtf latex2rtf-doc latexdiff latexdraw \
writer2latex writer2latex-manual \
texpower texpower-manual texpower-examples \
context \
mathtex
fi
ncurses
aptitude -q -y --with-recommends install ncurses-base ncurses-bin
aptitude -q -y --with-recommends install virtualbox
Remove insecure services
aptitude -y -q purge telnet rsh-server rsh-client
Add Standard Shells
aptitude -q -y --with-recommends install bash dash csh ksh tcsh zsh zsh-doc
Setup /xhbin, Some scripts expect those shells to be in /xhbin
mkdir /xhbin
ln -s /bin/bash /xhbin
ln -s /bin/dash /xhbin
ln -s /bin/csh /xhbin
ln -s /bin/ksh /xhbin
ln -s /bin/sh /xhbin
ln -s /bin/tcsh /xhbin
ln -s /bin/zsh /xhbin
# LDAP login needs this
ln -s /bin/false /xhbin
Setup NTP
# Make sure the NTP package is installed on your host
backup /etc/ntp.conf
aptitude -q -y --with-recommends install ntp ntpdate
# Install the CSCF ntp.conf file (if you're on the UW campus network):
# sudo wget https://www.cs.uwaterloo.ca/cscf/software/ntp/etc/ntp.conf -O /etc/ntp.conf
wget -q --no-check-certificate https://www.cs.uwaterloo.ca/cscf/software/ntp/etc/ntp.conf -O /etc/ntp.conf
# Restart ntp:
/etc/init.d/ntp restart
# You can check that it is working with:
ntpq -p
Setup SNMP
# Backup snmp files only once
backup /etc/snmp/snmp.conf
backup /etc/default/snmpd
aptitude -q -y --with-recommends install snmpd
# Install the CSCF SNMP configuration files:
wget --no-check-certificate -q https://www.cs.uwaterloo.ca/cscf/software/snmp/etc/snmp/snmpd.conf -O /etc/snmp/snmpd.conf
wget --no-check-certificate -q https://www.cs.uwaterloo.ca/cscf/software/snmp/etc/default/snmpd -O /etc/default/snmpd
# Restart SNMP
# You will get a "warning/error" "Bad group id: snmp" until after the host is added to the AD domain.
/etc/init.d/snmpd restart
Setup Network Services Caching Daemon
aptitude -q -y --with-recommends install nscd
Purge insecure services
# We don't want clear text passwords being used for network connections
aptitude -y -q purge telnet rsh-server rsh-client
Setup Cups
# 13.04 or greater ?
if compare_ge $RELEASENO 13.04
then
# 13.04 used cups-browsed to poll servers
# update /etc/cups/cups-browsed.conf
aptitude install --with-recommends cups-daemon cups-client cups-browsed cups
aptitude install --with-recommends bluez-cups cups-bsd cups-common cups-driver-gutenprint \
cups-filters cups-pdf cups-ppdc cups-pk-helper ghostscript-cups \
printer-driver-gutenprint printer-driver-hpcups printer-driver-postscript-hp \
python-cups python-cupshelpers
wget --no-check-certificate -q https://www.cs.uwaterloo.ca/twiki/pub/CF/UbuntuImageCreation/cups-browsed.conf -O /etc/cups/cups-browsed.conf
service cups-browsed restart
# ===================================================================
else
aptitude -q -y --with-recommends install cups cups-pdf
# backup cupsd.conf only once
backup /etc/cups/cupsd.conf
wget --no-check-certificate -q https://www.cs.uwaterloo.ca/twiki/pub/CF/UbuntuImageCreation/cupsd.conf -O /etc/cups/cupsd.conf
/etc/init.d/cups restart
fi
# Note - it will take some time to have the printers show up so we will move setting the
# default to the end of the script
Add recommened packages
apt-get -y -q --install-recommends dist-upgrade
Setup Samba - but with local only config for now...
# Setup Samba with local Host only access
apt-get -y -q install samba
# Configure local samba with vmware access
# backup smb.conf only once
# If you want SAMBA to be available to external hosts update the *interfaces* line
# to read: =interfaces = lo vmnet* eth*=
if [ ! -f /etc/samba/smb.conf ]
then
backup /etc/samba/smb.conf
wget --no-check-certificate -q https://www.cs.uwaterloo.ca/twiki/pub/CF/UbuntuImageCreation/smb.conf -O /etc/samba/smb.conf
fi
Create sysmlinks for /u../u9 to /home
for i in u u1 u2 u3 u4 u5 u6 u7 u8 u9
do
if [ -L /$i ]
then
echo Symlink /$i exists
ls -l /$i
else
if [ -d /$i ]
then
echo Directory /$i exists
else
ln -s /home /$i
ls -l /$i
fi
fi
done
Update Disk Scheduler Options to deadline - Recommended
PROG=fix_scheduler
# Update script if needed
rm -f /etc/$PROG
wget --no-check-certificate -nd -nH -nc https://www.cs.uwaterloo.ca/twiki/pub/CF/UbuntuImageCreation/$PROG -O /etc/$PROG
chmod 755 /etc/$PROG
# Has rc.local been patched \?
if grep "^/etc/$PROG" /etc/rc.local >/dev/null 2>&1
then
echo /etc/rc.local already patched
else
echo Backup and Patch /etc/rc.local to add $PROG script
backup /etc/rc.local
sed_file "s;exit 0;/etc/$PROG;" /etc/rc.local
echo "exit 0" >>/etc/rc.local
fi
echo skipping
Setup Host Name Resolving Service.
echo We do not want any other packages that tamper with /etc/resolv.conf
apt-get -y purge resolvconf
Installing CS resolv.conf
*NOT USED BY DEFAULT*
echo skipping
echo the CS resolv.conf file is busted out of date, wrong
# wget --no-check-certificate -q -O /tmp/resolv.conf https://www.cs.uwaterloo.ca/cscf/software/ubuntu/UW-CS-GradPC/etc/resolv.conf && mv -f /tmp/resolv.conf /etc/resolv.conf
Installing backup scripts
rsync -a scripts/ /scripts
echo Adding prototype crontab entry for system backup
echo The entry is just a comment for now - please edit this
echo See /scripts/README.txt for details
backup /etc/crontab
cat scripts/crontab >>/etc/crontab
Install LC
cd "$HDIR"
pushd lc
make clean
make install
popd
Install Matlab
# This will result in a harmless error when running under 11.04
# /usr/local/matlab/bin/util/oscheck.sh: 605: /lib64/libc.so.6: not found
# find /lib | grep libc.so
# /lib/x86_64-linux-gnu/libc.so.6
if [ ! -f /lib64/libc.so.6 ]
then
ln -s /lib/x86_64-linux-gnu/libc.so.6 /lib64/libc.so.6
fi
MATLAB=matlab-R2012a-x86_64.tar.gz
try rsync -a $ROPT -e "ssh -S ${CM_PATH_E}" \
$CM_USER@$CM_HOST:/coregroup1/images/packages/$MATLAB \
/tmp
cd /
tar xzf /tmp/$MATLAB
rm /tmp/$MATLAB
Install Maple
MAPLE=maple14-x64.tar.gz
try rsync -a $ROPT -e "ssh -S ${CM_PATH_E}" \
$CM_USER@$CM_HOST:/coregroup1/images/packages/$MAPLE \
/tmp
cd /
tar xzf /tmp/$MAPLE
rm /tmp/$MAPLE
set default printer to lj_csgrad
# Set the default printer last to give time for the printer list to update
lpadmin -d lj_csgrad
End of AUTOMATICALLY GENERATED section
END of updates script
Old Ubuntu 10.04 combined package list - not used
Notes on other Common Software
CUPS
- Edit /etc/cups/cupsd.conf and make/verify the following changes
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL
BrowsePoll print.cs.uwaterloo.ca
BrowseInterval 3600
BrowseTimeout 3700
APC UPS
- apt-get install apcupsd
- cd /etc/apcupsd
- For USB connections change the following directives to read as follows:
- UPSCABLE usb
- UPSTYPE
- #DEVICE /dev/ttyS0
Backups
Legato Backup
Subversion
Apache
Email
Setting up Quotas
Denyhosts
Using Old Passwords
After copying the passwords from an old machine some don't work - this is the fix
*Continue to
Ubuntu Release Specific Section Below*</verbatim></verbatim>