WebGUI8 pre-release install

Tags:

Here's a successful installation of the nascent WebGUI 8 as it stands, as of early August 2014.

I fired up a barebones Debian 7.6 box. One from Linode would work nicely.

NOTE: If you want to use a later version of Perl than comes bundled with your Linux distribution, you'll have to install it system-wide. The installer does not yet work with perlbrew.

For now you'll have to run the installer as root, or with sudo. (The only step that fails is when /etc/nginx/conf.d/webgui8.conf gets created; this should be corrected fairly soon)

To start off, install some basics.

# <span style="text-decoration: underline;">apt-get install gpm git sudo
</span>### Assume user named bob. Add the devel group:
# <span style="text-decoration: underline;">addgroup devel</span>
# <span style="text-decoration: underline;">usermod -a -G devel bob</span>
### optional, personal preferences
# <span style="text-decoration: underline;">apt-get install screen htop
</span># <span style="text-decoration: underline;">apt-get install emacs23-nox <a class="inter DebianPackage" href="http://packages.debian.org/emacs-goodies-el"><span class="page">emacs-goodies-el</span></a>
</span>

Note: emacs-goodies-el includes autoloading modules such as perldoc which gives you convenient Perl documentation viewing right inside the One True Editor™.

Then, we will need a database. The installer currently has difficulty installing mysql/Percona (Percona fails because at least as of Debian 7.6, the module still depends on openssl0.9.8 which can't be installed as it's a downgrade from openssl1.0.x that comes with Debian), and I'd prefer MariaDB in any case, so let's take care of this now:

Following the instructions from MariaDB use the following commands on Debian:

# <span style="text-decoration: underline;">apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db</span>
# <span style="text-decoration: underline;">echo deb http://ftp.utexas.edu/mariadb/repo/10.1/debian wheezy main > /etc/apt/sources.list.d/mariadb.list</span>
# <span style="text-decoration: underline;">apt-get update</span>
# <span style="text-decoration: underline;">apt-get install mariadb-server</span>

Note: Recent versions of Debian support putting *.list files in the sources.list.d/ directory, which is a handy way of avoiding management and manual editing of the sources.list file itself. On Ubuntu, you can use add-apt-repository (instead of creating the mariadb.list file as shown above). UBUNTU ONLY:

# <span style="text-decoration: underline;">sudo add-apt-repository 'deb http://ftp.utexas.edu/mariadb/repo/10.1/debian wheezy main'</span>

You will also need a library for the PNG Imager. Again, the installer should encompass this, but for now, follow instructions from Imager::File::PNG documentation to prevent any dependency resolution failures later:

# <span style="text-decoration: underline;">apt-get install libpng12-dev</span>

I downloaded the latest pre-release installer into a temporary directory as follows. Note the use of sudo -g to execute the command with devel being the effective group. Also, I set the umask to 2, which gives everyone in the devel group write access to all the created files and directories.

# <span style="text-decoration: underline;">cd /opt</span>
# <span style="text-decoration: underline;">umask 002</span>
# <span style="text-decoration: underline;">sudo -g devel     </span>  <span style="text-decoration: underline;">git clone https://github.com/AlliumCepa/webgui</span>

This should place a copy of the git repository in the webgui subdirectory. Now, run the installer:

# <span style="text-decoration: underline;">cd /opt/webgui/installer/</span>
# <span style="text-decoration: underline;">perl ./webgui_installer.pl</span>

and follow the prompts. If something goes wrong, you'll have to follow the recovery procedure below. But if you get this far:

Running upgrade script.... Installation is wrapping up. /data/webgui.sh shows how to manually launch WebGUI.

and then:

│┌Comments─────────────────────────────────┐│
││Installation complete.  Go to http://    ││
││www.example.com and set up the new site. ││
││The admin user is "Admin" with password  ││
││"123qwe".                                ││
││Please hit any reasonable key to exit the││
││installer.

you should be ready to, at last:

# <span style="text-decoration: underline;">service nginx restart</span>
# <span style="text-decoration: underline;">bash /data/webgui.sh</span>

and browse to your www.example.com (presuming you have defined www.example.com in /etc/hosts to point to 127.0.0.1)

Recovery

To retry the installation, before re-running the installer, you must do:

# <span style="text-decoration: underline;">userdel webgui_user</span>
# <span style="text-decoration: underline;">mysql -u root -p</span>
mysql> <span style="text-decoration: underline;">drop database www_example_com;</span>
mysql> <span style="text-decoration: underline;">exit</span>
# <span style="text-decoration: underline;">rm -rf /data</span>

NOTE: You can work around many of the abort-on-error conditions if you need to re-run the installer, by pressing "s" to skip individual commands.