Last active
June 8, 2016 06:02
-
-
Save buonzz/3a5b7c975b9b61e80153 to your computer and use it in GitHub Desktop.
install confluence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-5.9.4-x64.bin | |
| chmod +x atlassian-confluence-5.9.4-x64.bin | |
| ./atlassian-confluence-5.9.4-x64.bin | |
| sudo apt-get update | |
| sudo apt-get install nginx | |
| sudo vi /etc/nginx/sites-available/docs.youdomain.com | |
| server { | |
| listen 80; | |
| server_name docs.domain.com; | |
| location / { | |
| proxy_pass http://127.0.0.1:8090; | |
| proxy_set_header X-Forwarded-Host $host; | |
| proxy_set_header X-Forwarded-Server $host; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| client_max_body_size 10M; | |
| } | |
| } | |
| sudo ln -s /etc/nginx/sites-available/docs.domain.com /etc/nginx/sites-enabled/docs.domain.com | |
| sudo nginx -s reload | |
| vi ~/atlassian/confluence/conf/server.xml | |
| <Connector port="8090" connectionTimeout="20000" redirectPort="8443" | |
| maxThreads="200" minSpareThreads="10" | |
| enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" | |
| protocol="org.apache.coyote.http11.Http11NioProtocol" proxyName="docs.domain.com" proxyPort="80"/> | |
| ~/atlassian/confluence/bin/stop-confluence.sh | |
| ~/atlassian/confluence/bin/start-confluence.sh | |
| ## head into https://my.atlassian.com/products and get a fucking evaluation license | |
| # then visit http://docs.yourdomain.com and choose production installation | |
| # we choose MySQL for backend db - https://confluence.atlassian.com/doc/database-setup-for-mysql-128747.html | |
| # download the jar file in here http://dev.mysql.com/downloads/connector/j/ | |
| wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.38.zip | |
| sudo apt-get install unzip | |
| unzip mysql-connector-java-5.1.38.zip | |
| cp mysql-connector-java-5.1.38/mysql-connector-java-5.1.38-bin.jar ~/atlassian/confluence/lib/ | |
| ~/atlassian/confluence/bin/stop-confluence.sh | |
| ~/atlassian/confluence/bin/start-confluence.sh | |
| # install MySQL server | |
| sudo apt-get install mysql-server | |
| sudo mysql_secure_installation | |
| # setup db for confluence | |
| CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin; | |
| GRANT ALL PRIVILEGES ON confluence.* TO 'confluenceuser'@'localhost' IDENTIFIED BY 'yourpass'; | |
| # in configure database, choose direct jdbc | |
| # username is confluenceuser, password is the password you picked above | |
| # the following is guide in case you execued it as root | |
| # if you got "Spring Application context has not been set" error | |
| # sudo mv /var/atlassian/application-data/confluence/confluence.cfg.xml /var/atlassian/application-data/confluence/confluence.cfg.xml.bak | |
| # to restart the install process | |
| # if getting "Couldn't lock file 'lock' in directory /data/atlassian/application-data/confluence | |
| # Make sure the directory is not being used by another Confluence instance." | |
| # delete the lock file, see https://developers.atlassian.com/questions/34996336/make-sure-the-directory-is-not-being-used-by-another-confluence-instance. | |
| # sudo rm /var/atlassian/application-data/confluence/lock | |
| # sudo chown -R confluence:confluence /var/atlassian/application-data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment