2008年11月18日 星期二

Add image resizing and rotating to Gnome on Ubuntu

1. the package name is nautilus-image-converter, nautilus extension to mass resize or rotate images

sudo apt-get install nautilus-image-converter

2. logout and login again, or reboot, you will find right-click pop menu on image has the features we need

2008年11月17日 星期一

Set up a Tor relay node on Ubuntu

1. verify that your clock is set correctly

2. install tor

sudo apt-get install tor

3. make sure to define at least Nickname and the listening port, ORPort

sudo vi /etc/tor/torrc

--
.
.
SocksPort 9050 # what port to open for local application connections
SocksListenAddress 127.0.0.1 # accept connections only from localhost
.
Nickname ididnteditheconfig
.
RelayBandwidthRate 20 KBytes # Throttle traffic to 100KB/s (800Kbps)
RelayBandwidthBurst 40 KBytes # But allow bursts up to 200KB/s (1600Kbps)
.
ORPort 9001
.
.

5. restart tor to reload config

sudo /etc/init.d/tor restart

4. add this line to privoxy configuration file /etc/privoxy/config

forward-socks4a / localhost:9050 .

it means tor listens socks4a on port 9050
In the SOCKS 4A protocol, the DNS resolution of the target hostname happens on the SOCKS server, while in SOCKS 4 it happens locally.

5. according the default setting in /etc/privoxy/config

listen-address 127.0.0.1:8118

port 8118 should be used as http proxy

6. when your browser is set with privoxy proxy, you can check this website to verify

https://torcheck.xenobite.eu/


7. when you check log file, /var/log/tor/log
you may notice the warning message

MMM ddd hh:mm:ss.xxx [warn] Your application (using socks4 to port 80) is giving Tor only an IP address. Applications that do DNS resolves themselves may leak information. Consider using Socks4A (e.g. via privoxy or socat) instead. For more information, please see http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#SOCKSAndDNS.

2008年11月11日 星期二

Set up CACTI on Ubuntu

1. install cacti, it depends on many packages like snmpd, apache2, mysql-server

sudo apt-get install cacti

2. installation in progress
password of your database's administrative user: password of mysql administrator
mysql application password for cacti: leave it blank, cacti will create a random password
webserver type: apache2

3. visit the webpage of your cacti server, http://localhost/cacti
follow cacti installation guide in your web-browse

4. login with default username and password, admin / admin

5. Devices -> Add
Description: Give this host a meaningful description.
Hostname: localhost
Host Template: Generic SNMP-enabled Host
SNMP Version: Version 1
SNMP Community: public
create

6. Associated Graph Templates -> Add Graph Template
add any you need

7. Associated Data Queries -> Add Data Query
add SNMP - Get Mounted Partitions and SNMP - Interface Statistics
save

8. Create Graphs for this Host
select any items you need
create

9. Graph Trees -> Add
Name: A useful name for this graph tree.
create

10 Tree Item -> Add
Tree Item Type: host
Tree Item Value -> Host: choose what you just created
create

2008年11月2日 星期日

Surface and Bad Blocks check of Hard Disk on Unix

1. unmount the device you want to check

umount /dev/sda1

2. search the device for bad blocks

# -s: show the progress of the scan
# -v: verbose mode

badblocks -sv /dev/sda1

--
create a filesystem that excludes the badblocks which have been checked

mke2fs -c /dev/sda1

2008年11月1日 星期六

Could not update ICEauthority file /home/user/.ICEauthority

this error makes me fail to login gnome

1. boot into recovery mode
press ESC while loading grub

2. chown user:user /home/user/.ICEauthority

3. chmod 644 /home/user/.ICEauthority

4. shutdown -r now
restart