• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

debian

Google SDK Install on Debian or Ubuntu

January 23, 2020

Here’s the script.

echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] \
  https://packages.cloud.google.com/apt cloud-sdk main" | \
  sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
sudo apt-get install apt-transport-https ca-certificates
sudo curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
  sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt-get update && sudo apt-get install google-cloud-sdk

echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] \ https://packages.cloud.google.com/apt cloud-sdk main" | \ sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list sudo apt-get install apt-transport-https ca-certificates sudo curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \ sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - sudo apt-get update && sudo apt-get install google-cloud-sdk

Filed Under: Cloud Tagged With: apt, apt-get, debian, gcloud, google, install, sdk, ubuntu

GCP Web Server

January 8, 2020

Here’s a quick script to stand up a web server based on Centos image.

gcloud compute instances create [VM-NAME] \
    --zone=[ZONE] \
    --image-family=debian-9 \
    --image-project=debian-cloud \
    --tags=allow-ssh,allow-health-check \
    --subnet=lb-subnet \
    --metadata=startup-script='#! /bin/bash
apt-get update
apt-get install apache2 -y
a2ensite default-ssl
a2enmod ssl
vm_hostname="$(curl -H "Metadata-Flavor:Google" \
http://169.254.169.254/computeMetadata/v1/instance/name)"
echo "Page served from: $vm_hostname" | \
tee /var/www/html/index.html
systemctl restart apache2'

gcloud compute instances create [VM-NAME] \ --zone=[ZONE] \ --image-family=debian-9 \ --image-project=debian-cloud \ --tags=allow-ssh,allow-health-check \ --subnet=lb-subnet \ --metadata=startup-script='#! /bin/bash apt-get update apt-get install apache2 -y a2ensite default-ssl a2enmod ssl vm_hostname="$(curl -H "Metadata-Flavor:Google" \ http://169.254.169.254/computeMetadata/v1/instance/name)" echo "Page served from: $vm_hostname" | \ tee /var/www/html/index.html systemctl restart apache2'

Filed Under: Cloud Tagged With: apache, debian, gcp, metadata, server, vm, web

Apache & Webroot

July 5, 2019

Where’s Apache and webroot for the different distros?

Webroot:

# Redhat, Fedora, Centos, Amazon Linux
/var/www/html
# Debian, Ubuntu, Mint
/var/www/html

# Redhat, Fedora, Centos, Amazon Linux /var/www/html # Debian, Ubuntu, Mint /var/www/html

Apache Configuration:

# Redhat, Fedora, Centos, Amazon Linux
/etc/httpd/conf/httpd.conf
# Debian, Ubuntu, Mint
/etc/apache2/sites-available/default

# Redhat, Fedora, Centos, Amazon Linux /etc/httpd/conf/httpd.conf # Debian, Ubuntu, Mint /etc/apache2/sites-available/default

Filed Under: Linux Tagged With: apache, centos, debian, fedora, mint, redhat, ubuntu, webroot

The Return of the Linux Desktop

July 19, 2016

I’m thinking about using the Linux desktop again after 4 years of inactivity. The MacOS was the desktop of choice. I’ve been happy with the switch. I don’t anticipate abandoning it any time soon. Lately I thought about sharpening up my Linux skills after having been dormant for years. I need a Linux platform that I can work with. Ubuntu is my default, but there are other distros equally interesting. Mint, Debian and Fedora come to mind. Instead of having multiple boot partitions, I might install Ubuntu as the base distro and install Virtualbox. Other distros can be fired up as virtual machines. In that way, it’s simple to manage. I just need a heftier machine that can handle several VMs running at the same time. That’s the plan for the next several weeks.

Filed Under: Linux Tagged With: debian, fedora, mac os, mint, ubuntu, virtualbox

  • Home
  • About
  • Archives

Copyright © 2023