Posts Tagged ‘CentOS’

OpenVZ on CentOS 5.2

OpenVZ setup procedure followed – January 6th, 2009
host machine – 1.5ghz Pentium 4 (i386), 1GB ram, 40GB hard disk drive
host os – CentOS 5.2
for more detailed installation information see: http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

This installation of CentOS 5.2 is on a i386 machine, be sure to substitute in for a 64-bit machine if you have one. Following most/all of the instructions will give you an OpenVZ CentOS 5.2 host with browser-based administration of your VPS(es) with vtonf. This cookbook assumes running knowledge of how to edit configuration files via “vi”, using yum to install dependencies/software, and how to install via tarballs (.tar.gz).

  1. Install latest CentOS distro on physical server (at the time of writing this, it was 5.2)
    • minimal install only requires disc 1 – “CentOS-5.2-i386-bin-1of6.iso”
    • choose your mirror: http://isoredirect.centos.org/centos/5/isos/i386/
    • partition setup note: 5GB for root filesystem, 1.25X-2X size of RAM for swap, rest of space for /vz (the VPS nodes and OS templates)
    • During the category/task selection, deselect all package categories, and choose the “Customize now” option at the bottom of screen. During the customized package selection, deselect everything. This will allow for a “minimal” install with only disc 1.
  2. Configure static ipv4/ipv6 address(es) – /etc/sysconfig/network/
  3. Setup dns nameservers – /etc/resolv.conf
  4. Run an update: yum update
  5. Follow hotwo: http://www.howtoforge.com/installing-and-using-openvz-on-centos5.2
  6. Download VTONF – http://vtonf.com/downloads.html
  7. tar xzvf on the archive you just downloaded and cd into the created directory
  8. Follow on screen instructions to complete setup
  9. If you wanna go crazy with the customizations get into the “/etc/vtonf/” directory and check things out
  10. To allow connections to vtonf from IPv4/6 addresses other than through the localhost, modify the code block within “/etc/vtonf/vtonf.conf” so it looks like the below code block. Note the second line!

    fastcgi.server = ( ".php" =>
    ( "*" =>
    ( "socket" => "/tmp/vtonf.socket",
    "bin-path" => "/usr/local/vtonfphp/bin/php",
    "max-procs" => 1,
    "bin-environment" => (
    "PHP_FCGI_CHILDREN" => "4",
    "PHP_FCGI_MAX_REQUESTS" => "10000"
    ),
    )
    )
    )

  11. Remember to modify the OpenVZ host IPTABLES rules so that it allows traffic to the VPS nodes. I just turned mine off (service iptables stop; chkconfig iptables off), because I got an external firewall/router in my home LAN.

That’s it you are good to go to start reselling VPSes to clients!

CentOS 4.4 in Malaysia

The setup
Recently I started leasing an OpenVZ VPS (virtual private server) from Shinjiru hosting. Their servers are located in Malaysia in seven different data centers. Mine happens to be located in Kuala Lumpur. The customer support I experienced was very good. The sales reps responded to my emails in less than a business day, with English that was pretty good for not being native speakers. I was even able to negotiate a lower priced VPS plan, since I didn’t need any control panel.

The technical details
The choices for operating systems are a bit old. I was hoping to use Debian 4.1 or CentOS 5, but the best I could get was CentOS 4.4. Their default VPS image install includes SSHd (obviously), Apache 2 with Perl, PHP, PHPMyAdmin, AWstats, Analog, MySQL, sendmail and a POP3 server. Unfortunately YUM was not installed, so I had download the source and compile it. Not that it is extremely difficult, but processing tar.gz files and getting the install configured just right is tedious. After I compiled yum I then had to get the configuration files just right. I learned that certain packages don’t like to be updated or installed in an OpenVZ VPS, such as gcc or any gcc dependencies. Thanks to the RPM Search, I managed to get all the dependencies worked out and installed. My first priority after getting yum to work was killing off ftpd and installing vftpd. After getting things cleaned up, I installed the Webmin minimal version (from source). I didn’t want to use yum on this one, because the full version has all these extra utilities with the package that I don’t need.

The conclusion
Shinjiru offers great offshore hosting. It would be even better if they had newer operating systems. The latency is pretty good as offshore servers go. The latency for my VPS runs around 300 – 330ms when I ping it from my home DSL connection (Qwest DSL in St. Paul, Minnesota). If you want some great offshore hosting (where even warez is ok) then I would say that Shinjiru is going to be your best bet.

Return top