Recent Changes - Search:

Participantes

Proyectos

Cursos

Bitacoras

Support

upload Folder

edit SideBar

Installation of Ubuntu 14.04.2 LTS (Trusty Tahr) 64-bit on ocomex (server)
Based on LERA field machine install for Ubuntu with GUI support

In the instructions below, # indicates a root prompt and a command to be executed as root, and $ indicate a user prompt and a command to be executed as the current user (typically wera). Preformatted text between horizontal lines should be copied verbatim into configuration files.

1. Prepare USB key with Ubuntu 14.04.2 LTS 64-bit desktop version; from an ubuntu laptop:
  • Applications->System tools->Administration->Startup Disk Creator
  • shutdown laptop and plug USB key on target machine to be installed.
  • start machine and select "Try Ubuntu without installing."
2. Allocate drive space.

Open terminal window

 # sudo gparted
 Enter sudo password
 Create a partition table of type msdos, and then three partitions in the table:

 /dev/sda1 Primary partition type ext4 (83)  32 Gb (1Gb = 1024 Mb)
 /dev/sda2 Primary partition type swap (82)  72 Gb (3x real memory)
 /dev/sda3 Primary partition type ext4 (83)  remaining of the disk (~15Gb)

If a GPT partition table already exists, you must delete it and recreate a msdos table; this is important for later grub installation. Be careful not to create extended partitions; their management in case of recovery/surgery is more difficult. Commit changes and exit.

3. Select icon "Install Ubuntu 14.04.2" Choose "Something else" when allocating disk space, and change the given partitions so that:
 /dev/sda1 is ext4, formatted, and mounted as /
 /dev/sda3 is ext4, formatted, and mounted as /home

DO NOT MODIFY THE PARTITION SIZE OR PARTITION TABLE TYPE! If you do, Ubuntu will create additional guid partition tables with subsequent problems.

6. Set time zone to GMT.
7. Computer will ask to restart when installation is complete; remove the USB key. If the computer does not reboot, there is a GRUB problem. This happens frequently, fix as follows:
  • boot again using USB key and select "Try Ubuntu 14.04 without installing"
  • open a terminal window and type
 sudo su
  • enter radlab password
  • mount the partition that has Ubuntu installed on it: this is should normally be mount /dev/sda1 /mnt. Check that the correct partition is mounted with ls /mnt; you should see directories /bin, /boot, /etc ...
  • install GRUB:
 grub-install --root-directory=/mnt /dev/sda''
  • DO NOT INCLUDE THE PARTITION NUMBER HERE!!!
 umount /mnt
 reboot
  • remove the USB key before the boot sequence starts.
8. Create wera account.

Open terminal window:

 $ sudo su    (enter ocomex password)
 # useradd -u 500 -g 100 wera  
 # passwd wera                 set wera password
 # cd /home
 # mkdir wera
 # chown wera.users wera
 # vi /etc/passwd              set wera shell to /usr/bin/tcsh
 # vi /etc/login.defs          

edit to read:

 UID_MIN                   500
 UID_MAX                 60000

 SYS_UID_MIN               100
 SYS_UID_MAX               499

 GID_MIN                   100
 GID_MAX                 60000

 SYS_GID_MIN               61
 SYS_GID_MAX               99
9. Enable sudoer for wera:
 # vi /etc/group             

edit line sudo:x:27:radlab , appending wera: sudo:x:27:radlab,wera

 # exit

Verify by typing su wera, entering wera password, then sudo su and entering wera password again, that you can gain root priviledge. We no longer put root password in /etc/shadow, as there are security issues associated with allowing direct root login.

