How to Manually Migrate a VZ Container

Have a tricky VPS that vzmigrate just can’t move? Luckily, Virtuozzo (and OpenVZ for that matter) are pretty simple in terms of how the containers are set up. You’re mainly dealing with two locations that data for the container is stored:

/vz/private/$VEID
/etc/vz/conf/$VEID.conf

To manually move a container to another node, all you need to do is copy those folders:

rsync -av /vz/private/$VEID $newserver:/vz/private
rsync -av /etc/vz/conf/$VEID $newserver:/etc/vz/conf

Then on the server server, just start it right up. You do need to have the container’s OS template installed on the new node, as referenced in the container’s config file.
This same process also applies to cloning a VPS, which is particularly useful on an OpenVZ server where the vzmlocal command isn’t available. All you have to do is use similar commands to rsync the container’s private folder to a new VEID:

rsync -av /vz/private/$VEID /vz/private/$NEWVEID
rsync -av /etc/vz/conf/$VEID /etc/vz/conf/$NEWVEID

Then just change the hostname and ip variables in the new container’s config file.

surce: http://www.thevirtuozzoadmin.com/how-to-manually-migrate-a-vz-container/

Metatrader on CentOS using wine

1) install wine and winetricks
yum install wine

wget http://kegel.com/wine/winetricks

chmod +x winetricks

sudo mv winetricks /usr/bin/

2) Install requirements for MetaTrader (gecko is used for HTML
rendering):
winetricks -q gecko vcrun6

3) Install MetaTrader with Wine and work with it as usually.

Setting Outlook Menggunakan SMTP SSL port 465

Akhir-akhir ini beberapa ISP menutup port 25/tcp sehingga pengiriman email melalui email client seperti Outlook atau lainnya tidak bisa dengan error seperti di bawah ini:

The connection to the server has failed. Account: ‘emailaccount.mydomain.com’, Server: ‘mail.mydomain.com’, Protocol: SMTP, Port: 25, Secure(SSL): No, Socket Error: 10051, Error Number: 0x800CCC0E

Untuk mengatasi masalah tersebut, silakan ubah setting Outlook untuk menggunakan SMTP TLS port 465 sebagai berikut:

  1. Buka Outlook, pilih Tools / Account Settings.
  2. Pilih Tab E-mail, lalu Pilih alamat emailnya dan klik Change.
  3. Akan muncul Internet E-mail Settings, lalu klik More Setting
  4. Centang pada My Outgoing server (SMTP) requires authentication lalu bawahnya di pilih Use same setting asmy incoming mail server, setelah itu klik OK
  5. Klik Tab Advanced, pada kotak Outgoing server (SMTP), masukkan port: 465 dan pilih Use the following type of encrypted connection: SSL
  6. Klik OK dan Finish

Semoga berhasil.

How to install GotRoot ModSecurity Rules

Make sure you have at least version 2.6.1 of modsecurity installed. Cpanel includes its own modsecurity configuration files and its own modsecurity module. To install gotroot modsecurity rules for the first time you will need to do the following:

  1. Download the Free Delayed/Unsupported feed here. Keep in mind the Delayed feed is released 90 days after the realtime feed (that includes any fixes).
  2. Unpack the rules in /usr/local/apache/conf/
  3. Create the following directories and chmod them accordingly:

    mkdir /var/asl
    mkdir /var/asl/data/
    mkdir /var/asl/data/msa
    mkdir /var/asl/data/audit
    mkdir /var/asl/data/suspicious
    chown nobody.nobody /var/asl/data/msa
    chown nobody.nobody /var/asl/data/audit
    chown nobody.nobody /var/asl/data/suspicious
    chmod o-rx -R /var/asl/data/*
    chmod ug+rwx -R /var/asl/data/*

    you will never need to use these directories but they have to be present for the rules to work.

  4. Read the rest of this entry »

How to restore Incremental backup on cPanel Machine

Most of you got the Incremental backup located at ‘/backup’ so if you are not the one of those please modify the value of ‘/backup’ path to the correct path.

Step 1) Taring the backup folder

/usr/local/cpanel/bin/cpuwatch 4.0 tar -czf /home/user.tar.gz /backup/cpbackup/daily/user

* /usr/local/cpanel/bin/cpuwatc is used to monitor the cpu load. If the load goes past the set limit, it will stop the application and resume it after the load averages are below the threshold for a few seconds

Step 2) Restoring the backup

/scripts/restorepkg user

** Modify ‘user’ to your correct user value

Switch to our mobile site