vagrant provision shell from gist.github

from gist.github

ordinaryPack="docker nc tcsh unzip"
servPack="httpd mariadb-server php-mysql php"

yum update -y
yum install -y $servPack $ordinaryPack
systemctl enable httpd.service
systemctl enable mariadb.service
curl $passwdResetURL >> /tmp/rootPasswdReset
mysqld_safe --user=mysql --init-file=/tmp/rootPasswdReset
wget -P /tmp
unzip /tmp/ -d /var/www/html
mv /var/www/html/DVWA-1.0.8 /var/www/html/dvwa
sed -i 's/p@ssw0rd/sqlpasswd/g' /var/www/html/dvwa/config/
sed -i 's/^/#/g' /etc/httpd/conf.d/welcome.conf

systemctl start mariadb.service
systemctl start httpd.service

rm -rf /tmp/*

UPDATE mysql.user SET Password=PASSWORD('sqlpasswd') WHERE User='root';

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s