augmenter la taille de ma partition étendue sous Linux 1and1 Cloud dynamique serveur

Comment puis-je augmenter la taille de ma partition étendue sous Linux?
Connectez-vous sur votre serveur en tant qu'utilisateur « root » avec SSH.

Pour afficher votre système de fichiers, utilisez la commande « ~ # df -h »:

  s123456789:~ # df –h

Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             9.2G  235M  8.5G   3% /		        
udev                  496M  112K  496M   1% /dev	
/dev/hda5             9.4G  2.1G  7.3G  22% /usr	
/dev/hda6             9.4G  148M  9.2G   2% /var	
/dev/hda7             221G   22M  221G   1% /srv	
none                  1.0G     0  1.0G   0% /tmp


Pour afficher votre partitionnage, utilisez la commande « ~ # fdisk -l »:

  s123456789:~ # fdisk –l
Disk /dev/hda: 343.5 GB, 343597383680 bytes				
255 heads, 63 sectors/track, 41773 cylinders				
Units = cylinders of 16065 * 512 = 8225280 bytes			
Disk identifier: 0x000c8b23	
							
    Device Boot      Start         End      Blocks   Id  System	
/dev/hda1               1        1217     9775521   83  Linux	
/dev/hda2            1218        1461     1959930   82  Linux swap / Solaris										
/dev/hda4            1462       32636   250408517+   5  Extended	
/dev/hda5            1462        2678     9775521   83  Linux	
/dev/hda6            2679        3895     9775521   83  Linux	
/dev/hda7            3896       32635   230854018+  83  Linux	
s15378494:~ #


Vous augmentez la taille de votre partition étendue avec la commande « ~ # parted /dev/hda »

s123456789:~ # parted /dev/hda

GNU Parted 1.8.8									
Using /dev/had									
Welcome to GNU Parted! Type 'help' to view a list of commands.	
(parted) unit s									
(parted) print									
Model: QEMU HARDDISK (ide)							
Disk /dev/hda: 671088640s							
Sector size (logical/physical): 512B/512B					
Partition Table: msdos								
												
Number  Start      End         Size        Type     File system  Flags
1      63s        19551104s   19551042s   primary   ext3         , , , , , , , , , type=83, ,							
2      19551105s  23470964s   3919860s    primary   linux-swap   , , , , , , , , , type=82, ,							
4      23470965s  524287999s  500817035s  extended               , , , , , , , , , type=05, ,							
5      23471028s  43022069s   19551042s   logical   xfs          , , , , , , , , , type=83, ,							
6      43022133s  62573174s   19551042s   logical   xfs          , , , , , , , , , type=83, ,							
7      62573238s  524281274s  461708037s  logical   xfs          , , , , , , , , , type=83, ,	

												
(parted) resize 4 23470965s -1						
(parted) print									
Model: QEMU HARDDISK (ide)							
Disk /dev/hda: 671088640s							
Sector size (logical/physical): 512B/512B					
Partition Table: msdos								
												
Number  Start      End         Size       Type     File system  Flags
1      63s        19551104s   19551042s   primary   ext3         , , , , , , , , , type=83, ,							
2      19551105s  23470964s   3919860s    primary   linux-swap   , , , , , , , , , type=82, ,							
4      23470965s  671088639s  647617675s  extended               , , , , , , , , , type=05, ,							
5      23471028s  43022069s   19551042s   logical   xfs          , , , , , , , , , type=83, ,							
6      43022133s  62573174s   19551042s   logical   xfs          , , , , , , , , , type=83, ,							
7      62573238s  524281274s  461708037s  logical   xfs          , , , , , , , , , type=83, ,							
												
(parted)
						



Read more...

Routing and Remote Access 0x2 VPS

  • Published in VPS
 virtuozzo VPS

 OPENVZ VPS

Routing and Remote Access 服务因 2 (0x2) 服务性错误而停止。


I had the same issue on a VPS running Win2k3 under virtuozzo. Googling shows RRAS must run on virtuozzo host to make guest OS able to run it.
Read more...

CentOS 5.5 安装 IPSEC / L2TP VPN

  • Published in VPN

CentOS 5.5 安装 IPSEC / L2TP VPN

 

继续折腾 Linode VPS , 上次成功的学会了 Linode VPS (LAMP+ PPTP VPN)配置笔记 ,更进一步,学习安装 IPSEC / L2TP VPN 。 在这里记录一下安装过程、与遇到的问题。

 

