Here's a quick how to in installing yum to your VPS. I don't know about you but Virtuozzo or the Parallels team told us that it should be included in the VPS template. I am running Virtuozzo version 4 and for some reason, yum isn't installed. You should be able to install it with a flick by trying out my solution:
Linux distro: Centos 4.4
1. Login to your box thru ssh using any of your favorite ssh clients. I used mRemote.
2. Create the directory yum under /usr/src. (Optional)
3. Download the following files using the wget tool:
a. python-urlgrabber-2.9.6-2.noarch.rpm
b. python-sqlite-1.1.6-1.i386.rpm
c. python-elementtree-1.2.6-4.i386.rpm
d. python-urlgrabber-2.9.6-2.noarch.rpm
e. sqlite-3.2.2-1.i386.rpm
Usage: wget
Sample: wget http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/python-2.3.4-14.7.el4.i386.rpm
4. Run this command:
# rpm -Uvh *rpm
5. Download yum:
a. centos-yumconf-4-4.3.noarch.rpm
b. yum-2.4.0-1.centos4.noarch.rpm
c. yum-metadata-parser-1.0-8.el4.centos.i386.rpm
6. Proceed with item no.4.
You should be able to see a successful installation afterwards.
For an updated version of the yum dependencies and yum itself, visit Centos' repository. And speaking of dependencies, other's might encounter a dependency issue when installing components manually. Do drop by and post a quick comment and we'll try to sort things out.
Have a nice yum day!
You may create Service Container on a Virtuozzo hardware node using 'vzsveinstall' utility:
# vzsveinstall -D DISTRIB_DIR -s SERVICE_CT_IP
where
- DISTRIB_DIR - path to Virtuozzo distribution directory hierarchy on a server. F.e. if you have the Virtuozzo distrib on your server in the folder /root/Rel400 then DISTRIB_DIR should be /root/Rel400/;
- SERVICE_CT_IP - IP address to be assigned to Service Container;
Please refer to man page on 'vzsveinstall' utility for additional information.
Please note - OS template 'redhat-as3-minimal' must be installed on a hardware node and cached before Service Container may be created. If you have no that template on a node please do the following:
- install OS template 'redhat-as3-minimal', corresponding RPM package is located in the folder 'virtuozzo/SVE' inside Virtuozzo distrib (in Virtuozzo 3.x it is the folder 'HW/SVE');
- create OS template cache using 'vzpkgcache' command on a node.
If Virtuozzo server has been updated since the very first release (using 'vzup2date' utility or manually) then you need to apply all needed updates to the Service Container as well. Updates downloaded by 'vzup2date' utility are usually located under /vz/vzup2date/3.0.0/TU-3.0.0-* dirs on a Virtuozzo server. You may apply them to the Service Container using 'vzsveupgrade' utility using this simple script:
# for i in `find /vz/vzup2date/$(awk '{print $NF}'
If you need to re-create Service Container then you may destroy the existing one using 'vzctl destroy 1' utility (container must be stopped first), then create it from the scratches and apply available updates as it is described above.
Iptables NAT module does not work in container
Posted by adminix Labels: Knowledgebase, Linux, Virtuozzo
SYMPTOMS
NAT module does not work in container, you get "can't initialize iptables table 'nat'" error:
# iptables -t nat -L -n
iptables v1.2.11: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
The following Iptables modules settings are configured on the hardware node:
# cat /proc/net/ip_tables_targets
LOG
TOS
TCPMSS
REJECT
ERROR
# grep con /etc/modprobe.conf
options ip_conntrack ip_conntrack_disable_ve0=1
RESOLUTION
If order to enable NAT you should perform the following actions on the hardware node:
- stop Virtuozzo service and all containers:
# service vz stop
- reconfigure IPtables module "ip_conntrack":
# sed -i '/ip_conntrack/ d' /etc/modprobe.conf
# echo "options ip_conntrack ip_conntrack_disable_ve0=0" >> /etc/modprobe.conf
- restart IPtables service:
# service iptables restart
- start Vituozzo service and all CTs:
# service vz start
--- http://kb.parallels.com/en/5228
Virtuozzo 4.0 for Windows - Error 422 (Named Pipe connection failed, error #2 [The system cannot find the file specified)
Posted by adminix Labels: Virtuozzo, Windows
You can use whatever NTP server you like. For my example, I used the pool.ntp.org server.
How to set the date and time - Virtuozzo VPS for Linux
Posted by adminix Labels: Linux, Virtuozzo, VPSAfter several hours of googling, and unfortunately, I'm unable to find out how to set the correct date and time on a Linux VE.
Good new is, I've tested out something that came from my mind and hey, it worked!
Here's what I did.
1. Login to the hardware node using your favorite ssh client. I used putty. It's on my downloads category.
2. I use the date command to check for the current time and date. I also used the command date to adjust the time and clock settings.
e.g. date 061913062008
That means that I want to set the date to June 19, 2008 and the current time is 13:06 or 1:00PM gmt +8.
Not that hard eh? Time to check the VE's if the changes we did to the hardware node had an effect to them. You can use the date command again in checking.
Hope this post help's you save time too.
Also, set a higher value on your numproc. This also has something to do as to how many processes the system can use.
All you have to do is to modify your php.ini. ( Config file for PHP)
Change the line safe_mode = on to safe_mode = off.
In windows for Plesk, the path is C:\\windows\php.ini.
In linux for Plesk, the path is /etc/php.ini.
You should restart the web server service in order for the changes to take effect.
Edit:
On the Plesk 8.x versions, it provides an added functionality wherein you can edit the PHP Safe Mode option for single or multiple domains.
1. Login as administrator to the Plesk control panel.
2. Click on the Domains.
3. Check the domain you want to edit then choose Group Operations. This is located on the upper part of the Domains' page. This is also where you edit the other global changes for the domain/s.
4. Scroll down until you see the Hosting options.
5. Look for the line "PHP 'safe_mode' on", tick the radio button under the Disable column.
You can now safely assure that all of your applications that requires PHP Safe mode off will perfectly work.
*wink
Edit:
I've created a new post on how this can be done on Cpanel. Here's the link.
From SWSOFT's Knowledgebase, here's a step by step information in enabling firewall in a Virtuozzo for Linux VE. (Virtual Environment)
First of all you should define which iptables modules are available for VEs.
Edit /etc/sysconfig/iptables-config and /etc/sysconfig/vz on the hardware node. Add modules you need into IPTABLES_MODULES= and IPTABLES= lines correspondingly. Please note that all iptables modules in /etc/sysconfig/vz file in IPTABLES parameter should be listed in one single line, no linebreaks are allowed in this parameter.
For example, typical firewall configuration requires the following modules:
ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp
The changes will be applied after you load all required modules and restart Virtuozzo service (all VEs will be restarted):
# service vz stop
# service iptables restart
# service vz start
Modules you defined will be available for all VEs. However, you can also define a list of iptables modules for each VE using --iptables option of vzctl utility, e.g.:
# vzctl set 101 --iptables ipt_REJECT --iptables ipt_tos --iptables ipt_TOS --iptables ipt_LOG --iptables ip_conntrack --iptables ipt_limit --iptables ipt_multiport --iptables iptable_filter --iptables iptable_mangle --iptables ipt_TCPMSS --iptables ipt_tcpmss --iptables ipt_ttl --iptables ipt_length --iptables ipt_state --iptables iptable_nat --iptables ip_nat_ftp --save
You will probably need to increase the barrier of numiptent parameter in /proc/user_beancounters using vzctl utility. This parameter limits amount of iptables rules which VE owner is allowed to create. For example, this is how you allow to enter 400 iptables rules on VE 101:
# vzctl set 101 --numiptent 400 --save
Problem:
Cannot access or ping a Virtuozzo VPS. Status in the Virtual Management console shows that the VPS is up and running.
Solution:
After minutes of figuring out why the VE stopped responding, we finally pointed out the culprit. For some reason, the Windows Firewall Service is started automatically! One rule for a Windows VPS is that the firewall should not be running. I know it sounds too risky for the servers not to have a firewall started. But we gotta follow the "VE rules".
Here's how we did it:
Since we cannot access the virtual machine, we used the VZMC to do the needed changes.
1. Login to VZMC.
2. Look for the VPS options. ( Virtual Private Server)
3. Right click the problematic server then hit Manage Virtual Server.
4. Scroll down until you see the Services option.
5. Look for the Windows Firewall service then disable it.
That's it. You know have a working VE again.



