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.

Linux Ask!

Apr 102010
 

Rescheduling mlocate to run weekly instead of daily

Answer:

As explained before, mlocate is a useful tool for quickly find files on the filesystem based on their name.

When you installed the mlocate, it created a daily cron job under /etc/cron.daily/ which build the database daily. However, it is quite IO intensive when you build the database, and it is not recommended to run the indexing in a production server in such high frequency...it is better to run it weekly or monthly.

E.g. To reschedule the the cron job to run weekly

# mv /etc/cron.daily/mlocate /etc/cron.weekly/

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

Apr 102010
 

Installing Nginx in Ubuntu

Answer:

1. Using aptitude

# sudo aptitude install nginx

2. Start it

# sudo /etc/init.d/nginx start

3. Stop it

# sudo /etc/init.d/nginx stop

4. Restart it

# sudo /etc/init.d/nginx restart