Wednesday, December 7, 2011
Friday, November 25, 2011
perl install UserAgent.pm error message "Connection timed out"
1, perl -MCPAN -e shell
2, install LWP::UserAgent
Connection timed out
Solution:
Firewall block the connection, so need to stop iptables
2, install LWP::UserAgent
Connection timed out
Solution:
Firewall block the connection, so need to stop iptables
ubuntu static ip
vim /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.6
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.99
auto lo
iface lo inet loopback
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.6
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.99
Tuesday, November 22, 2011
gunzip: aaa.zip: unknown suffix -- ignored
I used 7z to zip this file under Windows, try to unzip it under linux
[ang@walker temp]$ gunzip 2011.sdf.zip
gunzip: 2011.sdf.zip: unknown suffix -- ignored
Try to us unzip, instead of gunzip
[chang@walker temp]$ unzip 2011.sdf.zip
Archive: 2011.sdf.zip
inflating: 2011.sdf
[ang@walker temp]$ gunzip 2011.sdf.zip
gunzip: 2011.sdf.zip: unknown suffix -- ignored
Try to us unzip, instead of gunzip
[chang@walker temp]$ unzip 2011.sdf.zip
Archive: 2011.sdf.zip
inflating: 2011.sdf
Monday, November 21, 2011
LVM add harddisk
1 ifconfig
2 fdisk -l
3 aptitude update && sudo aptitude safe-upgrade
4 apt-get update
5 apt-get upgrade
6 fdisk -l
7 pvcreate /dev/sdb1
8 fdisk /dev/sdb -l
9 vgdisplay
10 df
11 vgscan
12 vgdisplay
13 vgextend PubChem /dev/sdb1
14 df
15 lvextend -L128G /dev/mapper/PubChem-root
16 lvextend -L500G /dev/mapper/PubChem-root
17 lvextend -L480G /dev/mapper/PubChem-root
18 lvextend -L400G /dev/mapper/PubChem-root
19 df
20 resize2fs /dev/mapper/PubChem-root
21 df
22 shutdown now
23 df
24 sudo -s
25 history
2 fdisk -l
3 aptitude update && sudo aptitude safe-upgrade
4 apt-get update
5 apt-get upgrade
6 fdisk -l
7 pvcreate /dev/sdb1
8 fdisk /dev/sdb -l
9 vgdisplay
10 df
11 vgscan
12 vgdisplay
13 vgextend PubChem /dev/sdb1
14 df
15 lvextend -L128G /dev/mapper/PubChem-root
16 lvextend -L500G /dev/mapper/PubChem-root
17 lvextend -L480G /dev/mapper/PubChem-root
18 lvextend -L400G /dev/mapper/PubChem-root
19 df
20 resize2fs /dev/mapper/PubChem-root
21 df
22 shutdown now
23 df
24 sudo -s
25 history
ubuntu add second disk
1, sudo fdisk -l
root@ubuntu:~/pubchem/process_sdf# fdisk -l
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b6fa8
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 488396799 243947521 5 Extended
/dev/sda5 501760 488396799 243947520 8e Linux LVM
Disk /dev/sdb: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders, total 488281250 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x41ab2316
Device Boot Start End Blocks Id System
/dev/sdb1 63 80324 40131 12 Compaq diagnostics
/dev/sdb2 * 80325 481949999 240934837+ fd Linux raid autodetect
/dev/sdb3 481966065 488263544 3148740 fd Linux raid autodetect
/dev/sdb4 481950061 481966064 8002 5 Extended
/dev/sdb5 481950063 481966064 8001 8e Linux LVM
Partition table entries are not in disk order
Disk /dev/sdc: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00055dc9
Device Boot Start End Blocks Id System
/dev/sdc1 * 63 488392064 244196001 8e Linux LVM
root@ubuntu:~/pubchem/process_sdf# fdisk -l
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b6fa8
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 488396799 243947521 5 Extended
/dev/sda5 501760 488396799 243947520 8e Linux LVM
Disk /dev/sdb: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders, total 488281250 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x41ab2316
Device Boot Start End Blocks Id System
/dev/sdb1 63 80324 40131 12 Compaq diagnostics
/dev/sdb2 * 80325 481949999 240934837+ fd Linux raid autodetect
/dev/sdb3 481966065 488263544 3148740 fd Linux raid autodetect
/dev/sdb4 481950061 481966064 8002 5 Extended
/dev/sdb5 481950063 481966064 8001 8e Linux LVM
Partition table entries are not in disk order
Disk /dev/sdc: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00055dc9
Device Boot Start End Blocks Id System
/dev/sdc1 * 63 488392064 244196001 8e Linux LVM
Tuesday, November 15, 2011
mysql add AUTO_INCREMENT
1, if the table no primary key, you need add primary key first
mysql> alter table blacklist add primary key (alarmID) ;
2, mysql> alter table blacklist modify alarmID int(10) unsigned AUTO_INCREMENT, AUTO_INCREMENT=50000;
mysql> alter table blacklist add primary key (alarmID) ;
2, mysql> alter table blacklist modify alarmID int(10) unsigned AUTO_INCREMENT, AUTO_INCREMENT=50000;
Subscribe to:
Posts (Atom)
-
Step 1, New a project rails new demo Step 2, Update Gemfile add paperclip, mysql2 gem, enable JavaScript runtime gem 'mysql2' ...
-
When trying to access transmission from web-browswer i got the message : 403: Forbidden Unauthorized IP Address. Either disable the IP ad...