已经安装的工作环境为 Linode VPS + CentOS 5.5  32 bit

一、部署IPSEC 、安装 openswan

1、关联包

yum install make gcc gmp-devel bison flex

2、编译安装

cd /usr/src
wget http://www.openswan.org/download/openswan-2.6.24.tar.gz
tar zxvf openswan-2.6.24.tar.gz
cd openswan-2.6.24
make programs install

3、配置

vi /etc/ipsec.conf

config setup
nat_traversal=yes
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12
oe=off
protostack=netkey

conn L2TP-PSK-NAT
rightsubnet=vhost:%priv
also=L2TP-PSK-noNAT

conn L2TP-PSK-noNAT
authby=secret
pfs=no
auto=add
keyingtries=3
rekey=no
ikelifetime=8h
keylife=1h
type=transport
left=YOUR.SERVER.IP.ADDRESS
leftprotoport=17/1701
right=%any
rightprotoport=17/%any

4、 设置 Shared Key

vi /etc/ipsec.secrets

YOUR.SERVER.IP.ADDRESS %any: PSK “YourSharedSecret”

 

(别忘了把红色的「YOUR.SERVER.IP.ADDRESS」这部分换成你的服务器的 IP 地址,把「zhimakaimen」部分换成随便一个字串,例如你喜欢的一句话如 ilovemoney,等等。)

 

5、 修改包转发设置

