为 apt-get 设置 HTTP 代理
作者:comet 日期:2010-02-08
方法一
这是一种临时的手段,如果您仅仅是暂时需要通过http代理使用apt-get,您可以使用这种方式。
在使用apt-get之前,在终端中输入以下命令(根据您的实际情况替换yourproxyaddress和proxyport)。
export http_proxy=http://yourproxyaddress:proxyport
方法二
这种方法要用到/etc/apt/文件夹下的apt.conf文件。如果您希望apt-get(而不是其他应用程序)一直使用http代理,您可以使用这种方式。
注意: 某些情况下,系统安装过程中没有建立apt配置文件。下面的操作将视情况修改现有的配置文件或者新建配置文件。
sudo gedit /etc/apt/apt.conf
在您的apt.conf文件中加入下面这行(根据你的实际情况替换yourproxyaddress和proxyport)。
Acquire::http::proxy "http://yourproxyaddress:proxyport";
保存apt.conf文件。
方法三
这种方法会在您的主目录下的.bashrc文件中添加两行。如果您希望apt-get和其他应用程序如wget等都使用http代理,您可以使用这种方式。
gedit~/.bashrc
在您的.bashrc文件末尾添加如下内容(根据你的实际情况替换yourproxyaddress和proxyport)。
http_proxy=http://yourproxyaddress:proxyport
export http_proxy
保存文件,关闭当前终端。
使用apt-get update或者任何您想用的网络工具测试代理。可以使用netstat -n|head 或安装 firestarter 查看活动的网络连接。
如果您为了纠正错误而再次修改了配置文件,记得关闭终端并重新打开,否自新的设置不会生效。
3G无线网A版和O版的分别
作者:comet 日期:2010-02-01
什么是A版和O版?
A版的网卡采用的芯片有高通6085 和 高通6800(6085是要比6800好的)
O版的网卡采用是高通6500芯片
A版的网卡都是比O版的网卡快的。
华为和中兴用的是什么芯片呢?
华为和中兴都是用高通6085的芯片。
也就是说华为和中兴的网卡速度都是一样的。
他们的差价主要在于模具上面。也就是外观上面。
速度的快慢和什么有关系?
主要和芯片还有和当地的网络环境有直接的关系。
和资费卡是没有任何关系的。因为资费卡只是起到一个扣费的作用而已。
同样的网卡,在不同的地方,网速也会不一样的。
也就是说各地区的网络环境是不一样的。
A版的速度有多少O版的速度又有多少?
如果是在网络环境很好的情况下.
A版的下载速度一般在200K--300K/S。这个速度完全比2M的宽带要快了。
O版的下载速度一般在100K--200/S。这个速度完全比1的宽带要快了。
升级 cacti
作者:comet 日期:2010-01-29
Upgrading Cacti
-
Backup the old Cacti database.
shell> mysqldump -l --add-drop-table cacti > mysql.cacti
Note: You will probably have to specify the -u and -p flags for the MySQL username and password. This user must have permission to read from Cacti's database or you will end up with an empty backup.
-
Backup the old Cacti directory.
shell> mv cacti cacti_old
-
Extract the distribution tarball.
shell> tar xzvf cacti-version.tar.gz
-
Rename the new Cacti directory to match the old one.
shell> mv cacti-version cacti
-
Edit “include/config.php” and specify the MySQL user, password and database for your Cacti configuration.
$database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cactiuser"; $database_password = "cacti";
-
Copy the *.rrd files from the old Cacti directory.
shell> cp cacti_old/rra/* cacti/rra/
-
Copy any relevant custom scripts from the old Cacti directory. Some script are updated between versions. Therefore, make sure you only over write if the scripts either don't exist or are newer than the distribution's.
shell> cp -u cacti_old/scripts/* cacti/scripts/
-
Copy any relevant custom resource XML files from the old Cacti directory. Some resource XML files are updated between versions. Therefore, make sure you only over write if the XML files either don't exist or are newer than the distribution's.
shell> cp -u -R cacti_old/resource/* cacti/resource/
-
Set the appropriate permissions on Cacti's directories for graph/log generation. You should execute these commands from inside Cacti's directory to change the permissions.
shell> chown -R cactiuser rra/ log/
(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)
-
Point your web browser to:
http://your-server/cacti/
-
Follow the on-screen instructions so your database can be updated to the new version.
http://docs.cacti.net/manual:088:1_installation.3_upgrading
ubuntu 中模拟键盘鼠标操作
作者:comet 日期:2010-01-25
显示 X 事件的 xev
作者:comet 日期:2010-01-18
xev 是显示 X 事件的程序,用来调试 X 的东东非常方便,最简单的就是测试键盘按键啦。附上 keycode 备查:
| 字母和数字键的键码值(keyCode) | |||||||
| 按键 | 键码 | 按键 | 键码 | 按键 | 键码 | 按键 | 键码 |
|
A |
65 | J | 74 | S | 83 | 1 | 49 |
| B | 66 | K | 75 | T | 84 | 2 | 50 |
| C | 67 | L | 76 | U | 85 | 3 | 51 |
| D | 68 | M | 77 | V | 86 | 4 | 52 |
| E | 69 | N | 78 | W | 87 | 5 | 53 |
| F | 70 | O | 79 | X | 88 | 6 | 54 |
| G | 71 | P | 80 | Y | 89 | 7 | 55 |
| H | 72 | Q | 81 | Z | 90 | 8 | 56 |
| I | 73 | R | 82 | 0 | 48 | 9 | 57 |
| 数字键盘上的键的键码值(keyCode) | 功能键键码值(keyCode) | ||||||
| 按键 | 键码 | 按键 | 键码 | 按键 | 键码 | 按键 | 键码 |
Tags: xev
空间有点不正常了
作者:comet 日期:2010-01-15
ubuntu moblin
作者:comet 日期:2010-01-08
U100X 上网本
作者:comet 日期:2010-01-04
1月3日,入手了第2台笔记本:U100X-615CN,10寸上网本。性能很一般,MIC很差劲,价格1950,送内胆、外包,再加上买了一个正版的双飞燕鼠标、贴了屏幕膜、键盘膜,差不多2K了。改成XP后还没有很好的SATA驱动,要把AHCI关掉。这个本本在bios中可以超频^_^
详细如下:http://blog.3gcomet.com/temp/U100X.htm
| 型号 | Wind U100X-615CN |
| 上市时间 | 2009年 |
| 处理器 | Intel Atom N270 1.6GHz |
| 处理器类型 | 英特尔 Atom(凌动) |
| 处理器最高主频 | 1600MHz |
| 二级缓存 | 512KB L2 |
| 主板芯片组 | Intel 945GMS+ICH7M |
| 系统总线 | 533MHz |
| 内存容量 | 1024MB |
| 内存类型 | DDR2 667 |
| 硬盘类型 | SATA硬盘 |
| 硬盘容量 | 160GB |
| 屏幕尺寸 | 10英寸 |
| 显示屏描述 | LED背光,分辨率:1024×600 |
| 显示芯片 | 集成Intel GMA950显卡 |
| 内置摄像头 | 支持,集成130万像素摄像头 |
| 音频系统 | Intel High Definition Audio,立体声音效 |
| 扬声器 | 内置扬声器 |
| 无线通讯 | 802.11b/g无线网卡 |
| 网卡 | 内置10-100M网卡 |
| 鼠标替代设备 | 触摸板 |
| USB | 3个,USB2.0 |
| 读卡器 | 三合一读卡器(SD/MMC/MS) |
| 其它接口 | VGA接口,RJ45,声音输入,声音输出孔,直流电源插孔,安全锁孔 |
| 重量 | 约1000g |
| 规格 | 260×180×19-31.5mm |
| 外观外壳 | 纯白 |
| 电池类型 | 3芯2200mAh锂电 |
| 工作时间 | 2小时 |
| 电源适配器 | 100V-240V 自适应交流电源供应器 |
| 操作系统 | Linux(SUSE Linux Enterprise Desktop 10) |
| 附带软件 | 随机光盘,驱动程序 |
| 附件 | 锂电池,电源适配器,说明书 |
| 可选配件 | 可选外置光驱 |
| 保修时间、方式 | 2年有限质保 |











