Ubuntu 14 Instructions: Difference between revisions

From CSLLabWiki
Jump to navigation Jump to search
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Installation ==
== Installation ==
You will be using the Ubuntu 14.04 Server AMD64 install disc. 


WARNING: The pre-packaged installer does not handle RAID well. GParted does. If partitioning is necessary, try it on live and use GParted to partition prior to installing using the below steps.  
WARNING: The pre-packaged installer does not handle RAID well. GParted does. If partitioning is necessary, try it on live and use GParted to partition prior to installing using the below steps.  
Line 5: Line 7:
1. Select "English"
1. Select "English"


2. Select "Install Ubuntu"
2. Select "Install Ubuntu Server"


3. Select "Install this Third Party Software" and "Download Updates while Installing"
3. Get out of DHCP set up.  Manually set the IP info.


4. Wait
4. Wait
Line 13: Line 15:
5. IF NO OTHER OPERATING SYSTEMS: Erase Disk and Install Ubuntu.
5. IF NO OTHER OPERATING SYSTEMS: Erase Disk and Install Ubuntu.


5b. IF OTHER OSes: Something else
5b. IF OTHER OSes:
- Select a drive; set to ext3, mountpoint: /, install.
 
* Select a drive; set to ext3, mountpoint: /, install.
 
* Be careful! This install does not understand RAID. See potential pitfalls for more information should you experience issues.


6. Where are you? New York.
6. Where are you? New York.
Line 23: Line 28:
- Password: qazzaq
- Password: qazzaq
- Do not encrypt home folder.
- Do not encrypt home folder.
Option for additional software---choose openSSH server.


Restart now.
Restart now.


== Configuration ==
== Configuration ==
- SSH does not come preinstalled in Ubuntu 14! You *must* go to the machine and physically log in as lab to do:
- apt-get install ssh
- Reboot
- You still can't ssh in as root.


==== Setting up root SSH ====
==== Setting up root SSH ====
Line 41: Line 39:
- sudo vi /etc/ssh/sshd_config
- sudo vi /etc/ssh/sshd_config


- PermitRootLogin no -> PermitRootLogin yes
- change PermitRootLogin yes


- sudo service ssh restart
- sudo service ssh restart
Line 48: Line 46:
==== Removing the 'lab' generic account and changing root password ====
==== Removing the 'lab' generic account and changing root password ====


-    ssh root@ipaddress
-    ssh lab@ipaddress


-  sudo su -
-  sudo passwd
 
-    passwd root (set the current root password)
 
-    exit


-    exit
-    exit
Line 74: Line 68:
* apt-get install kdm kubuntu-desktop plasma-desktop  
* apt-get install kdm kubuntu-desktop plasma-desktop  
* edit /etc/kde4/kdm/kdmrc
* edit /etc/kde4/kdm/kdmrc
* Change allowRootLogin to true.
* Change AllowRootLogin to true.


*  apt-get install auth-client-config libpam-ldap libnss-ldap ldap-auth-client ldap-auth-config  
*  apt-get install auth-client-config libpam-ldap libnss-ldap ldap-auth-client ldap-auth-config  
Line 97: Line 91:
<code><pre>
<code><pre>
[transy]
[transy]
nss_passwd=passwd: ldap files
nss_passwd=passwd: compat ldap  
nss_group=group: ldap files
nss_group=group: compat ldap
nss_shadow=shadow: ldap files
nss_shadow=shadow: compat ldap
nss_netgroup=netgroup: ldap files
nss_netgroup=netgroup: compat ldap
pam_auth=auth      required    pam_env.so
pam_auth=auth      required    pam_env.so
         auth      sufficient  pam_unix.so likeauth nullok
         auth      sufficient  pam_unix.so likeauth nullok
Line 112: Line 106:
         password  required    pam_deny.so
         password  required    pam_deny.so
pam_session=session    required    pam_limits.so
pam_session=session    required    pam_limits.so
         session    required    pam_unix.so
         session    required    pam_unix.so apt-get install nfs-common
         session    optional    pam_ldap.so
         session    optional    pam_ldap.so


Line 118: Line 112:


* auth-client-config -a -p transy
* auth-client-config -a -p transy
* Add the following line near the very top of /etc/pam.d/kdm AND /etc/pam.d/login
* Add the following line near the very top of /etc/pam.d/kdm, /etc/pam.d/lightdm,  AND /etc/pam.d/login
<code><pre>
<code><pre>
auth    optional        pam_group.so
auth    optional        pam_group.so
Line 129: Line 123:
kdm;*;*;Al0000-2400;cdrom,floppy,plugdev,audio,dip,video
kdm;*;*;Al0000-2400;cdrom,floppy,plugdev,audio,dip,video
gdm;*;*;Al0000-2400;cdrom,floppy,plugdev,audio,dip,video
gdm;*;*;Al0000-2400;cdrom,floppy,plugdev,audio,dip,video
lightdm;*;*;Al0000-2400;cdrom,floppy,plugdev,audio,dip,video
</pre></code>
</pre></code>


Line 162: Line 157:


=== Software ===
=== Software ===
* scp 10.20.3.8:/root/keep/jdk* .
<code>
<code>
apt-get install amarok mplayer firefox thunderbird blackbox fluxbox gimp blender vim emacs xemacs21 nano gedit nedit jedit gcc php5 perl ruby python audacity pidgin gdb xfce4 vlc cupsys swi-prolog htop screen kdm mutt eclipse  libxi-dev libxmu-dev spim tk make ant xorg k3b kubuntu-desktop ubuntu-desktop mesa-utils nfs-common flashplugin-nonfree alsa-utils lbreakout2 subversion subversion-tools patch libsvn-perl python-subversion g++ gcc build-essential libxi-dev libxmu-dev mysql-client lynx lbreakout2 csh mesa-utils dia-common
apt-get install amarok mplayer firefox thunderbird blackbox fluxbox gimp blender vim emacs xemacs21 nano gedit nedit jedit gcc php5 perl ruby irb python audacity pidgin gdb xfce4 vlc swi-prolog gdm htop screen kdm mutt eclipse  libxi-dev libxmu-dev spim tk make ant xorg k3b kubuntu-desktop ubuntu-desktop mesa-utils flashplugin-nonfree alsa-utils lbreakout2 subversion subversion-tools patch libsvn-perl python-subversion g++ gcc build-essential libxi-dev libxmu-dev mysql-client clisp lynx lbreakout2 csh mesa-utils dia-common git libappindicator1 libindicator7 suckless-tools virtualbox
</code>
</code>
* Graphical menus:
** No configuration
* Install chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb
* Install Makerware
apt-add-repository http://downloads.makerbot.com/makerware/ubuntu
wget http://downloads.makerbot.com/makerware/ubuntu/dev@makerbot.com.gpg.key
apt-key add dev@makerbot.com.gpg.key
apt-get update
apt-get install makerware
=== Printing (CUPS) ===
<code><pre>
Printer Info:
Name: Starkweather
Host: starkweather.cs.transy.edu
IP: 10.20.3.6
Model: HP Color Laserjet 4500N
Trays: 1
Name: Watson
Host: watson.cs.transy.edu
IP: 10.20.3.7
Model: Lexmark T642 (B&W)
Trays: 1
</pre></code>
==== starkweather ====
* hp-setup -i 10.20.3.6
*Print Queue Name: starkweather
*Yes
Location: Turing Lab
Additional Information: HP Color Laserjet Pro 400
==== watson ====
* scp 10.20.3.8:/root/keep/Lexmark* .
* lpadmin -p watson -v socket://10.20.3.7:9100 -L "TURING Lab" -D "Lexmark T642" -P ./Lexmark-T642-Postscript.ppd -E
* Set watson as default printer
** lpadmin -d watson
=== Hosts ===
* Add these entries to /etc/hosts
** Be sure to remove the original line in /etc/hosts for that host (no duplicates, please)
<code><pre>
# Servers
10.20.3.4 hollerith.cs.transy.edu hollerith
10.20.3.9 kay.cs.transy.edu kay
10.20.3.8 babbage.cs.transy.edu babbage
# Workstations
## SGI
10.20.3.5 sammett.cs.transy.edu sammett
## Mac Minis
10.20.3.13 holberton.cs.transy.edu holberton
10.20.3.30 morello.cs.transy.edu morello
10.20.3.19 hoover.cs.transy.edu hoover
10.20.3.29 bartik.cs.transy.edu bartik
10.20.3.3 calvin.cs.transy.edu calvin
10.20.3.47 lamarr.cs.transy.edu lamarr
10.20.3.48 spence.cs.transy.edu spence
## Linux
10.20.3.15 burks.cs.transy.edu burks
10.20.3.14 clarke.cs.transy.edu clarke
10.20.3.25 fox.cs.transy.edu fox
10.20.3.23 garrett.cs.transy.edu garrett
10.20.3.21 granville.cs.transy.edu granville
10.20.3.11 hopper.cs.transy.edu hopper
10.20.3.12 lovelace.cs.transy.edu lovelace
10.20.3.28 winters.cs.transy.edu winters
10.20.3.26 forsythe.cs.transy.edu forsythe
10.20.3.42 goldstine.cs.transy.edu goldstine
10.20.3.43      lichterman.cs.transy.edu lichterman
10.20.3.45      antonelli.cs.transy.edu antonelli
10.20.3.46 mayer.cs.transy.edu mayer
## Mac
10.20.3.20      borg.cs.transy.edu  borg
# Other
10.20.3.22 bonnie.cs.transy.edu bonnie
# Color HP Laser Printer
10.20.3.6      starkweather.cs.transy.edu starkweather
# B&W Lexmark Laser Printer
10.20.3.7      watson.cs.transy.edu watson
</pre></code>
=== At Boot ===
* update-rc.d -f apache2 remove
* update-rc.d -f apparmor remove
* Edit /etc/rc.local - add echo "2147483648" > /proc/sys/kernel/shmmax
=== Remove Shutdown ===
* While logged in as root:
* mv /sbin/shutdown /sbin/shutoff
* The computer will now be unable to shut down except for the power button and calling the shutoff file like this:
* shutoff -h now


