Blog Archives

the difference between redirection and rewrite

If you wrote rewrite rules, you may get confused by the rewrite and redirection. What happens if you write the following RewriteRules?

If you type http://domainhostseotool.com/test1.html , the browser will display the content of test3.html while the url in

Posted in tips of hosting

stdout/stderr redirection

You must know the standout redirection: ls > file The output of ls is now saved in file “file”. This is equivalent to: ls 1>file Note that there is no space between 1 and >. 1 is the file descriptor

Posted in tips of hosting

How to upgrade mysql on CentOS6?

On CentOS6, the version of  mysql is typically V5.1. mysql -V mysql  Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1 rpm -q mysql mysql-5.1.73-7.el6.x86_64 rpm -qa|grep mysql mysql-libs-5.1.73-7.el6.x86_64 php-mysql-5.3.3-47.el6.x86_64 mysql-5.1.73-7.el6.x86_64 mysql-server-5.1.73-7.el6.x86_64 Sometimes you may want to upgrade mysql

Posted in tips of hosting

How to temporally disable a website?

Sometimes you may want to temporally shut down your website to do some maintenance work. Stopping the httpd service may not be a good choice for you because you have other websites on the same host. You may think you

Posted in tips of hosting

How to create a display network campaign for Adwords?

Although display network ad in Adwords is basically a piece of junk, you might want to have a try to prove it. In Adwords’ “All campaigns” page, click “+CAMPAIGN” button, you will see a list of available  types of campaigns:

Posted in Webmaster Tools

How to set up sendmail on CentOS?

It is said postfix is the most popular mail server now. However, postfix is not installed on my VPS. Instead, sendmail is installed by default although I never started the service before. So I decide to use sendmail as the

Posted in tips of hosting

sql syntax memo

mysql> select table1.id1,table1.field1,table2.id2,table2.field2 from table1, table2; mysql> select table1.id1,table1.field1,table2.id2,table2.field2 from table1  join table2; mysql> select table1.id1,table1.field1,table2.id2,table2.field2 from table1 inner join table2; The above three statements return the same result: the Cartesian product of table1 and table2 If you use outer

Posted in tips of hosting

how to compress mysql databases?

Here we talk about enabling compression for mysql innodb tables. Follow the following steps to compress the tables and save disk space. 1 enable innodb_file_per_table add a line “innodb_file_per_table” under [mysqld] in /etc/my.cnf. This will make databases use their own

Posted in tips of hosting

What databases/tables does Sentora use?

I accidentally deleted some databases Sentora uses to store its system data, which leads to the inaccessibility of Sentora panel. To recover   corrupted or deleted Sentora system databases/tables, you should first know what databases/tables it uses. During installation, Sentora

Posted in tips of hosting

bash memo

I always forget the syntax of if…then..else…fi clauses if test 1 -gt 0 then echo yes fi will produce the error:-bash: syntax error near unexpected token `fi’ if test 1 -gt 0 then echo yes fi will produce the same

Posted in tips of hosting