89

To start, there's a whole history and struggle between going from SysVInit to SystemD. Rather than trying to break that all down in one answer though, I'll refer you to some google venturing for more details on the history as well as one particular article on the topic: The Story Behind 'init' and 'systemd': Why 'init' Needed to be Replaced with 'systemd' in ...


44

There would be multiple ways of doing this. First, change the sym-links around so that the python in /usr/bin/ would actually be pointing to the same location as the /usr/bin/python3 sym-link. However, this is a bad idea (as I explain below). The second option would be to create a user-specific command alias - this is definitel the better option of the two. ...


24

I have encounter the same problem when I init my small VPS. The issue is caused by small memory. So without spending extra money to increase the memory which you not needed, you could simply create swap files to aids the installation. Yes the swap is slow, but all you need is get the install done. On Ubuntu 14.04, I do the following to solve the problem: ...


22

Easiest way is to copy and paste... First view/copy the contents of your local public key id_rsa.pub including the beginning "ssh-rsa" until it ends with your email address: cat ~/.ssh/id_rsa.pub Then edit authorized_keys on the server and paste contents of your clipboard below any other keys in that file: nano ~/.ssh/authorized_keys And save Ctl+O, ...


22

The problem you are having looks the same as this bug report. The failure to start seems to be because the default MySQL 5.6 configuration requires more memory than it can get in your micro instance. The solution to the error appears to be to do one of the following: Increase the amount of memory in your EC2 instance Set a smaller value for MySQL's ...


20

Ubuntu is based on Debian, which uses apt not yum which is what Red Hat uses. The Debian equivalent of: yum update -y Would be: sudo apt-get update As for your results when running apt-get install yum Err http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libnss3 amd64 3.14.3-0ubuntu0.12.04.1 403 Forbidden Would seem to indicate ...


19

Install nodejs 6 Get your nodejs tarball from node site e.g. node-v6.11.3-linux-x64.tar.gz from v6.11.3 wget https://nodejs.org/dist/v6.11.3/node-v6.11.3-linux-x64.tar.g‌​z Unpack provided archive files to /opt/nodejs mkdir -p /opt/nodejs tar -xvzf node-v6.11.3-linux-x64.tar.gz -C /opt/nodejs/ Create link to current node version cd /opt/nodejs mv node-...


16

You can bind the /tmp mount point to /mnt/tmp: sudo mount -B /tmp /mnt/tmp


15

Most likely, you ran into a race condition with cloud-init. This packer issue gives some insights, and I have tried the following suggestion given by the OP with success: echo "waiting 180 seconds for cloud-init to update /etc/apt/sources.list" timeout 180 /bin/bash -c \ 'until stat /var/lib/cloud/instance/boot-finished 2>/dev/null; do echo waiting ...;...


14

Guess here that you installed rstudio-server by downloading it from an external source and then installing it using dpkg or GDebi. So, you are trying to remove it using the command: sudo apt-get remove rstudio-server-1.0.143-amd64.deb But, rstudio-server-1.0.143-amd64.deb is the name of the file. The software is installed as: rstudio-server. So, the ...


14

As tritium_3 suggested, I had to edit .ssh/authorized_keys, to remove the following text: no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"ubuntu\" rather than the user \"root\".';echo;sleep 10" and keep the ssh-rsa and key that comes after it. However, the rsync command had copied the file to the new user,...


11

New and improved version. # needed as json list returned by ubuntu site is mal-formed remove_last_comma() { sed ' $x;$G;/\(.*\),/!H;//!{$!d }; $!x;$s//\1/;s/^\n//' } curl -s "https://cloud-images.ubuntu.com/locator/ec2/releasesTable" \ | remove_last_comma \ | jq -c '.aaData[] | select(contains(["16.04", "us-west-2", "hvm:ebs"]))' \ ...


10

Inside EC2, to me, it only really makes sense to use the entire volume for the filesystem, because of the flexibility allowed by Elastic Block Store (EBS) volumes, which are much different than many physical disks, in the sense that you can provision them as needed, destroy them as needed, attach and detach them from instances without rebooting, and take ...


10

It is, see https://cloud-images.ubuntu.com/locator/ec2/ for reference depending on what region you are in.


9

/opt/tomcat is declared to be the home directory of the tomcat user, but belongs to the root user (with the tomcat user not having write permissions). Scrubbing the tutorial, especially the permissions section, I have mixed feelings towards the quality of the tutorial. It speaks about "giv[ing] the tomcat user write access to the conf directory" while ...


9

Pam is the Pluggable Authentication Modules. It is a backend for authentication, that handles authentication for applications on a system. As the name says, it's pluggable. You can have multiple plugs providing authentication from different sources. A common source is /etc/passwd and /etc/shadow in combination. Others can be LDAP, Kerberos, NIS, or ...


8

What really properly fixed this problem for me was uninstalling apt-xapian-index package. None of the other suggested fixes did anything in my situation. You may read more details from my little blog post.


8

They are kind of released. If you look at: https://cloud-images.ubuntu.com/query/xenial/server/released.current.txt you will find the AMI id's. As of right now though, they are not public, atleast not in eu-west-1. Most likely Amazon is vetting them, because they'll become official images.


8

there is a command inside authorized_keys as follows. cat /root/.ssh/authorized_keys no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"ubuntu\" rather than the user \"root\".';echo;sleep 10" remove this line and keep the ssh-rsa and key that comes after it. save the file then try again.


7

I'm assuming you are running out of RAM. You can verify this with watch cat /proc/meminfo while your process is running. You may have insufficient RAM and/or SWAP to accomplish your task. Due to the low-ram condition, insure that swap is on with swapon -a and if no swap is setup on the system create a partition for swap on unused diskspace and enable it. ...


6

I have a 1GB RAM 1 CPU Core VPS with Postfix + Dovecot + rspamd (it's an OVH VPS classic tier 1), and I don't even use 25% of the total amount of RAM I have. Postfix is actually really lightweight. At the moment it's using less than 7 Megabytes of RAM total across all its processes. For spam filtering, I'd recommend either spamassassin or rspamd. Rspamd is ...


6

Get a shell on the remote machine where you want to put the key and then you can run this one-liner to create the necessary files and directories, set their permissions and append the key to the file. Of course you have to change the KEYGOESHERE part below and the comment after it. mkdir -p ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/...


6

The user that runs apache/php is www-data. Run sudo chown -R www-data:www-data /var/www/deploy.log to make the file editable by the web server. The other files you want to perform operations on also need to be writable by the webserver.


6

Becase curl is unable to verify the certificate provided by the server. There are two way to bypass: 1.add -k option which allows curl to make insecure connections, which does not verify the certificate. 2.add root curl ca (download here) to /etc/ssl/certs/nodesource-ca.crt


6

The issue in the question was resolved by adding appropriate swap. For completeness let me give a summary of additional options we have when running Image Magick convert on huge files on low memory systems, or when there is no swap available, or the swap was too small. The methods mentioned below are elaborated in detail in the Image Magick manual: Really ...


6

I did some research earlier and also reached AWS support for comments. And the short answer is: Yes they are official images AWS official images for Ubuntu as same as those provided by the Canonical organisation. Only thing AWS does is, mark them as official in "Getting Started" page. Important thing to note is that they are not currently available under ...


6

You may not use .*, because that shell glob will also match . and .. (current and parent directory), causing the behaviour you described. But it isn't necessary anyway, you can just use the zip -r option on its own. Let me quote the manual page man zip: -r --recurse-paths Travel the directory structure recursively; for example: ...


6

Canonical's livepatch will only work for Canonical kernels based only. "*-aws" kernels are made by Amazon, and considered as non-Canonical based kernels. At their Wiki they mention: GA generic and lowlatency kernel variants only Hope it works.


6

What you're trying You may be thinking of the term alias as defined and used in Mac OS. For ubuntu the command alias does something totally different. The command you have used is for creating new commands so you don't have to remember a longer command, or a longer command you type so much it is quicker to type the alias. For example, if I don't want to ...


6

So should I upgrade this to Ubuntu 18.04 No. NEVER EVER upgrade a cloud instance. NEVER. Remember: ssh access is the only access you have. If that breaks your instance is gone and you depend on backups and a new instance to get back up running. It is not worth the risk. or let my server run in 16.04. Yes. And is is not a server, it is a cloud instance. ...


Only top voted, non community-wiki answers of a minimum length are eligible