-
Archives
- January 2012
- December 2011
- September 2011
- August 2011
- June 2011
- January 2011
- December 2010
- November 2010
- October 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- January 2009
- November 2008
- September 2008
- August 2008
- July 2008
- March 2008
- February 2008
- January 2008
-
Meta
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.
Synchronize time in Linux
This procedure needs root access. $ sudo ntpdate pool.ntp.org
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
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
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 awksqldump, bash
Leave a comment
Transfer Horde emails to a new server
Transfer Horde emails to a new server
rsync
rsync -avz -e ssh root@i095.indigo.fastwebserver.de:/var/www/vhosts/philippinedev.com/httpdocs/ /srv/www/vhosts/philippinedev.com/httpdocs/
How to use .htaccess to change default index page
DirectoryIndex alternative-default-home-page.php
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 PHP, reverse traceroute, traceroute
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.