As operating systems evolve unmaintained software has a tendency to break. If you are in a situation where IRAF is no longer usable, and you are still dependent upon it for one reason or another, we have created a CentOS 7 virtual appliance with everything pre-installed.
On 10/01/2019 STScI will cease providing software support for the following products:
- Python 2.7
- PyRAF
- IRAF
- None
- Use at your own risk
THE SOFTWARE (AND APPLIANCE) IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
$ sudo apt-get update
$ sudo apt-get install virtualbox
$ sudo dnf install virtualbox
$ sudo yum install virtualbox
$ sudo pacman -S virtualbox
-or-
curl -LO https://ssb.stsci.edu/aciraf/astroconda_iraf_centos7.ova
$ VirtualBox astroconda_iraf_centos7.ova
Double-click the astroconda_iraf_centos7.ova
file.
No matter if you install via the shell or file manager a dialog will appear requesting that you specify the (new) location of the virtual machine. It is also possible to adjust the virtual machine's settings (listed below) here by double-clicking on an item. However, if you prefer to follow along with this guide simply click Import
now.
The import operation may take several minutes to complete, especially on Windows. Be patient.
- On the leftmost pane of the VirtualBox main window, click to select
Tools
- Click hamburger menu icon, and select
Network
- Click
Create
icon. An entry will appear:vboxnet#
(# will be an integer value) - (optional) To return, click hamburger menu icon again, and select
Welcome
The defaults applied to this VM are the bare mininum required by CentOS:
- CPU: 1
- RAM: 512MB
- VRAM: 8MB
- In the leftmost pane select
astroconda_iraf_centos7
from the list. - Right-click to open the context menu, then click on
Settings
.
- Click
System
- Adjust
Base Memory
slider to a value appropriate for your system (Recommended:TOTAL_RAM/4
orTOTAL_RAM/2
)
- Click
System
- Click the
Processor
tab - Adjust slider to set a value appropriate for your system. (Recommended:
TOTAL_CPUS-1
orTOTAL_CPUS/2
)
- Click
Display
- Adjust slider to set a value approprate for your system. (Recommended:
MAX
)
- Click
Network
- Click
Adapter 2
tab - Enable
Enable Network Adapter
check-box - From
Attached to
drop-down menu selectHost-only Adapter
- From
Name
drop-down menu selectvboxnet0
To make it easier to interact with data from within the VM you will want to share a directory on your local system. VirtualBox uses the CIFS protocol to acheive this, so it's important to note the permissions of files and directories created here will be 770
(rwxrwx---
) by default.
- Click
Shared Folders
- Click
Folder with a plus sign
icon - Set
Folder Path
to the location of your data (e.g./home/username/my_data
) - Set
Folder Name
(can be anything) - Enable
Auto-mount
check-box - Set
Mount point
to a path within the VM (e.g./mnt/data
,/data
,/home/aciraf/mydata
, etc) - Enable
Make Permanent
check-box - Click
OK
- To save your settings, click
OK
- On the leftmost pane, Double-click on
astroconda_iraf_centos7
- At the login prompt, authenticate with:
Username: aciraf
Password: aciraf
- [If using
Shared Folders
] Addaciraf
user to thevboxsf
group
For your security, the aciraf
user is not capable of accessing shared folders by default:
$ sudo usermod -G vboxsf -a aciraf
$ exit
# <Log in again>
Assuming you configured your Shared Folders
mount-point as /mnt/data
- Verify mount-point works as expected
$ ls -l /mnt/data
# Expectation: You see your data
$ echo test > /mnt/data/testfile.txt
# Expectation: You can write to the mount-point
$ cat /mnt/data/testfile.txt
test
# Expectation: You can read from the mount-point
$ rm /mnt/data/testfile.txt
# Expectation: You can delete data from the mount-point
This method only works when the remote system is configured to accept logins over ssh
. The vboxnet#
network you created earlier uses the default subnet 192.168.56.1/24
. The default gateway assigned to this network, 192.168.56.1
, leads back to your host system. If the data is not stored on your host system you should supplement the IP below with the correct hostname.
$ yum install -y sshfs
$ mkdir ~/remote_data
$ sshfs [email protected]:/home/username/my_data ~/remote_data
[email protected]'s password: [authenticate here]
$ ls -l ~/remote_data
# Expectation: You see your data
$ echo test > ~/remote_data/testfile.txt
# Expectation: You can write to the mount-point
$ cat ~/remote_data/testfile.txt
test
# Expectation: You can read from the mount-point
$ rm ~/remote_data/testfile.txt
# Expectation: You can delete data from the mount-point
This virtual machine is not configured for displaying graphics. In order to render graphics you will need:
The second network adapter you enabled earlier will be initialized as eth1
by the Linux kernel. You already know what the subnet will be, so go ahead and poll it with:
$ ifconfig eth1 | grep 192.168.56
inet 192.168.56.101 # ... <- this is the IP of the adapter
$ ssh -X [email protected]
# password: aciraf
$ cd /mnt/data
$ pyraf
# Expectation: Graphical splash screen is diplayed
- Start your local X11 server
- Enable X11 forwarding for your client (do not specify a custom DISPLAY; it will be automatically assigned at login)
- Set username to:
aciraf
- Set password to:
aciraf
- Set the remote host to:
192.168.56.101
- [optional] Save your connection details to avoid repeating this in the future
- Connect
$ cd /mnt/data
$ pyraf
# Expectation: Graphical splash screen is displayed