Hot answers tagged

44

Upstart watches its configuration directories with inotify and reloads the configuration when any of the files change or a new file is added. Apparently this doesn't work for symlinks. To manually update the configuration use $ initctl reload-configuration


35

Use both the ServerName and ServerAlias directives in your virtualhost definition. You would do something like: <VirtualHost *:80> Servername wiki.lan ServerAlias wiki [...] </Virtualhost> See Apache Docs – ServerAlias Directive.


29

Ok... I've found the answer with experiments. Use the server or alternate ISO instead of the desktop ISO! Preseed does not work with the desktop ISO. Use the linux-generic kernel and tasksel ubuntu-desktop to get a desktop installation. The auto boot parameter does not work (at least for i386). Use auto=true priority=critical instead. In contrast to the ...


25

Apparently respawn console none start on (local-filesystems and net-device-up IFACE!=lo) stop on [!12345] script chdir /usr/local/gw6c/bin/ exec /usr/local/gw6c/bin/gw6c end script seems to work


25

First the lecture: Rule Number Zero: If you do not understand what something does, DO NOT TOUCH IT Deleting files "to save space" with no concept of what you are doing will anger the operating system gods, resulting problems similar to what you are now experiencing (Things break. Fixing them is often non-trivial). Now the sympathetic assistance: ...


22

You're looking at a lost cause. Save the data you need, and reinstall the operating system.


21

This is coming from the MOTD (Message Of The Day). The MOTD is pieced together from the commands in /etc/update-motd.d. The specific message comes from running /etc/update-motd.d/90-updates-available. I have seen this happen on systems where after running sudo apt-get update and packages are kept back The following packages have been kept back: linux-...


17

If you want to use the GUI, try clicking Places -> Connect to Server.... For Service Type choose Windows share, and fill out the fields like so: Server: 192.168.1.66 Share: SharedFolder Then download your file from the window. If you want to use a command-line interface, smbclient uses a FTP-like interface (get, put, etc.): ~$ smbclient //192.168.1.66/...


16

Linux command-line ftp defaults to using active-mode FTP. Try switching to passive mode with the pass command: me@ip-10-a-b-c:~$ ftp ftp.drupal.org Name (ftp.drupal.org:me): anonymous 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> dir 500 Illegal PORT command. ftp: ...


15

I've ended up here more than once so I thought I'd provide an updated answer based on my own experience after using the answers here. Thanks especially to @danorton and @orj for their answers. This script has been tested on Upstart 1.5 running on Ubuntu 12.04 with Nginx 1.0.11 and Passenger 3.0.11. If you're not using Passenger you may need to play around ...


15

"In use" as in with an active connection, or that programs are listening on? Or both? Run sudo netstat -lp in your terminal; this will tell you what ports are open to receive connections, and what programs are listening on them. Try sudo netstat -p for the same thing, plus currently-active connections.


12

Figured it out, I needed to wait for a specific device, here's my working Upstart job file: description "SSH Tunnel" start on (net-device-up IFACE=eth0) stop on runlevel[016] respawn env DISPLAY=:0.0 exec autossh -nNT -o ServerAliveInterval=15 -R 22100:localhost:22 myuser@myserver.com -p 2201


11

Found it! You need: - JETTY_HOST=0.0.0.0 to listen to other hosts. So a minimal /etc/default/jetty file includes: - JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun NO_START=0 JETTY_HOST=0.0.0.0 JETTY_PORT=8080


11

php.ini-development and php.ini-production, which come with the PHP 5.3 package, are really just examples of recommended settings. You should review the settings and make sure that they apply to your use and copy them to the regular php.ini file location. On my Ubuntu 10.04.1 LTS (lucid) server, here’s where I find mine: # locate php.ini-development /usr/...


11

Another one of these "fine" Ubuntu-bugs... Check Ubuntu Bug #634387: https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/634387 I deleted the files "/etc/motd.tail" and "/etc/motd.tail.old" and did a logout / login to re-genereate a propper /etc/motd.


