Crmgo Блог

Centos 7, установка Jira

Centos 7, установка Jira

создаем db и пользователя: mysql -p Скачиваем bin с сайта https://www.atlassian.com/software/jira/download chmod a+x atlassian-jira-software-7.2.2-x64.bin ./atlassian-jira-software-7.2.2-x64.bin Отвечаем на вопросы, после установки на джиру уже можно зайти по порту 8080. Для подключения к MySQL нам понадобится mysql connector, скачиваем его: http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.39.tar.gz tar…

Centos 7,  установка Jira

создаем db и пользователя:

mysql -p

CREATE DATABASE jiradb CHARACTER SET utf8 COLLATE utf8_bin;

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on jiradb.* TO jirauser@'localhost' IDENTIFIED BY '***';

flush privileges;

Скачиваем bin с сайта https://www.atlassian.com/software/jira/download

chmod a+x atlassian-jira-software-7.2.2-x64.bin

./atlassian-jira-software-7.2.2-x64.bin

Отвечаем на вопросы, после установки на джиру уже можно зайти по порту 8080.

Для подключения к MySQL нам понадобится mysql connector, скачиваем его:

http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.39.tar.gz

tar - xzvf mysql-connector-java-5.1.39.tar.gz

cp mysql-connector-java-5.1.39/mysql-connector-java-5.1.39-bin.jar /opt/atlassian/jira/lib/

Перезапускаем JIRA:

sh /opt/atlassian/jira/bin/stop-jira.sh
sh /opt/atlassian/jira/bin/start-jira.sh
после чего входим в админку, конектим к DB и пользуемся.
Для русификации скачиваем:
https://translations.atlassian.com/dashboard/download?lang=ru_RU#/JIRA/6.2.6
Устанавливаем чз адоны и в system выбираем Ru.

Integrating JIRA with Nginx

Configuring Tomcat

In this example, we want a setup where JIRA can be accessed at the address http://www.atlassian.com/jira (on standard HTTP port 80), while JIRA itself listens on port 8080 with context path /jira.

Set the Context Path

  • cd /opt/atlassian/jira
  • vim conf/server.xml
<Context docBase="${catalina.home}/atlassian-jira" path="" reloadable="false" useHttpOnly="true">
Configure the Connector
  1. Configure the HTTP connectors so we have one serving as a proxy connector and another for troubleshooting. This is done in the same <JIRA-INSTALL>/conf/server.xml file, locate this code segment:
    <Connector port="8080" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false" maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443" acceptCount="100" disableUploadTimeout="true"/>
  2. And add the proxyName and proxyPort elements (replacing them with the appropriate properties), and another connector below - this is used for troubleshooting to bypass the proxy:
    <!-- Nginx Proxy Настройки на 80-й порт
    <Connector port="8080"
     maxThreads="150"
     minSpareThreads="25"
     connectionTimeout="20000"
     enableLookups="false"
     maxHttpHeaderSize="8192"
     protocol="HTTP/1.1"
     useBodyEncodingForURI="true"
     redirectPort="8443"
     acceptCount="100"
     disableUploadTimeout="true"
     proxyName="www.atlassian.com" proxyPort="80"/>
    Если используем https:
    <Connector port="8081"
     maxThreads="150"
     minSpareThreads="25"
     connectionTimeout="20000"
     enableLookups="false"
     maxHttpHeaderSize="8192"
     protocol="HTTP/1.1"
     useBodyEncodingForURI="true"
     redirectPort="8443" 
    acceptCount="100" 
    disableUploadTimeout="true"
    proxyName="www.atlassian.com"
     proxyPort="443" 
    scheme="https" 
    secure="true"/>
    <!-- Standard HTTP Connector -->
    <Connector port="8082"
     maxThreads="150"
     minSpareThreads="25"
     connectionTimeout="20000" 
    enableLookups="false"
     maxHttpHeaderSize="8192"
     protocol="HTTP/1.1"
     useBodyEncodingForURI="true"
     redirectPort="8443" 
    acceptCount="100"
     disableUploadTimeout="true"/>
    Restart JIRA and verify it can be accessed on the base URL (for example http://www.atlassian.com/jira). You may receive some errors about the dashboard being incorrectly configured - we'll fix this in the next section.

    Configure Nginx
  1. Update the Nginx settings to have the below server (replacing www.atlassian.com with the FQDN and jira-hostname with the hostname of the server):
    server {
      listen www.atlassian.com:80;
    server_name www.atlassian.com;
    location /jira {
      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://jira-hostname:8080/jira;
      client_max_body_size 10M;
    }
    }

    (info) By default Nginx allows 1MB file to be attached into JIRA. So, parameter client_max_body_size is necessary to set the maximum size of attachment that can be uploaded into JIRA

  2. If configuring SSL, follow the instructions in https://mozilla.github.io/server-side-tls/ssl-config-generator/ to generate the profile.
  3. If you want to redirect HTTP to HTTPS the below can be used instead of the above block (remember to replace www.atlassian.com with the FQDN):
    server {
          listen 80 default_server;
        listen [::]:80 default_server ipv6only=on;
        server_name atlassian.com www.atlassian.com;
        return 301 https://$server_name$request_uri;
    }
  4. If configuring SSL, ensure the security config from https://mozilla.github.io/server-side-tls/ssl-config-generator/ is used.
  5. Restart Nginx.

Test JIRA

  1. Restart JIRA and verify it can be accessed on the base URL (for example http://www.atlassian.com/jira) and also the 8081 port (e.g.: http://www.atlassian.com:8080/jira).
  2. For normal operation of JIRA you will also need to set the base URL accordingly. In this example the base URL shall be set to http://www.atlassian.com/jira.
  3. Disable GZIP compression as described in Configuring JIRA Options.

Примечание: материал мог быть создан с помощью ИИ и затем отредактирован человеком. Ответственный: Dmytro Lomaka, Kaltenkirchen.

Рубрики: Jira