Monday, 30 May 2011

Mail client Error.

""You receive an "Outlook is unable to connect to your outgoing (SMTP) e-mail server" error message in Outlook 2002""


Please check the following link to understand the problem and its solution.

""http://support.microsoft.com/kb/302357""

H-Sphere Locations

Root directory in HSphere: /hsphere/local


Configuration files:

Common path - /hsphere/local/config
Control panel - /hsphere/local/home/cpanel/arjun/psoft_config/hsphere.properties
DNS - /etc/named.conf
The main named directory - /hsphere/local/var/named/
HTTP - /hsphere/local/config/httpd/httpd.conf
FTP - /hsphere/local/config/ftpd/proftpd.conf
Qmail - /hsphere/local/var/qmail/control/
Mysql - /etc/my.cnf
php.ini - /hsphere/local/config/httpd/php.ini or /usr/local/lib/php.ini


Control Panel features - /hsphere/local/home/cpanel
Scripts in hsphere - /hsphere/shared/scripts/
Location of domains - /hsphere/local/home//
Qmail - /hsphere/local/var/qmail(A symbolic link given to /var/qmail)
Mails - /hsphere/local/var/vpopmail/domains

Log files paths:

HSphere - /var/log/hsphere/hsphere.log
DNS - /var/log/messages
HTTP - /hsphere/local/var/httpd/logs/
Mail - /var/log/maillog
Horde - /hsphere/local/var/horde/log
FTP - /hsphere/local/var/proftpd/xferlog OR /var/log/proftpd/auth.log
MySQL - /var/log/mysqld.log


Statistics: Webalizer and Modlogan

/hsphere/local/var/staticstics - statistics results from rotatelogs (used for bandwith metering)
/hsphere/shared/ - modlogan and webalizer files
/hsphere/shared/apache/conf/modlogan_user.cfg - ModLogAn config file
/hsphere/shared/apache/conf/webalizer_user.cfg - webalizer config file (if MySQL is installed)
/hsphere/shared/skel/webalizer - skeleton files for webalizer section of the site.
/hsphere/shared/skel/modlogan - skeleton files for ModLogAn section of the site.


FTP and Frontpage:

/hsphere/local/var/proftpd/ - ftp log files
/hsphere/local/config/ftpd/ - ftp config files
/hsphere/shared/sbin/proftpd - ftp daemon file
/hsphere/shared/frontpage - FrontPage installation
/hsphere/local/var/frontpage - FrontPage config files

Others:

/hsphere/local/network/ips - all IP addresses and their netmasks that will be brought up by the system at start up. Used by H-Sphere to control IPs on the server.
/hsphere/shared/apache/htdocs - document root. Place index.html into this directory.
/hsphere/shared/apache/webshell - WebShell installation. This is a web based file manager that comes with H-Sphere
/hsphere/shared/skel - skeleton files for user sites. These are html pages that users see at their address before they upload their site content.
/hsphere/shared/skel/website - skeleton files for new sites
/hsphere/shared/skel/suspended - skeleton files for suspended sites
/hsphere/local/home/cpanel/apache/logs/ssl_engine_log - SSL log file in hshpere

Saturday, 28 May 2011

Bash script for login details logs

Hello,

I want to create a bash script that upon invocation shows the time and date, lists
all logged-in users, and gives the system uptime. The script then saves this information to a logfile.

I have searched a lot to create the bash file and I'm unable to find the script. I'm newbie to linux trying to learn about bash scripting. can you explain in detail.

Sol:
Step 1: create a file using vi 'filename'     eg: vi bash_logindetails
Step 2: Paste this script in the file, save it and exit


#!/bin/bash
logfile=~/homework.txt
echo `date` > $logfile 
echo `who` >> $logfile
echo `uptime` >> $logfile
exit


Step 3: Then change it to executable mode chmod +x <filename> 
            eg: chmod +x bash_logindetails
