Enable Slow Query logs in Mysql   We can enable mysql slow query log by two way: Step 1   # touch /var/log/mysql/mysql-slow.log # chown mysql:mysql /var/log/mysql/mysql-slow.log # mysql -u username -ppassword -e ‘SET GLOBAL slow_query_log=1;’ # mysql -u username -ppassword -e ‘SET GLOBALslow_query_log_file=”/var/log/mysql/mysql-slow.log”;’ # …

Run/Include php code in .shtml   To run php code in .shtml add below Apache directive’s either in .htaccess .   # vi .htaccess AddType text/html .shtml AddHandler server-parsed .shtml AddType application/x-httpd-php .shtml RemoveHandler .shtml .html .htm Options Indexes FollowSymLinks Includes XBitHack on DirectoryIndex index.shtml …

Database backup and restore with mysqldump command.   The mysqldump client is backup program. Also it can be use to dump a database or database collection for backup or transfer to another server. It takes backup in .sql format. Syntax: mysqldump -u username -pPassword database_name …

How to enable server side(SSI) include in Apache   What are SSI? SSI (Server Side Includes) are directives that are placed in HTML pages, and evaluated on the server while the pages are being served. They let you add dynamically generated content to an existing …

       Manually Sync Two MySQL Databases with mysqldump command Here we see how to sync two mysql databases with Linux mysqldump command.. For testing purpose I created two databases. Database 1 : sunil_test Database 2 : sunil_test1   Database 1: sunil_test   Database 2:  sunil_test1 …

Installing optipng jpegoptim on Centos and Redhat   Follow below steps to installing packages: 1) Install dependency for the relevant packages.. #yum -y install gcc libpng libpng-devel gifsicle pngcrush p7zip lzip jhead   2) Install optipng For x86 architecture [64 bit]: # yum -y install …

Install Siege stress tester on Centos 6.5   Siege is a Apache benchmarking tool. It is a stress testing tool for a Apache web server. Installation process: cd /usr/src/ wget http://www.joedog.org/pub/siege/siege-2.72.tar.gz tar -zxvf siege-2.72.tar.gz     Extract siege folder to configuration and compilation. # cd …

Howto install Redis magento cache on centos and redhat Follow below steps to install redis and integration with magneto.   #wget http://redis.googlecode.com/files/redis-2.6.14.tar.gz #tar -zxvf redis-2.6.14.tar.gz #cd redis-2.6.14 #make Once you installed it without any error move two Redis files into the /usr/local/bin/ directory.. # cd …

                                  How to clear/flush memcache (Centos & Redhat)   Some time’s you observed you update data on server, but it is still showing old data. It is because of memcached. To fix this, you have to flush memcache on server. flush_all command do flush all …

1 2 3 4 7