Category Archives: Linux Administration

Linux Time Synchronization

# ntpdate pool.ntp.org 12 Nov 11:39:23 ntpdate[13390]: the NTP socket is in use, exiting If the socket error shows, it means that your computer’s time is already synchronized by ntp service.

Posted in Linux, Linux Administration | Tagged , | Leave a comment

Synchronize time in Linux

This procedure needs root access. $ sudo ntpdate pool.ntp.org

Posted in Linux, Linux Administration | Tagged , | Leave a comment

Plesk: command to reconfigure one site

/usr/local/psa/admin/sbin/websrvmng -u –vhost-name=domain.com If you encounter WARNING: You are using obsolete option, use corresponding option of httpdmng. /usr/local/psa/admin/bin/httpdmng –reconfigure-domain domain.com

Posted in Linux Administration | Tagged | Leave a comment

OpenSSL: How To Create Self-Signed Certificate

$ openssl genrsa -out ca.key 1024 $ openssl req -new -key ca.key -out ca.csr $ openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt For the explanation, here’s the source: OpenSSL: How To Create Self-Signed Certificate

Posted in Linux Administration, web | Tagged , | Leave a comment

Extract particular table from a mysqldump file

$ awksqldump dbname.dump.sql tblname #!/bin/bash ### check parameter E_NO_ARGS=65 if [ $# -eq 2 ] then # Outputs string of specified table only awk “/Table structure for table .$2./,/UNLOCK TABLES/{print}” $1 > $1.EXTRACTED.sql elif [ $# -eq 3 ] then … Continue reading

Posted in Bash script, Database, Linux Administration, MySQL | Tagged , | Leave a comment

Transfer Horde emails to a new server

Transfer Horde emails to a new server

Posted in Linux Administration | Tagged , | Leave a comment

rsync

rsync -avz -e ssh root@i095.indigo.fastwebserver.de:/var/www/vhosts/philippinedev.com/httpdocs/ /srv/www/vhosts/philippinedev.com/httpdocs/

Posted in Linux Administration | Tagged | Leave a comment

How to use .htaccess to change default index page

DirectoryIndex alternative-default-home-page.php

Posted in Apache2, Linux Administration, Programming | Tagged | Leave a comment

How to create reverse traceroute page on your website using PHP

<?php $result = exec(‘traceroute ‘ . $_SERVER["REMOTE_ADDR"], $lines); echo ‘<h1>Your IP is ‘ . $_SERVER["REMOTE_ADDR"] . ‘</h1>’; echo ‘<pre>’; foreach ($lines as $n => $line) { if ($n) echo ‘<br />’; echo $line; } echo ‘</pre>’; echo ‘<p>-end-</p>’; Here’s how … Continue reading

Posted in Linux Administration, PHP, Programming | Tagged , , | Leave a comment

How to redirect pages to a new domain

RedirectMatch 301 (.*)$ http://www.newdomainhere.com$1 Save this into .htaccess and upload on the root directory on your old domain.

Posted in Apache2, Linux, Linux Administration | Tagged | Leave a comment