Confluence is great way to manage projects and keep track of current/previous projects. Follow this guide on how to install Confluence. This guide assumes that the server is already setup with networking.
1. Create a Confluence Service User Account
The best way to run Confluence is as a service. In order to do so we must first create a service account.
adduser YourUserName passwd YourUserName usermod -aG wheel YourUserName
2. Download Confluence Server
First we are going to switch to our Confluence user and then install Confluence. Please note the download link below will very based on the current version of Confluence.
su YourUserName sudo wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-6.10.1-x64.bin
3. Install Confluence Server
Next we are going to install Confluence Server as our Confluence server account. This step is very important. If Confluence is not installed with another account that is not root then it can not be installed as a service.
We will first make the .bin file executable and then we will install it. Follow the prompts after running the executable.
sudo chmod a+x atlassian-confluence-6.10.1-x64.bin sudo ./atlassian-confluence-6.10.1-x64.bin
4. Open Required Ports
Now we will open the required firewall ports.
sudo firewall-cmd --zone=public --add-port=8090/tcp --permanent sudo firewall-cmd --zone=public --add-port=8000/tcp --permanent sudo firewall-cmd --reload
5. Install MySQL 5.7
Confluence requires a database to store its information. For this demonstration we will be installing MySQL 5.7 as this is a version that Confluence supports. Please choose the best database for your usage case.
First we are going to download MySQL 5.7 and then we will install it, start the service and then grab the temporary password that we will use in the upcoming steps.
wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm sudo rpm -ivh mysql57-community-release-el7-9.noarch.rpm sudo yum install mysql-server sudo systemctl start mysqld sudo grep 'temporary password' /var/log/mysqld.log
6. Secure MySQL 5.7
Now we can setup MySQL. Keep the temporary password from the last step handy as the security prompt will ask for it.
sudo mysql_secure_installation
7. Configure MySQL 5.7
After installing MySQL, we can now configure MySQL for Confluence. First we must optimize MySQL for Confluence by editing the my.cnf file located at “/etc/my.cnf”. Add the following after the “[mysqld]” line in the file.
sudo nano /etc/my.cnf # add the lines below to the file make sure there are no duplicates character-set-server=utf8 collation-server=utf8_bin default-storage-engine=INNODB max_allowed_packet=256M innodb_log_file_size=2GB transaction-isolation=READ-COMMITTED binlog_format=row # remove this if it exists sql_mode = NO_AUTO_VALUE_ON_ZERO
After closing and saving the file we can restart the MySQL service to complete the changes.
service mysqld restart
8. Setup MySQL Database
Now we are able to setup the MySQL database for Confluence.
Run MySQL as root and use the root password you created earlier.
sudo mysql -u root -p
Now enter the following commands to create the database and the confluence database user.
CREATE DATABASE <database-name> CHARACTER SET utf8 COLLATE utf8_bin; GRANT ALL PRIVILEGES ON <database-name>.* TO '<confluenceuser>'@'localhost' IDENTIFIED BY '<password>'; exit;
9. Install MySQL driver
Download the MySQL driver for Confluence and then copy the .bin.jar file to the Confluence install directory.
wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.46.zip sudo unzip mysql-connector-java-5.1.46.zip -d mysql-connector sudo cp mysql-connector/mysql-connector-java-5.1.46/mysql-connector-java-5.1.46-bin.jar /opt/atlassian/confluence/confluence/WEB-INF/lib
Restart Confluence.
sudo /etc/init.d/confluence restart
10. Finished
We are finished. You can now configure Confluence at http://your-server-name:8090 and run through the initial configuration and connect to you MySQL database.
Recent Comments