- Java ver 8
- a database (if using for prod env)
- Search for available package:
yum search java | grep 'java-'
- Select package to install:
yum install java-1.8.0-openjdk*
for example - Check:
java -version
- Change to root user:
sudo su
- Locate which java is being used:
update-alternatives --config java
(select your option or just hit enter. This is also to check the location of java installation) - Set JAVA_HOME:
export JAVA_HOME=/path/to/jdk
- Add JAVA_HOME to path variable:
export PATH=$PATH:$JAVA_HOME
-
Check if mysql is already installed
rpm -qa | grep mysql
if not proceed further: -
Download and add the repository:
wget https://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpm
-
Install the package:
yum localinstall mysql80-community-release-el7-1.noarch.rpm
-
Verify if the yum repository has been added successfully:
yum repolist enabled | grep "mysql.*-community.*"
-
Installing latest MYSQL:
yum install mysql-community-server
-
Starting mySql server:
service mysqld start
-
Verify the mySql server status:
service mysqld status
-
Verify the installed mySql version:
mysql --version
-
Securing the mySql installation: The command
mysql_secure_installation
allows to secure your MySQL installation by performing important settings like setting the root password, removing anonymous users, removing root login, and so on.Note: MySQL version 8.0 or higher generates a temporary random password in /var/log/mysqld.log after installation.
grep 'temporary password' /var/log/mysqld.log
don't forget to copy the temp password.mysql_secure_installation
Sample Output:
Securing the MySQL server deployment. Enter password for user root: Enter New Root Password VALIDATE PASSWORD PLUGIN can be used to test passwords and improve security. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD plugin? Press y|Y for Yes, any other key for No: y There are three levels of password validation policy: LOW Length >= 8 MEDIUM Length >= 8, numeric, mixed case, and special characters STRONG Length >= 8, numeric, mixed case, special characters and dictionary Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2 Using existing password for root. Estimated strength of the password: 50 Change the password for root ? ((Press y|Y for Yes, any other key for No) : y New password: Set New MySQL Password Re-enter new password: Re-enter New MySQL Password Estimated strength of the password: 100 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? (Press y|Y for Yes, any other key for No) : y Success. Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y Success. By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y - Dropping test database... Success. - Removing privileges on test database... Success. Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y Success. All done!
-
Updating mySQL with yum:
yum update mysql-server
(optional for updates). -
Connecting to mySQL server:
mysql -u root -p
-
Creating a database "jira-db":
CREATE DATABASE jira_db CHARACTER SET utf8 COLLATE utf8_bin;
-
Creating a database user with password:
CREATE USER 'jira'@'localhost' IDENTIFIED BY 'yourPassword';
-
Granting priviledges:
GRANT ALL PRIVILEGES ON * . * TO 'jira'@'localhost';
-
Use
flush privileges;
in order to makeGRANT
effective. -
Restart mySQL"
restart mysql
- Download jira. Download
.bin
file. e.g.atlassian-jira-software-8.1.0-x64.bin
. - To check your operating system bits, type
uname -m
- Make your file executable. In our case
chmod a+x atlassian-jira-software-8.1.0-x64.bin
- Change to root user:
sudo su
- Run the file:
./atlassian-jira-software-8.1.0-x64.bin
- If getting error
Could not display GUI. This application needs access to an X server
, useyum install dejavu-sans-fonts
and restart from step 4. - Follow along the further steps, but do not start the jira server now.
- Download mySQL connector from here tar.gz file/platform independent one. e.g.
mysql-connector-java-8.0.16.tar.gz
. - Extract the file
tar -xvf mysql-connector-java-8.0.16.tar.gz
, cd tomysql-connector-java-8.0.16
and copy thejar
filemysql-connector-java-8.0.16.jar
tojira-install-directory/lib
; e.g.cp mysql-connector-java-8.0.16.jar /opt/atlassian/jira/lib
- Now start our jira server:
cd /opt/atlassian/jira/bin/
- Run the script:
./startup.sh
- Now go to the
url:port
no into the browser. e.g.localhost:8080
- Choose the following:
- I'll set it up myself
- My own databse.
- Database Type: MY SQL
- Hostname: type
hostname
on your terminal to get hostname - Port no: leave the default value
- Database/Username/Password will be the same as created in database set-up
- Test Connection
- Next
- follow along.
NOTES:
- Defaults:
- Install directory:
/opt/atlassian/jira
- Software data/Home directory:
/var/atlassian/application-data/jira
- Connection/http port: 8080
- Control port: 8005
- Backup:
/var/atlassian/application-data/jira/export/
- Install directory:
- Opening firewall from termianl:
- sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent
- sudo firewall-cmd --reload
- AWS or GCloud or Azure: don't forget to open port via Network & Security