Archive for August, 2008

How to Set Idle Timeout in Linux SSH (Redhat, CentOS)

No GoodNeed ImprovementOKGoodExcellent (2 votes, average: 5 out of 5)
Loading ... Loading ...

1, Edit sshd_config

vi /etc/ssh/sshd_config

2, Edit ClientAliveInterval and ClientAliveCountMax

ClientAliveInterval 600
ClientAliveCountMax 3

this will give you 30 minute idle time (3 x 600 seconds) and you don’t need to reconnect your application (SCP, Putty) every few minutes.

3, Restart sshd:

/etc/init.d/sshd restart

Technorati :
Del.icio.us :

Popularity: 4%

Comments

How to install ehour timesheet on Linux

No GoodNeed ImprovementOKGoodExcellent (No Ratings Yet)
Loading ... Loading ...

1, Download ehou war file (ehour-0.8.2-war.zip) from http://www.ehour.nl/download.phtml, unzip it.

2, Download and install Tomcat.

3, Download and install MySQL, download JDBC driver for MySQL, unzip and put driver jar file into $Tomcat_home/lib.

4, Put ehour-0.8.2-war to $Tomcat_home/webapps

5, Copy context.xml to context.xml.orig, and edit context.xml

<Context path="/ehour" reloadable="false" cookies="true" docBase="${catalina.home}/webapps/ehour-0.8.2">
<Resource name=”jdbc/eHourDS”
auth=”Container”
type=”javax.sql.DataSource”
maxActive=”100″
maxIdle=”30″
maxWait=”10000″
username=”ehour”
password=”changeme”
driverClassName=”com.mysql.jdbc.Driver”
url=”jdbc:mysql://localhost:3306/ehour?zeroDateTimeBehavior=convertToNull”/>
<ResourceParams name=”jdbc/eHourDS” >
<parameter>
<name>validationQuery</name>
<value>SELECT 1</value>
</parameter>
<parameter>
<name>testOnBorrow</name>
<value>true</value>
</parameter>

<parameter>
<name>zeroDateTimeBehavior</name>
<value>convertToNull</value>
</parameter>
<parameter>
<name>autoReconnect</name>
<value>true</value>
</parameter>
<parameter>
<name>timeBetweenEvictionRunsMillis</name>
<value>10000</value>
</parameter>
<parameter>
<name>testWhileIdle</name>
<value>true</value>
</parameter>
<parameter>
<name>minEvictableIdleTimeMillis</name>
<value>60000</value>
</parameter>
</ResourceParams>
</Context>

edit server.xml

<Host name="timecard.ebiocenter.com" appBase="webapps"
unpackWARs=”true” autoDeploy=”true”
xmlValidation=”false” xmlNamespaceAware=”false”>

<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html –>
<!–
<Valve className=”org.apache.catalina.authenticator.SingleSignOn” />
–>
<!– Access log processes all example.
Documentation at: /docs/config/valve.html –>
<!–
<Valve className=”org.apache.catalina.valves.AccessLogValve” directory=”logs”
prefix=”localhost_access_log.” suffix=”.txt” pattern=”common” resolveHosts=”false”/>
–>
</Host>

6, start Tomcat

Technorati :
Del.icio.us :

Popularity: 4%

Comments