display color directory
 in your ~/.bashrc file and uncommit the line after it says "enable color support of ls and also add handy aliases"


Install remote desktop
aptitude install xfce4 vnc4server


dns config
vim /etc/resolv.conf
nameserver 46.182.121.1
nameserver 8.8.8.8



中文乱码(空心方框)问题
vim  /etc/profile
install fonts
aptitude install xfonts-base x-ttcidfont-conf xfonts-intl-chinese ttf-bitstream-vera ttf-kochi-gothic ttf-kochi-mincho xfonts-wqy ttf-mscorefonts-installer ttf-umefont ttf-umeplus


wine garbage characters

vim ~/.wine/drive_c/windows/win.ini

add 
[Desktop]
menufontsize=13
messagefontsize=13
statusfontsize=13
IconTitleSize=13


vim zh.reg
insert

REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"Arial Baltic,186"="Arial,186"
"Arial CE,238"="Arial,238"
"Arial CYR,204"="Arial,204"
"Arial Greek,161"="Arial,161"
"Arial TUR,162"="Arial,162"
"Arial Unicode MS"="Droid Sans Fallback"
"Courier New Baltic,186"="Courier New,186"
"Courier New CE,238"="Courier New,238"
"Courier New CYR,204"="Courier New,204"
"Courier New Greek,161"="Courier New,161"
"Courier New TUR,162"="Courier New,162"
"Dotum"="UnDotum"
"Helv"="MS Sans Serif"
"Helvetica"="Arial"
"MS Gothic"="Ume Gothic"
"MS Mincho"="Ume Mincho"
"MS PGothic"="Ume P Gothic"
"MS PMincho"="Ume P Mincho"
"MS Shell Dlg"="Ume P Gothic"
"MS Shell Dlg 2"="Ume P Gothic"
"MS UI Gothic"="Ume UI Gothic"
"Times"="Times New Roman"
"Times New Roman Baltic,186"="Times New Roman,186"
"Times New Roman CE,238"="Times New Roman,238"
"Times New Roman CYR,204"="Times New Roman,204"
"Times New Roman Greek,161"="Times New Roman,161"
"Times New Roman TUR,162"="Times New Roman,162"
"Tms Rmn"="Times New Roman"

regedit zh.reg


lenny update something from sid

vim /etc/apt/sources.list
deb http://ftp.nl.debian.org/debian lenny main contrib non-free
deb http://ftp.nl.debian.org/debian-security lenny/updates main contrib non-free

deb http://ftp.nl.debian.org/debian sid main contrib non-free
deb-src http://ftp.nl.debian.org/debian sid main contrib non-free


vim /etc/apt/preferences
Package: *
Pin: release a=stable
Pin-Priority: 700

Package: *
Pin: release a=testing
Pin-Priority: 650




Error:
symbol lookup error: /usr/lib/libstdc++.so.6: undefined
symbol: _ZNSt8messagesIcE2idE, version GLIBCXX_3.4

Solution:
install
gcc-base-4.4 and libstdc++6 from squeeze.


debian lenny rar400b2 garbage characters

1.http://www.rarlab.com/download.htm download the newest version for Linux
2.exact and make install
3.ln -s /usr/local/bin/rar /usr/bin


SNMPv3 with cacti
apt-get install snmp snmpd
/etc/init.d/snmpd stop

vim /etc/snmp/snmpd.conf
#  Listen for connections from the local system only
--agentAddress  udp:127.0.0.1:161
agentAddress  udp:161

net-snmp-config --create-snmpv3-user -ro -a yourPASSWORD -A MD5 yourUSERNAME
/etc/init.d/snmpd start
snmpwalk -v3 -u yourUSERNAME -l auth -a MD5 -A yourPASSWORD localhost

if everything is fine, in the cacti configure page
must set SNMP Privacy Protocol (v3) to none


ulimit -n/too many open files

vim /etc/security/limits.conf
*               soft    nofile          327680
*               hard    nofile          327680

if nothing changed , then change * to your username
relogin

vim /etc/sysctl.conf
fs.file-max = 1567143

sysctl -p



cacti监控流量超过100M不准确的问题(非64位采集/非net-snmp版本过低)

the problem is that a 32 bit snmp counter overflows between the 5 min polling intevals that is used by default. 
you have two options: 
* use 64 bit snmp counters if your device supports it (probably needs snmp v2 or above) 
* use shorter polling interval, for example 1 minute, but note that you need to change more than just the polling interval (graph, rra and so on) 

i'm using 1min polling intervals for 32bit counters on 1 gbit interfaces and a different graph+datasource setup, and this works fine. 
it also gives better precition for the last couple of ours (1min intervals instead of 5min). 


原来,把cacit的poller时间改成1分钟,可以解决这个问题,于是:
1.将cacti的poller设置中Poller Interval和Cron Interval两项改为Every Minute
2apt-get install cacti-spine,并将cacti的poller类型修改为spine(原来为cmd.php)
3.vim /etc/cron.d/cacti */5***** to */1******
如果原来已经有设备和图形,则须Rebuild Poller Cache或者删除/var/lib/cacti/rra/里面的所有东西
cd /usr/share/cacti/cli
php -q rebuild_poller_cache.php -d

Data sourcers -> RRAs -> add "Hourly (1 Minute Average)"
select "average" and "max"
x-files: 0.5
Steps: 1
Rows: 500
Timespan: 14400 

It just works
don't forget to add "hourly" to "Associated RRA's" for each data source (templates) and delete the old .rrd files.
In Data sources (templates): Step must be 60 and Heartbeat should be 120.


Building Wine on 64-bit Debian Unstable (Sid)

/etc/apt/preferences:
Package: wine
Pin: release l=WineHQ APT Repository
Pin-Priority: 1000


The build dependencies in the released Wine have most of what you need:
sudo apt-get build-dep wine

On Debian you may need to add some more, or run the build-dep command after adding the APT Repository.
To get Direct X working with nvidia, install the 32-bit drivers:
sudo apt-get install nvidia-glx-ia32

Wine's configure requires .so links, and for some reason Debian 64-bit doesn't make .so links for the 32-bit libraries. Accordingly, to avoid missing libraries and compile smoothly you'll have to do some linking by hand.
You can make these links in a temporary folder within the wine tree.
mkdir -p ./lib32
ln -s /usr/lib32/libX11.so.6 ./lib32/libX11.so
ln -s /usr/lib32/libXext.so.6 ./lib32/libXext.so
ln -s /usr/lib32/libfreetype.so.6 ./lib32/libfreetype.so
ln -s /usr/lib32/libfontconfig.so.1 ./lib32/libfontconfig.so
ln -s /usr/lib32/libGL.so.1 ./lib32/libGL.so
ln -s /usr/lib32/libGLU.so.1 ./lib32/libGLU.so
ln -s /usr/lib32/libXrender.so.1 ./lib32/libXrender.so
ln -s /usr/lib32/libXinerama.so.1 ./lib32/libXinerama.so
ln -s /usr/lib32/libXxf86vm.so.1 ./lib32/libXxf86vm.so
ln -s /usr/lib32/libXi.so.6 ./lib32/libXi.so
ln -s /usr/lib32/libXrandr.so.2 ./lib32/libXrandr.so
ln -s /usr/lib32/liblcms.so.1 ./lib32/liblcms.so
ln -s /usr/lib32/libpng12.so.0 ./lib32/libpng.so
ln -s /usr/lib32/libcrypto.so.0.9.8 ./lib32/libcrypto.so
ln -s /usr/lib32/libssl.so.0.9.8 ./lib32/libssl.so
ln -s /usr/lib32/libxml2.so.2 ./lib32/libxml2.so
ln -s /usr/lib32/libjpeg.so.62 ./lib32/libjpeg.so
ln -s /usr/lib32/libXcomposite.so.1 ./lib32/libXcomposite.so
ln -s /usr/lib32/libcups.so.2 ./lib32/libcups.so
ln -s /usr/lib32/libXcursor.so.1 ./lib32/libXcursor.so
ln -s /lib32/libdbus-1.so.3 ./lib32/libdbus-1.so
ln -s /usr/lib32/libhal.so.1 ./lib32/libhal.so
ln -s /usr/lib32/libsane.so.1 ./lib32/libsane.so
ln -s /usr/lib32/libgphoto2.so.2 ./lib32/libgphoto2.so
ln -s /usr/lib32/libgphoto2_port.so.0 ./lib32/libgphoto2_port.so
ln -s /usr/lib32/libldap-2.4.so.2 ./lib32/libldap.so
ln -s /usr/lib32/libldap_r-2.4.so.2 ./lib32/libldap_r.so
ln -s /usr/lib32/liblber-2.4.so.2 ./lib32/liblber.so
ln -s /usr/lib32/libxslt.so.1 ./lib32/libxslt.so
ln -s /usr/lib32/libcapi20.so.3 ./lib32/libcapi20.so
ln -s /usr/lib32/libjack.so.0 ./lib32/libjack.so
ln -s /usr/lib32/libodbc.so.1 ./lib32/libodbc.so
ln -s /usr/lib32/libgnutls.so.26 ./lib32/libgnutls.so

It is ok if you delete this directory after compiling Wine (configure is linking to the real libs, not the symlinks we just made).
Run configure, build and install with:
CC="gcc-4.4 -m32" LDFLAGS="-m32 -L/lib32 -L/usr/lib32 -L`pwd`/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32" ./configure -v
make
sudo make install

or checkinstall


checkinstall -D -y --install=no \
                   --fstrans \
                   --pkgname=wine \
                   --pkgversion=1.2.2 \
                   --arch=amd64 \
                   --pkglicense=GPL \
                   --maintainer=sora@kasugano.us \
                   --requires=ia32-libs,lib32asound2,lib32bz2-1.0,lib32gcc1,\
lib32ncurses5,lib32stdc++6,lib32v4l-0,lib32z1,libc6-i386,\
libv4l-0,libwine,libwine-alsa,libwine-cms,libwine-gl,\
libwine-gphoto2,libwine-ldap,libwine-print,libwine-sane


If all needed libraries are present there will be no missing-library warnings or errors anywhere. If you find that this process misses a library, then it means we are either missing a link or the ia32-libs package is missing the 32-bit version of the library. In either case, contact the Ubuntu package maintainer, Scott Ritchie, so things can be fixed.
We explicitly set CC="gcc-4.4 -m32", as the 32-bit libraries are no longer provided for gcc-4.2 or earlier. Update version of gcc as needed. Also, the LDFLAGS explicitly set 32-bit mode.
To add pulseaudio support, install the package lib32asound2-plugins:
sudo aptitude install lib32asound2-plugins
 posted on 2011-05-04 09:55  月の祭司  阅读(2537)  评论(0)    收藏  举报