Skip to content

Instantly share code, notes, and snippets.

@msimerson
Created December 8, 2016 21:59
Show Gist options
  • Save msimerson/41710e81130a3d5cf2955dd5fe8aadd3 to your computer and use it in GitHub Desktop.
Save msimerson/41710e81130a3d5cf2955dd5fe8aadd3 to your computer and use it in GitHub Desktop.
Mail Toaster 6 - Roundcube install
# ./provision-roundcube.sh
loading mail-toaster.conf
mysql enabled
toaster host: jails.tnpi.net
email domain: theartfarm.com
shell: /bin/sh
safe name: stage
zroot/jails/base-10.3-RELEASE@p14 snapshot exists
*** stage cleanup ***
service jail stop stage
Stopping jails:.
jail -r stage
stage: removed
zroot/data/roundcube filesystem exists
*** stage jail filesystem setup ***
zfs clone zroot/jails/base-10.3-RELEASE@p14 zroot/jails/stage
sysrc -R /jails/stage hostname=roundcube
hostname: base -> roundcube
*** creating data volume ***
zroot/data/roundcube filesystem exists
zroot/data/roundcube filesystem exists
mkdir -p /jails/stage/data
mount_nullfs /data/roundcube /jails/stage/data
mount /jails/stage/usr/ports
mount /jails/stage/var/cache/pkg
*** stage jail stage startup ***
Setting hostname: roundcube.
Starting syslogd.
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib
32-bit compatibility ldconfig path: /usr/lib32
Clearing /tmp (X related).
Starting cron.
Thu Dec 8 13:58:06 PST 2016
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
*** installing PHP ***
pkg -j stage install -y php56 php56-fileinfo php56-mcrypt php56-exif php56-openssl
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The following 9 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
php56: 5.6.28
php56-fileinfo: 5.6.28
php56-mcrypt: 5.6.28
php56-exif: 5.6.28
php56-openssl: 5.6.28
libxml2: 2.9.4
pcre: 8.39
libltdl: 2.4.6
libmcrypt: 2.5.8_3
Number of packages to be installed: 9
The process will require 30 MiB more space.
[roundcube] [1/9] Installing libxml2-2.9.4...
[roundcube] [1/9] Extracting libxml2-2.9.4: 100%
[roundcube] [2/9] Installing pcre-8.39...
[roundcube] [2/9] Extracting pcre-8.39: 100%
[roundcube] [3/9] Installing php56-5.6.28...
[roundcube] [3/9] Extracting php56-5.6.28: 100%
[roundcube] [4/9] Installing libltdl-2.4.6...
[roundcube] [4/9] Extracting libltdl-2.4.6: 100%
[roundcube] [5/9] Installing libmcrypt-2.5.8_3...
[roundcube] [5/9] Extracting libmcrypt-2.5.8_3: 100%
[roundcube] [6/9] Installing php56-fileinfo-5.6.28...
[roundcube] [6/9] Extracting php56-fileinfo-5.6.28: 100%
[roundcube] [7/9] Installing php56-mcrypt-5.6.28...
[roundcube] [7/9] Extracting php56-mcrypt-5.6.28: 100%
[roundcube] [8/9] Installing php56-exif-5.6.28...
[roundcube] [8/9] Extracting php56-exif-5.6.28: 100%
[roundcube] [9/9] Installing php56-openssl-5.6.28...
[roundcube] [9/9] Extracting php56-openssl-5.6.28: 100%
Message from libmcrypt-2.5.8_3:
===> NOTICE:
The libmcrypt port currently does not have a maintainer. As a result, it is
more likely to have unresolved issues, not be up-to-date, or even be removed in
the future. To volunteer to maintain this port, please create an issue at:
https://bugs.freebsd.org/bugzilla
More information about port maintainership is available at:
https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port
Message from php56-fileinfo-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-20-fileinfo.ini
configuration file to automatically load the installed extension:
extension=fileinfo.so
****************************************************************************
Message from php56-mcrypt-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-20-mcrypt.ini
configuration file to automatically load the installed extension:
extension=mcrypt.so
****************************************************************************
Message from php56-exif-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-20-exif.ini
configuration file to automatically load the installed extension:
extension=exif.so
****************************************************************************
Message from php56-openssl-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-20-openssl.ini
configuration file to automatically load the installed extension:
extension=openssl.so
****************************************************************************
*** install php mysql module ***
pkg -j stage install -y php56-mysql
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
php56-mysql: 5.6.28
Number of packages to be installed: 1
[roundcube] [1/1] Installing php56-mysql-5.6.28...
[roundcube] [1/1] Extracting php56-mysql-5.6.28: 100%
Message from php56-mysql-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-20-mysql.ini
configuration file to automatically load the installed extension:
extension=mysql.so
****************************************************************************
pkg -j stage install -y nginx
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The following 2 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
nginx: 1.10.1_2,2
openssl: 1.0.2j_1,1
Number of packages to be installed: 2
The process will require 12 MiB more space.
[roundcube] [1/2] Installing openssl-1.0.2j_1,1...
[roundcube] [1/2] Extracting openssl-1.0.2j_1,1: 100%
ldconfig: warning: ldconfig: No such file or directory
[roundcube] [2/2] Installing nginx-1.10.1_2,2...
===> Creating groups.
Using existing group 'www'.
===> Creating users
Using existing user 'www'.
[roundcube] [2/2] Extracting nginx-1.10.1_2,2: 100%
Message from openssl-1.0.2j_1,1:
Copy /usr/local/openssl/openssl.cnf.sample to /usr/local/openssl/openssl.cnf
and edit it to fit your needs.
Message from nginx-1.10.1_2,2:
===================================================================
Recent version of the NGINX introduces dynamic modules support. In
FreeBSD ports tree this feature was enabled by default with the DSO
knob. Several vendor's and third-party modules have been converted
to dynamic modules. Unset the DSO knob builds an NGINX without
dynamic modules support.
To load a module at runtime, include the new `load_module'
directive in the main context, specifying the path to the shared
object file for the module, enclosed in quotation marks. When you
reload the configuration or restart NGINX, the module is loaded in.
It is possible to specify a path relative to the source directory,
or a full path, please see
https://www.nginx.com/blog/dynamic-modules-nginx-1-9-11/ and
http://nginx.org/en/docs/ngx_core_module.html#load_module for
details.
Default path for the NGINX dynamic modules is
/usr/local/libexec/nginx.
===================================================================
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- nginx.conf-dist 2016-11-03 05:11:28.000000000 -0700
|+++ nginx.conf 2016-12-07 16:29:52.835309001 -0800
--------------------------
Patching file nginx.conf using Plan A...
Hunk #1 succeeded at 41.
Hunk #2 succeeded at 78.
done
*** installing roundcube ***
pkg -j stage install -y roundcube
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The following 16 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
roundcube: 1.2.3,1
php56-session: 5.6.28
php56-xml: 5.6.28
php56-iconv: 5.6.28
libiconv: 1.14_9
php56-pdo_mysql: 5.6.28
php56-pdo: 5.6.28
pecl-intl: 3.0.0_6
icu: 57.1,1
php56-filter: 5.6.28
php56-dom: 5.6.28
php56-zip: 5.6.28
libzip: 1.1.2
php56-mbstring: 5.6.28
oniguruma5: 5.9.6_1
php56-json: 5.6.28
Number of packages to be installed: 16
The process will require 67 MiB more space.
[roundcube] [1/16] Installing libiconv-1.14_9...
[roundcube] [1/16] Extracting libiconv-1.14_9: 100%
[roundcube] [2/16] Installing php56-pdo-5.6.28...
[roundcube] [2/16] Extracting php56-pdo-5.6.28: 100%
[roundcube] [3/16] Installing icu-57.1,1...
[roundcube] [3/16] Extracting icu-57.1,1: 100%
[roundcube] [4/16] Installing libzip-1.1.2...
[roundcube] [4/16] Extracting libzip-1.1.2: 100%
[roundcube] [5/16] Installing oniguruma5-5.9.6_1...
[roundcube] [5/16] Extracting oniguruma5-5.9.6_1: 100%
[roundcube] [6/16] Installing php56-session-5.6.28...
[roundcube] [6/16] Extracting php56-session-5.6.28: 100%
[roundcube] [7/16] Installing php56-xml-5.6.28...
[roundcube] [7/16] Extracting php56-xml-5.6.28: 100%
[roundcube] [8/16] Installing php56-iconv-5.6.28...
[roundcube] [8/16] Extracting php56-iconv-5.6.28: 100%
[roundcube] [9/16] Installing php56-pdo_mysql-5.6.28...
[roundcube] [9/16] Extracting php56-pdo_mysql-5.6.28: 100%
[roundcube] [10/16] Installing pecl-intl-3.0.0_6...
[roundcube] [10/16] Extracting pecl-intl-3.0.0_6: 100%
[roundcube] [11/16] Installing php56-filter-5.6.28...
[roundcube] [11/16] Extracting php56-filter-5.6.28: 100%
[roundcube] [12/16] Installing php56-dom-5.6.28...
[roundcube] [12/16] Extracting php56-dom-5.6.28: 100%
[roundcube] [13/16] Installing php56-zip-5.6.28...
[roundcube] [13/16] Extracting php56-zip-5.6.28: 100%
[roundcube] [14/16] Installing php56-mbstring-5.6.28...
[roundcube] [14/16] Extracting php56-mbstring-5.6.28: 100%
[roundcube] [15/16] Installing php56-json-5.6.28...
[roundcube] [15/16] Extracting php56-json-5.6.28: 100%
[roundcube] [16/16] Installing roundcube-1.2.3,1...
[roundcube] [16/16] Extracting roundcube-1.2.3,1: 100%
Message from php56-pdo-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-20-pdo.ini
configuration file to automatically load the installed extension:
extension=pdo.so
****************************************************************************
Message from php56-session-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-18-session.ini
configuration file to automatically load the installed extension:
extension=session.so
****************************************************************************
Message from php56-xml-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-20-xml.ini
configuration file to automatically load the installed extension:
extension=xml.so
****************************************************************************
Message from php56-iconv-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-20-iconv.ini
configuration file to automatically load the installed extension:
extension=iconv.so
****************************************************************************
Message from php56-pdo_mysql-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-30-pdo_mysql.ini
configuration file to automatically load the installed extension:
extension=pdo_mysql.so
****************************************************************************
Message from pecl-intl-3.0.0_6:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-20-intl.ini
configuration file to automatically load the installed extension:
extension=intl.so
****************************************************************************
Message from php56-filter-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-20-filter.ini
configuration file to automatically load the installed extension:
extension=filter.so
****************************************************************************
Message from php56-dom-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-20-dom.ini
configuration file to automatically load the installed extension:
extension=dom.so
****************************************************************************
Message from php56-zip-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-20-zip.ini
configuration file to automatically load the installed extension:
extension=zip.so
****************************************************************************
Message from php56-mbstring-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-20-mbstring.ini
configuration file to automatically load the installed extension:
extension=mbstring.so
****************************************************************************
Message from php56-json-5.6.28:
****************************************************************************
The following line has been added to your /usr/local/etc/php/ext-20-json.ini
configuration file to automatically load the installed extension:
extension=json.so
****************************************************************************
Message from roundcube-1.2.3,1:
---------------------------------------------------------------------
FIRST INSTALLATION
If this is a first installation of RoundCube you have to create
a new database and a db user. Read INSTALL for detailed instructions.
UPGRADING
If you already had a previous version of RoundCube installed,
you should check your config files and DB schema are up-to-date.
Read UPGRADING for detailed instructions.
---------------------------------------------------------------------
$config['log_driver'] = 'syslog';
$config['session_lifetime'] = 30;
$config['enable_installer'] = true;
$config['mime_types'] = '/usr/local/etc/mime.types';
$config['smtp_conn_options'] = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'verify_depth' => 3,
'cafile' => '/etc/ssl/cert.pem',
),
);
roundcubemail db exists
preserving roundcube password rcIsureLuvU
*** installing mime.types ***
/jails/stage/usr/local/etc/mime.types 100% of 59 kB 1238 kBps 00m00s
*** starting PHP ***
sysrc -R /jails/stage php_fpm_enable=YES
php_fpm_enable: -> YES
jexec stage service php-fpm start
Performing sanity check on php-fpm configuration:
[08-Dec-2016 13:58:20] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful
Starting php_fpm.
*** starting nginx ***
sysrc -R /jails/stage nginx_enable=YES
nginx_enable: -> YES
jexec stage service nginx start
Performing sanity check on nginx configuration:
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
Starting nginx.
*** testing roundcube httpd ***
checking for port 80 listener in staged jail
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
www nginx 23039 6 tcp4 172.16.15.254:80 *:*
root nginx 23038 6 tcp4 172.16.15.254:80 *:*
*** testing roundcube php ***
checking for port 9000 listener in staged jail
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
www php-fpm 22968 0 tcp4 172.16.15.254:9000 *:*
www php-fpm 22967 0 tcp4 172.16.15.254:9000 *:*
root php-fpm 22966 7 tcp4 172.16.15.254:9000 *:*
it worked
*** promoting jail roundcube ***
service jail stop stage
Stopping jails: stage.
jail -r stage
stage: removed
nameserver 172.16.15.3
umount /jails/stage/dev
unmount /jails/stage/usr/ports
unmount /jails/stage/var/cache/pkg
zroot/data/roundcube filesystem exists
/data/roundcube on /jails/stage/data (nullfs, local)
unmount data fs /jails/stage/data
zfs rename zroot/jails/stage zroot/jails/roundcube.ready
service jail stop roundcube
Stopping jails: roundcube.
jail -r roundcube
zroot/data/roundcube filesystem exists
zroot/jails/roundcube.last filesystem exists
zfs destroy zroot/jails/roundcube.last
zroot/jails/roundcube filesystem exists
zfs rename zroot/jails/roundcube zroot/jails/roundcube.last
zfs rename zroot/jails/roundcube.ready zroot/jails/roundcube
*** roundcube already in /etc/jail.conf ***
*** service jail start roundcube ***
Starting jails: roundcube.
Success! A new 'roundcube' jail is provisioned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment