Bonjour, si vous voulez installer SquashTM 3 voici comment faire :
Installer les dépendances :
yum install -y java-1.8.0-openjdk nginx mariadb-server wget epel-release
yum install -y pv
systemctl enable --now nginx mariadb
Configurer MariaDB :
mysql_secure_installation
mysql -u root -p
CREATE DATABASE squashtm CHARACTER SET utf8 COLLATE utf8_bin;
CREATE USER 'squashtm'@localhost IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON squashtm.* TO 'squashtm'@localhost IDENTIFIED BY 'my_password';
FLUSH PRIVILEGES;
EXIT
Télécharger SquashTM :
mkdir -p /opt/squashtm /root/.ssl
wget -O /opt/squashtm/squashtm.tar.gz https://nexus.squashtest.org/nexus/repository/public-releases/tm/core/squash-tm-distribution/3.0.4.RELEASE/squash-tm-3.0.4.RELEASE.tar.gz
cd /opt/squashtm && tar -xvf squashtm.tar.gz
mv /opt/squashtm/squash-tm/* mv /opt/squashtm/
rm -rf /opt/squashtm/squashtm.tar.gz /opt/squashtm/squash-tm
chmod +x /opt/squashtm/bin/startup.sh
Créer un utilisateur dédié :
groupadd -r squashtm
useradd -r -g squashtm -d /opt/squashtm -s /sbin/nologin squashtm
chown -R squashtm: /opt/squashtm
Configurer SquashTM :
nano /opt/squashtm/bin/startup.sh
HTTP_PORT=8080
TMP_DIR=/opt/squashtm/tmp
BUNDLES_DIR=/opt/squashtm/bundles
CONF_DIR=/opt/squashtm/conf
LOG_DIR=/opt/squashtm/logs
TOMCAT_HOME=/opt/squashtm/tomcat-home
PLUGINS_DIR=/opt/squashtm/plugins
DB_TYPE=mysql
DB_URL=jdbc:mysql://localhost:3306/squashtm
DB_USERNAME=squashtm
DB_PASSWORD=My_Password
Importer la DB :
cd /opt/squashtm/database-scripts
pv mysql-full-install-version-*.RELEASE.sql | mysql -u squashtm -pMy_Password squashtm
Créer le service :
nano /etc/systemd/system/squashtm.service
[Unit]
Description=SquashTM 3
After=network.target
After=mariadb.service
[Service]
Type=simple
WorkingDirectory=/opt/squashtm/bin
User=squashtm
Group=squashtm
#LimitNOFILE=65536
ExecStart=/opt/squashtm/bin/startup.sh
ExecStop=/bin/kill $MAINPID
KillMode=process
[Install]
WantedBy=multi-user.target
Démarrer SquashTM :
systemctl enable --now squashtm
Aller sur le site :
http://ip_server:8080/squash
Nginx avec SquashTM :
nano /etc/nginx/conf.d/squashtm.conf
server {
listen 443 ssl http2;
server_name squashtm.my_domain.com;
access_log /var/log/nginx/squashtm-access.log;
error_log /var/log/nginx/squashtm-error.log error;
## The default `client_max_body_size` is 1M, this might not be enough for some posters, etc.
client_max_body_size 200M;
# SSL Configuration
ssl_certificate /root/.ssl/squashtm.my_domain.com.crt;
ssl_certificate_key /root/.ssl/squashtm.my_domain.com.key;
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
ssl_prefer_server_ciphers on;
# See https://hstspreload.org/ before uncommenting the line below.
# add_header Strict-Transport-Security "max-age=15768000; preload;";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header Content-Security-Policy "frame-ancestors 'self'";
add_header X-Frame-Options DENY;
add_header Referrer-Policy same-origin;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_buffering off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host;
}
}
systemctl enable --now nginx
Pensez à bien configurer votre URL :
Voilà vous pouvez maintenant accéder à votre SquashTM.