Last active
September 26, 2018 14:13
-
-
Save kaldown/1a0df9af50b6d08ddc32 to your computer and use it in GitHub Desktop.
vagrant(chef/centos-7.0; httpd, mariadb, php, docker, nc, unzip, tcsh)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE mysql.user SET Password=PASSWORD('sqlpasswd') WHERE User='root'; | |
FLUSH PRIVILEGES; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
ordinaryPack="docker nc tcsh unzip" | |
servPack="httpd mariadb-server php-mysql php" | |
passwdResetURL="https://gist.githubusercontent.com/kaldown/1a0df9af50b6d08ddc32/raw/bfaf3bf4e610649437ae6ee72a1c3e3d9e7d3538/rootPasswdReset" | |
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 https://github.com/RandomStorm/DVWA/archive/v1.0.8.zip | |
unzip /tmp/v1.0.8.zip -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/config.inc.php | |
sed -i 's/^/#/g' /etc/httpd/conf.d/welcome.conf | |
systemctl start mariadb.service | |
systemctl start httpd.service | |
rm -rf /tmp/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment