| | {section} |
| | {column} |
| | {panel:title=Table Of Content|borderStyle=dashed|borderColor=#ccc|titleBGColor=#007F0E|bgColor=#DCFFD6} |
| | {toc} |
| | {panel} |
| | {column} |
| | {column:width=200px}{rate} |
| | {html:script=#googleadsense_200x200.html} |
| | {html} |
| | {column} |
| | {section} |
| | |
| | h1. Foreword |
| | |
| | Confluence is the best wiki out there and I love it a lot. My company uses it for everything and everyday I spend at least an hour on it. I spent many hours on installing Confluence on Ubuntu Server Virtual Machine since I encountered many issues along the way. I document everything here and hope everybody will find it helpful. |
| | |
| | Please feel free to rate this document on upper right corner. ;) Thanks a lot! |
| | |
| | {note:title=If you are lazy...} |
| | Jump to the last part of this document to download a pre-installed and configured VM. You only need your license and configure confluence to use mysql (< 2 mins). ^_^ |
| | {note} |
| | |
| | h1. Step by step Installation |
| | |
| | h2. Install Confluence on Ubuntu Server 7.04 Virtual Machine |
| | |
| | h3. Step 1 - Install [VMware player | http://www.vmware.com/download/player/] |
| | |
| | h3. Step 2 - Download [Ubuntu 7.04 server virtual machine | http://www.vmware.com/vmtn/appliances/directory/972] |
| | |
| | h3. Step 3 - Setup network on Ubuntu 7.04 (assume there is a DHCP server in the network) |
| | |
| | # Start wmware player and open the downloaded vm in step2. |
| | # While prompting for UUID, choose to create a new one |
| | !CreateNewUUID.jpg! |
| | # Use username "user" and password "user" to login |
| | # Execute "ifconfig", if only {color:blue}lo{color} is shown as below, please continue on to fix the network issue first. If network is working, you can skip to Step 4. |
| | !NoNetwork.jpg! |
| | # Get the Correct Mac Address |
| | {code} |
| | ifconfig -a |
| | {code} |
| | # write down "HWaddr" for eth1 as shown in the screen shot |
| | !GetNetworkAddress.jpg! |
| | # Change the network card settings |
| | {code} |
| | cd /etc |
| | sudo vi iftab |
| | replace the mac address for eth0 with the one that has been written down |
| | {code} |
| | # Restart the server |
| | {code} |
| | sudo shutdown -r now |
| | {code} |
| | # Now execute "ifconfig" you should see an ip address listed for \*eth0" |
| | |
| | h3. Step 4 - Install Java5 JRE |
| | |
| | {code} |
| | sudo apt-get install sun-java5-jre |
| | {code} |
| | |
| | h3. Step 5 - Install Tomcat5.5 |
| | |
| | # download and install tomcat 5.5 |
| | {code} |
| | sudo apt-get install tomcat5.5 |
| | {code} |
| | # set JAVA_HOME |
| | {code} |
| | sudo vi /usr/share/tomcat5.5/bin/setclasspath.sh |
| | add "JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.11" or whatever you choose for the JRE location under "CLASSPATH=" |
| | {code} |
| | !setJavaHome.jpg! |
| | # fix a known tomcat won't start up issue |
| | {code} |
| | cd /usr/share/tomcat5.5/logs |
| | sudo mv catalina.out catalina.out.old |
| | sudo touch catalina.out |
| | sudo chown tomcat55 catalina.out |
| | {code} |
| | # set JAVA_HOME and change security setting on tomcat 5.5 auto start script |
| | {code} |
| | cd /etc/init.d |
| | sudo vi tomcat5.5 |
| | add JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.11 |
| | and update "TOMCAT5_SECURITY=yes" to |
| | TOMCAT5_SECURITY=no |
| | {code} |
| | !turnoffSecurity.jpg! |
| | |
| | h3. Step 6 - Download and Extract Confluence |
| | |
| | {code} |
| | cd /home/user |
| | mkdir downloads |
| | cd downloads |
| | wget http://www.atlassian.com/software/confluence/downloads/binary/confluence-2.5.6.tar.gz |
| | tar zxvf confluence-2.5.6.tar.gz |
| | sudo mv confluence-2.5.6 /usr/share/ |
| | {code} |
| | |
| | h3. Step 7 - Configure Tomcat to Use Confluence as the Default Webapp |
| | |
| | {code} |
| | cd /usr/share/tomcat5.5/conf |
| | sudo vi server.xml |
| | jump to the end of the file and add the following right above the last </Host> |
| | <Context path="" docBase="/usr/share/confluence-2.5.6/confluence" debug="0" reloadable="false"> |
| | <Manager pathname="" /> |
| | </Context> |
| | {code} |
| | !AddConfluenceToTomcat.jpg! |
| | |
| | h3. Step 8 - Configure Confluence |
| | |
| | # create directory for storing confluence data, backup, attachments, etc.. |
| | {code} |
| | cd /srv |
| | sudo mkdir confluence |
| | cd confluence |
| | sudo mkdir data |
| | cd .. |
| | sudo chown -hR tomcat55 confluence |
| | {code} |
| | # configure confluence to use the directory created above |
| | {code} |
| | cd /usr/share/confluence-2.5.6/confluence/WEB-INF/classes/ |
| | sudo vi confluence-init.properties |
| | uncomment the last line and change to |
| | confluence.home=/srv/confluence/data |
| | {code} |
| | !ConfigureConfluenceStorage.jpg! |
| | # restart ubuntu server |
| | {code} |
| | sudo shutdown -r now |
| | {code} |
| | {info:title=Congratulations!} |
| | Now you should have successfully installed Confluence on a tomcat 5.5 server. Now you should be able to open a browser and point to the [http://ubuntuip:8180/] and see the configuring Confluence screen. :-) Next we will go through some post installation settings such as "how to set up Confluence to use Mysql database that supports UTF8" and "how to setup mail server using gmail". |
| | {info} |
| | |
| | h2. Post Installation |
| | |
| | |
| | h3. Step 9 - How to Set Up Confluence to Use Mysql Database That Supports UTF8 |
| | |
| | |
| | h4. Step 9.1 - Install Mysql server 5.0 |
| | |
| | {code} |
| | sudo apt-get install mysql-server |
| | {code} |
| | |
| | h4. Step 9.2 - Get Mysql JDBC Driver |
| | |
| | {code} |
| | wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.0.7.tar.gz/from/http://mirror.x10.com/mirror/mysql/ |
| | tar zxvf mysql-connector-java-5.0.7.tar.gz |
| | cd mysql-connector-java-5.0.7 |
| | sudo cp mysql-connector-java-5.0.7-bin.jar /usr/share/confluence-2.5.6/confluence/WEB-INF/lib/ |
| | sudo shutdown -r now |
| | {code} |
| | |
| | h4. Step 9.3 - Setup Mysql DataBase that supports UTF8 |
| | |
| | {code} |
| | mysql -u root -p |
| | hit enter directly since the default root password is empty |
| | CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_general_ci; |
| | grant all on confluence.* to 'atlassian'@'localhost' identified by 'confluence'; |
| | flush privileges; |
| | {code} |
| | |
| | h4. Step 9.4 - Configure Confluence to Use Mysql Database Created Above |
| | |
| | # open a broswer and hit [http://ip:8180/] you should see the installation guide |
| | # go to [this link | http://www.atlassian.com/software/confluence/PersonalDownload!default.jspa ] and request a personal license |
| | # add license key then choose "Custom Installation" |
| | # on "External Database", select "Mysql" from drop down menu then click on "External Databases" button |
| | # click "Direct JDBC" button and use the following info |
| | {code} |
| | jdbc:mysql://localhost/confluence?autoReconnect=true&useUnicode=true&characterEncoding=utf8 |
| | username: atlassian |
| | password: confluence |
| | {code} |
| | # click "Next", wait a while for the database tables to be created and data initialized. |
| | # Then you should see the "Load Content" page, you can choose "Empty Site", then create an admin account or choose the other paths |
| | # Now you can start enjoying your personal wiki with a stable Mysql database. ^(++)^ |
| | |
| | h3. Step 10 - How to Setup SMTP Mail Server Using Gmail |
| | |
| | |
| | h4. Step 10.1 - Add Mail Server Resource to Tomcat |
| | |
| | {code} |
| | cd /usr/share/tomcat5.5/conf |
| | sudo vi server.xml |
| | inside <Context, add the following (please use your own gmail username and password) |
| | <Resource name="mail/Session" |
| | auth="Container" |
| | type="javax.mail.Session" |
| | mail.smtp.host="smtp.gmail.com" |
| | mail.smtp.port="465" |
| | mail.smtp.auth="true" |
| | mail.smtp.user="yourname@gmail.com" |
| | password="yourpassword" |
| | mail.smtp.starttls.enable="true" |
| | mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory" |
| | /> |
| | {code} |
| | !addMailSession.jpg! |
| | |
| | h4. Step 10.2 - Move mail and activation jars to Tomcat |
| | |
| | {code} |
| | cd /usr/share/confluence-2.5.6/confluence/WEB-INF/lib |
| | sudo mv javamail-1.3.2.jar /usr/share/tomcat5.5/common/lib |
| | sudo rm mail-1.3.3.jar |
| | sudo mv activation-1.0.2.jar /usr/share/tomcat5.5/common/lib |
| | {code} |
| | |
| | h4. Step 10.3 - Restart Tomcat |
| | |
| | {code} |
| | sudo shutdown -r now |
| | {code} |
| | |
| | h4. Step 10.4 - Configure Confluence to use the mail server |
| | |
| | # Login Confluence as admin |
| | # Click on "Mail Servers" and choose to create a new one |
| | # use JNDI and enter "java:comp/env/mail/Session" |
| | # Now you should be able to send a test mail using gmail SMTP server. :-) |
| | |
| | h1. Use the pre-installed and configured VM |
| | |
| | I have gone through the steps above multiple times on brand new Ubuntu Server VM to make sure I didn't miss anything. So if you don't want to go through the steps, you can follow the steps below to have Confluence running in 2 minutes plus the download time. :) |
| | |
| | h2. [Download the VM | http://www.xiguaforever.net/download/Confluence_Ubuntu.rar] |
| | |
| | This VM has the following software installed |
| | |
| | * Java 1.5.0.11 JRE |
| | * MySQL 5.0 with a blank "confluence" database created that supports UTF8 |
| | * MySQL JDBC driver |
| | * Tomcat 5.5 |
| | * dummy mail JNDI entry created that uses gmail smtp server |
| | | * username and password: user/user |
| | |
| | Please follow the steps below to have a functional confluence site in 2 minutes: |
| | |
| | h3. Step 1 - [Fix the network | http://www.xiguaforever.net/confluence/display/KB/Install+Confluence+on+Ubuntu+Server+Virtual+Machine#InstallConfluenceonUbuntuServerVirtualMachine-Step3SetupnetworkonUbuntu7.04%28assumethereisaDHCPserverinthenetwork%29] |
| | |
| | h3. Step 2 - Connect Confluence an MySQL database |
| | |
| | # open a broswer and hit [http://ip:8180/] you should see the installation guide |
| | # go to [this link | http://www.atlassian.com/software/confluence/PersonalDownload!default.jspa ] and request a personal license |
| | # add license key then choose "Custom Installation" |
| | # on "External Database", select "Mysql" from drop down menu then click on "External Databases" button |
| | # click "Direct JDBC" button and use the following info |
| | {code} |
| | jdbc:mysql://localhost/confluence?autoReconnect=true&useUnicode=true&characterEncoding=utf8 |
| | username: atlassian |
| | password: confluence |
| | {code} |
| | # click "Next", wait a while for the database tables to be created and data initialized. |
| | # Then you should see the "Load Content" page, you can choose "Empty Site", then create an admin account or choose the other paths |
| | # Now you can start enjoying your personal wiki with a stable Mysql database. ^(++)^ |
| | |
| | h3. Step 3 (Optional) - Use Gmail SMTP server |
| | |
| | # sudo vi /usr/share/tomcat5.5/conf/server.xml |
| | # jump to the bottom of the file and replace the dummy username and password with your own |
| | # restart tomcat or the VM |
| | # Login Confluence as admin |
| | # Click on "Mail Servers" and choose to create a new one |
| | # use JNDI and enter "java:comp/env/mail/Session" |
| | # Now you should be able to send a test mail using gmail SMTP server. :-) |