Questions tagged [amazon-ec2]

Amazon Elastic Compute Cloud (EC2) is a cloud-based computing platform.

EC2 is a central part of Amazon.com's cloud computing platform, Amazon Web Services (AWS).

EC2 allows users to rent virtual computers on which to run their own computer applications and allows scalable deployment of applications by providing a Web service through which a user can boot an Amazon Machine Image to create a virtual machine. Amazon calls these virtual machines an "instance", containing any software desired.

A user can create, launch, and terminate server instances as needed, paying by the hour for active servers, hence the term "elastic". EC2 provides users with control over the geographical location of instances that allows for latency optimization and high levels of redundancy.

490 questions
339
votes
9 answers

How do I add SSH Keys to authorized_keys file?

I have an Ubuntu server on Amazon EC2, that I use for development, and today I stupidly cleared everything out of my ~/.ssh/authorized_keys file. Luckily I have an SSH open, so I am still connected, and can fix the file, but when I try to put my…
Dave Long
  • 3,776
71
votes
5 answers

How do I apt-get -y dist-upgrade without a grub config prompt?

Per Make apt-get (or aptitude) run with -y but not prompt for replacement of configuration files? I did the following: ec2run ami-3c994355 --region us-east-1 -n 1 -t m1.large -z us-east-1d On the machine: sudo apt-get update sudo apt-get -y -o…
fratrik
  • 2,785
34
votes
5 answers

What is the default username for Amazon AMI images of Ubuntu Server?

I just launched one of the Ubuntu Server AMI's on Amazon EC2. I connect just fine, but I don't see anything to tell me the default login credentials. login as: ?
David Parks
  • 2,586
34
votes
8 answers

How do I know what Ubuntu AMI to launch on EC2?

When I want to launch an instance of Ubuntu on EC2, how do I find the right one? There are thousands of public images that have "Ubuntu" in their name. I am only interested in running the Official Ubuntu images. How do I now which AMI is the…
smoser
  • 1,855
33
votes
1 answer

How to set python 3 as default interpreter in Ubuntu 14.04

I am working with Ubuntu 14.04 LTS on EC2. I want to change the default python interpreter from python 2.7 to 3.4.0 which is installed by default. When I do: /home/ubuntu$ which python /usr/bin/python looking in /usr/bin/ I see: So obviously it's…
user1592380
  • 1,905
30
votes
7 answers

Why did installation of MySQL 5.6 on Ubuntu 14.04 fail?

I wanted to get a look at MySQL 5.6 on Ubuntu 14.04 just out of curiosity. And based on this article it certainly looked like installation should be simple and straightforward. So I fired up an AWS EC2 micro server running Ubuntu 14.04 (64-bit),…
WebLearner
  • 303
  • 1
  • 3
  • 5
28
votes
3 answers

How can I stop unattended-upgrades from rebooting the machine?

I just had a look at my Amazon EC2 instance and noticed I had 20 minutes exactly of downtime. I didn't know what caused it so I logged in to SSH and tried upgrading my packages, and saw that the unattended-upgrades package needed upgrading. I went…
28
votes
2 answers

Ubuntu 12.04 on Amazon EC2: /dev/xvda1 will be checked for errors at next reboot?

I'm running the lastest Ubuntu 12.04 AMI (ami-a29943cb) from Canonical on Amazon EC2 and quite often when I log in I get the message: *** /dev/xvda1 will be checked for errors at next reboot *** I have read a bunch of documentation on this and seem…
cwd
  • 1,663
  • 5
  • 19
  • 24
28
votes
7 answers

Run a script only at the very first boot

Is there an idiomatic way in Ubuntu to run a script only the first time a machine is booted? (EC2).
28
votes
4 answers

Not enough disk space '/' in AWS instance

i am running Ubuntu 11.04 instance for my Web Server on AWS cloud, now i am getting there is no disk space in / partition of my server. df -ah say this Filesystem Size Used Avail Use% Mounted on /dev/xvda1 7.9G 7.8G 97M …
Sumant
  • 633
21
votes
4 answers

Please login as the user “ubuntu” rather than the user “root”

I launched an Ubuntu 18 instance on EC2. I connected to the server using ubuntu user. I created a new user named newuser and added it to the sudo group. Then I ran: rsync --archive --chown=newuser:newuser ~/.ssh /home/newuser in order to let the…
Alon
  • 675
18
votes
1 answer

Should I upgrade kernel packages on EC2 instances?

On my EC2 server, when I do sudo apt-get update && sudo apt-get upgrade, I see: The following packages have been kept back: linux-ec2 linux-image-ec2 linux-image-virtual linux-virtual Should I go ahead and do sudo apt-get install linux-ec2…
Adam Monsen
  • 2,161
17
votes
2 answers

Move tmp folder from '/' partition to mounted partition (/mnt)

I have an Amazon EC2 instance which has given me a tiny '/' partition and a large '/mnt' partition. As such, I have moved my mysql data-dir over to the /mnt partition. However I am now having issues with the /tmp folder running out of space on my…
Programster
  • 6,039
15
votes
2 answers

ImageMagick convert and low RAM

Please consider the following command for the imagemagick package: sudo convert -resize 460x200 /path/to/test1.jpg /path/to/test2.jpg Now test1.jpg is a fairly large image (12.5MB), but not unheard of sizes, but the server I am working from only…
Aphire
  • 203
15
votes
3 answers

what can be causing /etc/cron.daily/apt to hang?

Lately I've been getting a mail from the server every day, Subject Cron test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) Body /etc/cron.daily/apt: DB Update failed, database locked If i just run the…
geermc4
  • 1,503
1
2 3
32 33