Skip to main content

How to add startup script while creating google compute engine

Go to Compute Engine > VM Instances tab

add the following startup detail to Startup script tab

apt-get update
apt-get install apache2 php php-mysql -y
service apache2 restart

Now click on create VM button, while booting the VM it will automatically install apache2, php and php-mysql packages