Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand

Download the Repository

The YUM repository configuration can be downloaded from the MySQL website.

http://dev.mysql.com/downloads/repo/yum/

Choose the desired distribution (Red Hat Enterprise Linux 7 / Oracle Linux 7 for this tutorial) and click Download. The download link can be retrieved without registering for an Oracle account. Locate the No thanks, just start my download link and pass the link URL as a parameter to rpm.

Code Block
rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

Install MySQL Packages

MySQL server can now be installed using YUM. The MySQL client package will be included with the server package.

Code Block
yum -y install mysql-community-server

Configure MySQL Server

Edit the /etc/my.cnf . Locate the [mysqld]section in the file, and add or modify the following parameters:

Code Block
character-set-server=utf8
collation-server=utf8_bin
default-storage-engine=INNODB

The modify the following parameter

Code Block
 max_allowed_packet=32M

Enable, Start and Check Status

Code Block
/usr/bin/systemctl enable mysqld
/usr/bin/systemctl start mysqld
/usr/bin/systemctl status mysqld

Set Root Password

Code Block
mysqladmin -u root password PASSWORD

Set Up Confluence Database

Log in

Code Block
mysql -u root -p'PASSWORD'

Create database

Code Block
CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin;

Grant Access

Code Block
GRANT ALL PRIVILEGES ON confluence.* TO 'confluence'@'localhost' IDENTIFIED BY 'PASSWORD';

To set up a direct JDBC connection:

Download the driver

Code Block
wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.38.tar.gz

gunzip and untar the driver files/

Copy the driver JAR file to the <confluence-install-dir>/confluence/WEB-INF/lib folder in your new or upgraded Confluence installation.

 

PostgreSQL

 

Expand

Install PostgreSQL

Code Block
# yum install postgresql-server

Initialize PostgreSQL

Code Block
# service postgresql initdb
# chkconfig postgresql on

Set up password authentication

Code Block
nano /var/lib/pgsql/data/pg_hba.conf

Find the lines that looks like this, near the bottom of the file, then replace "ident" with "md5"

Code Block
host    all             all             127.0.0.1/32            ident
host    all             all             ::1/128                 ident

Start and enable PostgreSQL

Code Block
# systemctl start postgresql
# systemctl enable postgresql

Create a role for Confluence

By default, PostgreSQL uses a concept called "roles" to aid in authentication and authorization. These are, in some ways, similar to regular Unix-style accounts, but Postgres does not distinguish between users and groups and instead prefers the more flexible term "role".

Code Block
# sudo -i -u postgres

Access PostgreSQL

Code Block
# psql

Exit out of the PostgreSQL prompt by typing:

Code Block
postgres=# \q
Create a

Create the role for Confluence

 

 

 

 

 

Code Block
[root@asia moucher]# service postgresql initdb
Hint: the preferred way to do this is now "postgresql-setup initdb"
Initializing database ... OK
[root@asia moucher]# chkconfig postgresql on
Note: Forwarding request to 'systemctl enable postgresql.service'.
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql.service to /usr/lib/systemd/system/postgresql.service.
[root@asia moucher]# nano /var/lib/pgsql/data/pg_hba.conf
[root@asia moucher]# systemctl start postgresql
[root@asia moucher]# systemctl enable postgresql
[root@asia moucher]# -i -u postgres
bash: -i: command not found...
[root@asia moucher]# sudo -i -u postgres
-bash-4.2$ psql
psql (9.2.14)
Type "help" for help.
postgres=# \q
-bash-4.2$ psql
psql (9.2.14)
Type "help" for help.
postgres=# postgres=# create role confluenceuser with login password 'Verdammt13<password>' valid until 'infinity';
ERROR: syntax error at or near "postgres"
LINE 1: postgres

Create the  database:

Code Block
postgres=# create role confluenceuser with login password 'V...
 ^
postgres=# postgres=# create database confluence with encoding='utf-8' owner=confluenceuser connection limit=-1;
ERROR: syntax error at or near "postgres"
LINE 1: postgres=# create database confluence with encoding='utf-8' ...
 ^
postgres=# create role confluenceuser with login password 'Verdammt13' valid until 'infinity';
CREATE ROLE
postgres=# create database confluence with encoding='utf-8' owner=confluenceuser connection limit=-1;
CREATE DATABASE
postgres=#cp

Exit out of the PostgreSQL prompt by typing and return to the previous user account:

Code Block
postgres=# \q
# exit

To set up a direct JDBC connection:

Download the driver

Code Block
wget http://jdbc.postgresql.org/download/postgresql-9.2-1004.jdbc4.jar

Copy the driver JAR file to the <confluence-install-dir>/confluence/WEB-INF/lib folder in your new or upgraded Confluence installation.

Start Confluence!

Code Block
cd /opt/atlassian/install/atlassian-confluence-5.9.4/bin
cd ..

...