== Potential Pitfalls ==
== Potential Pitfalls ==
Line 173: Line 275:
* When logging into an LDAP user on KDM, the log-in screen disappears but no welcome screen appears.
* When logging into an LDAP user on KDM, the log-in screen disappears but no welcome screen appears.
- Purge Plasma-Desktop and reinstall Plasma-Desktop / Kubuntu-Desktop. See http://ubuntuforums.org/showthread.php?t=2133661
- Purge Plasma-Desktop and reinstall Plasma-Desktop / Kubuntu-Desktop. See http://ubuntuforums.org/showthread.php?t=2133661
* I keep getting a "??? ???" error during the initial install, after partitioning the hard drive
- The Ubuntu install does not understand RAID. In order to partition hard drives, you'll need to boot into the live CD (the first option when the installer comes up) and use GParted to partition the hard drive as you want. Reboot and install into whatever partition you like.


* <code>
* <code>

Latest revision as of 11:58, 8 September 2015

Installation[edit]

You will be using the Ubuntu 14.04 Server AMD64 install disc.

WARNING: The pre-packaged installer does not handle RAID well. GParted does. If partitioning is necessary, try it on live and use GParted to partition prior to installing using the below steps.

1. Select "English"

2. Select "Install Ubuntu Server"

3. Get out of DHCP set up. Manually set the IP info.

4. Wait

5. IF NO OTHER OPERATING SYSTEMS: Erase Disk and Install Ubuntu.

5b. IF OTHER OSes:

  • Select a drive; set to ext3, mountpoint: /, install.
  • Be careful! This install does not understand RAID. See potential pitfalls for more information should you experience issues.

6. Where are you? New York. 7. English, English (US)

8. Your name: Lab - Pick a username: lab - Password: qazzaq - Do not encrypt home folder.

Option for additional software---choose openSSH server.

Restart now.

Configuration[edit]

Setting up root SSH[edit]

- sudo vi /etc/ssh/sshd_config

- change PermitRootLogin yes

- sudo service ssh restart


Removing the 'lab' generic account and changing root password[edit]

- ssh lab@ipaddress

- sudo passwd

- exit

- ssh root@ipaddress

- userdel lab

- rm -rf /home/lab

Update / Upgrade[edit]

  • apt-get update
  • apt-get upgrade
  • apt-get dist-upgrade

LDAP / KDM[edit]

  • apt-get install kdm kubuntu-desktop plasma-desktop
  • edit /etc/kde4/kdm/kdmrc
  • Change AllowRootLogin to true.
  • apt-get install auth-client-config libpam-ldap libnss-ldap ldap-auth-client ldap-auth-config
    • LDAP server Uniform Resource Identifier: ldap://10.20.3.8
    • Distinguished name of the search base: dc=cs,dc=transy,dc=edu
    • LDAP version to use: 3
    • Make local root Database admin: NO
    • Does the LDAP database require login?: NO
  • Edit /etc/ldap.conf and change / check the following values:
    • host 10.20.3.8
    • base dc=cs,dc=transy,dc=edu (should be set already)
    • uri ldap://10.20.3.8 (should be set already)
    • bind_policy soft
  • Edit /etc/ldap/ldap.conf
    • BASE dc=cs,dc=transy,dc=edu
    • URI ldap://10.20.3.8


  • Edit /etc/auth-client-config/profile.d/transy
