Questions tagged [debian]
Debian is a popular and influential GNU/Linux distribution. Questions here should generally be about Debian Server.
7,624
questions
362
votes
5
answers
154k
views
Anyone else experiencing high rates of Linux server crashes during a leap second day?
*NOTE: if your server still has issues due to confused kernels, and you can't reboot - the simplest solution proposed with gnu date installed on your system is: date -s now. This will reset the ...
262
votes
11
answers
268k
views
How can I run Debian stable but install some packages from testing?
Say you're running a server and you don't want to upgrade to Testing (Squeeze) from Stable (Lenny) to just install a required package or two.
What's the best way of installing only certain packages ...
234
votes
4
answers
182k
views
What's the best way of handling permissions for Apache 2's user www-data in /var/www?
Has anyone got a nice solution for handling files in /var/www? We're running Name Based Virtual Hosts and the Apache 2 user is www-data.
We've got two regular users & root. So when messing with ...
156
votes
6
answers
212k
views
List of files installed from apt package
How do I get a list of files that were or will-be installed when I apt-get a package? Conversely, can I find what package(s) caused a particular file to be installed?
143
votes
3
answers
51k
views
How to remove the "installed manually" flag and revert to "automatically installed" with apt-get?
To compile something, I needed the zlib1g-dev package to be installed so I launched an apt-get install zlib1g-dev.
apt-get informed me nicely that the package was already auto-installed because of ...
138
votes
13
answers
302k
views
How do I get apt-get to ignore some dependencies?
How do I make apt-get ignore some dependencies? For example, I wanted to install mailx so I can use it to send email from cron scripts/report-generating tools. However, installing mailx also installs ...
111
votes
8
answers
320k
views
How to install/change locale on Debian?
I've written a web application for which the user interface is in Dutch. I use the system's date and time routines to format date strings in the application. However, the date strings that the system ...
105
votes
8
answers
156k
views
How to determine JAVA_HOME on Debian/Ubuntu?
On Ubuntu it is possible to have multiple JVMs at the same time. The default one is selected with update-alternatives. But this does not set the JAVA_HOME environment variable, due to a debian policy.
...
105
votes
6
answers
128k
views
list all packages from a repository in ubuntu / debian
is there a command to see what packages are available from a certain ppa repository?
100
votes
9
answers
182k
views
mysqldump to a tar.gz
Usually after dumping a MySQL database with mysqldump command I immediately tar/gzip the resultant file. I'm looking for a way to do this in one command:
So from this:
mysqldump dbname -u root -p &...
99
votes
11
answers
151k
views
How can I export the privileges from MySQL and then import to a new server?
I know how to export/import the databases using mysqldump & that's fine but how do I get the privileges into the new server.
For extra points, there are a couple of existing databases on the new ...
95
votes
3
answers
40k
views
Is it possible to reboot a Linux OS without rebooting the hardware?
Is there a way to reboot a Linux system (Debian in particular) without rebooting the hardware?
I have a RAID controller that takes a bit to get itself running before the OS starts up, and I would ...
85
votes
8
answers
312k
views
How can I list my open ports on Debian?
What is the command to display a list of open ports on a Debian server?
I tried netstat -a | egrep 'Proto|LISTEN' but I would like something more specific that actually lists the port number.
83
votes
1
answer
49k
views
What does "debconf: delaying package configuration, since apt-utils is not installed" mean?
I have just installed Debian and I was just installing some packages using apt-get instal when I saw this message:
debconf: delaying package configuration, since apt-utils is not installed
What does ...
81
votes
5
answers
158k
views
Best location to keep SSL certificates and private keys on Ubuntu servers?
On Ubuntu, it looks like the best place for a private key used to sign a certificate (for use by nginx) is in /etc/ssl/private/
This answer adds that the certificate should go in /etc/ssl/certs/ but ...
80
votes
8
answers
73k
views
What should I do when I got the KEYEXPIRED error message after an apt-get update?
While updating my packages on a debian based system by a
sudo apt-get update
I've got that error message :
Reading package lists... Done
W: GPG error: ftp://ftp.fr.debian.org stable/non-US Release:...
78
votes
7
answers
27k
views
How to check for modified config files on a Debian system?
How to find all Debian managed configuration files which have been changed from the default?
78
votes
9
answers
118k
views
What is the debian-sys-maint MySQL user (and more)?
I have been bitten several times by the 'debian-sys-maint' user that is installed by default on the mysql-server packages installed from the Ubuntu repositories.
Generally what happens is I pull a ...
74
votes
2
answers
7k
views
How should an IT department choose a standard Linux distribution?
There is a lot of community feeling about what Linux distributions are appropriate for production server environments and which aren't, however, a lot of this feeling seems religiously based, and ...
69
votes
7
answers
43k
views
automate dpkg-reconfigure tzdata
I'm using puppet to admin a cluster of debian servers. I need to change the timezone of each machine on the cluster. The proper debian way to do this is to use dpkg-reconfigure tzdata. But I can ...
68
votes
8
answers
146k
views
How to change a SSH host key?
I cloned a server and so they've the same RSA key fingerprint.
It seems to be defined in /etc/ssh/ssh_host_rsa_key.pub.
What is the correct way to change that?
Thanks.
68
votes
11
answers
185k
views
Disable a service from starting at all runlevels?
I have a service foo which currently starts at runlevel 3 and above. How can I stop it from doing so, without using update-rc.d foo stop 3 ., which (if I understand it correctly) would turn off the ...
68
votes
3
answers
262k
views
How do I enable non-free packages on Debian?
How can I enable non-free packages on Debian? I want to install Sun's Java JDK but it's not available to me.
68
votes
10
answers
106k
views
Question marks showing in ls of directory. IO errors too
Has anyone seen this before? I've got a raid 5 mounted on my server and for whatever reason it started showing this:
jason@box2:/mnt/raid1/cra$ ls -alh
ls: cannot access ...
66
votes
12
answers
223k
views
MySQL keeps crashing: InnoDB: Unable to lock ./ibdata1, error: 11
I have a simple webserver (Debian 6.0 x86, DirectAdmin with 1 GB of memory and still 10 GB free space, mySQl version 5.5.9), however the mySQL server keeps crashing and I need to kill all mySQL ...
66
votes
8
answers
61k
views
What steps do you take to secure a Debian server? [closed]
I am installing a Debian server which is connected directly to the Internet. Obviously I want to make it as secure as possible. I would like you guys/gals to add your ideas to secure it and what ...
64
votes
3
answers
54k
views
Docker: failed to add the pair interfaces (operation not supported)
After installing Docker, I am getting an error when I try to run the Hello World example:
Error response from daemon: Cannot start container ...
63
votes
4
answers
55k
views
Purpose of Debian "sites-available" and "sites-enabled" directories?
Can anyone tell me—in a nutshell—what the purpose of these two directories are in Debian?
/etc/apache2/sites-enabled
/etc/apache2/sites-available
I notice that diffing sites-available/000-default ...
63
votes
11
answers
17k
views
How Often Should I Update our Linux Server?
I am responsible for managing both our production server (mail, web, database are all on one server) and our test server. Both are built on Debian. However as I am very new to system administration, I ...
62
votes
2
answers
44k
views
debian packages version convention
I'm using debian/Ubuntu, and get confused about versions of packages.
When using dpkg -l command, I get:
ii vim 2:7.3.429-2ubuntu2.1 Vi IMproved - ...
62
votes
5
answers
46k
views
What's the difference between 'useradd' and 'adduser'?
What's the difference between useradd and adduser? When/why should I prefer using one or the other?
59
votes
13
answers
69k
views
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY
My environment:
# uname -a
Linux app11 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 GNU/Linux
#
# cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/...
59
votes
8
answers
267k
views
Run a shell script as a different user
What's a good way of running a shell script as a different user. I'm using Debian etch, and I know which user I want to impersonate.
If I was doing it manually, I would do:
su postgres
./backup_db....
57
votes
6
answers
31k
views
Given a debian source package - How do I install the build-deps?
I have a debian (well technically ubuntu) source package, i.e. the .dsc, the .tar.gz, etc., I want to build this. The dpkg-buildpackage fails, since I don't have all the build dependencies.
Normally ...
56
votes
9
answers
13k
views
What's the difference between apt-get and aptitude?
I don't get why there are two different programs in a minimal install to install software. Don't they do the same thing? Is there a big difference? I have read everywhere to use aptitude over apt-get ...
56
votes
6
answers
302k
views
How do I force Linux to reacquire a new IP address from the DHCP server?
The environment is Debian, although the answer will apply to all distributions.
55
votes
5
answers
86k
views
HAProxy graceful reload with zero packet loss
I'm running an HAProxy load balancing server to balance load to multiple Apache servers. I need to reload HAProxy at any given time in order to change the load balancing algorithm.
This all works ...
53
votes
12
answers
42k
views
How much SWAP space on a 2-4GB system?
How should I decide what size to make my swap on a new Linux machine (Debian) with 2-4 GB of RAM? Do I really need swap space?
48
votes
5
answers
29k
views
100% non-interactive Debian dist-upgrade
Is there a way to do an apt-get dist-upgrade in Debian that not only automatically answers "yes" to all questions asked, but also uses reasonable defaults as answers to questions that are ...
46
votes
6
answers
50k
views
How do you set a locale non-interactively on Debian/Ubuntu?
Usually, I run aptitude -y install locales then dpkg-reconfigure locales to set up locale.
Now I want to put it into a shell script, how can I reliably do the following, automatically / non-...
45
votes
2
answers
38k
views
Slow ssh login - Activation of org.freedesktop.login1 timed out
On one of my servers I've noticed really delay on SSH logins.
Connecting using the ssh -vvv options the delay occurs at debug1: Entering interactive session.
extract of connection:
debug1: ...
44
votes
2
answers
55k
views
Do some debian builds not have lsb_release?
A .deb package I am releasing expects that it can call lsb_release. One customer using Debian 6.0.5 indicated that the lsb_release command (even in the terminal) produces a command not found error. ...
43
votes
4
answers
128k
views
apt-get update/upgrade list without changing anything
I would like to view what packages are available for update/upgrade without actually changing any files becuase there are some packages I wouldn't like to update. Would it then be possible to apt-get ...
43
votes
6
answers
49k
views
How can I prevent cron from filling up my syslog?
I have a script which needs to be executed each minute. The problem is that cron is logging to /var/log/syslog each time it executes. I end up seeing something like this repeated over and over in /...
43
votes
1
answer
54k
views
What exactly will --delete-excluded do for rsync?
I use rsync with great pleasure for backing up my servers, although I do have a question about the --delete-excluded parameter.
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded ...
42
votes
5
answers
47k
views
Can dpkg verify files from an installed package?
With rpm -qV openssh-server I will get a list of files that have changed compared to default.
~$ rpm -qV openssh-server
S.?....T. c /etc/ssh/sshd_config
~$
Can dpkg on Ubuntu do the same?
38
votes
7
answers
254k
views
Huge amount of TIME_WAIT connections says netstat
Okay, this is creeping me out - I see about 1500-2500 of these:
root@wherever:# netstat
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:...
38
votes
6
answers
262k
views
How to use both AllowGroups and AllowUsers in sshd_config?
I'm trying to modify /etc/ssh/sshd_config on my dedicated debian7 server with both AllowUsers and AllowGroups. However I can't seem get both to work together.
The Setup
There's a user called ...
38
votes
2
answers
18k
views
Can someone clarify Ubuntu (Debian) dist-upgrade for me?
I've got an Ubuntu 8.04 LTS server. There are several packages which are "kept back" ("the following updates have been kept back") when I do an apt-get upgrade. It's my understanding that I can do ...
38
votes
7
answers
97k
views
Unable to ssh to GCE: "Permission denied (publickey)"
I created a VM via Bitnami in Google Compute Engine. Previously, I was able to ssh via the Bitnami web interface. I tried to ssh via terminal on my Mac but kept getting the Permission denied (...