Difference between revisions of "Guide to install Linux on lab computer"

From Immersive Visualization Lab Wiki
Jump to: navigation, search
(Install additional libraries)
(RPMForge)
 
(99 intermediate revisions by 2 users not shown)
Line 8: Line 8:
 
# Set up computer, monitor, keyboard, mouse on lab desk
 
# Set up computer, monitor, keyboard, mouse on lab desk
 
# Make sure mouse is wired and optical; talk to Jurgen if not
 
# Make sure mouse is wired and optical; talk to Jurgen if not
# Connect monitor with DVI cable, not VGA
+
# Connect monitor via DVI or HDMI, not VGA
# Connect network cable to activated Ethernet wall jack
+
# Connect network cable to activated Ethernet jack
  
 
===Install Operating System===
 
===Install Operating System===
# insert CentOS DVD-ROM
+
# insert CentOS on USB thumb drive
 
# reboot computer
 
# reboot computer
# in boot manager: select DVD drive to boot from DVD
+
# in boot manager: select DVD drive to boot from USB
 
# use default regional settings (US/English)
 
# use default regional settings (US/English)
 
# set root password
 
# set root password
 
# in time zone settings: enable NTP
 
# in time zone settings: enable NTP
 +
# instead of doing a minimum install, select "Software Development Workstation"
 
# Configure network
 
# Configure network
 
# start network configuration tool in System->Administration->Network
 
# start network configuration tool in System->Administration->Network
Line 23: Line 24:
 
# enter this computer's static IP address
 
# enter this computer's static IP address
 
# net mask: 255.255.255.0
 
# net mask: 255.255.255.0
# DNS servers: 132.239.0.252, 128.54.16.2
+
# DNS server: 132.239.0.252
 
# reboot
 
# reboot
  
 
===Configure File Server Access===
 
===Configure File Server Access===
# Add machine's IP address to server's "exports" file
+
* Add machine's IP address to server's "exports" file
# "exportfs -r" on server
+
* "exportfs -r" on server
# Add two lines to /etc/fstab:
+
* Add two lines to /etc/fstab:
 
<pre>
 
<pre>
 
   137.110.118.210:/raid/ivlhome  /home        nfs    defaults        0 0
 
   137.110.118.210:/raid/ivlhome  /home        nfs    defaults        0 0
   137.110.118.211:/raid/ivldata   /data        nfs    defaults        0 0
+
   137.110.118.211:/data   /data        nfs    defaults        0 0
 
</pre>
 
</pre>
# mkdir /data
+
* Remove from /etc/fstab to avoid conflict with new /home:
# mount -a
+
<pre>
 +
  /dev/mapper/centos-home /home                  xfs    defaults        0 0
 +
</pre>
 +
* mkdir /data
 +
* Enable NFS services:
 +
<pre>
 +
  systemctl enable nfs.service
 +
  systemctl start nfs.service
 +
</pre>
 +
* Open up firewall for NFS:
 +
<pre>
 +
  firewall-cmd --permanent --add-port=111/tcp
 +
  firewall-cmd --permanent --add-port=54302/tcp
 +
  firewall-cmd --permanent --add-port=20048/tcp
 +
  firewall-cmd --permanent --add-port=2049/tcp
 +
  firewall-cmd --permanent --add-port=46666/tcp
 +
  firewall-cmd --permanent --add-port=42955/tcp
 +
  firewall-cmd --permanent --add-port=875/tcp
 +
</pre>
 +
* mount -a
  
 +
===Install Additional Library Repositories===
  
 +
===RPM Fusion===
  
===Install Additional Library Repositories===
+
RHEL 6 or compatible like CentOS:
  
