Skip to content
Snippets Groups Projects
Commit 1ed0cc96 authored by Xiemuqing Xiao's avatar Xiemuqing Xiao
Browse files

Merge remote-tracking branch 'origin/main'

parent 727ee276
No related branches found
No related tags found
No related merge requests found
...@@ -7,12 +7,12 @@ echo logged in as $USER. ...@@ -7,12 +7,12 @@ echo logged in as $USER.
echo in directory $PWD echo in directory $PWD
echo "installing MariaDB..." #echo "installing MariaDB..."
# sudo yum install mysql -y ## sudo yum install mysql -y
sudo dnf install mariadb-server -y #sudo dnf install mariadb-server -y
sudo systemctl start mariadb #sudo systemctl start mariadb
sudo systemctl status mariadb #sudo systemctl status mariadb
sudo systemctl enable mariadb #sudo systemctl enable mariadb
echo "creating mysql_secure_installation.txt..." echo "creating mysql_secure_installation.txt..."
...@@ -41,12 +41,9 @@ sudo dnf update openssh-server openssh-client -y ...@@ -41,12 +41,9 @@ sudo dnf update openssh-server openssh-client -y
echo "needs to be in root account" echo "needs to be in root account"
cd root cd root
touch .ssh/known_hosts
ssh-keyscan git.cardiff.ac.uk >> .ssh/known_hosts
chmod 644 .ssh/known_hosts
echo "now needs to be in rocky user directory" echo "now needs to be in rocky user directory"
cd sports-league-application cd /home/rocky
cat << `EOF` >> matrix_keypair.key cat << `EOF` >> matrix_keypair.key
-----BEGIN OPENSSH PRIVATE KEY----- -----BEGIN OPENSSH PRIVATE KEY-----
...@@ -88,12 +85,27 @@ TBXGOnjcHM0kCN4cQcT7YgnEtrt1SEt/yVK590Z+hSkaJIgPxUlDrm3UCkHFrKxdT+UCDL ...@@ -88,12 +85,27 @@ TBXGOnjcHM0kCN4cQcT7YgnEtrt1SEt/yVK590Z+hSkaJIgPxUlDrm3UCkHFrKxdT+UCDL
/sHf7dEAE5USKzAAAAHElEK2MyMjEyMjE5MkBEU0E4Q0U5RUU2MEFCRjgBAgMEBQY= /sHf7dEAE5USKzAAAAHElEK2MyMjEyMjE5MkBEU0E4Q0U5RUU2MEFCRjgBAgMEBQY=
-----END OPENSSH PRIVATE KEY----- -----END OPENSSH PRIVATE KEY-----
`EOF` `EOF`
chmod 400 matrix_keypair.key
ssh-agent bash -c 'ssh-add matrix_keypair.key; git clone git@git.cardiff.ac.uk:c24020257/sports-league-application.git'
sudo chmod 400 matrix_keypair.key
sudo ssh-agent bash -c 'ssh-add matrix_keypair.key'
cd ~/
sudo touch .ssh/known-hosts
#touch .ssh/known_hosts
sudo ssh-keyscan git.cardiff.ac.uk >> .ssh/known_hosts
sudo chmod 644 .ssh/known_hosts
cd /home/rocky
echo "Cloning Git Repo..."
sudo ssh-agent bash -c 'ssh-add matrix_keypair.key; git clone git@git.cardiff.ac.uk:c24020257/sports-league-application.git'
echo "Entering Git Repo directory..."
cd sports-league-application cd sports-league-application
echo "installing MariaDB..."
# sudo yum install mysql -y
sudo dnf install mariadb-server -y
sudo systemctl start mariadb
sudo systemctl status mariadb
sudo systemctl enable mariadb
mysql -uroot -pcomsc < src/main/resources/sports.sql mysql -uroot -pcomsc < src/main/resources/sports.sql
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment