15 lines
		
	
	
		
			507 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			507 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/bash
 | |
| #install the web server, to check that the config_drive has been passed to the guest machine and test for webpage
 | |
| set -e -x
 | |
| yum update -y
 | |
| yum groupinstall -y "Web Server" "MySQL Database" "PHP Support"
 | |
| yum install -y php-mysql
 | |
| service httpd start
 | |
| chkconfig httpd on
 | |
| groupadd www
 | |
| usermod -a -G www ec2-user
 | |
| chown -R root:www /var/www
 | |
| chmod 2775 /var/www
 | |
| find /var/www -type d -exec chmod 2775 {} +
 | |
| find /var/www -type f -exec chmod 0664 {} +
 | |
| echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php | 