[transy]
nss_passwd=passwd: compat ldap 
nss_group=group: compat ldap
nss_shadow=shadow: compat ldap
nss_netgroup=netgroup: compat ldap
pam_auth=auth       required     pam_env.so
        auth       sufficient   pam_unix.so likeauth nullok
        auth       sufficient   pam_ldap.so use_first_pass
        auth       required     pam_deny.so
pam_account=account    sufficient   pam_unix.so
        account    sufficient   pam_ldap.so
        account    required     pam_deny.so
pam_password=password   sufficient   pam_unix.so nullok md5 shadow use_authtok
        password   sufficient   pam_ldap.so use_first_pass
        password   required     pam_deny.so
pam_session=session    required     pam_limits.so
        session    required     pam_unix.so apt-get install nfs-common 
        session    optional     pam_ldap.so

  • auth-client-config -a -p transy
  • Add the following line near the very top of /etc/pam.d/kdm, /etc/pam.d/lightdm, AND /etc/pam.d/login
auth    optional        pam_group.so
  • Add the following to the BOTTOM of /etc/security/group.conf:
# This will force all users that logon into these groups
login;*;*;Al0000-2400;cdrom,floppy,plugdev,audio,dip
kdm;*;*;Al0000-2400;cdrom,floppy,plugdev,audio,dip,video
gdm;*;*;Al0000-2400;cdrom,floppy,plugdev,audio,dip,video
lightdm;*;*;Al0000-2400;cdrom,floppy,plugdev,audio,dip,video
  • Test LDAP authentication - if "id USERNAME" returns with info about the user... all is good. (Maybe)
root@clarke:~# id kmoorman
uid=1129(kmoorman) gid=110(faculty) groups=110(faculty),800(camp),2100(linux)
  • Make sure you can log-in via KDM! See Potential Pitfalls.

Filesystems[edit]

  • apt-get install nfs-common
  • mkdir /classes
  • mkdir /labdata
  • Edit /etc/fstab

Add:


# NFS Filesystems
10.20.3.8:/data/exportfs/home           /home           nfs     defaults,rw
10.20.3.8:/data/exportfs/classes        /classes        nfs     defaults,rw
10.20.3.8:/data/exportfs/labdata        /labdata        nfs     defaults,rw
  • Log-in to Babbage
  • edit /etc/exports
  • exportfs -a
  • exit
  • ssh root@IP
  • mount -a
  • Ensure the NFS filesystems loaded with "ls /home" "ls /classes" "ls /labdata"

Software[edit]

apt-get install amarok mplayer firefox thunderbird blackbox fluxbox gimp blender vim emacs xemacs21 nano gedit nedit jedit gcc php5 perl ruby irb python audacity pidgin gdb xfce4 vlc swi-prolog gdm htop screen kdm mutt eclipse libxi-dev libxmu-dev spim tk make ant xorg k3b kubuntu-desktop ubuntu-desktop mesa-utils flashplugin-nonfree alsa-utils lbreakout2 subversion subversion-tools patch libsvn-perl python-subversion g++ gcc build-essential libxi-dev libxmu-dev mysql-client clisp lynx lbreakout2 csh mesa-utils dia-common git libappindicator1 libindicator7 suckless-tools virtualbox

  • Graphical menus:
    • No configuration
  • Install chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb
  • Install Makerware
apt-add-repository http://downloads.makerbot.com/makerware/ubuntu
wget http://downloads.makerbot.com/makerware/ubuntu/dev@makerbot.com.gpg.key
apt-key add dev@makerbot.com.gpg.key
apt-get update
apt-get install makerware

Printing (CUPS)[edit]

Printer Info:

Name: Starkweather
Host: starkweather.cs.transy.edu
IP: 10.20.3.6
Model: HP Color Laserjet 4500N
Trays: 1

Name: Watson
Host: watson.cs.transy.edu
IP: 10.20.3.7
Model: Lexmark T642 (B&W)
Trays: 1

starkweather[edit]

  • hp-setup -i 10.20.3.6
  • Print Queue Name: starkweather
  • Yes

Location: Turing Lab

Additional Information: HP Color Laserjet Pro 400

watson[edit]

  • scp 10.20.3.8:/root/keep/Lexmark* .
  • lpadmin -p watson -v socket://10.20.3.7:9100 -L "TURING Lab" -D "Lexmark T642" -P ./Lexmark-T642-Postscript.ppd -E
  • Set watson as default printer
    • lpadmin -d watson

Hosts[edit]

  • Add these entries to /etc/hosts
    • Be sure to remove the original line in /etc/hosts for that host (no duplicates, please)
# Servers
10.20.3.4	hollerith.cs.transy.edu	hollerith
10.20.3.9	kay.cs.transy.edu	kay
10.20.3.8	babbage.cs.transy.edu	babbage

# Workstations
## SGI
10.20.3.5	sammett.cs.transy.edu	sammett

## Mac Minis
10.20.3.13	holberton.cs.transy.edu	holberton
10.20.3.30	morello.cs.transy.edu	morello
10.20.3.19	hoover.cs.transy.edu	hoover
10.20.3.29	bartik.cs.transy.edu	bartik
10.20.3.3	calvin.cs.transy.edu	calvin
10.20.3.47	lamarr.cs.transy.edu 	lamarr	
10.20.3.48	spence.cs.transy.edu	spence	

## Linux
10.20.3.15	burks.cs.transy.edu	burks
10.20.3.14	clarke.cs.transy.edu	clarke
10.20.3.25	fox.cs.transy.edu	fox
10.20.3.23	garrett.cs.transy.edu	garrett
10.20.3.21	granville.cs.transy.edu	granville
10.20.3.11	hopper.cs.transy.edu	hopper
10.20.3.12	lovelace.cs.transy.edu	lovelace
10.20.3.28	winters.cs.transy.edu	winters
10.20.3.26	forsythe.cs.transy.edu	forsythe
10.20.3.42	goldstine.cs.transy.edu goldstine	
10.20.3.43      lichterman.cs.transy.edu lichterman
10.20.3.45      antonelli.cs.transy.edu antonelli
10.20.3.46	mayer.cs.transy.edu	mayer 

## Mac
10.20.3.20      borg.cs.transy.edu  	borg 

# Other
10.20.3.22	bonnie.cs.transy.edu	bonnie

# Color HP Laser Printer
10.20.3.6       starkweather.cs.transy.edu starkweather

# B&W Lexmark Laser Printer
10.20.3.7       watson.cs.transy.edu watson

At Boot[edit]

  • update-rc.d -f apache2 remove
  • update-rc.d -f apparmor remove
  • Edit /etc/rc.local - add echo "2147483648" > /proc/sys/kernel/shmmax

Remove Shutdown[edit]

  • While logged in as root:
  • mv /sbin/shutdown /sbin/shutoff
  • The computer will now be unable to shut down except for the power button and calling the shutoff file like this:
  • shutoff -h now

Potential Pitfalls[edit]

  • The machine is frozen while trying to mount something! (Also: GDM freezes on start-up)

- Switch to terminal 1; if it works, then it's a GDM issue. GDM freezes on start up. Fix unknown; use KDM!

  • When logging into an LDAP user on KDM, the log-in screen disappears but no welcome screen appears.

- Purge Plasma-Desktop and reinstall Plasma-Desktop / Kubuntu-Desktop. See http://ubuntuforums.org/showthread.php?t=2133661

  • I keep getting a "??? ???" error during the initial install, after partitioning the hard drive

- The Ubuntu install does not understand RAID. In order to partition hard drives, you'll need to boot into the live CD (the first option when the installer comes up) and use GParted to partition the hard drive as you want. Reboot and install into whatever partition you like.

Note, selecting 'flashplugin-installer' instead of 'flashplugin-nonfree' Package hpijs is not available, but is referred to by another package. This may mean that the package is missing, has been obsol is only available from another source However the following packages replace it:

 printer-driver-hpijs:i386 printer-driver-hpijs

Package openoffice.org is not available, but is referred This may mean that the package is missing, has been obsol is only available from another source

Package ffmpeg is not available, but is referred to by an This may mean that the package is missing, has been obsol is only available from another source

Package mozilla-plugin-vlc is not available, but is referge. This may mean that the package is missing, has been obsol is only available from another source However the following packages replace it:

 vlc-data browser-plugin-vlc:i386 browser-plugin-vlc

Package xlockmore is not available, but is referred to by This may mean that the package is missing, has been obsol is only available from another source

E: Package 'openoffice.org' has no installation candidate E: Package 'hpijs' has no installation candidate E: Unable to locate package cupsys E: Unable to locate package libglui-dev E: Unable to locate package libglui2c2 E: Unable to locate package libglut3-dev E: Unable to locate package libglut3 E: Package 'ffmpeg' has no installation candidate E: Package 'mozilla-plugin-vlc' has no installation candi E: Unable to locate package libsvn-ruby E: Unable to locate package libglui-dev E: Unable to locate package libglui2c2 E: Unable to locate package kompozer E: Unable to locate package kompozer-dev E: Package 'xlockmore' has no installation candidate