SSH KeepAlive
on Wednesday 9th February, 2011 Gabe speculated thusly…add the following to sshd_config
KeepAlive yes
ClientAliveInterval 60
Posted in Linux, Operating System, Server, Ubuntu
add the following to sshd_config
KeepAlive yes
ClientAliveInterval 60
Posted in Linux, Operating System, Server, Ubuntu
Either:
$ sudo tasksel
or:
$ sudo tasksel install lamp-server
or:
$ sudo apt-get install php5 mysql-server apache2
Posted in Information, Linux, Operating System, Ubuntu
Run as root, or prefix with “sudo”:
# locale-gen en_GB.UTF-8
# dpkg-reconfigure locales
Posted in Information, Linux, Operating System, Ubuntu
Find your debian-sys-maint password in /etc/mysql/debian.cnf.
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '
Replace
with your debian-sys-maint password.
Posted in Debian, Development, MySQL, Operating System, Ubuntu
For some reason servers that I connected to using FTP with gnome-vfs would open in Firefox. Odd really.
I fiddled about and eventually developed a filesystem level fix. Just go to the folder:
~/.gconf/desktop/gnome/url-handlers
And delete the ftp folder!
Posted in Debian, Information, Linux, Operating System, Ubuntu
I upgraded to VirtualBox 3 and then my windows guest went wrong.
First of all, you have make sure the latest version of compiz installed.
Go to CompizConfigs Settings Manager and look for “Windows Rules” under Windows Management category. Enable “Windows Rules” and go to “No ARGB visuals” use Window Class, click Grab and then click in virtualbox window.
Posted in Information, Linux, Operating System, Ubuntu
If you develop multiple sites and you need virtual hosting functionality, scroll down to the end of the /private/etc/apache2/httpd.conf file and uncomment the following:
# Include /private/etc/apache2/extra/httpd-vhosts.conf
Next, you’ll need to setup whatever virtual hosts you have in the virtual hosts file /private/etc/apache2/extra/httpd-vhosts.conf
You need to make an entry in the httpd-vhosts.conf file like so:
<virtualhost *:80> ServerName beta-site-1.com ServerAlias www.beta-site-1.com ServerAdmin webmaster@beta-site-1.com ErrorLog "/private/var/log/apache2/dummy-host2.example.com-error_log" CustomLog "/private/var/log/apache2/dummy-host2.example.com-access_log" common DocumentRoot "/Library/WebServer/beta-site-1" ScriptAlias /cgi-bin/ "/Library/WebServer/beta-site-1/cgi-bin"Options FollowSymLinks MultiViews Includes AllowOverride All Order allow,deny Allow from all </virtualhost>
The examples provided by Apple in the vhosts file are slightly incorrect and if you use the CustomLog lines as is you will get errors the following errors if you run: apachectl -t -D DUMP_VHOSTS:
Syntax error on line 40 of /private/etc/apache2/extra/httpd-vhosts.conf:
CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional "env=" clause (see docs)
This is because
CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log common
Should actually read:
CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" common
Posted in Development, Frameworks, HowTo, Information, Leopard, Linux, Operating System, OS X, PHP, Server, Ubuntu
Ensure that you have the package sun-java6-jre installed and then run the following command from a terminal:
sudo ln -s /usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox-3.0.10/plugins/
You will need to restart FireFox after this and Java should be working for FireFox now.
Posted in Information, Linux, Operating System, Ubuntu
A few weeks back I tried out the Gnome sessions. Gnome should automatically restore the programs you were last using when you log back in. However, it did not work well at all and I turned it off. This is when the problem began – everytime I logged back a whole bunch of the same applications automatically launched causing all sorts of mischief. No matter what I tried I could not get Gnome to turn sessions off again.
In the beginning I clicked on System -> Preferences -> Startup Applications and then selected the Options tab. Here, you may check a box labelled “Automatically remember running applications when logging out”. This will activate Gnome sessions. In my case, however, deselecting this did not turn Gnome sessions off.
After much hunting around, with no help from the Internet, I finally found the files that needed deleting to stop Gnome launching various apps at startup. You need to open your home folder in Nautilus and press CTRL+H – this lets you view hidden files and folders (hidden files/folders begin with a dot “.”). Navigate the following path .config/gnome-session/saved-session and delete all the files there. You can move them to the trash can for safety. Having done this, the next time you login you should just get a blank desktop.
I’ve taken the time to write this in the hope that anyone else suffering from the same bug can solve it more quickly than I. This should be reported as a bug on launchpad.net if it isn’t already there.
Posted in Information, Linux, Operating System, Ubuntu
I was recently trying to get a Ruby script working on Ubuntu. This script required Hpricot and using Ruby Gems to install Hpricot always resulted in an error:
gem install hpricot --remote
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /var/lib/gems/1.8 directory.
gabriel@windsor-telecom-2874:~/Music$ sudo gem install hpricot --remote
Building native extensions. This could take a while...
ERROR: Error installing hpricot:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb install hpricot --remote
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
Gem files will remain installed in /var/lib/gems/1.8/gems/hpricot-0.7 for inspection.
Results logged to /var/lib/gems/1.8/gems/hpricot-0.7/ext/hpricot_scan/gem_make.out
The answer was simple:
sudo aptitude install ruby-dev
Just install the Ruby Dev package, this will also allow you to install lots of other gems such as SQLite3, etc.
Posted in Development, Ruby, Ubuntu