heihachi88
1/14/2015 - 7:25 PM

Install jira on ubuntu

Install jira on ubuntu

Updating 6 to 7.

1. Install jira 6
2. Download jira 7 software installer
3. run it and choose upgrade existing installation
4. update configs for nginx.
1) create database jira in mysql
2) download jira: http://www.atlassian.com/software/jira/downloads/
3) chmod 755 it
4) sh atlassian-jira-6.3.6-x32.bin (install with sudo and use express method)

# nginx config
server {
        listen 80;
        listen [::]:80;
        server_name jira.webium.me;
        return 301 https://$server_name$request_uri;
}

server {
        listen 443 ssl;
        listen [::]:443 ssl;
        
        server_name jira.webium.me;

        root /srv/www/jira.webium.me;
        #index index.php index.html index.htm;

        ssl_certificate /etc/letsencrypt/live/jira.webium.me/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/jira.webium.me/privkey.pem;

        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers on;

        location / {
                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;
                proxy_pass http://localhost:8080;
                client_max_body_size 10M;

                # vs timeouts
                proxy_connect_timeout       600;
                proxy_send_timeout          600;
                proxy_read_timeout          600;
                send_timeout                600;
        }
}

# atlassian/jira/conf/server.xml
# append these lines to <Connector port="8080"
  maxThreads="150"
  minSpareThreads="25"
  connectionTimeout="20000"
  
  enableLookups="false"
  maxHttpHeaderSize="8192"
  protocol="HTTP/1.1"
  useBodyEncodingForURI="true"
  redirectPort="8443"
  acceptCount="100"
  secure="true"
  scheme="https"
  proxyName="jira.webium.me"
  proxyPort="443"
  disableUploadTimeout="true"/>

# stop and start jira atlassian/jira/bin
sh shutdown.sh
sh start-jira.sh
/var/atlassian/application-data/jira:

    data/attachments - здесь хранятся все привязанные к запросам файлы
    data/avatars - картинки пользователей
    logos - файлы логотипов JIRA
    
    
# to turn off admin session password create a file /var/atlassian/application-data/jira/jira-config.properties
jira.websudo.is.disabled = true

# restart jira

# don't forget to re-index after restoring

# change jira service name from jira1 to jira - go to /etc/init.d and rename it
sudo a2enmod proxy_http

service apache2 reload

sudo a2enmod remoteip

sudo apache2 reload
ServerName jira.webium.me
ServerAlias www.jira.webium.me

ServerAdmin webmaster@localhost

ProxyRequests Off
ProxyVia Block
ProxyPreserveHost On
RemoteIPHeader X-Forwarded-For

<Proxy *>
        Require all granted
</Proxy>

<Location />
        ProxyPass http://localhost:8080/
        ProxyPassReverse http://localhost:8080/
</Location>