Bonjour, si vous voulez installer Jira sur votre serveur.
Voici comment faire :
Veuillez vous mettre en root avant de l'installer !
Installer MySQL (CentOS / RedHat):
nano /etc/yum.repos.d/mysql-community.repo
(Seulement pour CentOS 7)
[mysql80-community]
name=MySQL 8.0 Community Server
baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/$releasever/$basearch/
enabled=1
gpgcheck=0
[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/$releasever/$basearch/
enabled=1
gpgcheck=0
[mysql-tools-community]
name=MySQL Tools Community
baseurl=http://repo.mysql.com/yum/mysql-tools-community/el/$releasever/$basearch/
enabled=1
gpgcheck=0
CentOS 8 / RedHat 8
yum update
yum install -y mysql-server
CentOS 7 / RedHat 7
yum update
yum install -y mysql-community-server
Démarrer MySQL et l'activer au démarrage
systemctl enable --now mysqld.service
Configurer MySQL :
grep 'temporary password' /var/log/mysqld.log`
mysql_secure_installation
nano /etc/my.cnf.d/mysql-server.cnf
# Disable bin logs. they are only useful in replication mode
#skip-log-bin
# Jira
max_binlog_size = 100M
expire_logs_days = 2
default-storage-engine=INNODB
character_set_server=utf8mb4
innodb_default_row_format=DYNAMIC
innodb_log_file_size=2G
bind_address = 0.0.0.0
systemctl restart mysqld
Créer votre Base de Données :
mysql -u root -p
CREATE DATABASE jira CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER 'jira'@'localhost' IDENTIFIED BY 'Mot_de_Passe';
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,ALTER,INDEX on jira.* TO 'jira'@'localhost' IDENTIFIED BY 'Mot_de_Passe';
FLUSH PRIVILEGES;
QUIT;
Télécharger Jira Software (Payant) :
wget https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-8.13.7-x64.bin -O jira-software.bin
Télécharger Jira Core (Gratuit) :
wget https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-core-8.13.7-x64.bin -O jira-core.bin
Installer Jira Software (Payant) :
chmod +x jira-software.bin
./jira-software.bin
Installer Jira Core (Gratuit) :
chmod +x jira-core.bin
./jira-core.bin
Installer Java MySQL connector :
wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-8.0.30.tar.gz
tar -xvf mysql-connector-java-8.0.30.tar.gz && rm -f mysql-connector-java-8.0.30.tar.gz
cp mysql-connector-java-8.0.30/mysql-connector-java-8.0.30.jar /opt/atlassian/jira/lib/
/etc/init.d/jira stop
/etc/init.d/jira start
Installer Nginx :
yum install -y nginx (CentOS 7)
dnf install -y nginx (CentOS 8 / RedHat 8)
apt install -y nginx (Ubutun / Debian)
systemctl enable --now nginx
Mettre en place le Reverse Proxy :
nano /opt/atlassian/jira/conf/server.xml
Modifier la partie suivante :
-->
<!-- Nginx Proxy Connector -->
<Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"
acceptCount="100" disableUploadTimeout="true" bindOnInit="false" scheme="http"
proxyName="mon.domaine.com" proxyPort="80"/>
<!-- Standard HTTP Connector -->
<Connector port="8082" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true"
redirectPort="8443" acceptCount="100" disableUploadTimeout="true"/>
<!--
Voici un exemple HTTP via Reserve Proxy :
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/>
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
<Service name="Catalina">
<!--
==============================================================================================================
DEFAULT - Direct connector with no proxy for unproxied access to Jira.
If using a http/https proxy, comment out this connector.
==============================================================================================================
HTTP - Proxying Jira via Apache or Nginx over HTTP
If you're proxying traffic to Jira over HTTP, uncomment the below connector and comment out the others.
Ensure the proxyName and proxyPort are updated with the appropriate information if necessary as per the docs.
See the following for more information:
Apache - https://confluence.atlassian.com/x/4xQLM
nginx - https://confluence.atlassian.com/x/DAFmGQ
==============================================================================================================
-->
<!-- Nginx Proxy Connector -->
<Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"
acceptCount="100" disableUploadTimeout="true" bindOnInit="false" scheme="http"
proxyName="mon.domaine.com" proxyPort="80"/>
<!-- Standard HTTP Connector -->
<Connector port="8082" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true"
redirectPort="8443" acceptCount="100" disableUploadTimeout="true"/>
<!--
<Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"
acceptCount="100" disableUploadTimeout="true" bindOnInit="false" secure="true" scheme="https"
proxyName="<subdomain>.<domain>.com" proxyPort="443"/>
-->
<!--
==============================================================================================================
AJP - Proxying Jira via Apache over HTTP or HTTPS
If you're proxying traffic to Jira using the AJP protocol, uncomment the following connector line
See the following for more information:
Apache - https://confluence.atlassian.com/x/QiJ9MQ
====================================PURGE BINARY LOGS BEFORE '2021-02-21 23:00:00';==========================================================================
-->
<!--
<Connector port="8009" URIEncoding="UTF-8" enableLookups="false" protocol="AJP/1.3"/>
-->
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true">
<Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"
factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
<Manager pathname=""/>
<JarScanner scanManifest="false"/>
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="120" />
</Context>
</Host>
<Valve className="org.apache.catalina.valves.AccessLogValve"
pattern="%a %{jira.request.id}r %{jira.request.username}r %t "%m %U%{sanitized.query}r %H" %s %b %D "%{sanitized.referer}r" "%{User-Agent}i" "%{jira.request.assession.id}r""/>
</Engine>
</Service>
</Server>
Voici un exemple SSL via Reverse Proxy :
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/>
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
<Service name="Catalina">
<!--
==============================================================================================================
DEFAULT - Direct connector with no proxy for unproxied access to Jira.
If using a http/https proxy, comment out this connector.
==============================================================================================================
HTTP - Proxying Jira via Apache or Nginx over HTTP
If you're proxying traffic to Jira over HTTP, uncomment the below connector and comment out the others.
Ensure the proxyName and proxyPort are updated with the appropriate information if necessary as per the docs.
See the following for more information:
Apache - https://confluence.atlassian.com/x/4xQLM
nginx - https://confluence.atlassian.com/x/DAFmGQ
==============================================================================================================
-->
<!-- Nginx Proxy Connector -->
<Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"
acceptCount="100" disableUploadTimeout="true" bindOnInit="false" scheme="https" secure="false"
proxyName="mon.domaine.com" proxyPort="443"/>
<!--
<Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"
acceptCount="100" disableUploadTimeout="true" bindOnInit="false" secure="true" scheme="https"
proxyName="<subdomain>.<domain>.com" proxyPort="443"/>
-->
<!--
==============================================================================================================
AJP - Proxying Jira via Apache over HTTP or HTTPS
If you're proxying traffic to Jira using the AJP protocol, uncomment the following connector line
See the following for more information:
Apache - https://confluence.atlassian.com/x/QiJ9MQ
==============================================================================================================
-->
<!--
<Connector port="8009" URIEncoding="UTF-8" enableLookups="false" protocol="AJP/1.3"/>
-->
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true">
<Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"
factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
<Manager pathname=""/>
<JarScanner scanManifest="false"/>
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="120" />
</Context>
</Host>
<Valve className="org.apache.catalina.valves.AccessLogValve"
pattern="%a %{jira.request.id}r %{jira.request.username}r %t "%m %U%{sanitized.query}r %H" %s %b %D "%{sanitized.referer}r" "%{User-Agent}i" "%{jira.request.assession.id}r""/>
</Engine>
</Service>
</Server>
Redémarrer Jira :
/etc/init.d/jira stop
/etc/init.d/jira start
Configurer Nginx :
nano /etc/nginx/conf.d/jira.conf
server {
listen 80;
server_name mon.domain.com;
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;
}
}
Désactiver SELinux (si vous l'avez) :
setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config
/etc/init.d/jira stop
/etc/init.d/jira start
Redémarrer Nginx :
systemctl restart nginx
Autres Informations !!!
Si vous avez besoin de d'installer ou migrer votre serveur voici comment faire.
Migration Jira :
Si vous voulez migrer votre serveur vers un nouveau serveur pensez à faire une sauvegarde.
Vous pourrez utiliser scp pour faire un transfert de l'ancien serveur au nouveau serveur.
Trouver votre fichier de sauvegarde :
ls /var/atlassian/application-data/jira/export/
Sauvegarde-2020-XX-XX.zip
Transférer votre sauvegarde :
scp -p /var/atlassian/application-data/jira/export/Sauvegarde-2020-XX-XX.zip user@ip:/var/atlassian/application-data/jira/import/Sauvegarde-2020-XX-XX.zip
cd /var/atlassian/application-data/jira/import/
chown jira: Sauvegarde-2020-XX-XX.zip
Transférer vos Data :
Une fois la migration terminé sachez que vous devez restaurer vos data aussi.
scp -r -p /var/atlassian/application-data/jira/data/* user@ip:/var/atlassian/application-data/jira/data/
chown -R jira: /var/atlassian/application-data/jira/data
Mettre à jour Jira :
/etc/init.d/jira stop
wget https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-core-8.13.7-x64.bin -O jira-core.bin
cp -a /opt/atlassian/jira /opt/atlassian/jira.bak
chmod +x jira-core.bin
./jira-core.bin
rm -f jira-core.bin
Appuyez sur 3 pour lancer la mise à jour
Debug Jira :
Pour Tomcat
tail -f /opt/atlassian/jira/logs/catalina.out
Pour Jira
tail -f /var/atlassian/application-data/jira/log/atlassian-jira.log
Désinstaller Jira :
/opt/atlassian/jira/uninstall
Voilà vous avez votre serveur Jira opérationnel.