-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtooling-userdata.md
30 lines (21 loc) · 984 Bytes
/
tooling-userdata.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
mkdir /var/www/
sudo mount -t efs -o tls,accesspoint=fsap-03f4bb5597fe2126e fs-0eb398004e89421d8:/ /var/www/
yum install -y httpd
systemctl start httpd
systemctl enable httpd
yum module reset php -y
yum module enable php:remi-7.4 -y
yum install -y php php-common php-mbstring php-opcache php-intl php-xml php-gd php-curl php-mysqlnd php-fpm php-json
systemctl start php-fpm
systemctl enable php-fpm
git clone https://github.com/MayorFaj/tooling.git
mkdir /var/www/html
cp -R /tooling/html/* /var/www/html/
cd /tooling
mysql -h acs-database1.cpaxmx0nk7d7.us-east-2.rds.amazonaws.com -u admin -p toolingdb < tooling-db.sql
cd /var/www/html/
touch healthstatus
sed -i "s/$db = mysqli_connect('mysql.tooling.svc.cluster.local', 'admin', 'admin', 'tooling');/$db = mysqli_connect('acs-database1.cpaxmx0nk7d7.us-east-2.rds.amazonaws.com', 'admin', 'admin12345', 'toolingdb');/g" functions.php
chcon -t httpd_sys_rw_content_t /var/www/html/ -R
systemctl restart httpd