老師說:學術研究的路是孤單的
2011年5月25日星期三
2011年5月3日星期二
T1/E1 Pinout (RJ-48C)
| RJ45 Pin | Signal | Notes |
| 1 | RX1 (Ring - negative) | |
| 2 | RX2 (TIP - positive) | |
| 3 | FGND (RX GND) | Ground/Shield |
| 4 | TX1 (Ring - negative) | |
| 5 | TX2 (TIP - positive) | |
| 6 | FGND (TX GND) | Ground/Shield |
| 7 | NC | Unused |
| 8 | NC | Unused |
2010年10月13日星期三
收到附件檔名為winmail.dat檔時的處理方法
2009年10月5日星期一
Cisco Config Class
svn co http://svn.openfoundry.org/ciscoconfig ciscoconfig
2008年12月8日星期一
DHCP OPTION 43 for Lightweight Cisco Aironet Access Points Configuration Example
ddns-update-style none;
option time-offset 28800;
option domain-name-servers 140.127.198.1;
#Define Space
option space Cisco_LWAPP_AP;
option Cisco_LWAPP_AP.server-address code 43 = string;
class "Vendor-Identifier" {
match option vendor-class-identifier;
}
subnet 172.17.0.0 netmask 255.255.255.0 {
option routers 172.17.0.254;
option subnet-mask 255.255.255.0;
option domain-name "AP.Example.com";
option broadcast-address 172.17.0.255;
#Wireless Controler IP Address Configure Option
subclass "Vendor-Identifier" "Airespace.AP1200" {
option vendor-class-identifier "Airespace 1200";
vendor-option-space Cisco_LWAPP_AP;
option Cisco_LWAPP_AP.server-address "172.17.10.1";
}
subclass "Vendor-Identifier" "Cisco AP c1500" {
option vendor-class-identifier "Cisco AP c1500";
vendor-option-space Cisco_LWAPP_AP;
option Cisco_LWAPP_AP.server-address "172.17.10.2";
}
subclass "Vendor-Identifier" "Cisco AP c1200" {
option vendor-class-identifier "Cisco AP c1200";
vendor-option-space Cisco_LWAPP_AP;
option Cisco_LWAPP_AP.server-address "172.17.10.3";
}
range dynamic-bootp 172.17.0.1 172.17.0.200;
default-lease-time 43200;
max-lease-time 86400;
}
2008年12月2日星期二
Install Two HP FC1142SR 4Gb PCI-e HBA Card Using QLogic Fibre Channel HBA Driver (qla2xxx-8.02.21) in Ubuntu 8.04.1
Download QLogic Fibre Channel HBA Driver Source Code
- apt-get install build-essential
- apt-get install kernel-package
- make sure that can find linux-source tarball (ex: linux-source-2.6.24.tar.bz2) in path: /usr/src
- extract and decompress linux-source tarball (ex: tar -xvjf linux-source-2.6.24.tar.bz2)
- change directory to /lib/modules/{kernel version} (ex: cd /lib/modules/`uname -r`)
- create a link to linux-headers path with the name build. (ex: ln -s /usr/src/`uname -r` build)
- create a link to linux-source path with the name build. (ex: ln -s /usr/src/linux-source-2.6.24 source)
Modify The Driver Source Code
- change to your home directory
- wget ftp://ftp.qlogic.com/outgoing/linux/beta/8.x/qla2xxx-src-v8.02.21.tar.gz
- extract and decompress source code tarball file (ex: tar -xvzf qla2xxx-src-v8.02.21.tar.gz)
Get ready to build Driver
- edit file extras/build.sh at first line "#!/bin/sh" to "#!/bin/bash"
in Ubuntu Linux the default "sh" had been symbolic linking to "dash", there are some functions can't be executable in build.sh scrip.- edit file qla_def.h, remark line 33 ~ 35.
- edit file qla_isr.c,. replace "SA_INTERRUPT|SA_SHIRQ" with "IRQF_DISABLED|IRQF_SHARED" at line 2100.
- edit file qla_os.c, add "struct" in front of "kmem_cache *srb_cachep;" at line 40.
- remove ones of NULL at line 5723 in file qla_os.c
- replace "pci_module_init" with "pci_register_driver" at line 5759 in file qla_os.c
Now You Can Install this Driver, If Everything is O Kay.
- change user to root.
- execute "extras/build.sh" in qla2xxx-8.02.21 directory.
Reboot System to Test New Initial Ramdisk and Pray It Can Work..... just kindling ^_^
- execute "extras/build.sh install" to install Driver.
- execute "update-initramfs -v -u -k `uname -r`" to update initramfs image.
2008年9月26日星期五
Resetting MySQL Root Password on Unix Systems
Use the following procedure for resetting the password for any MySQL root accounts on Unix. The instructions assume that you will start the server so that it runs using the Unix login account that you normally use for running the server. For example, if you run the server using the mysql login account, you should log in as mysql before using the instructions. (Alternatively, you can log in as root, but in this case you must start start mysqld with the --user=mysql option. If you start the server as root without using --user=mysql, the server may create root-owned files in the data directory, such as log files, and these may cause permission-related problems for future server startups. If that happens, you will need to either change the ownership of the files to mysql or remove them.)
Log on to your system as the Unix
mysqluser that the mysqld server runs as.-
Locate the
.pidfile that contains the server's process ID. The exact location and name of this file depend on your distribution, hostname, and configuration. Common locations are/var/lib/mysql/,/var/run/mysqld/, and/usr/local/mysql/data/. Generally, the filename has an extension of.pidand begins with eithermysqldor your system's hostname.You can stop the MySQL server by sending a normal
kill(notkill -9) to the mysqld process, using the pathname of the.pidfile in the following command:shell>
kill `cat /mysql-data-directory/host_name.pid`Note the use of backticks rather than forward quotes with the
catcommand; these cause the output ofcatto be substituted into thekillcommand. -
Create a text file and place the following statements in it. Replace the password with the password that you want to use.
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;The
UPDATEandFLUSHstatements each must be written on a single line. TheUPDATEstatement resets the password for all existingrootaccounts, and theFLUSHstatement tells the server to reload the grant tables into memory. Save the file. For this example, the file will be named
/home/me/mysql-init. The file contains the password, so it should not be saved where it can be read by other users.-
Start the MySQL server with the special
--init-fileoption:shell>
mysqld_safe --init-file=/home/me/mysql-init &The server executes the contents of the file named by the
--init-fileoption at startup, changing eachrootaccount password. After the server has started successfully, delete
/home/me/mysql-init.
You should now be able to connect to MySQL as root using the new password.
Alternatively, on any platform, you can set the new password using the mysql client (but this approach is less secure):
Stop mysqld and restart it with the
--skip-grant-tablesoption.-
Connect to the mysqld server with this command:
shell>
mysql -
Issue the following statements in the mysql client. Replace the password with the password that you want to use.
mysql>
UPDATE mysql.user SET Password=PASSWORD('MyNewPass')
->WHERE User='root';
mysql>FLUSH PRIVILEGES;
You should now be able to connect to MySQL as root using the new password.
