Ubuntu 16.04

From FOG Project
Revision as of 08:40, 22 November 2016 by Wayne-workman.28155 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

See also: Ubuntu 16.04 Server


USE AT YOUR OWN RISK: We are not responsible for any damage to yourself, hardware, or co-workers. Use at your own risk.

Article under construction.

Installation from scratch

There should be a lot less trouble doing a fresh installation. Just follow the usual steps outlined in the articles on previous Ubuntu versions:

  • Insert your Ubuntu installation disc and reboot the computer. Boot from the disc, Ubuntu will launch in it’s live form for you to get a feel for the OS or install. You will be presented with two options, install Ubuntu or run a Live instance. Click the "Install Ubuntu" Option when it is presented to you at the Welcome screen.
  • Proceed with a normal install of Ubuntu. It is recommended to make the choice to Download the latest updates while installing by ticking the checkbox. Ubuntu will now examine hardware and alert you of any previously existing operating systems. Recommended that you remove all information unless you have other OS's you want to keep on the system.
  • Partitioning the disk seems to be a bit tricky: You have to delete the volume group it makes, select the actual device, and it lets you choose to blow away the partitions table and make a new one
  • During the install Ubuntu will ask you to set your timezone, layout, and some user information such as a user name and password. Set this information to your liking. In the latest flavors of Ubuntu the Root user account is disabled, after installation this guide will show you how to enable it. Ubuntu will copy files and begin the installation.
  • After installation is complete, reboot. Remove the installation disc and press enter, your computer will reboot and boot up in it’s new operating system that is much faster and more durable than it’s squishy, virus prone, partners. Log in with the Password and the User you specified during installation.

Your system should now be installed and ready to go.

Update / Dist-Upgrade

This part is definitely harder than a new installation. So please read this before starting the upgrade process and be aware that things might go wrong. You have been warned. So start off by modifying your /etc/apt/sources.list file. Replace all 'trusty' or 'wily' strings with 'xenial' and update your package list.

sudo apt-get update

Upgrading from 14.04 (trusty) as well as from 15.04 (wily) you'll most probably run into the following error:

sudo apt-get dist-upgrade
...
Checking if update is needed.
Checking server version.
Error: Server version (5.5.49-0ubuntu0.14.04.1) does not match with the version of
the server (5.7.12) with which this program was built/distributed. You can
use --skip-version-check to skip this check.
mysql_upgrade failed with exit status 3
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
...
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
                                         
Current status: 0 updates [-272].

As you can clearly see from the error (in my case) the mysql server still runnning was the old version 5.5.49 but the mysql_update tool trying to update the DB in the postinstall scripts was already the newer version. I got this solved by opening two terminals/consoles and shutting down the (old) mysql DB (sudo service mysql stop) while re-running the package installer (sudo apt-get -f install). Very ugly but worked for me.

An error might be caused by different issues. So please pay full attention on the error you see and check your error log which is the most valuable source of information in this case.

tail -n 30 /var/log/mysql/error.log

MySQL password behavior

Password behaviour when the MySQL root password is empty has changed. Packaging now enables socket authentication when the MySQL root password is empty. This means that a non-root user can't log in as the MySQL root user with an empty password. See here and as well note that root login via non-socket connection (like FOG connecting via TCP localhost) also is not allowed anymore if password was empty. To fix this you can login via mysql command line tool and change the connection setting.

mysql -u root
...
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
mysql> quit

Customized my.cnf

In case you have customized your mysql configuration (/etc/mysql/my.cnf) you might even run into another problem. See here!

PHP issue

People reported having issues with PHP in 16.04 as well. On my test install system I have the following PHP packages:

dpkg -l | grep php
ii  libapache2-mod-php5                 5.6.20+dfsg-1+deb.sury.org~trusty+1 amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  php-cli                             1:7.0+35ubuntu6                     all          command-line interpreter for the PHP scripting language (default)
ii  php-common               This is a set up that was proven to work in at LEAST 3 test environments. Any misuse or replication of this walk through in any other form is STRICTLY PROHIBITED.           1:35ubuntu6                         all          Common files for PHP packages
ii  php-gettext                         1.0.11-2build1                      all          read gettext MO files directly, without requiring anything other than PHP
ii  php-pear                            1:1.10.1+submodules+notgz-6         all          PEAR Base System
ii  php-xml                             1:7.0+35ubuntu6                     all          DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default]
ii  php5                                5.6.20+dfsg-1+deb.sury.org~trusty+1 all          server-side, HTML-embedded scripting language (metapackage)
ii  php5-cli                            5.6.20+dfsg-1+deb.sury.org~trusty+1 amd64        command-line interpreter for the php5 scripting  language
ii  php5-common                         5.6.20+dfsg-1+deb.sury.org~trusty+1 amd64        Common files for packages built from the php5 source
ii  php5-curl                           5.6.20+dfsg-1+deb.sury.org~trusty+1 amd64        CURL module for php5
ii  php5-fpm                            5.6.20+dfsg-1+deb.sury.org~trusty+1 amd64        server-side, HTML-embedded scripting language (FPM-CGI binary)
ii  php5-gd                             5.6.20+dfsg-1+deb.sury.org~trusty+1 amd64        GD module for php5
ii  php5-json                           1.3.9-1+deb.sury.org~trusty+4       amd64        JSON module for php5
ii  php5-mcrypt                         5.6.20+dfsg-1+deb.sury.org~trusty+1 amd64        MCrypt module for php5
ii  php5-mysqlnd                        5.6.20+dfsg-1+deb.sury.org~trusty+1 amd64        MySQL module for php5 (Native Driver)
ii  php7.0-cli                          7.0.4-7ubuntu2                      amd64        command-line interpreter for the PHP scripting language
ii  php7.0-common                       7.0.4-7ubuntu2                      amd64        documentation, examples and common module for PHP
ii  php7.0-json                         7.0.4-7ubuntu2                      amd64        JSON module for PHP
ii  php7.0-opcache                      7.0.4-7ubuntu2                      amd64        Zend OpCache module for PHP
ii  php7.0-readline                     7.0.4-7ubuntu2                      amd64        readline module for PHP
ii  php7.0-xml                          7.0.4-7ubuntu2                      amd64        DOM, SimpleXML, WDDX, XML, and XSL module for PHP

Interestingly enough I have PHP5 and PHP7 packages and the FOG interface works fine. phpinfo shoes 5.6.20 running. So I purged all PHP5 packages (apt-get purge php5*), adding variables to .fogsettings file and re-ran the installer.

MySQL 5.7 issue

We have seen several issues with current FOG trunk on MySQL 5.7. Most of those problems should be fixed now. Please follow this forum post for most recent information on this. As well please open a new thread in the forums and let us know if you still see problems.

Installation

While the installer will, now, attempt to make the PHP 7 adjustments if the ubuntu version is 16 or higher.

To get it up with PHP 7 you need to run the installer as follows:

php_ver='7.0' php_verAdds='-7.0' ./installfog.sh -y