Most Popular

1500 questions
52
votes
12 answers

How to record server changes?

So we've all probably had this situation: you debug some problem, only to realize it was caused by a config change you made six months ago, and you can't remember why you did it. So you undo it and fix the problem, and now some other problem comes…
scobi
  • 879
  • 3
  • 13
  • 17
52
votes
12 answers

Tail multiple remote files

Is there a way to remote tail 2 files? I have two servers(a and b) behind a load balancer and I would like to do something like this if possible: tail -f admin@serverA:~/mylogs/log admin@serverB:~/mylogs/log Thanks!
Pablo Fernandez
  • 665
  • 1
  • 5
  • 8
52
votes
6 answers

Bash Loop - How to stop the loop when I press Control-C inside a command?

I am rsyncing a few directories. I have a bash terminal open and am executing something like this: for DIR in * ; do rsync -a $DIR example.com:somewhere/ ; done However if I want to stop the whole things, I press Control-C. That stops the rsync,…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
51
votes
5 answers

How do I show the actions that installing a .deb package will take?

I would like to be able to view the scripts/triggers associated with a package due for upgrade so that I can tell, for example, whether it will result in the web server being restarted. I can't find an aptitude option to show me that (or apt/dpkg);…
Sam Brightman
  • 825
  • 1
  • 8
  • 12
51
votes
10 answers

How do I tell if apache is running as prefork or worker?

How do I tell if apache is running (or configured to run) as prefork or worker?
Simon
51
votes
8 answers

Chrome S3 Cloudfront: No 'Access-Control-Allow-Origin' header on initial XHR request

I have a webpage (https://smartystreets.com/contact) that uses jQuery to load some SVG files from S3 through the CloudFront CDN. In Chrome I will open an Incognito window as well as the console. Then I will load the page. As the page loads, I will…
SunSparc
  • 998
  • 3
  • 11
  • 23
51
votes
4 answers

How to install Docker on AWS EC2 instance with AMI (CE/EE Update)

What is the current way of installing Docker on an AWS EC2 instance running the AMI? There has been an announcement of Docker Enterprise Edition and now I want to know if anything has changed. Until now, I have been using yum install docker and do…
mxscho
  • 682
  • 2
  • 6
  • 11
51
votes
6 answers

How to make a global ~/.vimrc?

Right now, I make everyone do ~/.vimrc and put their settings there. How can I make a global, default .vimrc for new users?
Alex
  • 8,471
  • 26
  • 75
  • 99
51
votes
4 answers

Configuring Systemd Service to run with root access

I have a service in the form of a node.js application set up with Systemd on Raspbian Jessie and it is using its own user account. However, I am finding that the service does not run correctly because it does not have the necessary permissions. One…
Luke
  • 557
  • 1
  • 5
  • 11
51
votes
4 answers

Linux: set up for remote sysadmin

Every now and then I get the odd request to provide remote support, troubleshooting and/or performance tuning on Linux systems. Larger companies often already have well established procedures to provide remote access to vendors/suppliers and I only…
HBruijn
  • 77,029
  • 24
  • 135
  • 201
51
votes
3 answers

Rsync to AWS S3 bucket

For a server I am hosting a website on I want to backup the data and settings to an S3 bucket. I found out that you can't directly use rsync to backup to an S3 bucket. Is there another way to achieve the following rsync command to backup the data to…
Bart Bergmans
  • 633
  • 1
  • 6
  • 9
51
votes
2 answers

docker-compose: option to automaticaly remove container after run in docker-compose.yml

The docker-compose run reference states that it has the --rm option to Remove container after run. I want to make this a default run behavior for some of services I specify in docker-compose.yml. So, the questions are: Can it somehow be…
Ivan Kolmychek
  • 1,244
  • 2
  • 10
  • 13
51
votes
5 answers

On a dual CPU server, is it normal for one CPU to run hotter than the other?

I have a dual Opteron server running Linux with libvirt to host several VMs. The VMs work fine and the server processes OK, but I notice one CPU always runs about 69C (throttles at 70C) and the other runs about 15C. This doesn't seem normal to me?…
samoz
  • 2,033
  • 6
  • 19
  • 20
51
votes
5 answers

Piping wget output to /dev/null in cron

I am running the following command every 5 minutes in my crontab to keep Phusion Passenger alive. */5 * * * * wget mysite.com > /dev/null 2>&1 When I run this it performs a wget on the site url routes STDOUT/STDERR to /dev/null. When I run this…
nulltek
  • 1,251
  • 3
  • 14
  • 22
51
votes
3 answers

Always trigger handler execution in Ansible

I'm using Ansible to provision my development server. I want it to always start some services for me. I have handlers for this purpose but what is the best way to trigger handler execution without condition, e.g. make it always work? Something like…
Slava Fomin II
  • 1,701
  • 4
  • 17
  • 23