Base System and Requirements
For this installation I used the following:
- Linode 512 VPS
- CentOS 5.4
- MySQL 5.0.77 (current version shipping with CentOS 5.4)
- Java SE 1.6.0_20-b02
- GMail for SMTP
I'll assume you have your Linode up and running with CentOS and start the install procedure from there.
Step 1: Buy a Confluence Starter License
Step 2: Install Dependencies
Confluence has a few dependencies, and my installation instructions assume that you have a few basic tools installed. As root perform the following:
# yum install wget mysql mysql-server libXp libXp-devel
Confluence is written in Java, so you'll also need to have Java 1.6 installed. Unfortunately Oracle/Sun makes this harder than it needs to be. They require that you follow their web based process to generate a download URL which can be used from wget.
You can start here and select Linux and continue. When the login pops up, select, "skip this step." Now on the download page, copy the second rpm.bin download link URL.
I then did the following to install Java as root:
# cd /usr/local # wget '<paste nasty long generated URL here>' -O jdk.rpm.bin # sh ./jdk.rpm.bin
To complete the java installation you need to set the JAVA_HOME variable. The easiest place to add it is /etc/profile. Add the following line to the end of the file:
export JAVA_HOME=/usr/java/default
To set the variable in your current shell instance simply type the following at the command line
# export JAVA_HOME=/usr/java/default
After setting the variable in /etc/profile you will not need to the set the variable the next time you login.
Step 3: Download and Configure Confluence Standalone
I installed confluence at /usr/local/confluence.
As root perform the following:
# cd /usr/local/ # wget http://www.atlassian.com/software/confluence/downloads/binary/confluence-3.3-std.tar.gz # tar zxvf confluence-3.3-std.tar.gz # mv confluence-3.3-std confluence
Now edit the file: /usr/local/confluence/confluence/WEB-INF/classes/confluence-init.properties
At the end of the file add the following line:
confluence.home=/usr/local/confluence
In this installation I will configure Tomcat to serve the application to the external network directly, but in my production system I use nginx as a proxy in front of Tomcat. If you have Apache or another web server running on startup, shut it down, and ensure that service isn't restarted at boot time. You can do this with:
# service httpd stop # chkconfig httpd off
Edit the file /usr/local/confluence/conf/server.xml and change the line:
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8080" minProcessors="5"
to
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="80" minProcessors="5"
Step 4: Configure MySQL
This next part of the process is what convinced me to write this guide. Confusingly, Atlassian's documentation recommends running the 'MySQL Server Instance Config Wizard,' but what they don't state is that this is only available on Windows and they don't provide mysql commands to setup the DB. Fortunately it isn't very difficult.
You might want to force mysqld to only listen on localhost, especially on internet facing servers. To do this add the following to /etc/my.cnf in the [mysqld] section.
bind-address=127.0.0.1
Now start the mysql server and set it to start at boot with the following commands:
# chkconfig mysqld on # service mysqld start
Now run mysql_secure_installation to set the root password for the DB, and then start the mysql command prompt with:
# mysql -u root -p
Now at the mysql> prompt run the following commands to create the confluence DB:
CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL PRIVILEGES ON confluence.* TO 'confluenceuser'@'localhost' IDENTIFIED BY '<password>';
FLUSH PRIVILEGES;
Replace <password> with the password you want to use for the confluence user account in MySQL. You will need this to access the database when you start Confluence.
Step 5: Start Confluence
Ok, finally we are ready to start the confluence server and try out the installation.
# sh /usr/local/confluence/bin/startup.sh
Now in your web browser, browse to your server's IP Address. Next you need to generate a server key at Atlassian's web site. You'll have to provide your Server ID, which will bind your license to your VPS. Copy the license key and paste it into the browser window, then select, "Production Installation."
At the Database Configuration screen, in the "External Database" section, choose "MySQL" and click "External Database > >"
At the next screen, select "Direct JDBC > >"
In the next screen set the User Name: to "confluenceuser" and set the password from step 4. This might take a few minutes.
Next you can load content into the site. It is your choice, but I prefer to build an empty site.
Now create the administrator account that will be used to log into confluence.
Finally, you can start using the Wiki!
I made a few more changes, namely configuring gmail as my SMTP server and setting up Tomcat to run behind the nginx reverse proxy, but I'll go over those in a future entry.
Comments (2)
Sep 15
Anonymous says:
Thanks for doing this. I had a very tough time with Linode's tutorial, but...Thanks for doing this. I had a very tough time with Linode's tutorial, but this worked like a charm. for a new instance you'll need to yum install httpd. Perhaps set a hostname too!
Oct 20
Anonymous says:
Next, try to determine the type of cheap queen mattress sets material production...Next, try to determine the type of cheap queen mattress sets material production. The most popular for centuries are the metal frames.They were created much earlier plastic, as plastic younger material.
Add Comment