Monday, 17 February 2014

How to get nrpe version

# /usr/local/nagios/bin/nrpe --help

NRPE - Nagios Remote Plugin Executor
Copyright (c) 1999-2003 Ethan Galstad (nagios@nagios.org)
Version: 1.9
Last Modified: 07-22-2003
License: GPL

Wednesday, 18 December 2013

Linux commands

1) to list open ports and services >> service --status-all
2) 

Wordpress with cPanel server

A) Steps to rename wordpress wp-login.php file

1) Find and replace the text “wp-login.php” on /wp-login.php file with “hidden-login.php”
2) Find and replace the text “wp-login.php” on /wp-includes/general-template.php file with “hidden-login.php” except this line on wp_login_url function, like :
$login_url = site_url('wp-login.php', 'login'); for new version, or
return site_url("wp-login.php$redirect",'login'); for old version
just let it be the way it is, otherwise when you go to wp-admin, it will redirect to “hidden-login.php”
3) Rename /wp-login.php file into hidden-login.php

http://crazydavinci.net/2010/11/secure-wordpress-login/

-------------------------------------------------------------------------------------

B) wordpress installation fantastico steps

1. Log into your website’s cPanel account, then click on the Fantastico icon.

2. From the Fantastico interface, scroll down until you see the Blogs section and just below it, you should see WordPress in the list. Click on the WordPress link.

3. To the right, you will be provided with some information about the version of WordPress you will be able to install. Take a moment to ensure that it’s up to date. If all is well, click on New Installation.

4. You should arrive at the first of three steps in the one-click installation process. Here, you’ll be able to determine which folder you’d like to have WordPress installed to, as well as some other blog information

  4.1 Installation Location. If you want your blog to be your website’s homepage, ensure that you leave the space blank, otherwise type in the name of the folder you want WordPress installed to (make sure it doesn’t already exist).

  4.2 Admin access data. Choose the username and password you’d like to use in order to access the WordPress admin panel after installation is completed.

  4.3 Base configuration. Type a nickname you’d like to use throughout the blog. By default, the nickname is used whenever you leave comments or write an entry on the blog, so choose something you don’t mind the world seeing. The admin e-mail address is where notices, passwords, and other information about the administration of the blog is sent. Your blog’s name and description should be self-explanatory.

  4.4 E-mail account configuration. You only need to worry about this if you plan to blog via e-mail. If you’ve set up a special e-mail account that you’ll use for blogging via e-mail, then enter the settings where applicable. (Bear in mind, you will need to enter an e-mail account password in order to proceed with the installation, simply use a false one if you don’t plan to blog via e-mail.)

  4.5 When your blog information is complete, click on the Install WordPress button at the bottom.

5. Verify that the information you provided is correct and click on Finish installation. Fantastico will create a brand new database for you and create the necessary WordPress files.

6. When the process is complete, you will receive a confirmation notice with the details of the installation. If you’d like a copy of the report for your records, you’ll have the option to send an e-mail to an account of your choosing.

-------------------------------------------------------------------------------------

Enable innodb in the mysql +cPanel

fix:: http://forums.cpanel.net/f354/how-install-innodb-step-step-155297.html Once you are logged in, check if Innodb is already there. Execute the command: mysqladmin variables | grep have_innodb this will tell you if Innodb is present on the server and whether it is ON or OFF. root@server1 [~]# mysqladmin variables | grep have_innodb | have_innodb | DISABLED | If you see have_innodb is set to OFF. It indicate thet innodb is disabled on your server. To enable it, ssh to your server as root and open file /etc/my.cnf with your favorite editor. Search for line skip-innodb and comment the line by placing # in the starting of the line. Save and quit the file and restart mysql service for changes to take effect. /etc/init.d/mysql restart Now check status of InnoDb engine mysqladmin variables | grep have_innodb Above command should show output as YES now. root@server1 [~]# vi /etc/my.cnf root@server1 [~]# /etc/init.d/mysql restart Shutting down MySQL... SUCCESS! Starting MySQL... SUCCESS! root@server1 [~]# mysqladmin variables | grep have_innodb | have_innodb | YES |

Webmail - squirrel, horde and roundcube doesn't work ask for double login

Cause:: this happened due to hostname change Fix:: http://forums.cpanel.net/f43/webmail-squirrel-horde-roundcube-doesnt-work-206321.html Please run the following command in root SSH: Code: /scripts/whoowns domain.com Where domain.com is the domain name in question. If it doesn't show any ownership, then move the following files: Code: cd /etc mv userdomains userdomains.bak mv domainusers domainusers.bak mv trueuserdomains trueuserdomains.bak At that point, run the following script and recheck ownership for the domain: Code: /scripts/updateuserdomains /scripts/whoowns domain.com

How to prevent mail delivered to spam folder

How to prevent mail delivered to spam folder when using contact forms etc:

Create custom php.ini file inside that ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = "/usr/sbin/sendmail -t -i -f mail_account_id" // write from address earlier the value is sendmail_path = "/usr/sbin/sendmail -t -i"

Access domain via IP in cPanel servers

In order to access domain via xxx.xxx.xxx.xxx/~user Please make sure that you have not disabled the mod_userdir from WHM for the domain. You can check it from WHM --> Security Center --> Apache mod_userdir Protection. 
Also try Home » Security Center » PHP open_basedir Tweak