Showing posts with label Configure. Show all posts
Showing posts with label Configure. Show all posts

Monday, November 06, 2006

Debian Hard Disk Spindown

This article Debian hdd spindown - Kurobox Central has an interesting note on how to spin down the hard drive in Debian. When will Linux be as easy to use as Windows?

Install hdparam: apt-get install hdparm

Hard drive info: hdparm -i /dev/hda

Hard drive performance: hdparm -tT /dev/hda

Here's my 7 years old Toshiba Satellite2755 laptop Debian Server 6GB hard drive performance:

Timing cached reads: 62 MB in 2.01 seconds = 30.86 MB/sec
Timing buffered disk reads: 40 MB in 3.07 seconds = 13.01 MB/sec

Set spin down to 35 seconds: hdparm -S7 /dev/hda

To turn on spin down at 35 seconds by default, edit /etc/hdparm.conf:

/dev/hda {
mult_sect_io = 16
write_cache = off
dma = on
spindown_time = 120
}

Run to add hdparm setting to run control 2 (with shutdown running at reboot, shutdown, and single-user mode):

update-rc.d -f hdparm remove
update-rc.d hdparm start 19 2 . stop 19 0 1 6 .

Add to /etc/init.d/sysklogd so SYSKLOGD doesn't log MARK to /var/log/messages every 20 minutes and force the hard drive to turn on

SYSLOGD="-m 0"

Sunday, November 05, 2006

Installing .rpm in Debian

Installing a RedHat .rpm in Debian means converting to .deb and then installing it. And here's how to do it:

Convert .rpm to .deb: alien -k package.rpm

NOTE: The -k option preserves the minor version

Install .deb: dpkg -i packagename.deb

Uninstall .deb: dpkg -r packagename

Wednesday, November 01, 2006

How to Install WordPress On Debian Etch

Complete the following the steps:
  1. # apt-get install mysql
  2. # apt-get install apache2
  3. # apt-get install php5
  4. # apt-get install wordpress
  5. # mysql -u root
  6. mysql> CREATE DATABASE wordpress
  7. mysql> GRANT ALL PRIVILEGES ON *.* TO wordpress@localhost
    IDENTIFIED BY ‘wordpresspassword’ WITH GRANT OPTION;
  8. mysql> FLUSH PRIVILEGES;
  9. #mv wp-config-sample.php wp-config.php
  10. Edit wp-config.php to enter the correct setting:
    // ** MySQL settings ** //
    define('DB_NAME', 'wordpress');
    define('DB_USER', 'wordpress');
    define('DB_PASSWORD', 'wordpresspassword');
    define('DB_HOST', 'localhost');
  11. Add to /etc/apache2/sites-available/default:
    Alias /blog "/usr/share/wordpress/"
    <Directory "/usr/share/wordpress/">
    Options FollowSymLinks
    AllowOverride Limit Options FileInfo
    DirectoryIndex index.php
    </Directory>
  12. #/etc/init.d/apache2 restart
  13. Goto: http://localhost/blog/wp-admin/install.php
  14. Follow the instruction to create a login
  15. Use generated login to log in and start blogging.