Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Apr 102010
 

SSH takes a long time to connect or log in

Answer

If you experienced slow SSH connect to a remote server, you can try to disable the reverse DNS lookup at the server.

1. Edit the sshd_config

# sudo vi /etc/ssh/sshd_config

2. Add the following line in sshd_config

UseDNS no

3. Restart sshd

# sudo /etc/init.d/ssh restart

Mar 072010
 

Installing Python modules with easy_install

Answer:

Install Python modules cannot be easier with easy_install.

To use easy_install, you can use apt-get to install the "python-setuptools" package

# sudo apt-get install python-setuptools

Then you can use easy_install to install the module you want, e.g. pymongo

# sudo easy_install pymongo

Feb 182010
 

Put a profile in AppArmor complain mode

Answer:

Some applications, such as the MySQL server, if you changed the default datadir, you might not be able to startup MySQL.

To solve the problem, put the MySQL profile in AppArmor complain mode can solve the problem.

# sudo aa-complain /usr/sbin/mysqld

Then reload AppArmor

# sudo invoke-rc.d apparmor reload