# cat jira_install.sh
#!/bin/bash
export ARC_NAME=atlassian-jira-software-7.7.0
export DIR_NAME=/opt/${ARC_NAME}-standalone
export JIRA_HOME=/var/atlassian/application-data/jira
echo "export JIRA_HOME=${JIRA_HOME}" > /etc/profile.d/jira.sh
mkdir -p ${JIRA_HOME}
cd /opt/
tar -xzvf ${ARC_NAME}.tar.gz
#ln -s ${DIR_NAME} /opt/jira
useradd --no-create-home --system --home-dir /opt/jira jira
chown -R jira:jira ${DIR_NAME} ${JIRA_HOME}
#chmod -R u=rwx,go-rwx ${DIR_NAME}
sed -i -e "s|^jira\.home =|jira.home = ${JIRA_HOME}|g" \
${DIR_NAME}/atlassian-jira/WEB-INF/classes/jira-application.properties
cat ${DIR_NAME}/atlassian-jira/WEB-INF/classes/jira-application.properties
sudo -i -u jira /opt/jira/bin/start-jira.sh
# postgre
yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
yum install --disablerepo=* --enablerepo=pgdg10 postgresql-server postgresql postgresql-libs
/usr/pgsql-10/bin/postgresql-10-setup initdb
#vi /var/lib/pgsql/9.6/data/pg_hba.conf
#local all all trust
#host all all 127.0.0.1/32 trust
#host all all ::1/128 trust
systemctl enable postgresql-10.service
systemctl start postgresql-10.service
psql -U postgres -c "CREATE DATABASE jira_db;"
psql -U postgres -c "CREATE USER jira_user WITH PASSWORD 'jira_password';"
psql -U postgres -c "GRANT ALL ON DATABASE jira_db TO jira_user;"
psql -U postgres -c "GRANT CONNECT ON DATABASE jira_db TO jira_user;"
psql -U postgres -d jira_db -c "GRANT ALL ON ALL TABLES IN SCHEMA public TO jira_user;"
psql -U postgres -d jira_db -c "GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO jira_user;"
#psql -U postgres -c "ALTER USER postgres with encrypted password 'postgres';"
Главная
- Просмотров: 3079