Step 4: Then run the file using ./filename       eg: ./bash_logindetails
Step 5: That's it your  shell script has completed. 


To check the output of your script just cat the file in the same directory.


[root@vps ~]# cat homework.txt
Sat May 28 20:40:00 MSD 2011
root pts/0 2011-05-28 20:17 (wing432)
20:40:00 up 4 days, 6:14, 1 user, load average: 0.00, 0.00, 0.00





Friday, 27 May 2011

Nagios : SYSTEM REQUIREMENTS FOR NAGIOS INSTALLATION

Hello,


Our company has hosted a dedicated server under the "Cloud computing" in a private network area. My, task is to install "Nagios" in the server. I wanna know the system requirements to proceed further. Please give me the exact details. I'm very much tried in searching these information.


Solution: These are the exact nagios requirement. If your server has these minimum requirements you can proceed installing your nagios in your server.


SYSTEM REQUIREMENTS FOR NAGIOS:


1) The only requirement of running Nagios is a machine running Linux
(or UNIX variant) or Windows and a C compiler.We will probably also
want to have TCP/IP configured, as most service checks will be
performed over the network.
2) A web server (preferrably Apache)
3) PHP
4)GD developmemnt library version 1.6.3 or higher (required by the
statusmap and trends CGIs)

Nagios History.

Hello,

I want to know about the "NAGIOS" the server monitoring tool. It looks like weird for a fresh learners regarding the server maintainance. I just wanna information about the "NAGIOS" and the activity it can perform on the server.

Sol:
NAGIOS   –   NETWORK MONITORING  SYSTEM

NAGIOS AUTHOR: Ethan Galstad
NAGIOS stands for: NAGIOS AIN'T GONNA INSIST ON SAINTHOOD
What is nagios ?

Nagios is a host and service monitor designed to inform us of network
problems before our clients, end-users or managers do. It has been
designed to run under the Linux and Windows operating system. The
monitoring daemon runs intermittent checks on hosts and services we
specify using external "plugins" which return status information to
Nagios. When problems are encountered, the daemon can send
notifications out to administrative contacts in a variety of different ways
(email, instant message, SMS, etc.). Current status information,
historical logs, and reports can all be accessed via a web browser.

NAGIOS FEATURES:
Some of the features of Nagios are listed below:
 * Monitoring of network services (SMTP, POP3, HTTP, PING, etc.)
 * Monitoring of host resources (processor load, disk and memory usage,
running processes, log files, etc.)
 * Monitoring of environmental factors such as temperature
 * Simple plugin design that allows users to easily develop their own host
and service checks
 * Contact notifications when service or host problems occur and get
resolved (via email, pager, or other user-defined method)
 * Ability to define event handlers to be run during service or host
events for proactive problem resolution
 * Scheduled downtime for suppressing host and service notifications
during periods of planned outages


Load in a server

Hello,


I have my own server. When i was trying to access my domain i can feel that the load of my server is too high. My domain is taking longer time to load. My server is based on Linux CentOS 5.5. I don't know how to check the load of the server. Sorry I'm new to linux. Can you help me????


Sol: You can use the following commands to check the load of the server.

top -c - this can be used to see the list of top process running under your server.

w - this is used to find the load in a server. used for finding average load time.

mysqladmin proc - this is very useful command to check the mysql database 
quire accessed through your website. Due to the domain 
linked with the database it can cause the server load to be 
high.

pidof httpd - this command is used to find the number of user accessing your apache httpd

cat /proc/user_beancounters - this command is used to check the fault count of  any particular process. If a load or link has some access error it will be added as fault count in this list. so you can able to identify the process which is causing the issue.

Hope this helps you to check the server load.

Thursday, 26 May 2011

MySQL table repair

Hello,


I have huge database for my website. Almost all the database has corrupted. I wasn't able to connect my website properly neither i was able to fix it manually. Can any one help me to fix the issue???


Solution: If your MySQL table is corrupted or damaged, then just follow this command to repair the mysql table following with the extension.


=======
myisamchk -r *.MYY to repair msql
=======


Understanding the command:

myisamchk - this is the command can be used to repair MySQL 
                    database tables.
-r               - recursive  function to perform the repair task
*.               - * represents all the names before the (.) has to be
                      taken for the database repair.
.MYY          - .MYY represents the mysql  database table extension. 
                     we can change the extention

cPanel Log files

These are the important cPanel log files

cPanel enabled Server's Log file location

cPanel: /usr/local/cpanel/logs directory

access_log - cPanel access log for both cPanel and WHM
error_log - cPanel error log
license_log - cPanel license log
login_log - cPanel user login log
melange.log - cPanel chat server log
melange_msg.log - cPanel chat server message log
stats_log - cPanel web stats log

System: /var/log/ directory.

bandwidth - cPanel total bandwidth logs for the entire server
chkservd.log - chkservd service log
clamav - clamav log directory
cpupdate.log - cPanel update log
exim_mainlog - Exim email transaction log
exim_paniclog - Exim error log
exim_rejectlog - Exim rejected email log
maillog - Transaction and login log for all mail services
messages - Transaction and login log for FTP services

cPanel individual domain logs: /usr/local/apache/domlogs

The log file will show the access log for each domain.

cPanel backend files and paths

Hello,

I'm working in a web-hosting company. Our company prefers cPanel for the customers to manage their websites. We do provide the tech support for them. Im new to the cPanel and I like to know backend file location of all the services.
How to find the cPanel back end file locations.


Sol: These are the cPanel path hosted in LINUX OS. All the path configuration and files are pasted here.
/etc/httpd/conf/httpd.conf - apache configuration file
/etc/exim.conf - mail server configuration file
/etc/named.conf - name server (named) configuration file
/etc/proftpd.conf - proftpd server configuration file
/etc/pure-ftpd.conf - pure-ftpd server configuration file
/etc/valiases/domainname - catchall and forwarders are set here
/etc/vfilters/domainname - email filters are set here
/etc/userdomains - all domains are listed here - addons, parked,subdomains
along with their usernames
/etc/localdomains - exim related file
all domains should be listed here to be able to send mails


/var/cpanel/users/username - cpanel user file
/var/cpanel/cpanel.config - cpanel configuration file ( Tweak Settings )*
/etc/cpbackup-userskip.conf -
/etc/sysconfig/network - Networking Setup*
/etc/hosts -
/var/spool/exim -
/var/spool/cron -
/etc/resolv.conf - Networking Setup--> Resolver Configuration
/etc/nameserverips - Networking Setup --> Nameserver IPs ( FOr resellers to
give their nameservers )
/var/cpanel/resellers - For addpkg, etc permissions for resellers.
/etc/chkserv.d - Main >> Service Configuration >> Service Manager *
/var/run/chkservd - Main >> Server Status >> Service Status *
/var/log/dcpumon - top log process


/root/cpanel3-skel - skel directory.
Eg: public_ftp, public_html. (Account Functions-->Skeleton Directory )*
/etc/wwwacct.conf - account creation defaults file in WHM (Basic cPanel/WHM
Setup)*
/etc/cpupdate.conf - Update Config *
/etc/cpbackup.conf - Configure Backup*
/etc/clamav.conf - clamav (antivirus configuration file )
/etc/my.cnf - mysql configuration file


/usr/local/Zend/etc/php.ini OR /usr/local/lib/php.ini - php configuration file
/etc/ips - ip addresses on the server (except the shared ip) (IP Functions--
>Show IP Address Usage )*
/etc/ipaddrpool - ip addresses which are free
/etc/ips.dnsmaster - name server ips
/var/cpanel/Counters - To get the counter of each users.
/var/cpanel/bandwidth - To get bandwith usage of domain