Creating Image of Compute Engine VM
- Creating a Compute Engine VM and SSH to it
- Now run following commands to install a sample website
- Elevate permission to root
sudo su
- Install Apache web server, wget & unzip
yum install httpd wget unzip -y
- Change directory to web server root folder
cd /var/www/html
- Download a sample website
wget https://www.free-css.com/assets/files/free-css-templates/download/page271/autowash.zip
- Extract the website and put files in web root
unzip autowash.zip
cd car-wash-website-template/
cp -R * ../.
cd ..
rm -Rf car-wash-website-template autowash.zip
- Start webserver
service httpd start
- Auto-start webserver on boot
chkconfig httpd on
- Elevate permission to root
- Creating Image
- Go to Images section and click on Create Image
- Name: webserver-image
- Source: Disk
- Source disk: instance-1
- Click Create
- Verify the created image in Images section
Comments are closed, but trackbacks and pingbacks are open.