The observatory's servers and control computers run on the OpenSuse distribution of Linux-based software. Most current systems are using release Leap 42.2 or 42.3, and will have Leap 15 after its release. We chose the Leap series because of its conservative testing and stability. Generally the slowed cycle of new versions does not cause problems, except where we need software that is pushing the edge, notably AstroPy. Our evolving installation notes given below are rewritten as we gain experience with the most recent releases and work-around solutions to problems.
The following describes how to build a system with OpenSuse that provides a solid foundation of software for physics and astronomy for real-time control of telescopes and observatories, use in the laboratory or the field, operating small servers, and processing astronomical data.
- 1 Before Installation
- 2 During installation
- 3 From OpenSuse using YAST
- 4 After updates
- 5 From source in /usr/local
- 6 Python
- 7 From local software in /usr/local
- 8 Update /etc
- 9 Settings for the network
- 10 Desktop
- 11 OpenGL with Nvidia
- 12 Google Chrome
- 13 Adobe Flash
- 14 gPhoto2
- 15 exFAT
- 16 VLC
- 17 Mplayer and ffmpeg
- 18 Simple Screen Recorder
- 19 VirtualBox
- 20 OpenGL
- 21 Zoom not Skype
- 22 Wireless
- 23 Static LAN and dnsmasq
- 24 Proxy
Prepare a DVD or a USB memory stick with the ISO image of the 64-bit distribution. OpenSuse's imagewriter is a convenient way to create the correct structure on the USB device. Newer hardware will accept a USB memory stick for booting, but older (say prior to 2015) may require a DVD drive.
If there is a proxy for network access at this point it may be necessary to enter that information before proceedings to the actual installation. At the OpenSuse boot screen press F4 for access to the manual network configuration and enter the information. At Mt. Kent, for example, there is a proxy but it is handled automatically for browsers. For zypper and yast, however, it has to be explicitly configured to http://proxy.usq.edu.au:8080 so that yast will find the repositories. After installation for normal use this would be turned off by deselecting the proxy in the yast configuration screen.
On laptops with Nvidia Quadro graphics and GPU combined with Intel graphics, if the BIOS allows it, deselect options that use the Intel graphics or that automatically select the card to enable sole use of Nvidia. This avoids a multitude of booting and configuration issues, and provides a platform for GPU computing. The downside is increased power consumption and loss of battery life. If those are the primary considerations, then it may be best to not use Nvidia at all. Alternatively, it is possible to install Bumblebee to enable switching between cards for specific uses. Nvidia Quadro will require their proprietary driver for full support.
At this point if the system has a recent Nvidia card it also may be best to disable modeset. The symptom this is necessary is that subsequent booting freezes before the installation begins. With Leap 42.3 edit the boot options by pressing "e" before the system tries to start an installation. This will open a simple boot editing screen with instructions.
Select almost all packages by group except Apparmor which should be marked "taboo". Include PHP, MySQL, and Apache unless not needed for your use. Decline KDE and Gnome desktop but add their development code. Some KDE and Gnome applications may be loaded individually later. Do not install laptop tools unless you are configuring a laptop. Otherwise network management will default to be selectively controlled by the user rather than by the system at boot time.
Set the computer system clock to use UTC, check the time zone and the local time.
The gparted package may be useful to manage disks larger than 2 TB. As of Opensuse 13.2 with new disks the installer will use BTRFS for the root partition and XFS for the remainder to make full use of large disks on UEFI systems. In the event of a failure, leaving a critical disk formatted in the wrong size or filesystem, add gdisk from a repository and reformat the disk. Reboot, and re-install the operating system on the reformatted disk.
While it would be preferred to use 100 GB for the root directory in a BTRFS, Opensuse by default allocates a marginally large enough 40 GB. It is sufficient for the base system, and if large files are needed in /usr/local/ they can be located in the /home partition with a soft link from /usr/local. The remaining space on the system disk will be formatted as XFS. An advantage to putting locally installed software in /usr/local/ and having that outside of the root partition is that in subsequent upgrades there is less risk of losing special software installations.
Deselect and mark "taboo" Apparmor for systems which do not require its access controls.
Add nano so that you will have a simple terminal-based editor after booting the first time
Turn off firewall (assuming your system is already behind an institutional or local firewall)
Open port for SSH
Check the boot option for grub2 on a non-UEFI system
Complete the installation from the media (either USB or DVD)
Remove the medium, reset the boot priority to the hard disk, reboot
From OpenSuse using YAST
Start yast from the command line as su with yast --qt or "yast2"
Disable DVD or USB in software respositories
Perform all updates based on default respositories as needed
Add apache if used as web server
Add php and packages if used as web server
Add gsl and gsl-devel
Add celestia (kde-celestia)
Add gnome-disk-utility (previously palimpsest)
Add hdf5 (required by Python Pynpoint-exoplanet)
Add libatlas3 (optional required by astromatic software not in Leap 42.3)
Add libatlas3-devel (optional required by astromatic software not in Leap 42.3)
Add nasm (used by openh264)
Add pavucontrol (pulse audio control to work around problems with defaults)
Add plplot-devel (optionally other plplot packages as needed)
'Opensuse Leap installs Python 2.7 and Python 3.4. The default system python command in /etc/alternatives points to python 2.7, but the default "pip" points to python 3.4. The following packges will go to Python 3.4. Equivalent packages are available for Python 2 without the "3" in the package name. An end user running python needs to explicitly call python3, or change the alternative link. We are currently moving all python code to Python 3 and installing the following optional packages on new systems. For a complete OpenSuse Python3 installation, use the search option in yast for python3-, right click on the field of search results and select all entries. Then deselect any you do not want. This will install packages that have conflicts to resolve. Make your best choice on those. Packages we know we need and are adequately provided by the operating system are . Add python3-Beautifulsoup4
Add python3-certifi (optional, may cause other issues)
Add python3-numpy or use pip.
Add python3-numpy-devel or use pip.
Add python3-scipy or use pip for this and related packages to get the most recent versions.
You will also need matplotlib, but OpenSuse 42.3 does not provide a Tk component for Python 3. It is best to mark the package as "taboo" in yast, and instead, after work with yast is over, use pip and install matplotlib directly.
Additional packages you will need are --
Add fftw3-devel, fftw3-threads, and fftw3-threads-devel
Add gphoto but not gphotofs
Add other motif libraries if they are not installed by default
Remove all virtualbox rpm's installed from OpenSuse
If using Grace earlier than 5.1.25 deselect libpng16-compat-devel and select libpng12-compat-devel
Add fxload (used by SBIG cameras)
Disable modemmanager because it interferes with serial ports used for instruments
Configure dnsmasq if used to run a subnet and start it from yast
Disable avahi as unnecessary in our environment
Edit /etc/sysconfig to set locate default search to root
Use YAST to set NTP servers for your domain rather than Opensuse's defaults
On a longer term, routine updates can be done from the command line with
Add any needed Python3 modules requiring pip, notably matplotlib (see below)
From source in /usr/local
For rpm packages use
zypper --non-interactive install package.rpm
or add --no-gpg-checks if necessary.
Install nedit from updated source to /usr/local/bin with a link in /usr/bin/
Add lame and lame library packages for mp3 audio
Install cfitsio and manually copy lib64 and include installation directories to /usr/local/lib64 and /usr/local/include
Install grace (build from source with local FFT modifications for normalization)
Download the latest stable package from the git repository. Astrometry.net now will sense and use Python3. It does not allow configuring with the configure script and it will work as is. In OpenSuse 42.3 you will have to install netpbm. Since astrometry uses swig and looks at the python system command, it requires numpy and astropy packages. Also netpbm will not be found with the out-of-the-box configuration. Edit the file util/makefile.netpbm to have these lines
NETPBM_INC = -I/usr/include/netpbm NETPBM_LIB ?= -L/usr/lib64 -lnetpbm
Astrometry.net by default installs in /usr/local/astrometry. Add /usr/local/astrometry/bin to the $PATH in /etc/profile.local. Replace the data directory with a soft link to the system archive of astrometry data files, currently the 4200 series. On systems witih limited root disk space, install astrometry on another disk and link it to /usr/local for consistency with scripts.
Install psfex (current release does not build in Opensuse Leap due to cblas package incompatibility)
Install moodle (depends on mysql, apache, and php) on educational servers
Install mediawiki on servers as needed
For OpenSuse Leap 42.3 (current as of March 2018) both Python-2.7 and Python-3.4 are installed. By default /usr/bin/python points to Python-2.7, while pip uses pip3.4. For the most part, leave the 2.7 installation alone and augment the Python3 installation for our software. Python 3.4 is obsolete now, and astropy will install on it as is. Apart from that issue (which will go away with Leap 15) these packages are installed with pip3:
Modules by pip
Because they are not available as a package in OpenSuse for Python 3, or because the OpenSuse version is too old to satisfy dependencies for other software, additional modules are installed with pip. Use explicitly pip3 if the alias is not in place, that is if /etc/alternatives/pip does not point to pip3.
Install matplotlib since t OpenSuse 42.3 version lacks Tk support in Python3 matplotlib:
If matplotlib for Python 3 was installed from the system source it must be removed, both in yast, and in Python. This may require forcing it to reload and recompile.
pip uninstall matplotlib
pip install matplotlib --upgrade --no-cache-dir
Also recommended for the latest matplotlib because the system package is not up to date --
pip uninstall six
pip install six --upgrade --no-cache-dir
Install pyephem (pip install pyephem)
Install healpy (pip install healpix)
Install reproject (pip install reproject) for image reprojection when doing fits conversion
Install quantities (pip install quantities) to have physical constants
Install emcee (pip install emcee) to have an MCMC library
Install pyastronomy (pip install pyastronomy) or from source on github pyastronomy
Install scikit-image (pip install scikit-image).
Lastly, install the software chain for data visualization with Python using pip rather than the system package because Pandas is developing rapidly
Install pandas (pip install pandas)
Install sqlite3 (pip install sqlite3)
Install scrapy (pip install scrapy)
Install requests (pip install requests)
Astropy is a collaboration to provide a consistent and comprehensive distribution of astronomical software to the research community. For systems running Python 3.5 and above it can be installed as other packages
Install astropy (pip install astropy)
The recent restriction excluding Python 3.4 means that new installations on older operating systems cannot add astropy without some work around solution. The astropy community recommendation is to use Anacondarather than the original Python source (cutting edge youth) or the distribution source.(stable but aging). Enthought Canopy Python should work as well. Both of these are by default single-user solutions, though both also provide ways to do a global installation with the potential conflicts with the system version that may create.
From local software in /usr/local
Install Alsvid updated for Python3
Install xmtel (if needed)
Install xmccd (if needed, also provides libcfitsio and xpa)
Optionally install astrometry.net (see above for details)
Add entries to /etc/rc.d/boot.local
Edit /etc/dnsmasq.conf as needed
Settings for the network
Configure network as needed for additional cards defined for internal zone
Configure dnsmasq as needed to service one or more cards
Add masquerade to firewall settings if internal zone present (required for dnsmasq ip forwarding)
Start the firewall if using dnsmasq or needing the security it provides
Run services manager and turn off unused services
Run lsof -i to confirm there are no insecure open ports
Reboot the system
OpenGL with Nvidia
- xrandr -q
will list the available displays and their capabilities, while one such as
- xrandr --output DVI-I-2 --right-of DVI-I-1
will configure them as one screen providing acceleration across the desktop.
Install the Chrome public keys
- wget https://dl.google.com/linux/linux_signing_key.pub
- sudo rpm --import linux_signing_key.pub
and then with the Firefox browser retrieve the latest 64-bit rpm package of Chrome and install it
- zypper --non-interactive install google-chrome-stable_current_x86_64.rpm
Installation of Google Earth is similar
- zypper --non-interactive install google-earth-stable_current_x86_64.rpm
The gphoto2 application runs Nikon DSLR cameras for real-time observing, scripted imaging, and called by cgi routines from a web server. To give the USB device the proper permissions without invoking unwanted software (the default for a Gnome installation in OpenSuse), we make sure that libgphoto2 is installed, but not the file system. In OpenSuse there will not be a udev rules file installed by default.
As root user,
Add fuse-exfat from OpenSuse package search, currently version 1.1.0
- zypper --non-interactive install fuse-exfat-1.1.0-2.1.x86_64.rpm
This provides support where needed for SDXC memory cards through the Microsoft exfat filesystem.
- Install lua and lua-devel if not already installed
- Download the latest source tarball from VLC (currently 2.2.1)
- Use the latest x264 source also from VLC, compile, and install
- Use the latest ffmpeg source tar file best taken from mplayer, compile, and install
- Untar ffmpeg
- ./configure --enable-pic --libdir=/usr/local/lib64 --enable-libmp3lame --enable-libx264 -enable-gpl
- make install
- Untar vlc
- ./configure --disable-mad --disable-a52
- make install
Mplayer and ffmpeg
- Install the source code in /usr/local/src/ --
- svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
- In the source directory, ./configure --enable-gui then make, make install
If ffmpeg is needed elsewhere (as it would be for Blender and other video editing applications), copy the internal version of ffmpeg from mplayer into its own /usr/local/src/ directory, compile the executables, and install system-wide. In this use it can be reconfigured to add x264, so do that as well with these steps:
Remove the obsolete Opensuse NASM package if it has been installed, and get the most recent NASM from http://www.nasm.us/pub/nasm/ . This is currently version 2.13 and is required to build x264. Build and install it with the defaults. It will go into /usr/ rather than /usr/local if you forget to select "local" explicitly. This will not matter until you rebuild the system with updated Opensuse files.
Get x264 (it may be better than openH264, which currently does not compile on Opensuse) with git clone http://git.videolan.org/git/x264.git . Build it using the configuration options for creating static and shared libraries, and install it.
Lastly, in the cloned copy of ffmpeg from mplayer, ./configure --enable-libx264 --enable-gpl, make, and make install.
Simple Screen Recorder
This very effective tool for making on-line instructional videos and lecture content is included in the Opensuse distribution. However, the distributed version lacks many useful codecs. Retrieve the source code, probably best from Packman where it will have been prepared for Opensuse. Compile it as an unprivileged user with the configuration flags ./configure --without-jack --oldincludedir=/usr/local/include that currently make it work without jack and with x264 on Opensuse. Install it as root with "make install". This version will have the codecs of ffmpeg and be broadly useful without needing subsequent file conversions.
- Set the BIOS to allow virtualization technology and to allow advanced I/O for sharing resources.
- Retrieve the packages from https://www.virtualbox.org/wiki/Linux_Downloads .
- Retrieve the public key from https://www.virtualbox.org/download/
- Install the public key with rpm --import public_key.asc
- Install the repository with zypper ar -f ./file.repo
- zypper --non-interactive install VirtualBox-5.1-5.1.18_114002_openSUSE132-1.x86_64.rpm
- Retrieve the extension pack from Oracle's download site.
- VBoxManage extpack install .Oracle_VM_VirtualBox_Extension_Pack-5.1.18-114002.vbox-extpack
- Add the virtualbox group to the user(s) who will run it .
- Start the qt interface from the command line with virtualbox .
- Lastly, read the Virtualbox on-line manual .
Users must belong to the video group to have access to OpenGL when NVidia drivers are in use.
Zoom not Skype
While Skype is supported on Linux through its newer version, it does not at this time (2018-03-14) work reliably with the default installation of Opensuse 42.3. Alternatives include Google Hangouts and conferencing software Zoom, which is the recommended solution.
Few USB network adapters work with the Linux kernel in OpenSuse . Only one we have found readily available new is the Buffalo Nfinity Wireless-N compact USB 2.0 adapter. It is recognized immediately and requires no additional configuration, other than the selection of networkmanager, and the user's choice of connection.
Static LAN and dnsmasq
- Attach the device to a switch which itself is integrated into a LAN with DHCP provided by another computer system.
- Custom configure the wired network interface using nmcli.
- Change the laptop networking to run wickedd instead of networkmanager.
The second method using the powerful console commandline interface for Network Manager is the best solution but requires specific commands for each situation. We will provide additional help with this in a separate wiki entry.
The third option is the default for a desktop system. The disadvantage to the third option in the laptop world is that wickedd does not have the end-user support for wireless networking that networkmanager provides. Further, when switching from one system to another, there are inevitable configuration issues, particularly with the management of host resolution and the file /etc/resolv.conf.
As of Opensuse 42.1, this line is not inserted by the yast2 configurator, and consequently the network device will stall and wickedd will report "setup-in-progress". The simple solution is to enter this by hand if you see this error and need a second network active on power up.
The system proxy settings are set globally in /etc/sysconfig/proxy . It is best to use yast to configure them. At USQ for normal use these fields are blank. However for installation through yast and zypper and for updates the fields have to be populated with http://proxy.usq.edu.au:8000. Also for use of curl where there is a proxy, it can be set in .curlrc for that user by adding a line such as
proxy = proxy.usq.edu.au:8080
without the "http" prefix.
Both Firefox and Chrome browsers will negotiate an automatic proxy server while curl, zypper, and yast will not.