Category Archives: Servers

Install Jenkins on Ubuntu 16.04

This is what I did to get a functioning Jenkins server on Ubuntu 16.04 LTS.

1) I installed the default Java that comes with Ubuntu:
sudo apt-get install default-jdk
2) Test with “java -version”

This gave me version 1.8.0_91 which worked fine for Jenkins.

3) Next I added a new repository using a PPA package.

  1. wget -q -O – | sudo apt-key add –
  2. sudo sh -c ‘echo deb binary/ > /etc/apt/sources.list.d/jenkins.list’

4) Update with “sudo apt-get update”
5) Now install Jenkins using this new repo.
sudo apt-get install jenkins
This will create a new user = jenkins user with


  • home=/var/lib/jenkins
  • startup script= /etc/init.d/jenkins

6) Enable jenkins to start at boot with:
sudo systemctl enable jenkins.service
other systemctl commands:

  • sudo systemctl start jenkins.service
  • sudo systemctl status jenkins.service
  • sudo systemctl stop jenkins.service

Postfix and LDAP

POSTFIX was already installed in a simple fashion using real Unix accounts. We will continue to use these Unix accounts but pass authentication duties off to an LDAP server.

I used the Centos Directory Server and it was necessary to install the (75misc.ldif schema in the server to allow for mail aliases and mailing lists).

/etc/postix/ was not changed for this set-up.

The following settings were placed in

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
myhostname =
mydomain =
myorigin = $mydomain
inet_interfaces = all

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

unknown_local_recipient_reject_code = 550
mynetworks_style = subnet
#mynetworks =,

alias_maps = hash:/etc/aliases
alias_database = $alias_maps
local_recipient_maps = ldap:/etc/postfix/
home_mailbox = Maildir/
virtual_alias_maps = ldap:/etc/postfix/
newaliases_path = /usr/bin/newaliases.postfix

# Virtual Users
# I didn’t use this but it could be used

#virtual_mailbox_domains =
#virtual_mailbox_base = /var/spool/virt_mailboxes/
#virtual_mailbox_maps = hash:/etc/postfix/vmailbox
#virtual_mailbox_maps = ldap:/etc/postfix/
#virtual_minimum_uid = 100
#virtual_uid_maps = static:500
#virtual_gid_maps = static:500
#virtual_alias_domains =
#virtual_alias_maps = hash:/etc/postfix/valias

This was added to the bottom of the /etc/aliases file but otherwise it was left as installed (note: run the newaliases command after any changes are made to the aliases file).

root: tedc


bind = no
version = 3
timeout = 20
size_limit = 1
expansion_limit = 0
start_tls = no
tls_require_cert = no
server_host = ldap://
scope = sub
search_base = ou=people,dc=example,dc=com
query_filter = (mail=%s)
result_attribute = uid


bind = no
timeout = 20
server_host = ldap://
search_base = ou=aliases,dc=example,dc=com
scope = sub
version = 3
query_filter = (cn=%s)
result_attribute = rfc822MailMember