Atlassian Applications in Azure – Part 2, Confluence

I always like starting with Confluence. It gives me the most feeling of success when done.

So, lets start. First thing, is to revisit the database server and create ourselves a confluence database. Commands are in bold.

(if you haven’t given yourself root do this command instead: sudo -u Root su – postgres)

[root@PostGresDB1 ~]# su – postgres
Last login: Sun Jun 28 01:28:44 UTC 2015 on pts/0
-bash-4.2$ psql
psql (9.2.10)
Type “help” for help.

postgres=# create role confly login password ‘pickastrongoneandtypeithere’;
CREATE ROLE
postgres=# create database confdb encoding ‘UTF8’ owner con fly;
CREATE DATABASE
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
———–+———-+———-+————-+————-+———————–
confdb | conf | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(4 rows)

postgres=#

Install Confluence

download latest version from atlassian’s website and scp file over to the confluence server

example use of scp:
scp /usr/test/working/Test1 me@55.55.55.55:/usr/me/directory1/working/Test1
| | | | | |
Source Dir | | Remote Svr | Remote File (optional)
Source File | Remote Directory (optional)
Remote User
from my mac terminal window:
ssh -p 29 gvandenham@sprocket.cloudapp.net
once connected, create a directory on the confluence server to receive the file
mkdir ConfInstall
(new console window – copy file up.)
Gregorys-MacBook-Pro:downloads gvandenham$ scp -P 29 atlassian-confluence-5.8.4-1-x64.bin gvandenham@sprocket.cloudapp.net:/home/gvandenham/ConfInstall/
gvandenham@sprocket.cloudapp.net’s password:
atlassian-confluence-5.8.4-1-x64.bin 4% 19MB 3.0MB/s 02:01 ETA
(back on the conf server)
[gvandenham@Confluence01 ~]$ cd ConfInstall
[gvandenham@Confluence01 ConfInstall]$ ls
atlassian-confluence-5.8.4-1-x64.bin

We’ll change permissions on the file here so we can execute it.

[gvandenham@Confluence01 ConfInstall]$ chmod a+x atlassian-confluence-5.8.4-1-x64.bin
[gvandenham@Confluence01 ConfInstall]$

and with the ./ magic we execute the file as root.

gvandenham@Confluence01 ConfInstall]$ sudo -u root ./atlassian-confluence-5.8.4-1-x64.bin

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for gvandenham:
Unpacking JRE …
Starting Installer …
Jun 28, 2015 2:46:02 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Jun 28, 2015 2:46:02 AM java.util.prefs.FileSystemPreferences$2 run
INFO: Created system preferences directory in java.home.

This will install Confluence 5.8.4-1 on your computer.
OK [o, Enter], Cancel [c]
o
Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (uses default settings) [1],
Custom Install (recommended for advanced users) [2, Enter],
Upgrade an existing Confluence installation [3]
1
See where Confluence will be installed and the settings that will be used.
Installation Directory: /opt/atlassian/confluence
Home Directory: /var/atlassian/application-data/confluence
HTTP Port: 8090
RMI Port: 8000
Install as service: Yes
Install [i, Enter], Exit [e]
i

Extracting files …

Please wait a few moments while Confluence starts up.
Launching Confluence …
Installation of Confluence 5.8.4-1 is complete
Your installation of Confluence 5.8.4-1 is now ready and can be accessed via
your browser.
Confluence 5.8.4-1 can be accessed at http://localhost:8090
Finishing installation …
[gvandenham@Confluence01 ConfInstall]$

Go into azure and open some ports 😉

conf3

browse to the site http://address:8090

conf4

select the products to install
add some licenses

conf5

Get your Server License ID from confluence licensing page – it will ask for server ID

conf6

Select the database – postgreSQl

conf8

conf7

Stop for a second and add the endpoint in Azure for port 5432 (postgresql database) and check the database server for ports in use

[gvandenham@PostGresDB1 ~]$ netstat -na
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 100.112.x.x:16001 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 100.112.xxx.xx:43730 100.112.xxx.xx:80 TIME_WAIT
tcp 0 0 100.112.xxx.xx:46757 191.237.xx.xxx:443 TIME_WAIT
tcp 0 0 100.112.xxx.xx:43733 100.112.xxx.xx:80 TIME_WAIT
tcp 0 0 100.112.xxx.xx:22 50.129.xx.xxx:51160 ESTABLISHED
tcp 0 0 100.112.xxx.xx:46759 191.237.xx.xxx:443 TIME_WAIT
tcp 0 0 100.112.xxx.xx:46760 191.237.xx.xxx:443 TIME_WAIT
tcp 0 0 100.112.xxx.xx:46756 191.237.xx.xxx:443 TIME_WAIT
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:5432 :::* LISTEN
tcp6 0 0 ::1:25 :::* LISTEN

Note it’s missing the proper IP address..

Find the postgreSQL config file
[gvandenham@PostGresDB1 /]$ sudo -u root find -name postgresql.conf
[sudo] password for gvandenham:
./var/lib/pgsql/data/postgresql.conf
./usr/lib/tmpfiles.d/postgresql.conf
[gvandenham@PostGresDB1 /]$
[gvandenham@PostGresDB1 var]$ sudo vi /var/lib/pgsql/data/postgresql.conf
in VI, use cursor arrows to scroll, get to the right spot press ‘i’ to edit
remove the # comment at start of line, change localhost to * in listen_addresses, then hit esc.
press ZZ to save and exit

conf9

restart the service
sudo service postgresql restart

check the port utilized with netstat -nlp | grep 5432

[gvandenham@PostGresDB1 var]$ netstat -nlp | grep 5432
(No info could be read for “-p”: geteuid()=1000 but you should be root.)
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN –
tcp6 0 0 :::5432 :::* LISTEN –
unix 2 [ ACC ] STREAM LISTENING 68060 – /tmp/.s.PGSQL.5432
unix 2 [ ACC ] STREAM LISTENING 68058 – /var/run/postgresql/.s.PGSQL.5432
[gvandenham@PostGresDB1 var]$

conf8

If successful, will stall out on this page for a few minutes while database is being created.
if you get an error below, fix the pg_hba.conf postgresql file.

conf10

[gvandenham@PostGresDB1 var]$ sudo vi /var/lib/pgsql/data/pg_hba.conf
add a host line to IPv4 with the IP address of the host that is connecting and since its using a password, method is md5. save the file and restart the service

conf11

Restart the service:

[gvandenham@PostGresDB1 var]$ sudo service postgresql restart
Redirecting to /bin/systemctl restart postgresql.service
[gvandenham@PostGresDB1 var]$

conf12

I choose empty site

conf13

conf14

this page will stall for a minute and then continue loading

conf15

Further config takes you to the admin panel

conf16

Create a quick space and We’re Done:

conf17



Leave a Reply

Your email address will not be published. Required fields are marked *