Notes: July 2003 Archives

lilo 太久沒用

| | Comments (0)

例: lilo 寫到 hda(下lilo時, 目標的位置), 要從 hdc1 開機
disk=/dev/hda bios=0x80
boot=/dev/hda
root=/dev/hdc1

還是 grub 比較實用

rename

| | Comments (0)

linux 下有個好用指令: rename, 可以批次更名, BSD 下沒有

[root@linux conf]# ll
total 40
drwxr-xr-x 2 root root 4096 7月 31 11:37 ./
drwxrwxrwt 18 root root 4096 7月 31 11:50 ../
-rw-rw-rw- 1 root root 61 7月 28 18:50 diskmounting.ini
-rw-rw-rw- 1 root root 2350 7月 31 11:35 keymap.ini
-rw-rw-rw- 1 root root 45 7月 30 16:49 mouse.ini
-rw-r--r-- 1 root root 70 7月 23 18:48 storage.ini
-rw-r--r-- 1 root root 4 7月 17 15:24 version
-rw-r--r-- 1 root root 7913 7月 3 15:19 zoneinfo.ini
[root@linux conf]# rename ini conf *
[root@linux conf]# ll
total 40
drwxr-xr-x 2 root root 4096 7月 31 11:53 ./
drwxrwxrwt 18 root root 4096 7月 31 11:50 ../
-rw-rw-rw- 1 root root 61 7月 28 18:50 diskmounting.conf
-rw-rw-rw- 1 root root 2350 7月 31 11:35 keymap.conf
-rw-rw-rw- 1 root root 45 7月 30 16:49 mouse.conf
-rw-r--r-- 1 root root 70 7月 23 18:48 storage.conf
-rw-r--r-- 1 root root 4 7月 17 15:24 version
-rw-r--r-- 1 root root 7913 7月 3 15:19 zoneinfo.conf

XF86Config Section "Screen"

| | Comments (0)

更改顏色數, 修改 DefaultColorDepth
可用參數
DefaultColorDepth 8
DefaultColorDepth 15
DefaultColorDepth 16
DefaultColorDepth 24

更改解析度, 修改所有 Subsection "Display" 中的 Mode
可用參數
Modes "640x480"
Modes "800x600" "640x480"
Modes "1024x768" "800x600" "640x480"
Modes "1280x960" "1024x768" "800x600" "640x480"
Modes "1400x1050" "1280x960" "1024x768" "800x600" "640x480"

meta redirect code

| | Comments (0)

<meta http-equiv="refresh" content="0;url=http://77bbs.com">

加在 header block 裡
記下來, 下次就不會忘了怎麼寫

apache HEADER, README

| | Comments (1)

# ReadmeName is the name of the README file the server will look for by
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes.
#
# If MultiViews are amongst the Options in effect, the server will
# first look for name.html and include it if found. If name.html
# doesn't exist, the server will then look for name.txt and include
# it as plaintext if found.
#
ReadmeName README
HeaderName HEADER

加個絕對路徑上去, 就可每個路徑都有

mrtg cfgmaker

| | Comments (0)

用 cfgmaker 可自動找抓資料, 建 config
如用在 ADSL 的 ATU-R
cfgmaker public@192.168.1.1 --output=mrtg.cfg

apache + ssl + php

| | Comments (0)

準備

apache_1.3.28.tar.gz
from http://httpd.apache.org/dist/httpd/apache_1.3.28.tar.gz
mod_ssl-2.8.15-1.3.28.tar.gz
from http://www.modssl.org/source/mod_ssl-2.8.15-1.3.28.tar.gz
openssl-0.9.7b.tar.gz
from http://www.openssl.org/source/openssl-0.9.7b.tar.gz
php-4.3.3RC1.tar.gz
from http://www.php.net

解壓全部

cd openssl-0.9.7b
./config -fPIC
make
make install

cd ../mod_ssl-2.8.15-1.3.28
./configure --with-apache=../apache_1.3.28 --with-ssl=../openssl-0.9.7b --prefix=/usr/local/apache

cd ../apache_1.3.28
./configure --prefix=/usr/local/apache --sysconfdir=/usr/local/apache/conf --enable-module=so \
--enable-shared=ssl --enable-module=ssl --enable-module=rewrite --enable-shared=rewrite
make
make certificate
選 DSA
Country Name 選 TW
Certificate Validity 填一個夠長的時間, 如 1000 (天)
Certificate Version 選 3
其他選項就不是很重要
Encrypt the private key now? [Y/n] 選 n 啟動時才不用輸入密碼
make install

cd ../php-4.3.3RC1
./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs --enable-module=so \
--with-config-file-path=/usr/local/etc --libexecdir=/usr/local/apache/libexec
make install

cp .libs/libphp4.so /usr/local/apache/libexec
複製編好的 php so 檔到 apache libexec 目錄下

修改 httpd.conf
新增
LoadModule php4_module libexec/libphp4.so
LoadModule ssl_module libexec/libssl.so
AddModule mod_php4.c
AddModule mod_ssl.c

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

加入 register_globals = On 到 php.ini
echo "register_globals = On" >> /usr/local/lib/php.ini

啟動 /usr/local/apache/bin/apachectl startssl

rsync via ssh

| | Comments (0)

測試檔, 173mb iso 檔

[root@pank tmp]# rsync -avz -e ssh 192.168.24.5:/tmp/mini.iso /tmp
receiving file list ... done
mini.iso
wrote 32 bytes read 181694087 bytes 2861324.71 bytes/sec
[root@pank tmp]# rsync -avz -e ssh 192.168.24.5:/tmp/mini.iso /tmp
receiving file list ... done
mini.iso
wrote 32 bytes read 181694087 bytes 2907105.90 bytes/sec
total size is 181633024 speedup is 1.00
[root@pank tmp]# rsync -avz -e ssh 192.168.24.5:/tmp/mini.iso /tmp
receiving file list ... done
mini.iso
wrote 32 bytes read 181694087 bytes 2861324.71 bytes/sec
total size is 181633024 speedup is 1.00

結果 rsync -e ssh 的效能比 scp 差(2.8mb/s vs 4mb/s)

MSN6 no ad

| | Comments (0)

去廣告修正

OFFSET D236D
Find 74 13 6A 04
Edit EB -- -- --

OFFSET D23AA
Find 74 0A 8B 4E 4C
Edit EB -- -- -- --

Pages

March 2008

Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          

About this Archive

This page is a archive of entries in the Notes category from July 2003.

Notes: August 2003 is the next archive.

Find recent content on the main index or look in the archives to find all content.