How To

How Tos, Tutorials

ssh debug command

ssh -vvv hostname-or-ip-address

Commands to Start & Stop Apache in Centos

to restart apache or httpd
to restart:

/sbin/service httpd restart

to start:

/sbin/service httpd start

to stop:

/sbin/service httpd stop

Step by Step Guide on How to Install Nagios in Ubuntu Jaunty To EC2 Instance from Source

Nagios is a good open source montoring tool. When trying to install nagios to our ubuntu server, I find there are lot of scattered documentation on the web, but not a single complete one that walk you step by step on how to install it to Ubuntu 9.04 Jaunty server. After encounter many dependency problems, espeically with the nagios plugin, I decided to do a total clean install in a valila server and record each steps. Hopefully, it will be useful to others who might want to install Nagios 3 to Ubuntu Jaunty.

Step I : Get a basic Ubuntu Jaunty OS server ready.

Node Template Creation Gotcha - Drupal 6

The following are very important tools in my box when creating node template for drupal 6:


<?php
print '

';
print_r(get_defined_vars());
print '

';
?>


<?php
print '

';
print htmlspecialchars(print_r(get_defined_vars(), TRUE), ENT_QUOTES);
print '

';
?>

<?php print_r($node); ?>

Adding Flash content to Drupal 6

It can be a very painful process for people who are not familiar with adding flash content to drupal site. Even though there are many great modules out there, but since the information is scattered, it is not simple to distill the process down initially. There are many ways to add flash to drupal. This article is a work in progress, since I do not have a chunk of time to organize it all at once, I will do rewrite as time permit.

Redirecting Using .htaccess

How to redirect your site or site content using .htaccess

# Point an entire site to a different URL, such as example.net redirected to example.com:


# This allows you to redirect your entire website to any other domain
Redirect 301 / http://exampledomain.net/

# Redirect index.html to a specific subfolder:


# This allows you to redirect index.html to a specific subfolder
Redirect /index.html http://exampledomain.net/subdirectory/

#Redirect an old file to a new file path:

Handy dandy mysql commandline for dumps and imports

Sometimes, phpmyadmin just do not cut it, especially if you are dealing with slightly larger files, so command line comes to the rescue. It if a pain if it is filed away in your neuro system and can not retrieve it in an instance. So here it is:

backup
mysqldump -u USER -pPASSWORD DATABASE > filename.sql

restore
mysql -u USER -p DBNAME < dump.sql

a very sloppy way to pipe mysqldump output to another host:
user@host1$ mysqldump mydbname | ssh host2 "mysql mydbcopy"

a more proper way:
The first host is where you want to copy FROM and the second is where
its going TO.

Syndicate content