http://www.youtube.com/cosmicpanda?gl=TW
---------------------------------------------------------------------------------------------------
vmware-config-tools.pl -c --overwrite --clobber-kernel-modules=vmmemctl --clobber-kernel-modules=vmxnet3 -d
VBoxManage modifyvdi vmxpd.vdi compact
mv /usr/lib/vmware/modules/binary ~
vmware-modconfig -–console -–install-all
mv /usr/lib/vmware/modules/binary /usr/lib/vmware/modules/binary.old
vmware-modconfig -–console -–install-all --validate-kernel-headers --validate-gcc
VMWARE E1000 NIC QUICK HOW TO:
Some users have reported problems with the Lance (default)
and VMXNet network card drivers with FreeBSD 6.x. If these
occur, it is recommended to use the E1000 driver in their place.
1. In /etc/rc.conf, change ifconfig_lnc0 to ifconfig_em0
2. Make the same change in /usr/local/etc/conftemplates/rc.conf
3. shutdown -h now
4. (On host) Edit the
/FreeBSD.vmx
5. Add a line:
ethernet0.virtualDev = "e1000"
ethernet0.virtualDev=vmxnet3
Just below:
ethernet0.present = "TRUE"
6. Boot the VM
scsi0.present = "TRUE"
scsi0.virtualDev = "pvscsi"
------------------------------------------------------------------------------------------------------
status
show database;
show databases;
q
;
show databases;
user horde;
use horde;
show tables;
status
show databases;
use mysql;
show tables;
select user from *;
status
show databases;
use mysql;
show tables;
select user from *;
select * from user;
show databases;
use horde;
status
show tables;
help show
show tables;
show tables.horde_users;
show tables horde_users;
help show
show master logs;
show master status;
status
show databases;
use horde;
status
show tables;
selece * from horde_prefs;
show tabls;
show
;
help show;
show table status;
help show;
show privileges;
show
;
help show;
status
use mysql;
status;
create database test2;
show databases;
status
show databases;
del database horde;
q
;
sh databases;
show databases;
help create
create database zabbix;
use zabbix;
show tables;
show databases;
status
show databases;
create database zabbix;
help
help shutdown
q
quit
;
q quit;
status
create database zabbix;
use zabbix;
show tables;
select * from items
;
status
help show
show innodb status;
status
sh databases;
show databases
;
help create
create database phplist;
help
status
help use
show databases;
use zabbix;
status
help show
SHOW INNODB STATUS;
show master status;
help show
show engine status;
show engine ;
help show engine
show engine innodb status
;
use zabbix;
show engine innodb status;
help show tables
help show databases;
showdatabes
;
help
status
help create
help create database
status
show databases
;
use zabbix;
show tables;
status
status
show databases;
use zabbix;
show table status;
show table status \G
show table ;
show tables;
select * from media;
select * from trends;
help show;
help
help contents
heep Fuctions;
help Fuctions;
SHOW BINLOG EVENTS IN 'mysql-bin.000012' ;
SHOW BINLOG EVENTS IN 'mysql-bin.000012' \G
use test;
show tables;
show columns from use;
show columns from users;
help show columns
help show
show columns from users;
status
use zabbix;
use mysql;
show table status;
help show
show tables ;
select * from user;
select * from user \G
select * from user where User=root \G
select * from user where User like 'root' \G
select * from user where User like 'root'
;
select * from user where User like 'root' \G
\q
status
use zabbix
show tables;
use zabbix;
show tables;
select * from history;
use zabbix;
show tables;
show test;
use test;
show tables;
show table status;
use mysql
show table status limit 1;
show table status;
show database status;
show databases;
help grant
show grants;
status;
show tables;
use test;
use zabbix;
use phplist;
show tables;
help drop
drop database zabbix;
help flush;
flush;
flush local;
show databases;
create database zabbix;
drop database zabbix;
create database zabbix;
show grants;
grant all on *.* to 'icarus'@'localhost'
;
reload
;
status;
show grants;
show grant status;
use mysql;
select * from user;
select * from user \G
help revoke
revoke all on *.* to 'icarus'@localhost'
;
'
;
revoke all on *.* to 'icarus'@localhost'
;
';
revoke all on *.* to 'icarus'@'localhost'
;
use zabbix;
sel#
;
select * from#
;
select * from\c
show grants;
show grants \G
grant all on *.* to test
\c
grant all on *.* to test
grant all on *.* to 'test'@'%';
show grants;
show grants
;
use zabbix;
help check table;
check table history fast;
help anal
help table;
help analyze table;
analyze table history;
help table;
help optimize table;
optimize table history;
select * from history;
q
\q
pager less -ieS
help show engine
show engine innodb status;
show d;
pager less -ivS
help table
help show table
help show
q
\q
pager less -ieS
help table
help check table
q
\q
pager less -ieS
show binlog events;
\q
pager less -ieS
help fulltext
help create index;
show databases;
use zabbix;
show tables;
explain hosts;
explain users;
select userid from hosts union select userid from users;
select hostid from hosts union select userid from users;
select * from hosts union select * from users;
show tables;
explain hosts;
show table hosts;
show table status;
select * from hosts;
select * from hosts where hostid= 10001;
select * from hosts;
select * from hosts where hostid= 10001 union select * from hosts where hostid=10025;
select now();
select unix_timestamp();
explain history;
select * from history where clock > unix_timestamp();
select * from history where clock > unix_timestamp() - 10 ;
select unix_timestamp();
select * from history where clock > unix_timestamp() - 10 ;
select unix_timestamp();
select * from history where clock > unix_timestamp() - 10 ;
\q
pager less -ieS
show databases;
use test;
show table status;
status
\q
use test;
LOAD DATA FROM MASTER;
use test;
pager less -ieS
use test;
select * from users;
LOAD DATA FROM MASTER;
select * from users;
LOAD DATA FROM MASTER;
select * from users;
show slave status;
show master status;
select * from users;
show master status;
show slave status;
select * from users;
LOAD DATA FROM MASTER;
select * from users;
show slave status;
show master status;
pager less -ieS
use phplist
show tables;
select * from phplist_user_user;
delete from phplist_user_user;
LAST_INSERT_ID()
;
last_insert_id();
select last_insert_id();
delete from phplist_user_user;
help alter tables
help alter table
show table status;
explain phplist_user_user;
alter table phplist_user_user AUTO_INCREMENT =1;
delete from phplist_user_user;
alter table phplist_user_user AUTO_INCREMENT =1;
\q
use phplist;
alter table phplist_user_user AUTO_INCREMENT =1;
delete from phplist_user_user;
\q
use phplist;
select * from phplist_user_user;
select * into '/root/test.sql' from phplist_user_user ;
select * into outfile '/root/test.sql' from phplist_user_user ;
\q
use phplist;
select * into outfile '/root/test.sql' from phplist_user_user ;
\q
use phplist;
select * into outfile '/root/test.sql' from phplist_user_user ;
status;
select * into outfile '/var/test.sql' from phplist_user_user ;
show file;
help show;
help into outfile
help into;
\q
use phplist;
help show;
select * into outfile '/var/test.sql' from phplist_user_user ;
select * into outfile 'test.sql' from phplist_user_user;
\q
use phplist;
select email into outfile 'test.sql' from phplist_user_user;
\q
use phplist;
delete from phplist_user_user;alter table phplist_user_user AUTO_INCREMENT =1;
\q
use phplist;
select email into outfile 'test.sql' from phplist_user_user;
delete from phplist_user_user;alter table phplist_user_user AUTO_INCREMENT =1;
\q
load data local infile 'test.sql' into table phplist_user_user(email);
use phplist;
load data local infile 'test.sql' into table phplist_user_user(email);
delete from phplist_user_user;alter table phplist_user_user AUTO_INCREMENT =1;
\q
delete from phplist_user_user;alter table phplist_user_user AUTO_INCREMENT =1;
use phplist;
delete from phplist_user_user;alter table phplist_user_user AUTO_INCREMENT =1;
load data local infile 'email.csv' into table phplist_user_user(email);
\q
shutdown
;
\q
create database \c
\q
use mysql
help grant
grant all on phplist_db to 'fulade'@'localhost' ;
help fuld
help flush
help flush pri
help private
grant all on phplist_db.* to 'fulade'@'localhost' ;
grant all on phplist_db.* to 'fulade'@'localhost' ;\c
\q
use phplist_db;
pager less -ieS
show tables;
explain phplist_user_user;
show table status;
\q
-------------------------------------------------------------------------------------------------
export CFLAGS="-O3 -march=core2 -mtune=core2 -mmmx -msse -msse2 -mfpmath=sse -fforce-addr -fomit-frame-pointer"
export PKG_CONFIG_PATH=/home/edward/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
export LD_LIBRARY_PATH=/home/edward/local/lib:$LD_LIBRARY_PATH
#gtkglext-1.2.0
./configure --prefix=/home/edward/local --disable-gtk-doc --enable-debug=no
#gliv-1.9.7
./configure --prefix=/home/edward/local
vdpau
./configure --prefix=/home/edward/local/mplayer-vdpau --disable-x264-lavc --disable-x264 --enable-gui
smplayer
make PREFIX=/home/edward/local QMAKE=/usr/bin/qmake-qt4 -j4 install
import ------> disable freetype
----------------------------------------------------------------------------------------------------------
java
ln -sf /usr/java/latest/jre/lib/amd64/libnpjp2.so /usr/lib64/mozilla/plugins/libnpjp2.so
ext3
Filesystem features: has_journal resize_inode dir_index filetype needs_recovery sparse_super large_file
ext4
tune2fs -O extents,uninit_bg,dir_index /dev/XXXX
fsck -pf /dev/XXXX
To enable the ext4 features on an existing ext3 filesystem, use the command:
# tune2fs -O extents,uninit_bg,dir_index /dev/DEV
tune4fs -O extents,uninit_bg,dir_index /dev/
WARNING: Once you run this command, the filesystem will no longer be mountable using the ext3 filesystem!
After running this command (specifically, after setting the uninit_bg parameter), you MUST run fsck to fix up some on-disk structures that tune2fs has modified:
# e2fsck -fDC0 /dev/DEV
e4fsck -fDC0 /dev/
-------------------------------------------------------------------------------
find /mnt/cifs/src/ -name "*gz" | xargs -t -i tar zxf {}
find /mnt/cifs/src/ -name "*bz2" | xargs -t -i tar jxf {}
export MAKEFLAGS="-j6"
export PS1='\@-[\u@\h \W]\$ '
http://www.google.com.tw/dictionary?langpair=en|zh-TW&hl=zh-TW
x11vnc -display :0 -ncache 10 -rfbport 5800 -clip 1440x900+0+0
metaflac --import-cuesheet-from=
rpmbuild --target=i686-redhat-linux --define 'dist .el5' --without schroedinger --without rtmp --without theora --without speex --ba ffmpeg.spec
vmware-config-tools.pl -c --overwrite --clobber-kernel-modules=vmmemctl --clobber-kernel-modules=vmxnet3 -d
ftp://ftp.ntu.edu.tw/pub/MySQL/Downloads/
mount -t udf,iso9660 /dev/scd0 iso/ -r
export LD_LIBRARY_PATH=/usr/lib/freetype-freeworld
find ~/cifs/*.bz2 | xargs -t -i tar jxvf {}
find ~/cifs/*.gz | xargs -t -i tar zxvf {}
find ../*.rar | xargs -t -i unrar x -o+ {}
find *.zip | xargs -t -i unzip {}
find *.zip | xargs -t file
rpmbuild -bb --with bytecode_interpreter --with subpixel_rendering
rpmbuild --with bytecode_interpreter --with subpixel_rendering --bs freetype.spec
rpmbuild --target=i686-redhat-linux --define 'dist .el5' --with bytecode_interpreter --with subpixel_rendering -bb freetype.spec
nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1
mount -t udf,iso9660 /dev/scd0 iso/
P5Q-EM
Sensor Properties:
Sensor Type Winbond W83627DHG (ISA 290h)
modprobe w83627ehf force_id=0x8860
ssh -R 2215:localhost:22 icarus@220.135.253.64 -N -f sleep 20
ssh edward@localhost -p 2215
mencoder -profile svi -vf scale=480:800,harddup
sysctl vm.max_writeback_pages=8192
VBoxManage modifyvdi vmxpd.vdi compact
mv /usr/lib/vmware/modules/binary ~
vmware-modconfig -–console -–install-all
mkfs.ext3 -b 4096 -j -E stride=32 -m 1 -O dir_index,filetype /dev/md15
mkfs.ext4 -b 4096 -j -E stride=64,stripe-width=128 -m 1 -O dir_index,filetype
#Create xfs filesystem with a 64 megabyte log
mkfs.xfs -f -s size=4096 -l size=64m /dev/hda3
#Mount filesystem with 8 log buffers, and atime and diratime disabled
mount -o noatime,nodiratime,logbufs=8 /dev/hda3 /mnt/gentoo/
rpmbuild --target=i686-redhat-linux --define 'dist .el5' --define '_without_speex 1' --rebuild ffmpeg-0.5-2.rf.src.rpm
find ../ -name "*rar" -print0 | xargs -0 -Iname unrar -o- x name
mv /usr/lib/vmware/modules/binary /usr/lib/vmware/modules/binary.old
vmware-modconfig -–console -–install-all --validate-kernel-headers --validate-gcc
alias net-pf-10 off
options ipv6 disable=1
ipv6.disable=1
with 11.2: Found out that ipv6 is no longer a module, it is in the kernel, so you can administratively disable with a kernel option in
grub's menu.lst of ipv6.disable=1 but individual applications can still send out v4 and v6 queries. In my case yast2 -> software ->
online update still sends out both, until I find out how to disable.
http://wiki.centos.org/HowTos/OS_Protection
ALSA Driver
I got a simple solution for this compile problem.
Just open the ”./include/adriver.h” file in a text editor, go to line 100 and do one of the following :
Comment out the typedef : //typedef unsigned int fmode_t;
Change the kernel number : #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27)
(I've got the 2.6.27-xxxx so this effectively cancels the typedef without breaking compat with older kernels)
No if only I could get this laptop to make some noise … :(
VMWARE E1000 NIC QUICK HOW TO:
Some users have reported problems with the Lance (default)
and VMXNet network card drivers with FreeBSD 6.x. If these
occur, it is recommended to use the E1000 driver in their place.
1. In /etc/rc.conf, change ifconfig_lnc0 to ifconfig_em0
2. Make the same change in /usr/local/etc/conftemplates/rc.conf
3. shutdown -h now
4. (On host) Edit the
/FreeBSD.vmx
5. Add a line:
ethernet0.virtualDev = "e1000"
ethernet0.virtualDev=vmxnet3
Just below:
ethernet0.present = "TRUE"
6. Boot the VM
scsi0.present = "TRUE"
scsi0.virtualDev = "pvscsi"
ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg
把 Linux 桌面錄製為視頻。
cmake CMAKE_C_FLAGS=Release -DQTC_MODIFY_MOZILLA=true -DQTC_DEFAULT_TO_KDE3=true ..
cmake -DQTC_DEFAULT_TO_KDE3=true -DQT_PLUGINS_DIR=/usr/lib/qt-3.3/plugins -DQTC_BUILD_CONFIG_MODULE=true ..
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="-O3 -DNDEBUG -march=core2 -mtune=core2 -mmmx -msse -msse2 -fforce-addr -pipe" -DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG -march=core2 -mtune=core2 -mmmx -msse -msse2 -fforce-addr -pipe" -DQT_PLUGINS_DIR=/usr/lib/qt-3.3/plugins -DQTC_BUILD_CONFIG_MODULE=true ..
[ 913.765932] UDF-fs: No VRS found
[ 913.765939] UDF-fs: No partition found (1)
mount -t udf,iso9660 /dev/scd0 iso/ -r
------------------------------------------------------------------------------------------------------
%define with_firmware 1
rpmbuild --target=x86_64-redhat-linux --with firmware --without debuginfo --bb kernel-uek.spec
-----------------------------------------------------------------------------------------------------------------
2,048 sectors make a megabyte.
2,097,152 sectors make a gigabyte
## chunk=512k=(stripe size) 512k/4k=128k , 128*2=256K
mkfs.ext3 -K -b 4096 -j -v -E stride=128,stripe-width=256 -m 1 -O dir_index,filetype /dev/md12
mkfs.ext4 -b 4096 -j -v -E stride=128,stripe-width=256 -m 1 -O dir_index,filetype /dev/md15
mkfs.xfs -L md16-xfs -s size=4096 -l size=128m,version=2,su=256k -d su=512k,sw=2 -f /dev/md16meta-data=/dev/md16
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
mkfs.ext3 -U b0230eac-8e63-4060-911f-4fa95c7ebe98 -K -v -b 4096 -j -L uHome -m1 -O dir_index,extent,filetype,large_file /dev/sde5
mkfs.vfat -K -F 32 -n Transcend_8GB -S 512 -s 16 -v /dev/sde1
mdadm -C /dev/md12 -e 0 --level=0 --chunk=512 -n 2 /dev/sda2 /dev/sdb2
## chunk=512k=(stripe size) 512k/4k=128k , 128*2=256K
mkfs.ext3 -K -b 4096 -j -v -E stride=128,stripe-width=256 -m 1 -O dir_index,filetype /dev/md12
mke2fs 1.41.12 (17-May-2010)
fs_types for mke2fs.conf resolution: 'ext3', 'default'
Calling BLKDISCARD from 0 to 24675090432 failed.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=128 blocks, Stripe width=256 blocks
1507328 inodes, 6024192 blocks
60241 blocks (1.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
184 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
#Create xfs filesystem with a 64 megabyte log
mkfs.xfs -f -s size=4096 -l size=64m /dev/hda3
#Mount filesystem with 8 log buffers, and atime and diratime disabled
mount -o noatime,nodiratime,logbufs=8 /dev/hda3 /mnt/gentoo/
4-drive RAID5 array with a 64k stripe size
mkfs.xfs -d su=64k,sw=3
mdadm -C /dev/md3 --level=0 --chunk=512 -n2 /dev/sda3 /dev/sdb3
mkfs.xfs -L md3-xfs -s size=4096 -l size=64m,version=2,su=256k -d su=512k,sw=2 -f /dev/md3
512k /512(s)=1024
mkfs.xfs -L md3-xfs -s size=4096 -l size=64m,version=2,su=256k -d sunit=1024 ,swidth=2048 -f /dev/md3
mkfs.xfs -L md16-xfs -s size=4096 -l size=128m,version=2,su=512k -d su=512k ,sw=2 -f /dev/md16
mkfs.xfs -L md16-xfs -s size=4096 -l size=128m,version=2,su=256k -d su=512k,sw=2 -f /dev/md16meta-data=/dev/md16
isize =256 agcount=32, agsize=10451072 blks
= sectsz=4096 attr=2
data = bsize=4096 blocks=334433024, imaxpct=5
= sunit=128 swidth=256 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal log bsize=4096 blocks=32768, version=2
= sectsz=4096 sunit=64 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
-------------------------------------256k
mdadm -C /dev/md16 -e 0 --level=0 --chunk=256 -n 2 /dev/sda6 /dev/sdb6
mkfs.xfs -L md16-xfs -l size=128m,version=2,su=256k -d su=256k,sw=2 -f /dev/md16
mkfs.xfs -L md16-xfs -l size=128m,version=2,su=256k -d su=256k,sw=2 -f /dev/md16
meta-data=/dev/md16 isize=256 agcount=32, agsize=10451008 blks
= sectsz=512 attr=0
data = bsize=4096 blocks=334432256, imaxpct=25
= sunit=64 swidth=128 blks, unwritten=1
naming =version 2 bsize=4096
log =internal log bsize=4096 blocks=32768, version=2
= sectsz=512 sunit=64 blks, lazy-count=0
realtime =none extsz=524288 blocks=0, rtextents=0
-------------------------------------------------------------------------------------------------------------------
mkfs.xfs -L sdc1-xfs -f -s size=4096 -l size=128m /dev/sdc1
mkfs.xfs -L sdc2-xfs -s size=4096 -f -l size=64m /dev/sdc2
-l log size
-s meta data size
amd-k8:~ # cat /proc/mdstat
Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md3 : active raid0 sda3[0] sdb3[1]
24096768 blocks 512k chunks
md5 : active raid0 sda5[0] sdb5[1]
97192960 blocks 128k chunks
md2 : active raid0 sda2[0] sdb2[1]
24097280 blocks 128k chunks
584 mkfs.xfs -L md3-xfs -s size=4096 -l size=64m,version=2 -d su=512k,sw=2 /dev/md3
585 mkfs.xfs -L md3-xfs -s size=4096 -l size=64m,version=2 -d su=512k,sw=2 -f /dev/md3
587 mkfs.xfs -L md3-xfs -s size=4096 -l size=64m,version=2,su=512k,sw=2 -d su=512k,sw=2 -f /dev/md3
588 mkfs.xfs -L md3-xfs -s size=4096 -l size=64m,version=2,su=512k -d su=512k,sw=2 -f /dev/md3
589 mkfs.xfs -L md3-xfs -s size=4096 -l size=64m,version=2,su=256k -d su=512k,sw=2 -f /dev/md3
----test----
CHUNKSIZE= mdadm --chunk = stripe size
SUNIT=CHUNKSIZE * 1024 / 512 #chunksize*2
SWIDTH=RAID_DISKS(data disk number) * SUNIT