≡ Menu

If you are running Cpanel on OpenVZ VPS and you want to enable quota for your cpanel account, please do this step on your node server.

Step 1: Check First-level Quotas to see whether first-level quotas have already been enabled

Step 2: Check Second-level Quotas

If you get an empty result, or a result of zero, second-level quotas are not supported by this environment, t go to step 3

Step 3: Turning On Second-Level Quotas for Container

ref: http://docs.cpanel.net/twiki/bin/view/11_30/WHMDocs/VirtuozzoQuotas

{ 0 comments }

php logoIf you have wordpress site or other website with limited resource, your will get error message “504 Gateway Time-out”. So here is how to increase the timeout your website.

Step 1: Edit php.ini

Step 2: Edit PHP-FPM

Set …

Step 3: Edit Nginx Config

Set …

Set …

Step 4: Restart PHP-FPM & Nginx

{ 0 comments }

If you want to connect to a server via SFTP with non standard port (22) you can use this command on your terminal (console)

{ 0 comments }

How to Backup/Restore Mysql Database

In general, to perform backup/restore mysql database we can use the command:

Backup a single database:

Backup multiple databases:

Backup all the databases:

Backup a specific table:

{ 0 comments }

How to upgrade PHP 5.3 on Centos

php logoTo upgrade to PHP 5.3.x on CentOS/RHEL/Fedora:

Step 1) Set up the atomic channel:

Step 2) Upgrade to PHP 5.3.x:

Step 3) Update libxml2:

Step 4) Replace the PHP 4 php.ini with PHP 5.3.x’s (if applicable):

Step 5) Replace the php.conf with the PHP 5.3.x php.conf (if applicable):

Step 6) Restart the webserver

Step 7) Update crontab
Maybe would it be a good idea to update your packages automatic by installing a crontab:

Insert:

Reference: http://www.atomicorp.com/wiki/index.php/PHP

{ 0 comments }

This tutorial is how to make a Web Server under Debian 6 using Nginx web server, MySQL as a database server, PHP-FPM as a fastCGI server, APC as an optcode cache and Varnish as a caching proxy to optimize a website using wordpress.

I have tried this method using Debian 6.0.5 32BIT on XEN VPS with 512 Memory.

Step 1: Adding main debian repos

Because i’m using idROOT as Indonesia VPS Provider, so i’m using Indonesian repository which is located at Kambing.ui.ac.id

Step 2: Adding dot-deb repo

Step 3: Update and adding base software

Step 4: Adding Varnish repo and Install Varnish

Step 5: Adding a system user and Add user to sudo

find: root ALL and then add this line below : [USER] ALL=(ALL) ALL

Step 5: Installing Software

Step 6: Configuring MySql

Insert this code into /etc/mysql/my.cnf

Step 6: Configuring nginx

Insert this code into /etc/nginx/nginx.conf

Insert this code into /etc/nginx/sites-available/default

Step 7: Fix CGI Path Info

find cgi.fix_pathinfo and Uncomment the command by removing the ; in front and replace the defauly 1 with a 0!

Step 8: Configuring PHP5-FPM

Insert this code into /etc/php5/fpm/php-fpm.conf

Insert this code into /etc/php5/fpm/pool.d/www.conf

Step 9: Configuring Varnish

Insert this code into /etc/default/varnish

Insert this code into /etc/varnish/default.vcl

step 10: Securing VPS

Securing SSH

–find: PermitRootLogin yes
–change to: PermitRootLogin no

–find: X11Forwarding yes
–change to: X11Forwarding no

–find: Port 22
–change to: 7766

–add to end: UseDNS no

Restart SSH

Installing IPTABLES

// Show what is loaded in our firewall

// Flush everything we have in our firewall

// Allow established sessions

// Allow services

// End iptables by blocking everything that we didn’t explicitly allowed earlier

// backup iptables to a file

Making sure iptables rules are reloaded on reboot

Insert this code

Restartig our services

Reference:
http://www.axelsegebrecht.com/how-to/install-nginx-apc-varnish-wordpress-and-w3-cache-128mb-vps/
http://library.linode.com/lemp-guides/debian-6-squeeze
http://www.farinspace.com/wordpress-nginx-rewrite-rules/

{ 0 comments }