11

That's just cron running the cronjobs. It opens (and then closes) a PAM session for the appropriate user when it executes commands. Based on the timestamps, you have a cronjob which executes every minute.


10

A socket file doesnt actually contain data, it transports it.. It is a special, unusual type of file created with special system calls/commands. It is not an ordinary file. It is like a pipe the server and the clients can use to connect and exchange requests and data. Also, it is only used locally. Its significance is merely as an agreed rendezvous ...


10

Copy this code into a new file /etc/fail2ban/filter.d/sshd-root.conf: [INCLUDES] # Read common prefixes. If any customizations available -- read them from # common.local before = common.conf [Definition] _daemon = sshd failregex = ^%(__prefix_line)sFailed (?:password|publickey) for root from <HOST>(?: port \d*)?(?: ssh\d*)?$ ignoreregex = ...


10

First of all, init scripts are supposed to be run sudo /etc/init.d/name when you are not logged in as root( when logged-in user is sudo enabled) Secondly, when you run sudo /etc/init.d/nginx start ==> it fires the master nginx process as root and worker processes as the user you specified in your nginx.conf user directive(eg. www-data) Can you confirm ...


10

It seems there was a bug in the 9.1 packages, but it should be fixed. As indicated in the linked thread the issue could be resolved by running : update-alternatives --remove postmaster.1.gz /usr/share/postgresql/9.1/man/man1/postmaster.1.gz and then reinstalling postgresql-9.1: apt-get install -f apt-get install --reinstall postgresql-9.1


9

Usually, in this case you would want to use apt-get dist-upgrade If you do not wish to run dist-upgrade by fear of breaking something by an accident removal, you can also tell apt-get to upgrade only the packages that were kept back, like this: In your case: sudo apt-get install linux-headers-server linux-image-server linux-server Just specify the ...


9

After some general confusion about permissions the OP realized that the problem wasn't that he didn't have permissions and paths rights but that AppArmor was preventing MySQL from reading and writing to the new location. This is his solution: First stop MySQL so nothing weird happens while you're fiddling: $ sudo stop mysql Then move all the database ...


9

Ahhhh....it doesn't really work that way. As long as the first nameserver is running and active all bind requests will go to it. The only way that you get to the second nameserver is if the previous nameserver in the list has died and after a LONG timeout. To fix your problem, I'm guessing that you might have to build a local caching DNS server ...


9

Use the find command instead. The following example will show you all files that are larger than 10 megabytes: find -size +10M You can use du with find like this to see the size of each file: find -size +10M -exec du -sh {} \;


9

If you have SSH opened to the Internet you WILL see hack attempts where scripties will try to crack that password. Possible mitigation steps: Do not allow root login via SSH (su after login if needed) Have a VERY strong password (think passphrase - 10 or more characters) Use key authentication for SSH and turn off password auth Install fail2ban to block ...


9

When you specify host=localhost, mysql client will try to login to mysql server using unix named pipe which requires a .sock file. This can be bypassed by specifying host=127.0.0.1. This will make mysql client use TCP to connect to the server. Taken from MySQL's documentation: mysql --host=127.0.0.1 --port=3306 --user=your_uname --password=your_pass


9

The column displays CPU time spent per process rather than real time. I can't see if this is specified in the man page but here is some copy-pastage from about.com: "TIME Total CPU time the task has used since it started. If cumulative mode is on, this also includes the CPU time used by the process's children which have died. You can set cumulative mode ...


9

Swapfiles are only supported on some openvz setups, and disabled on purpose by some admins so you cant use up much more resources than you've been alocated. You probably need to upgrade your vps.


8

A socket is a special pseudo-file used for data transmission by reading and writing, not data storage. The socket file is created when the service is started and removed when the service is terminated. The location of the file is defined in /etc/my.cnf like so: [mysqld] socket=/var/run/mysql/mysql.sock



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