Most Popular

1500 questions
48
votes
11 answers

Delete all of /var/log?

Can I delete everything in /var/log? Or should I only delete files (recursively) in /var/log but leave folders? Does anyone have a good rm command line? (My admin skills leave me nervous.) Note: I am using Debian. I am not sure what version.
user274
48
votes
7 answers

Cable Management Policy

We've all seen good and bad examples of cable management. What are objective, measurable requirements that can be used in a policy to maintain cabling order in the rack/server room/data center? I'm not looking for "Don't do spaghetti wiring!" but…
48
votes
7 answers

Forward local port or socket file to remote socket file

Quick question - I run two linux boxes, one my own desktop and the other my VPS. For security reasons on the VPS end I opted for socket connections to MySQL (/var/run/mysqld/mysql.sock). I know I can tunnel like this: ssh -L 3307:127.0.0.1:3306…
user32616
48
votes
13 answers

How to change "From:" field for emails from Cron?

I use remote SMTP via nullmailer and it requires set From field to the specific name, but cron set it as root@my.sweet.server.com. How could I change it to something like me@ya.ru?
48
votes
4 answers

How to list symbolic link chains?

Given this example: mkdir a ln -s a b ln -s b c ln -s c d If I execute: ls -l d It will show: d -> c Is there a way for ls or any other linux command to show d -> c -> b -> a instead?
Kalecser
  • 583
  • 1
  • 4
  • 5
47
votes
2 answers

Setting ssl_prefer_server_ciphers directive in nginx config

This question is about setting the correct value of ssl_prefer_server_ciphers while configuring nginx. According to a fairly typical config suggested by Mozilla, the value should be off (source:…
Hassan Baig
  • 2,745
  • 14
  • 36
  • 50
47
votes
6 answers

DNS using CNAMEs breaks MX records?

We are trying to move all our websites we host to CNAMES as we are planning on moving servers in the new year and would like the ability to move some clients to one server and other clients somewhere else. We were planning on giving clients a unique…
johnwards
  • 805
47
votes
3 answers

What are the merits of SAS vs SATA drives?

What are the merits of buying SAS drives over SATA drives, or vice versa?
username
  • 4,805
47
votes
4 answers

Ansible security best practices

I am going to introduce Ansible into my data center, and I'm looking for some security best practice on where to locate the control machine and how to manage the SSH keys. Question 1: the control machine We of course need a control machine. The…
Mat
  • 1,953
47
votes
4 answers

What time zone is a cron job using?

I'm guessing there's a difference between my PHP time and the server time. When I check the current time in PHP, it's showing that MST is being used. However, cron jobs aren't running at the correct time. How can I check to see what timezone the…
Edward
  • 573
47
votes
12 answers

Check is container/service running with docker-compose

I am using the docker-compose. Some commands like up -d service_name or start service_name are returning right away and this is pretty useful if you don't want the containers running to depend on the state of the shell, like they do with regular up…
47
votes
14 answers

AWS: Environment named *** is in an invalid state for this operation. Must be Ready

I get a message when I am trying to deploy my php app on EC2 using Elastic Beanstalk. Environment named *** is in an invalid state for this operation. Must be Ready. I am unable to deploy. The server status is running, no warnings. My experience…
47
votes
6 answers

Appending to lists or adding keys to dictionaries in Ansible

(Related to Callbacks or hooks, and reusable series of tasks, in Ansible roles): Is there any better way to append to a list or add a key to a dictionary in Ansible than (ab)using a jina2 template expression? I know you can do something like: -…
Craig Ringer
  • 11,525
47
votes
14 answers

VMware Linux Server -- how can you tell if you are a vm or real hardware?

An interesting question. I have logged into a Linux (most likely SuSE) host. Is there some way that I can tell programmatically that I am a VM host or not? Also assume that the vmtools are not installed.
mdpc
  • 11,914
47
votes
1 answer

how to install an older version of a pecl package

I have this code $passengerId = new \MongoId(oPassenger->getId()); return $this->createQueryBuilder('Device') ->update() ->multiple(true) ->field('activated')->set(false) …
abbood
  • 1,147