pptp on openvz




## Load modules on OpenVZ Server

modprobe tun
modprobe ppp-compress-18
modprobe ppp_mppe
modprobe ppp_deflate
modprobe ppp_async
modprobe pppoatm
modprobe ppp_generic

## Setup OpenVZ Container for PPTP

vzctl stop ID
vzctl set ID –features ppp:on –save
vzctl start ID
vzctl set ID –devices c:108:0:rw –save
vzctl exec ID mknod /dev/ppp c 108 0
vzctl exec ID chmod 600 /dev/ppp

* ID = VPS ID (vzlist)

eucalyptus [ep1]


[[email protected] images]# tar xzf wheezy_20130610.tar.gz 
[[email protected] images]# ls -l
total 283904
drwxr-xr-x. 2 root root      4096 Jun 10 02:07 wheezy
-rw-r--r--. 1 root root 290419446 Jun 10 02:09 wheezy_20130610.tar.gz
[[email protected] images]# cd wheezy
[[email protected] wheezy]# ls
image  initrd.img-3.2.0-4-amd64  vmlinuz-3.2.0-4-amd64
[[email protected] wheezy]# euca-bundle-image --image vmlinuz-3.2.0-4-amd64 --kernel true
Checking image
Compressing image
Encrypting image
Splitting image...
Part: vmlinuz-3.2.0-4-amd64.part.00
Generating manifest /tmp/vmlinuz-3.2.0-4-amd64.manifest.xml     
[[email protected] wheezy]# mv /tmp/vmlinuz-3.2.0-4-amd64.* .
[[email protected] wheezy]# euca-upload-bundle --bucket wheezy --manifest vmlinuz-3.2.0-4-amd64.manifest.xml 
Checking bucket: wheezy
Uploading manifest file
Uploading part: vmlinuz-3.2.0-4-amd64.part.00
Uploaded image as wheezy/vmlinuz-3.2.0-4-amd64.manifest.xml
[[email protected] wheezy]# euca-register wheezy/vmlinuz-3.2.0-4-amd64.manifest.xml
IMAGE	eki-2338373C
[[email protected] wheezy]# euca-bundle-image --image initrd.img-3.2.0-4-amd64 --ramdisk true
Checking image
Compressing image
Encrypting image
Splitting image...
Part: initrd.img-3.2.0-4-amd64.part.00
Generating manifest /tmp/initrd.img-3.2.0-4-amd64.manifest.xml   
[[email protected] wheezy]# mv /tmp/initrd.img-3.2.0-4-amd64.* .
[[email protected] wheezy]# euca-upload-bundle --bucket wheezy --manifest initrd.img-3.2.0-4-amd64.manifest.xml 
Checking bucket: wheezy
Uploading manifest file
Uploading part: initrd.img-3.2.0-4-amd64.part.00
Uploaded image as wheezy/initrd.img-3.2.0-4-amd64.manifest.xml
[[email protected] wheezy]# euca-register wheezy/initrd.img-3.2.0-4-amd64.manifest.xml
IMAGE	eri-03993FF1
[[email protected] wheezy]# euca-bundle-image -i image --kernel IMAGEeki-2338373C --ramdisk eri-03993FF1
Checking image
Compressing image
Encrypting image
Splitting image...
Part: image.part.00
Part: image.part.01
Part: image.part.02
Part: image.part.03
Part: image.part.04
Part: image.part.05
Part: image.part.06
Part: image.part.07
Part: image.part.08
Part: image.part.09
Part: image.part.10
Part: image.part.11
Part: image.part.12
Part: image.part.13
Part: image.part.14
Part: image.part.15
Part: image.part.16
Part: image.part.17
Part: image.part.18
Part: image.part.19
Part: image.part.20
Part: image.part.21
Part: image.part.22
Part: image.part.23
Part: image.part.24
Part: image.part.25
Part: image.part.26
Generating manifest /tmp/image.manifest.xml
[[email protected] wheezy]# cd /tmp/
[[email protected] tmp]# mv image.manifest.xml `date +%Y%m%d`.debian.wheezy.manifest.xml
[[email protected] tmp]# euca-upload-bundle -b wheezy -m 20130610.debian.wheezy.manifest.xml 
Checking bucket: wheezy
Uploading manifest file
Uploading part: image.part.00
Uploading part: image.part.01
Uploading part: image.part.02
Uploading part: image.part.03
Uploading part: image.part.04
Uploading part: image.part.05
Uploading part: image.part.06
Uploading part: image.part.07
Uploading part: image.part.08
Uploading part: image.part.09
Uploading part: image.part.10
Uploading part: image.part.11
Uploading part: image.part.12
Uploading part: image.part.13
Uploading part: image.part.14
Uploading part: image.part.15
Uploading part: image.part.16
Uploading part: image.part.17
Uploading part: image.part.18
Uploading part: image.part.19
Uploading part: image.part.20
Uploading part: image.part.21
Uploading part: image.part.22
Uploading part: image.part.23
Uploading part: image.part.24
Uploading part: image.part.25
Uploading part: image.part.26
Uploaded image as wheezy/20130610.debian.wheezy.manifest.xml
[[email protected] tmp]# euca-register wheezy/20130610.debian.wheezy.manifest.xml
IMAGE	emi-F92F3C2C
[[email protected] tmp]# euca-modify-image-attribute -l emi-F92F3C2C -a all
IMAGE	emi-F92F3C2C

มีแรงเมื่อไหร่ จะกลับมาอธิบาย

Unable to find credentials

หลังจากที่ติดตัง eucalyptus3.2 และสั่ง yum update แล้ว reboot แล้วใช้คำสั่งบางอย่างก็พบปัญหา

# /usr/sbin/euca-modify-property -p fontend_abr.arbitrator.gatewayhost=
Unable to find credentials.

# cd /root/credentials/admin
# source eucarc



centos runlevel

อยากให้ CentOS ทำงานในแบบ text-mode โดยยังคง Desktop package ไว้อยุ่

แก้ไฟล์ /etc/inittab

# System initialization is started by /etc/init/rcS.conf
# Individual runlevels are started by /etc/init/rc.conf
# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
# with configuration in /etc/sysconfig/init.
# For information on how to write upstart event handlers, or how
# upstart works, see init(5), init(8), and initctl(8).
# Default runlevel. The runlevels used are:
# 0 – halt (Do NOT set initdefault to this)
# 1 – Single user mode
# 2 – Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 – Full multiuser mode
# 4 – unused
# 5 – X11
# 6 – reboot (Do NOT set initdefault to this)

เปลี่ยน id:5:initdefault:
เป็น id:3:initdefault:

innotop debian

# innotop -u root -p password -h localhost
Can’t locate Term/ReadKey.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/bin/innotop line 1341.
BEGIN failed–compilation aborted at /usr/bin/innotop line 1341.

# aptitude -y install libterm-readkey-perl
The following NEW packages will be installed:
0 packages upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
Need to get 33.7 kB of archives. After unpacking 139 kB will be used.
Get:1 http://ftp.debian.org/debian/ squeeze/main libterm-readkey-perl amd64 2.30-4 [33.7 kB]
Fetched 33.7 kB in 2s (11.6 kB/s)
Selecting previously deselected package libterm-readkey-perl.
(Reading database … 31153 files and directories currently installed.)
Unpacking libterm-readkey-perl (from …/libterm-readkey-perl_2.30-4_amd64.deb) …
Processing triggers for man-db …
Setting up libterm-readkey-perl (2.30-4) …