10. Update and install various packages. At this stage, it is necessary to have access to the internet. If package updates fail, check apt-get and make sure there are no damaged packages in the install function. Some package install errors occur when Ubuntu Application Installer/Updater is turned off. Simply re-enabling the Auto-update feature to "Check for updates and let me know before installing" works to resolve this issue. If issue persists, you may have to downgrade some packages and then re-upgrade after everything is installed:

 # Sudo su
 # (sudo pw)
 # apt-get update
 # apt-get -y install apache2
 # apt-get -y install build-essential
 # apt-get -y install bvi
 # apt-get -y install chromium-browser
 # apt-get -y install csh
 # apt-get -y install gifsicle
 # apt-get -y install gimp
 # apt-get -y install gparted
 # apt-get -y install gpsbabel
 [[apt-get -y install ia32-libs
 [[apt-get -y install icomlib1c2
 [[apt-get -y install icomlib1-dev     Trouble installing these packages
 [[apt-get -y install icomlib-bin
 [[apt-get -y install icomlib-doc
 # apt-get -y install imagemagick
 # apt-get -y install isc-dhcp-server
 # apt-get -y install libio-socket-inet6-perl
 # apt-get -y install libio-socket-ssl-perl
 # apt-get -y install libnet-ssleay-perl
 # apt-get -y install netpbm
 # apt-get -y install nfs-kernel-server
 # apt-get -y install ntp
 # apt-get -y install openjdk-6-jre-headless
 # apt-get -y install openssh-server
 # apt-get -y install rpm
 # apt-get -y install screen
 # apt-get -y install setserial
 # apt-get -y install smartmontools
 # apt-get -y install tcsh
 # apt-get -y install traceroute

 ----- Server Programs to Install -----

 # apt-get -y install dc
 # apt-get -y install xinit
 # apt-get -y install gphoto2
 # apt-get -y install jhead

 [[apt-get -y install ffmpeg                          Problems installing these 2 server apps
 [[apt-get -y install heirloom-mailbox       

11. Set the proper time/clock and locale:
 # vi /etc/default/rcS

change the variable UTC to yes if not yet set; this will ensure that the hardware clock runs on UTC, not local time. Then

 # dpkg-reconfigure tzdata

and set timezone to "None of above" then UTC through the menus; this will ensure that the crontabs run on UTC, not local time. It is important to do this now to avoid irreparable confusion in data files time-tags.

If you installed the PC from outside the US, the installer may have outsmarted you by setting the default language based on where your IP is located, and you may see day/month in tagalog, spanish or french (this affects date, and any script that would use date).

 # vi /etc/default/locale

and change back all entries to "en_US.UTF-8"

Sometimes the network will delay boot. Edit /etc/init/failsafe.conf and comment out all the sleep commands.

12. Install Gnome Desktop

As root

 # apt-get install gnome-session-fallback

This is the leanest gnome desktop manager distribution, which we prefer to the default unity. When you first login, click on yourname then on the gear, and select the display manager gnome-fallback (metacity). That will set gnome as the default desktop for all your subsequent logins.

13.Configure apache2:
  # vi /etc/apache2/envvars

      export APACHE_RUN_USER=wera
      export APACHE_RUN_GROUP=users

  # chown -R wera:users /var/lock/apache2
  # /etc/init.d/apache2 restart
  # a2enmod include
  # a2enmod userdir
  # a2enmod cgid
  # service apache2 restart
  # vi /etc/apache2/mods-available/userdir.conf
  add new stanza:

    <Directory /home/*/public_html/cgi-bin>
        Options +ExecCGI
        SetHandler cgi-script
    </Directory>

Open a browser, type localhost in the address bar and make sure apache2 answers. The page should say "Apache2 Ubuntu Default Page. It works!"


14. Enable shutdown with multiple users logged in
 # vi /etc/polkit-1/localauthority/50-local.d/usershutdown.pkla    

Insert the following lines and save to create the file:


 [Allow Shutdown]
 Identity=unix-user:*
 Action=org.freedesktop.consolekit.system.stop-multiple-users
 ResultAny=yes
 ResultInactive=yes
 ResultActive=yes
 [Allow Restart]
 Identity=unix-user:*
 Action=org.freedesktop.consolekit.system.restart-multiple-users
 ResultAny=yes
 ResultInactive=yes
 ResultActive=yes

15. Google earth

If post-processed kml files need to be displayed:

 wget http://dl.google.com/dl/earth/client/current/google-earth-stable_current_amd64.deb
 dpkg -i google-earth-stable_current_amd64.deb
 apt-get install -f
16. Skype

Useful to install for support when working on the field.

 dpkg --add-architecture i386
 add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
 apt-get update
 apt-get install skype pulseaudio:i386
17. jfs
 # apt-get install jfsutils
18. Install 4 WesternDigital RED (NAS) 4Tb drives in front drive bays
19. sgdisk

Use sgdisk to edit /dev/sdb1 to contain 128 GB partition for swap and /dev/sdb2 as the remainder of the disk space 3.4 TB to ext4

Duplicate /dev/sdb to /dev/sdc,d,e with sgdisk -R (capital R, not lowercase), be careful as sgdisk does not use logical argument forms and has very different command line arguments from sfdisk. sgdisk must be used because GUID partitions exist on the disk, sfdisk will see the GUID partitions and refuse to copy the drives. GUID partitions must be used because msdos partitions have a maximum size of 2 Tb.

 # sgdisk -R /dev/sdc /dev/sdb
 # sgdisk -R /dev/sdd /dev/sdb
 # sgdisk -R /dev/sde /dev/sdb
20. mdadm
 # apt-get install mdadm
 # mdadm --create /dev/md0 --raid-devices=4 --level=raid6 /dev/sdb2 /dev/sdc2 /dev/sdd2 /dev/sde2
 # mdadm --assemble /dev/md0
 # mdadm --detail /dev/md0
21. mkfs
 # mkfs.ext4 /dev/md0
22. Change the swap file and mount /dev/md0 into home directory.
 # vi /etc/fstab

Comment out the swap partition on /dev/sda2 (72 Gb swap partition on SSD), SSD should not be used as swap file because of limited number or writes, only uncomment swap on /dev/sda2 if swap partitions on raid disks fail.

 Edit /dev/md0 to be /home

 Save changes and exit.
23. Last cleanup and update:

Launch update manager, and update all packages one more time. Then exit the update manager, open terminal window as root,

 # apt-get update
 # apt-get install -f
 # apt-get upgrade
 # apt-get autoremove
Edit - History - Print - Recent Changes - Search
Page last modified on April 13, 2016, at 12:32 AM PST