for each in /proc/sys/net/ipv4/conf/*
do
echo 0 > $each/accept_redirects
echo 0 > $each/send_redirects
done

6、 重启 IPSec ,测试

/etc/init.d/ipsec restart
ipsec verify

.

二、安装 L2TP

1、关联包

yum install libpcap-devel ppp

2、编译安装

cd /usr/src
wget http://downloads.sourceforge.net/project/rp-l2tp/rp-l2tp/0.4/rp-l2tp-0.4.tar.gz
tar zxvf rp-l2tp-0.4.tar.gz
cd rp-l2tp-0.4
./configure
make
cp handlers/l2tp-control /usr/local/sbin/
mkdir /var/run/xl2tpd/
ln -s /usr/local/sbin/l2tp-control /var/run/xl2tpd/l2tp-control

cd /usr/src
wget  http://www.xelerance.com/software/xl2tpd/xl2tpd-1.2.4.tar.gz
tar zxvf xl2tpd-1.2.4.tar.gz
cd xl2tpd-1.2.4
make install

3、配置

mkdir /etc/xl2tpd
vi /etc/xl2tpd/xl2tpd.conf

[global]
ipsec saref = yes

[lns default]
ip range = 10.1.2.2-10.1.2.254
local ip = 10.1.2.1
refuse chap = yes
refuse pap = yes
require authentication = yes
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes

4、修改 ppp 配置

vi /etc/ppp/options.xl2tpd

require-mschap-v2
ms-dns 8.8.8.8
ms-dns 8.8.4.4
asyncmap 0
auth
crtscts
lock
hide-password
modem
debug
name l2tpd
proxyarp
lcp-echo-interval 30
lcp-echo-failure 4

5、添加用户名/密码

vi /etc/ppp/chap-secrets

# user      server      password            ip
username        l2tpd       userpass        *

6、启用包转发

iptables --table nat --append POSTROUTING --jump MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward

 

7、修改/etc/sysctl.conf

vi  /etc/sysctl.conf

net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296

 

/sbin/sysctl -p    保存修改

8、启动 xl2tpd

/usr/local/sbin/xl2tpd

.

三、扫尾

设置开机自动运行

vi /etc/rc.local

iptables --table nat --append POSTROUTING --jump MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward
for each in /proc/sys/net/ipv4/conf/*
do
echo 0 > $each/accept_redirects
echo 0 > $each/send_redirects
done
/etc/init.d/ipsec restart
/usr/local/sbin/xl2tpd

.

四、已知问题

1、长宽之下连接不成功。 IP 地址被干扰了。就如同去 长宽用户在ip138.com 查不到实际 ip ( 但 Gmail 确能记录真实 ip )。

服务器端错误日志

the peer proposed: 服务器ip/32:17/1701 -> 175.189.178.120/32:17/0

peer proposal was reject in a virtual connection policy because

a private network virtual IP was required, but the proposed IP did not match our list (virtual_private=)

补记1:
错怪长宽了。其实出现上面这句话,并不能代表是长宽设备 IP 分配的问题导致连结不成功。 昨晚查了很多资料,然后发现不少同学出现这个问题。 原因在于 openswan 本身的 bug 。 最后重新编译安装 openswan-2.6.28 取代 openswan-2.6.24 ,问题华丽的解决了。能成功连接 l2tp 后,secure 日志记录中还是可以有上面一段迷惑人的纪录。

补记2:
Linode VPS + CentOS 5.5 成功安装 IPSEC/ L2TP VPN 后的状态

2、 L2TP  VPN 768 错误

IPSEC services 被关掉了。“运行”“services.msc”然后在服务中启用“IPSEC services” 即可。

.

以上内容90%抄自  Linode CentOS / Debian 部署 ipsec+l2tpd 简要笔记 ,部分参考自  CentOS安装L2TP/IPSEC 与简单故障处理

Read more...

CentOS 5.5 x64 PPTPD Server -2

Install the poptop repository
rpm -Uvh http://poptop.sourceforge.net/yum/stable/rhel5/pptp-release-current.noarch.rpm

 

Installing Unstable/Beta

 
# Install the poptop repository first
# poptop-beta updates ppp to 2.4.5-8.1.rhel5 from 2.4.4
 
[root@PPTP-SRVR yum.repos.d]# yum --enablerepo=poptop-beta install pptpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.aarnet.edu.au
 * base: mirror.aarnet.edu.au
 * extras: mirror.aarnet.edu.au
 * updates: mirror.aarnet.edu.au
poptop-beta                                              | 2.3 kB     00:00     
poptop-beta/primary_db                                   | 7.8 kB     00:00     
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package pptpd.x86_64 0:1.3.4-2.rhel5.1 set to be updated
--> Processing Dependency: ppp = 2.4.5 for package: pptpd
--> Running transaction check
---> Package ppp.x86_64 0:2.4.5-8.1.rhel5 set to be updated
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package       Arch           Version                 Repository           Size
================================================================================
Installing:
 pptpd         x86_64         1.3.4-2.rhel5.1         poptop-beta          82 k
Updating for dependencies:
 ppp           x86_64         2.4.5-8.1.rhel5         poptop-beta         354 k
 
Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       1 Package(s)
 
Total download size: 436 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): pptpd-1.3.4-2.rhel5.1.x86_64.rpm                  |  82 kB     00:01     
(2/2): ppp-2.4.5-8.1.rhel5.x86_64.rpm                    | 354 kB     00:06     
--------------------------------------------------------------------------------
Total                                            43 kB/s | 436 kB     00:10     
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 862acc42
poptop-beta/gpgkey                                       | 1.5 kB     00:00     
Importing GPG key 0x862ACC42 "PPTP Software Signing Key <This email address is being protected from spambots. You need JavaScript enabled to view it.%MINIFYHTMLeb6f2fc85412b532d1e85c95708c305216%>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-PPTP
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : ppp                                                      1/3 
  Installing     : pptpd                                                    2/3 
  Cleanup        : ppp                                                      3/3 
 
Installed:
  pptpd.x86_64 0:1.3.4-2.rhel5.1                                                
 
Dependency Updated:
  ppp.x86_64 0:2.4.5-8.1.rhel5                                                  
 
Complete!
[root@PPTP-SRVR yum.repos.d]# 
 
 
# I also tried to install the stable one which required the following

 

Intalling Poptop Stable
# Install the poptop repository first (see section above)
# you need to remove ppp because installing the stable 
# Poptop server is a downgrade of ppp from 2.4.4 to 2.4.3.
 
[root@PPTP-SRVR yum.repos.d]# yum remove pptpd ppp
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package ppp.x86_64 0:2.4.5-8.1.rhel5 set to be erased
--> Processing Dependency: ppp >= 2.3.7 for package: wvdial
--> Processing Dependency: ppp >= 2.4.2 for package: rp-pppoe
---> Package pptpd.x86_64 0:1.3.4-2.rhel5.1 set to be erased
--> Running transaction check
---> Package rp-pppoe.x86_64 0:3.5-32.1 set to be erased
---> Package wvdial.x86_64 0:1.54.0-5.2.2.1 set to be erased
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package         Arch          Version                   Repository        Size
================================================================================
Removing:
 ppp             x86_64        2.4.5-8.1.rhel5           installed        737 k
 pptpd           x86_64        1.3.4-2.rhel5.1           installed        174 k
Removing for dependencies:
 rp-pppoe        x86_64        3.5-32.1                  installed        249 k
 wvdial          x86_64        1.54.0-5.2.2.1            installed        268 k
 
Transaction Summary
================================================================================
Remove        4 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)
 
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing        : ppp                                                      1/4 
warning: /etc/ppp/pap-secrets saved as /etc/ppp/pap-secrets.rpmsave
warning: /etc/ppp/chap-secrets saved as /etc/ppp/chap-secrets.rpmsave
  Erasing        : pptpd                                                    2/4 
  Erasing        : wvdial                                                   3/4 
  Erasing        : rp-pppoe                                                 4/4 
 
Removed:
  ppp.x86_64 0:2.4.5-8.1.rhel5          pptpd.x86_64 0:1.3.4-2.rhel5.1         
 
Dependency Removed:
  rp-pppoe.x86_64 0:3.5-32.1           wvdial.x86_64 0:1.54.0-5.2.2.1          
 
Complete!
[root@PPTP-SRVR yum.repos.d]# yum --enablerepo=poptop-stable install pptpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.aarnet.edu.au
 * base: mirror.aarnet.edu.au
 * extras: mirror.aarnet.edu.au
 * updates: mirror.aarnet.edu.au
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package pptpd.x86_64 0:1.3.4-2.fc5 set to be updated
--> Processing Dependency: ppp = 2.4.3 for package: pptpd
--> Running transaction check
---> Package ppp.x86_64 0:2.4.3-7.fc5 set to be updated
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package       Arch           Version               Repository             Size
================================================================================
Installing:
 pptpd         x86_64         1.3.4-2.fc5           poptop-stable          82 k
Installing for dependencies:
 ppp           x86_64         2.4.3-7.fc5           poptop-stable         384 k
 
Transaction Summary
================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)
 
Total download size: 467 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): pptpd-1.3.4-2.fc5.x86_64.rpm                      |  82 kB     00:01     
(2/2): ppp-2.4.3-7.fc5.x86_64.rpm                        | 384 kB     00:07     
--------------------------------------------------------------------------------
Total                                            45 kB/s | 467 kB     00:10     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : ppp                                                      1/2 
  Installing     : pptpd                                                    2/2 
 
Installed:
  pptpd.x86_64 0:1.3.4-2.fc5                                                    
 
Dependency Installed:
  ppp.x86_64 0:2.4.3-7.fc5                                                      
 
Complete!
[root@PPTP-SRVR yum.repos.d]#

 

Refs: http://wingloon.com/2007/11/06/pptp-server-installation-in-centos-5/
http://poptop.sourceforge.net/dox/redhat-howto.phtml
http://www.anindya.com/installing-configuring-pptp-vpn-rhel-centos/

Read more...

Firefox greasemonkey

C:\Users\XXXX\AppData\Roaming\Mozilla\Firefox\Profiles\XXXXXXXX.default\gm_scripts\config.xml

 

change 修改

 

 

http://*
https://*

 

to


http://*
http://*.google.com/*
http://*.google.fr/*
http://*.hotmail.com/*
http://*.live.com/*

 

 

Read more...

adobe

127.0.0.1 activate.adobe.com
127.0.0.1 practivate.adobe.com
127.0.0.1 ereg.adobe.com
127.0.0.1 activate.wip3.adobe.com
127.0.0.1 wip3.adobe.com
127.0.0.1 3dns-3.adobe.com
127.0.0.1 3dns-2.adobe.com
127.0.0.1 adobe-dns.adobe.com
127.0.0.1 adobe-dns-2.adobe.com
127.0.0.1 adobe-dns-3.adobe.com
127.0.0.1 ereg.wip3.adobe.com
127.0.0.1 activate-sea.adobe.com
127.0.0.1 wwis-dubc1-vip60.adobe.com
127.0.0.1 activate-sjc0.adobe.com

Read more...
Subscribe to this RSS feed
Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 18

Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Notice: Undefined offset: 2 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Notice: Undefined offset: 3 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/category.php on line 191

Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 18

Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Notice: Undefined offset: 2 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Notice: Undefined offset: 3 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34