buy tb500

Archive for the ‘Linux’ Category

find database name location in linux or find text in text file

Sunday, September 5th, 2010

use below command in ssh

grep -lir “databasename” *

thank you.

JSP test code

Sunday, September 5th, 2010

code should be .jsp   for example  test.jsp

========

<html>
<head>
<title>Hello from JSP</title>
<%!
String message = “Hello, World. From JSP test page Tomcat is running.”;
%>
</head>
<body>
<hr color=”#000000″ />
<center>
<h2><font color=”#3366cc”><%= message%></font></h2>
<h3><font color=”#0000ff”><%= new java.util.Date() %> </font></h3>
<hr color=”#000000″ />
</center>
</body>
</html>

==============

Thank you.

Install tomcat in linux server WHM

Sunday, September 5th, 2010

1- WHM>> then easyapache then follow the step and select tomcat

or

you can run below scripts in SSH

/scripts/easyapache

then follow

after done you need to go to WHM >> install servlets>> then select the domain that you want to enable it to use tomcat and press install .

after done that you can test using below code

code should be .jsp for example test.jsp in your domain

alzwea.com/test.jsp

==============

<html>
<head>
<title>Hello from JSP</title>
<%!
String message = “Hello, World. From JSP test page Tomcat is running.”;
%>
</head>
<body>
<hr color=”#000000″ />
<center>
<h2><font color=”#3366cc”><%= message%></font></h2>
<h3><font color=”#0000ff”><%= new java.util.Date() %> </font></h3>
<hr color=”#000000″ />
</center>
</body>
</html>

==============

tomcat use for jsp, to make your website support jsp code

references

http://www.eukhost.com/forums/f15/how-install-enable-tomcat-account-whm-6447/

Thank you.

User Account – Domain Does Not Show In cPanel/WHM Accounts List

Tuesday, August 31st, 2010

Solution: Run

/scripts/updateuserdomains

View emails and emails Qouta using command in linux WHM

Tuesday, August 31st, 2010
cat ~username/.cpanel/email_accounts.yaml

How to disable Suhosin in linux server WHM

Tuesday, August 31st, 2010

add the code below in php.in then restart apache

suhosin.simulation = On

How can I find out where all a user’s files are? WHM

Thursday, August 26th, 2010

If there is a discrepancy between quotas and a du -sh /home/username, chances are, some other files on the system are owned by that user’s UID. To find these, type:

  • find / -user username -ls

Run that and you will get a long list of all files owned by that user. It might be wise to redirect the output to a file to browse through later.

Depending on the files, it’s usually better to chown them to the root user rather than delete them.

ndc can’t connect, connection refused |WHM

Thursday, August 26th, 2010

ndc is the name daemon control program. If you are getting that error, run the following script as the root user:

  • /scripts/fixndc

How can I debug problems with ProFTPD? WHM

Thursday, August 26th, 2010
  1. Shut it down from the init script.
    • /etc/rc.d/init.d/proftpd stop
  2. Start it up from the shell with:
    • proftpd -nd9

How can I disable the SMART errors? WHM

Thursday, August 26th, 2010

Run the following from a command line:

  1. touch /var/cpanel/disablesmartcheck
  2. /scripts/updatenow