Enable [http://wiki.centos.org/AdditionalResources/Repositories/RPMForge?action=show&redirect=Repositories/RPMForge#head-f0c3ecee3dbb407e4eed79a56ec0ae92d1398e01 RPMforge repository]:
+
sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-6.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-6.noarch.rpm
  
* wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
+
RHEL 7 or compatible like CentOS:
* rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt  # install GPG key
+
 
* rpm -K rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm  # make sure this returns OK
+
sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm
* rpm -i rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm  # install repository
+
 
 +
====Linuxtech====
 +
 
 +
* su
 +
* vi /etc/yum.repos.d/linuxtech.repo
 +
* Add this to file and save:
 +
<pre>
 +
[linuxtech]
 +
name=LinuxTECH
 +
baseurl=http://pkgrepo.linuxtech.net/el6/release/
 +
enabled=1
 +
gpgcheck=1
 +
gpgkey=http://pkgrepo.linuxtech.net/el6/release/RPM-GPG-KEY-LinuxTECH.NET
 +
</pre>
  
 
===Install additional libraries===
 
===Install additional libraries===
 
Install libraries which are part of CentOS:
 
Install libraries which are part of CentOS:
 
<pre>
 
<pre>
yum -y groupinstall "Chinese Support"
 
 
yum -y install eclipse
 
yum -y install eclipse
 
yum -y install kernel-devel
 
yum -y install kernel-devel
Line 69: Line 103:
 
yum -y install ffmpeg-devel
 
yum -y install ffmpeg-devel
 
yum -y install gstreamer-ffmpeg
 
yum -y install gstreamer-ffmpeg
 +
yum -y install selinux-policy.noarch
 +
yum -y install xorg-x11-apps
 +
yum -y install glibc-devel.i686
 +
yum -y install libstdc++.i686
 +
yum -y install libstdc++.so.5
 +
yum -y install libstdc++.so.6
 +
yum -y install freeglut-devel.x86_64
 +
yum -y install python-devel.x86_64
 +
yum -y install libidn-devel.x86_64
 +
yum -y install e2fsprogs-devel.x86_64
 +
yum -y install ncurses-devel.i686
 +
yum -y install ncurses-devel.x86_64
 +
yum -y install zlib.i686
 +
yum -y install tcl-devel
 +
yum -y install tk-devel
 +
yum -y install xterm
 +
yum -y install vim-X11
 +
yum -y install telnet
 +
yum -y install xclip
 +
yum -y install uuid-devel
 +
yum -y install meld
 +
yum -y install openal-soft-devel
 +
yum -y install freealut-devel
 +
yum -y install libspnav-devel
 +
yum -y install octave-devel
 +
yum -y install pcre-devel
 +
yum -y install recordmydesktop
 +
yum -y install epel-release
 +
ln -s /usr/lib64/libhdf5.so.7 /usr/lib64/libhdf5.so.6
 
</pre>
 
</pre>
  
The following libraries are not part of CentOS:
+
The following libraries are not part of CentOS and will require the above listed external repos to be installed, or rely on local files:
 
<pre>
 
<pre>
 +
yum -y install gkrellm
 +
yum -y install tcptrack
 +
yum -y install google-chrome-stable
 
yum -y install fltk
 
yum -y install fltk
 
yum -y install fltk-fluid
 
yum -y install fltk-fluid
 +
yum -y install cmake28
 +
yum -y install glew
 +
yum -y install mysql++-devel
 +
yum -y install mplayer
 +
yum -y install directfb
 +
yum -y install ntfs-3g
 
rpm -Uhv /home/jschulze/rpm/Cg-2.1_November2008_x86_64.rpm
 
rpm -Uhv /home/jschulze/rpm/Cg-2.1_November2008_x86_64.rpm
 
rpm -Uhv /home/jschulze/rpm/mxml-2.2.2-8.el5.ccrma.x86_64.rpm
 
rpm -Uhv /home/jschulze/rpm/mxml-2.2.2-8.el5.ccrma.x86_64.rpm
 
ln -s /usr/lib64/libmxml.so.1 /usr/lib64/libmxml.so
 
ln -s /usr/lib64/libmxml.so.1 /usr/lib64/libmxml.so
 +
</pre>
 +
 +
====Google====
 +
 +
Add to /etc/yum.repos.d/google-chrome.repo:
 +
 +
<pre>
 +
[google-chrome]
 +
name=google-chrome - 64-bit
 +
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
 +
enabled=1
 +
gpgcheck=1
 +
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
 
</pre>
 
</pre>
  
 
===Bring All Yum Packages Up To Date===
 
===Bring All Yum Packages Up To Date===
 +
# yum clean all
 
# yum -y update
 
# yum -y update
 
# reboot
 
# reboot
Line 87: Line 173:
 
===Install graphics driver===
 
===Install graphics driver===
 
* Disable default Nvidia driver (Nouveau)
 
* Disable default Nvidia driver (Nouveau)
** create config file: vi /etc/modprobe.d/disable-nouveau.conf
 
** contents for this file:<pre>blacklist nouveau options nouveau modeset=0</pre>
 
 
** create config file: vi /etc/modprobe.d/nvidia-installer-disable-nouveau.conf
 
** create config file: vi /etc/modprobe.d/nvidia-installer-disable-nouveau.conf
 
** contents for this file:
 
** contents for this file:
Line 101: Line 185:
 
KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=vg_pumice/lv_root  
 
KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=vg_pumice/lv_root  
 
SYSFONT=latarcyrheb-sun16 rhgb rd_LVM_LV=vg_pumice/lv_swap rd_NO_DM rdblacklist=nouveau
 
SYSFONT=latarcyrheb-sun16 rhgb rd_LVM_LV=vg_pumice/lv_swap rd_NO_DM rdblacklist=nouveau
 +
</pre>
 +
** Sometimes this is also necessary (not sure when it is):
 +
<pre>
 +
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
 +
dracut -v /boot/initramfs-$(uname -r).img $(uname -r)
 
</pre>
 
</pre>
 
** reboot
 
** reboot
Line 108: Line 197:
 
* log in as root again
 
* log in as root again
 
* Install Nvidia driver:
 
* Install Nvidia driver:
** "sh /home/jschulze/rpm/NVIDIA-Linux-x86_64-290.10.run"
+
** "sh /home/jschulze/rpm/NVIDIA-Linux-x86_64-367.44.run"
** do not install 32bit compatibility drivers
+
*** If installation fails with message "You appear to be running an X server": rm /tmp/.X0-lock and rm /tmp/.X1-lock
** allow auto-editing xorg.conf
+
** 32 bit compatibility libraries not needed but ok to install
 +
** yes to run nvidia-xconfig utility
 
* reboot
 
* reboot
  
Line 117: Line 207:
 
# cd .ssh
 
# cd .ssh
 
# scp * root@<new_machine>:.ssh
 
# scp * root@<new_machine>:.ssh
 +
# exit
  
 
===Add user accounts===
 
===Add user accounts===
* Copy passwd, shadow and group files from sessions
+
* Copy passwd, shadow and group files from sessions.
 +
* On new computer:
 +
** cd /etc
 +
** scp root@sessions.ucsd.edu:/etc/passwd .
 +
** scp root@sessions.ucsd.edu:/etc/shadow .
 +
** scp root@sessions.ucsd.edu:/etc/group .
  
 
===Disable user list at login===
 
===Disable user list at login===
Line 126: Line 222:
 
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type Boolean --set /apps/gdm/simple-greeter/disable_user_list True
 
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type Boolean --set /apps/gdm/simple-greeter/disable_user_list True
 
</pre>
 
</pre>
 +
 +
===Install Trackd (only for VR systems)===
 +
* copy trackd subdirectory from Nexcave /usr/local/trackd/
 +
* copy trackd script from Nexcave's /etc/init.d/trackd
 +
* install older version of libstdc++ with .so.5 libraries, for instance libstdc++-3.3.2-2.i386.rpm
 +
 +
===Install Printer (optional)===
 +
* To install in Linux, go to System->Administration->Printing and click "New".
 +
* IP address:
 +
* Printer type: Brother

Latest revision as of 15:45, 1 June 2018

Contents

CentOS 6.2

Preparation

  1. Request static IP address in 137.110.118 or 137.110.119 subnet, suggest DNS name (find inspiration at [1])
  2. Send DNS name to Jurgen to update data bank at [2]

Hardware

  1. Set up computer, monitor, keyboard, mouse on lab desk
  2. Make sure mouse is wired and optical; talk to Jurgen if not
  3. Connect monitor via DVI or HDMI, not VGA
  4. Connect network cable to activated Ethernet jack

Install Operating System

  1. insert CentOS on USB thumb drive
  2. reboot computer
  3. in boot manager: select DVD drive to boot from USB
  4. use default regional settings (US/English)
  5. set root password
  6. in time zone settings: enable NTP
  7. instead of doing a minimum install, select "Software Development Workstation"
  8. Configure network
  9. start network configuration tool in System->Administration->Network
  10. double click on connected Ethernet port
  11. enter this computer's static IP address
  12. net mask: 255.255.255.0
  13. DNS server: 132.239.0.252
  14. reboot

Configure File Server Access

  • Add machine's IP address to server's "exports" file
  • "exportfs -r" on server
  • Add two lines to /etc/fstab:
  137.110.118.210:/raid/ivlhome   /home         nfs     defaults        0 0
  137.110.118.211:/data	  /data         nfs     defaults        0 0
  • Remove from /etc/fstab to avoid conflict with new /home:
  /dev/mapper/centos-home /home                   xfs     defaults        0 0
  • mkdir /data
  • Enable NFS services:
  systemctl enable nfs.service
  systemctl start nfs.service
  • Open up firewall for NFS:
  firewall-cmd --permanent --add-port=111/tcp
  firewall-cmd --permanent --add-port=54302/tcp
  firewall-cmd --permanent --add-port=20048/tcp
  firewall-cmd --permanent --add-port=2049/tcp
  firewall-cmd --permanent --add-port=46666/tcp
  firewall-cmd --permanent --add-port=42955/tcp
  firewall-cmd --permanent --add-port=875/tcp
  • mount -a

Install Additional Library Repositories

RPM Fusion

RHEL 6 or compatible like CentOS:

sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-6.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-6.noarch.rpm

RHEL 7 or compatible like CentOS:

sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm

Linuxtech

  • su
  • vi /etc/yum.repos.d/linuxtech.repo
  • Add this to file and save:
[linuxtech]
name=LinuxTECH
baseurl=http://pkgrepo.linuxtech.net/el6/release/
enabled=1
gpgcheck=1
gpgkey=http://pkgrepo.linuxtech.net/el6/release/RPM-GPG-KEY-LinuxTECH.NET

Install additional libraries

Install libraries which are part of CentOS:

yum -y install eclipse
yum -y install kernel-devel
yum -y install arts-devel
yum -y install freetype-devel
yum -y install freeglut-devel
yum -y install ImageMagick-devel
yum -y install ImageMagick-c++-devel.x86_64
yum -y install emacs
yum -y install screen
yum -y install gnuplot
yum -y install latex2html
yum -y install gsl-devel
yum -y install lapack-devel
yum -y install opencv-devel
yum -y install giflib-devel
yum -y install ffmpeg-devel
yum -y install gstreamer-ffmpeg
yum -y install selinux-policy.noarch
yum -y install xorg-x11-apps
yum -y install glibc-devel.i686
yum -y install libstdc++.i686
yum -y install libstdc++.so.5
yum -y install libstdc++.so.6
yum -y install freeglut-devel.x86_64
yum -y install python-devel.x86_64
yum -y install libidn-devel.x86_64
yum -y install e2fsprogs-devel.x86_64
yum -y install ncurses-devel.i686
yum -y install ncurses-devel.x86_64
yum -y install zlib.i686
yum -y install tcl-devel
yum -y install tk-devel
yum -y install xterm
yum -y install vim-X11
yum -y install telnet
yum -y install xclip
yum -y install uuid-devel
yum -y install meld
yum -y install openal-soft-devel
yum -y install freealut-devel
yum -y install libspnav-devel
yum -y install octave-devel
yum -y install pcre-devel
yum -y install recordmydesktop
yum -y install epel-release
ln -s /usr/lib64/libhdf5.so.7 /usr/lib64/libhdf5.so.6

The following libraries are not part of CentOS and will require the above listed external repos to be installed, or rely on local files:

yum -y install gkrellm
yum -y install tcptrack
yum -y install google-chrome-stable
yum -y install fltk
yum -y install fltk-fluid
yum -y install cmake28
yum -y install glew
yum -y install mysql++-devel
yum -y install mplayer
yum -y install directfb
yum -y install ntfs-3g
rpm -Uhv /home/jschulze/rpm/Cg-2.1_November2008_x86_64.rpm
rpm -Uhv /home/jschulze/rpm/mxml-2.2.2-8.el5.ccrma.x86_64.rpm
ln -s /usr/lib64/libmxml.so.1 /usr/lib64/libmxml.so

Google

Add to /etc/yum.repos.d/google-chrome.repo:

[google-chrome]
name=google-chrome - 64-bit
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

Bring All Yum Packages Up To Date

  1. yum clean all
  2. yum -y update
  3. reboot
  4. If an Nvidia driver was installed before the update, it may have to be reinstalled now.

Install graphics driver

  • Disable default Nvidia driver (Nouveau)
    • create config file: vi /etc/modprobe.d/nvidia-installer-disable-nouveau.conf
    • contents for this file:
blacklist nouveau
options nouveau modeset=0
    • vi /etc/grub.conf
    • add rdblacklist=nouveau to all kernel entries:
kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=/dev/mapper/vg_pumice-lv_root rd_NO_LUKS 
KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=vg_pumice/lv_root 
SYSFONT=latarcyrheb-sun16 rhgb rd_LVM_LV=vg_pumice/lv_swap rd_NO_DM rdblacklist=nouveau
    • Sometimes this is also necessary (not sure when it is):
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
dracut -v /boot/initramfs-$(uname -r).img $(uname -r)
    • reboot
  • on login screen: hit ctrl-alt-F2
  • log in as root
  • "init 3"
  • log in as root again
  • Install Nvidia driver:
    • "sh /home/jschulze/rpm/NVIDIA-Linux-x86_64-367.44.run"
      • If installation fails with message "You appear to be running an X server": rm /tmp/.X0-lock and rm /tmp/.X1-lock
    • 32 bit compatibility libraries not needed but ok to install
    • yes to run nvidia-xconfig utility
  • reboot

Copy root's ssh keys

  1. ssh root@sessions.ucsd.edu
  2. cd .ssh
  3. scp * root@<new_machine>:.ssh
  4. exit

Add user accounts

  • Copy passwd, shadow and group files from sessions.
  • On new computer:
    • cd /etc
    • scp root@sessions.ucsd.edu:/etc/passwd .
    • scp root@sessions.ucsd.edu:/etc/shadow .
    • scp root@sessions.ucsd.edu:/etc/group .

Disable user list at login

  • As root type on command line:
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type Boolean --set /apps/gdm/simple-greeter/disable_user_list True

Install Trackd (only for VR systems)

  • copy trackd subdirectory from Nexcave /usr/local/trackd/
  • copy trackd script from Nexcave's /etc/init.d/trackd
  • install older version of libstdc++ with .so.5 libraries, for instance libstdc++-3.3.2-2.i386.rpm

Install Printer (optional)

  • To install in Linux, go to System->Administration->Printing and click "New".
  • IP address:
  • Printer type: Brother