Sunday, April 1, 2007

Java and OpenVZ VPS

After installation of openvz VPS by following its user guide, i cannot even run $java -version within the VPS.

After discovering, i found that the default VPS configuration cannot be used to run java application.

(1)Example, VPS 101 is running the vps.basic configuration profile. I run the following command: $vzcalc 101 and the result show that my hardware can support about 80 VPS. But if these VPSes are used to run java application, it is obviously not correct.

(2)So, i need to create/calcualte the profile myself. Fortunately, OpenVZ has command :
$vzsplit -n 10 -f vps.java
This means that i want to create 10 VPSes for java application in the hardware node.

(3)Finally, i apply this new configuration profile to VPS 101.
$vzctl set 101 --applyconfig vps.java --save

(4)Login into VPS 101 again. It is very happy to run java.

No comments: