Navigation


RSS : Articles / Comments


Fantastico Installation

5:41 AM, Posted by कैलास बधान, No Comment

You will need the server root access to install Fantastico :

cd /usr/local/cpanel/whostmgr/docroot/cgi
wget -N http://www.netenberg.com/files/free/fantastico_whm_admin.tgz
tar -xzpf fantastico_whm_admin.tgz
rm -rf fantastico_whm_admin.tgz

Do this on shell then go to whm and click on install with stable version.

cpanel not accessible with port

5:37 AM, Posted by कैलास बधान, No Comment

If you are not able to access cpanel/webmail/WHM with port ?

Solution : make sure your httpd.conf has the alias's for them
ScriptAlias /cpanel /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /whm /usr/local/cpanel/cgi-sys/whmredirect.cgi
ScriptAlias /webmail /usr/local/cpanel/cgi-sys/wredirect.cgi

cgi email Error

5:33 AM, Posted by कैलास बधान, No Comment

If you get the cgi email error as below while installing fourm ?

The requested URL /cgi-bin/cgiemail was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Solution: it needs to add the entry for script alias for the domains httpd.conf file

Perl interview questions

5:29 AM, Posted by कैलास बधान, No Comment

   1. What arguments do you frequently use for the Perl interpreter and what do they mean?

   2. What does the command ‘use strict’ do and why should you use it?

   3. What do the symbols $ @ and % mean when prefixing a variable?

   4. What elements of the Perl language could you use to structure your code to allow for maximum re-use and maximum readability?

   5. What are the characteristics of a project that is well suited to Perl?

   6. Why do you program in Perl?

   7. Explain the difference between my and local.

   8. Explain the difference between use and require.

   9. What’s your favorite module and why?

  10. What is a hash?

  11. Write a simple (common) regular expression to match an IP address, e-mail address, city-state-zipcode combination.

  12. What purpose does each of the following serve: -w, strict, -T ?

  13. What is the difference between for & foreach, exec & system?

  14. Where do you go for Perl help?

  15. Name an instance where you used a CPAN module.

  16. How do you open a file for writing?

  17. How would you replace a char in string and how do you store the number of replacements?

  18. When would you not use Perl for a project?

C# interview questions

5:10 AM, Posted by कैलास बधान, No Comment

# What’s the advantage of using System.Text.StringBuilder over System.String?
StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it’s being operated on, a new instance is created.

# Can you store multiple data types in System.Array?
No.

# What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?
The first one performs a deep copy of the array, the second one is shallow.

# How can you sort the elements of the array in descending order?
By calling Sort() and then Reverse() methods.

# What’s the .NET datatype that allows the retrieval of data by a unique key?
HashTable.

# What’s class SortedList underneath?
A sorted HashTable.


# Will finally block get executed if the exception had not occurred?
Yes.


# What’s the C# equivalent of C++ catch (…), which was a catch-all statement for any possible exception?
A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}.


# Can multiple catch blocks be executed?
No, once the proper catch code fires off, the control is transferred to the finally block (if there are any), and then whatever follows the finally block.


# Why is it a bad idea to throw your own exceptions?
Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project.


# What’s a delegate?
A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers.


# What’s a multicast delegate?
It’s a delegate that points to and eventually fires off several methods.


# How’s the DLL Hell problem solved in .NET?
Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32), but also the version of the assembly.


# What are the ways to deploy an assembly?
An MSI installer, a CAB archive, and XCOPY command.


# What’s a satellite assembly?
When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies.


# What namespaces are necessary to create a localized application?
System.Globalization, System.Resources.


# What’s the difference between // comments, /* */ comments and /// comments?
Single-line, multi-line and XML documentation comments.


# How do you generate documentation from the C# file commented properly with a command-line compiler?
Compile it with a /doc switch.


# What’s the difference between and XML documentation tag?
Single line code example and multiple-line code example.


# Is XML case-sensitive?
Yes, so and are different elements.


# What debugging tools come with the .NET SDK?
CorDBG – command-line debugger, and DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR. To use CorDbg, you must compile the original C# file using the /debug switch.


# What does the This window show in the debugger?
It points to the object that’s pointed to by this reference. Object’s instance data is shown.


# What does assert() do?
In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.


# What’s the difference between the Debug class and Trace class?
Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds.


# Why are there five tracing levels in System.Diagnostics.TraceSwitcher?
The tracing dumps can be quite verbose and for some applications that are constantly running you run the risk of overloading the machine and the hard drive there. Five levels range from None to Verbose, allowing to fine-tune the tracing activities.


# Where is the output of TextWriterTraceListener redirected?
To the Console or a text file depending on the parameter passed to the constructor.


# How do you debug an ASP.NET Web application?
Attach the aspnet_wp.exe process to the DbgClr debugger.


# What are three test cases you should go through in unit testing?
Positive test cases (correct data, correct output), negative test cases (broken or missing data, proper handling), exception test cases (exceptions are thrown and caught properly).


# Can you change the value of a variable while debugging a C# application?
Yes, if you are debugging via Visual Studio.NET, just go to Immediate window.



# What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?
SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and Informix, but it’s a .NET layer on top of OLE layer, so not the fastest thing in the world. ODBC.NET is a deprecated layer provided for backward compatibility to ODBC engines.


# What’s the role of the DataReader class in ADO.NET connections?
It returns a read-only dataset from the data source when the command is executed.


# What is the wildcard character in SQL?
Let’s say you want to query database with LIKE for all employees whose name starts with La. The wildcard character is %, the proper query with LIKE would involve ‘La%’.



# What connections does Microsoft SQL Server support?
Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and passwords).


# Which one is trusted and which one is untrusted?
Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction.


# Why would you use untrusted verificaion?
Web Services might use it, as well as non-Windows applications.


# What does the parameter Initial Catalog define inside Connection String?
The database name to connect to.


# What’s the data provider name to connect to Access database?
Microsoft.Access.


# What does Dispose method do with the connection object?
Deletes it from the memory.


# What is a pre-requisite for connection pooling?
Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings.

Linux admin interview questions

4:57 AM, Posted by कैलास बधान, No Comment

   1. How do you take a single line of input from the user in a shell script?

   2. Write a script to convert all DOS style backslashes to UNIX style slashes in a list of files.

   3. Write a regular expression (or sed script) to replace all occurrences of the letter ‘f’, followed by any number of characters, followed by the letter ‘a’, followed by one or more numeric          characters, followed by the letter ‘n’, and replace what’s found with the string “UNIX”.

   4. Write a script to list all the differences between two directories.

   5. Write a program in any language you choose, to reverse a file.

   6. What are the fields of the password file?

   7. What does a plus at the beginning of a line in the password file signify?

   8. Using the man pages, find the correct ioctl to send console output to an arbitrary pty.

   9. What is an MX record?

  10. What is the prom command on a Sun that shows the SCSI devices?

  11. What is the factory default SCSI target for /dev/sd0?

  12. Where is that value controlled?

  13. What happens to a child process that dies and has no parent process to wait for it and what’s bad about this?

  14. What’s wrong with sendmail? What would you fix?

  15. What command do you run to check file system consistency?

  16. What’s wrong with running shutdown on a network?

  17. What can be wrong with setuid scripts?

  18. What value does spawn return?

  19. Write a script to send mail from three other machines on the network to root at the machine you’re on. Use a ‘here doc’, but include in the mail message the name of the machine the mail is sent from and the disk utilization statistics on each machine?

  20. Why can’t root just cd to someone’s home directory and run a program called a.out sitting there by typing “a.out”, and why is this good?

  21. What is the difference between UDP and TCP?

  22. What is DNS?

  23. What does nslookup do?

  24. How do you create a swapfile?

  25. How would you check the route table on a workstation/server?

  26. How do you find which ypmaster you are bound to?

  27. How do you fix a problem where a printer will cutoff anything over 1MB?

  28. What is the largest file system size in solaris? SunOS?

  29. What are the different RAID levels?

  30. Advantages/disadvantages of script vs compiled program.

  31. Name a replacement for PHP/Perl/MySQL/Linux/Apache and show main differences.

  32. Why have you choosen such a combination of products?

  33. Differences between two last MySQL versions. Which one would you choose and when/why?

  34. Main differences between Apache 1.x and 2.x. Why is 2.x not so popular? Which one would you choose and when/why?

  35. Which Linux distros do you have experience with?

  36. Which distro you prefer? Why?

  37. Which tool would you use to update Debian / Slackware / RedHat / Mandrake / SuSE ?

  38. You’re asked to write an Apache module. What would you do?

  39. Which tool do you prefer for Apache log reports?

  40. Your portfolio. (even a PHP guest book may work well)

  41. What does ‘route’ command do?

  42. Differences between ipchains and iptables.

  43. What’s eth0, ppp0, wlan0, ttyS0, etc.

  44. What are different directories in / for?

  45. Partitioning scheme for new webserver. Why ?

Webhosting Interview Questions

4:47 AM, Posted by कैलास बधान, No Comment

1. What is Web Hosting?
Web hosting is the act of renting space and bandwidth through a company so that you may publish your web site online.   

2. What is Virtual Hosting?
Also known as shared hosting, this form of web hosting should suffice for most everyone. Virtual hosting simple refers to the fact that your site is on one server, and that this server hosts mulitple sites. You are virtually shared - your site will not be the only one on this specific server. Very few sites would actually need the power of a dedicated server, so this option provides to be a reliable and cheap solution.

3. What is a Domain Name?
A domain name is a word along with a TLD that uniquely identifies your website.

4. What is uptime?
Uptime is the percentage of time that a web site is working. For example, if some host has an uptime average of 99.86%, this means that your site will be down for a total about 1 hour each month. We monitor uptime of customer websites of many web hosts and we display this data on the host's details page. Some hosts also offer "uptime guarantees" but this is not as valuable as it might appear

5. How do I upload my site?
he main method of uploading files to your site's account is by using FTP. When you sign up with a host, you will probably get an FTP account that lets you access files in your account (usually ftp.yoursitename.com, your main account name and password). Then you can use a built-in Windows or Internet Explorer FTP client, or some other software that supports FTP such as CuteFTP, WS_FTP, or Total Commander, to transfer files from your hard drive to your account. If you don't get an FTP account or if you prefer a Web interface, you can use your account control panel's File Manager instead.

6. What is full-service web hosting?
"Full-service" can refer to a variety of services offered in addition to providing web space, transfer, and emails for a web site. For example, it could be 24/7 toll free phone support, web design services, or web site content maintenance services.

7. What is domain parking?
Domain parking lets you cheaply reserve a domain name for future use and display an "under construction" default page on it. You can register a domain and not park it anywhere but then your site will simply be inaccessible until you get a web host. Some registrar let you park your domain for free.

8. Can I run my own software on my site?
This depends on a web host and a plan. Most plans will allow running scripts in languages such as Perl or PHP. Some plans will also allow you to compile program in C/C++ and run them. Some Unix plans will also allow you to run "cron" which enables you to automatically execute programs or scripts at a specific time and date. However to get a full control over all aspects of your server, you will need a dedicated or co-located server instead of a shared plan.

9. What is the difference between UNIX hosting and Windows hosting?
If you need to support Microsoft products such as ASP, MS Access, or VBScript, then Windows hosting would be better. Furthermore, if you are comfortable with IIS and do not have the time to understand how UNIX works, Windows hosting would again be a better choice.

10. How do I track how many hits my website gets?
There are a few things that need to be cleared in terms of terminology: * Hits - this simply refers to the number of 'elements' loaded on your site. If one page has five images in it, viewing that page once adds 6 hits (one page + five images). * Impressions - the number of times all the pages on your site are seen (also simply called pageviews). Impressions are sometimes referred to as 'hits' which can cause confusion * Uniques - the number of people that visited your site

Neomail Support by Cpanel

6:37 AM, Posted by कैलास बधान, No Comment

Question: Why is Neomail not available on my new cPanel server?
All new cPanel installations use Maildir format mailboxes by default instead of the previous format, mbox.  Neomail is no longer supported with Maildir. 

controlpanel

6:26 AM, Posted by कैलास बधान, No Comment

License File Expired-cpanel :
First, check the license on http://verify.cpanel.net/ to ensure it is still licensed.
If it is not, please contact who you purchase the license from directly.
If it says it is valid, try the following as root via SSH:
# rdate -s rdate.cpanel.net
# /usr/local/cpanel/cpkeyclt
If that does not fix the issue, please open a support request with your license provider to have a tech investigate and fix the issue.



paths

6:11 AM, Posted by कैलास बधान, No Comment

Applications can log the system activity in two ways, one being according to their autonomous logic & the other through the system's log daemon, well know as syslog..

The syslog daemon's configuration file /etc/syslog.conf contains all the necessary paths/locations as to where the logs are stored.

Usually the directory /var/log/ is used for the system logs but other applications use the applications specified directories to store their log files...
Many distributions provide tools to manage and analyze the system logs.

Logrotate is a well known log rotation tool which usually is configured in the /etc/logrotate.conf file.
It may also have additional package-defined configurations in the /etc/logrotate.d/ directory..
In order to understand what's happening on the system a brief analysis of /etc/syslog.conf is mandatory for checking the main logs positions.

Here are some basic log files, their locations & a brief description which can be found in Linux distros [mostly in cPanel ]:

General:
 cPanel/WHM Initial Installation Errors:
Location : /var/log/cpanel*install*
Description : These log files contain cPanel installation logs & should be referenced first for any issues resulting from new cPanel installations..

Cpanel/WHM Service Status Logs:
Location : /var/log/chkservd.log
Description :The service monitoring demon (chkservd) logs all service checks here. Failed service are represented with a [-] and active services are represented by [+].

Cpanel/WHM Accounting Logs:
 Location : /var/cpanel/accounting.log
Description : Contains a list of accounting functions performed through WHM, including account removal and creation..

cPanel/WHM Specific Requests and Errors:
 cPanel error logs:
Location : /usr/local/cpanel/logs/error_log
Description : cPanel logs any error it incurs here. This should be checked when you encounter errors or strange behavior in cPanel/WHM...

cPanel License Error Logs:
Location : /usr/local/cpanel/logs/license_log
Description : All license update attempts are logged here. If you run into any errors related to license when logging in, check here.

Stats Daemon Logs:
Location : /usr/local/cpanel/logs/stats_log
Description : The stats daemon (cpanellogd) logs the output from all stats generators (Awstats, Webalizer, Analog) here.

Client Information, Requested URL Logs:
Location : /usr/local/cpanel/logs/access_log
Description : General information related to access cPanel requests is logged here.



cPanel/WHM Update Logs:
Location : /var/cpanel/updatelogs/update-[TIMESTAMP].log
Description : Contains all output from each cPanel update [upcp]. It's named with the timestamp at which the upcp process was initiated..

Bandwidth Logs:
Location : /var/cpanel/bandwidth
Description : Files contain a list of the bandwidth history for each account. Each named after their respective user.

Tailwatchd [New]:
Location : /usr/local/cpanel/logs/tailwatchd_log
Description : Logs for daemon configuired under tailwatchd ie. cPBandwd, Eximstats, Antirelayd.



Apache Logs:
General Error and Auditing Logs:
Location : /usr/local/apache/logs/error_log
Description : All exceptions caught by httpd along with standard error output from CGI applications are logged here..
The first place you should look when httpd crashes or you incur errors when accessing website.



Apache SuExec Logs:
Location : /usr/local/apache/logs/suexec_log
Description : Auditing information reported by suexec each time a CGI application is executed. Useful for debugging internal server errors, with no relevant information being reported to the Apache error_log, check here for potential suexec policy violations...



Domain Access Logs:
Location : /usr/local/apache/domlogs/domain.com
Description : General access log file for each domain configured with cPanel.



Apache Access Logs:
Location : /usr/local/apache/logs/access_log
Description : Complete web server access log records all requests processed by the server.


Exim :

Message Reception and Delivery:
Location : /var/log/exim_mainlog or /var/log/exim/mainlog
Description : Receives an entry every time a message is received or delivered.



Exim ACLs/Policies based RejectLog :
Location : /var/log/exim_rejectlog
Description : An entry is written to this log every time a message is rejected based on either ACLs or other policies eg: aliases configured to :fail



Unexpected or Fatal Errors:
Location : /var/log/exim_paniclog
Description : Logs any entries exim doesn’t know how to handle. It's generally a really bad thing when log entries are being written here, and they should be properly investigated..



IMAP/POP/SpamAssassin General Logging and Errors:
Location : /var/log/maillog & /var/log/messages
Description : The IMAP, POP, and SpamAssassin services all log here. This includes all general logging information (login attempts, transactions, spam scoring), along with fatal errors.



FTP:
FTP Logins and General Errors:
Location : /var/log/messages
Description : General information and login attempts are logged here..



FTP Transactions logging:
Location : /var/log/xferlog or /var/log/messages
Description : Is a symbolic link in most cases to /usr/local/apache/domlogs/ftpxferlog, which contains a history of the transactions made by FTP users...



MySQL:
MySQL General Information and Errors :
Location : /var/lib/mysql/$(hostname).err
Description : This path could vary, but is generally located in /var/lib/mysql. Could also be located at /var/log/mysqld.log
Security:

Authentication attempts: 

Location : /var/log/secure
Description : Logs all daemons which requires PAM Authentication.



Tracking all Bad Logins and Logouts:
Location : /var/log/btmp
Description : Log of all attempted bad logins to the system. Accessed via the lastb command..



Tracking all Logins and Logouts:
Location : /var/log/wtmp
Description : The wtmp file records all logins and logouts.

Last Logins:
Location : /var/log/lastlog
Description : Database times of previous user logins. The lastlog file is a database which contains info on the last login of each user.

WebDav or WebDisk Log :
Location : /usr/local/cpanel/logs/cpdavd_error_log
Description : The cpdavd daemon is "WebDav" (better known as "WebDisk") which was introduced in cPanel 11 to allow users to mount their home directory on their personal computer, always having access to the files and content...

Cphulkd Logs:
Location : /usr/local/cpanel/logs/cphulkd_errors.log
Description : cPHulk Brute Force Protection prevents malicious forces from trying to access your server's services by guessing the login password for that service....
It blacklists IPs that it thinks are trying to run a brute force attack.

Failure Logging:
Location : /var/log/faillog
Description : Faillog formats the contents of the failure log from /var/log/faillog database. It also can be used for maintains failure counters and limits. Run faillog without arguments display only list of user faillog records who have ever had a login failure.

Startup/Boot, Kernel & Hardware error messages :
Location : /var/log/dmesg
Description : dmesg is a "window" into the kernels ring-buffer. It's a message buffer of the kernel. The content of this file is referred to by the dmesg command. It shows bootlog and the hardware errors..

Tomcat:
General Startup, Shutdown & Error Logs:
Location : /usr/local/jakarta/tomcat/logs/catalina.err and /usr/local/jakarta/tomcat/logs/catalina.out
Description : Logs for Tomcat and all tomcat based applications...
 

plesk

4:35 AM, Posted by कैलास बधान, No Comment

dfdfds

Cpanel

4:03 AM, Posted by कैलास बधान, No Comment

cPanel

cPanel is the industry leader for turning standalone servers into a fully automated point-and-click hosting platform. Tedious tasks are replaced by web interfaces and API-based calls. cPanel is designed with multiple levels of administration including admin, reseller, end user, and email-based interfaces. These multiple levels provide security, ease of use, and flexibility for everyone from the server administrator to the email account user.
cPanel is an organization that wins the loyalty of customers around the world by providing feature-rich applications backed by a team of developers, technical support engineers and quality assurance experts that provide stable builds, direct support, and fantastic customer service.
cPanel powers web hosting companies and organizations that have a need to automate and offer competitive hosting services.

cPanel Direct Licensing

cPanel can be installed on any server worldwide. If you currently operate your own servers and wish to purchase the cPanel software directly, it can be purchased online at the cPanel Store. Every direct software purchase receives priority support, installation support, and migration assistance.