﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-SmileFace-随笔分类-Linux</title><link>http://www.blogjava.net/SmileFace/category/15082.html</link><description> 与java一起走过的日子</description><language>zh-cn</language><lastBuildDate>Mon, 31 Aug 2009 07:04:14 GMT</lastBuildDate><pubDate>Mon, 31 Aug 2009 07:04:14 GMT</pubDate><ttl>60</ttl><item><title>sudoers file in linux</title><link>http://www.blogjava.net/SmileFace/archive/2009/08/28/292919.html</link><dc:creator>SmileFace</dc:creator><author>SmileFace</author><pubDate>Thu, 27 Aug 2009 20:28:00 GMT</pubDate><guid>http://www.blogjava.net/SmileFace/archive/2009/08/28/292919.html</guid><wfw:comment>http://www.blogjava.net/SmileFace/comments/292919.html</wfw:comment><comments>http://www.blogjava.net/SmileFace/archive/2009/08/28/292919.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/SmileFace/comments/commentRss/292919.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/SmileFace/services/trackbacks/292919.html</trackback:ping><description><![CDATA[I am trying to run wireshark in linux using sudo, but was told: i am not in the sudoer files. So I must edit this file to add my own user into this file. Steps as follows:<br />
<br />
1. su to root:&nbsp; su-<br />
&nbsp;2. open sudoers:&nbsp; visudo /etc/sudoers<br />
3. add my user name:&nbsp; testuser ALL=(ALL) NOPASSWD:ALL<br />
&nbsp;&nbsp;&nbsp; This lines means that the user "testuser" can execute from ALL terminals, acting as ALL (any) users, and run ALL (any) command.<br />
<br />
The detail is in paper:&nbsp; http://www.go2linux.org/sudoers-how-to<br />
<br />
<br />
<br />
<br />
<br />
<br />
<img src ="http://www.blogjava.net/SmileFace/aggbug/292919.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/SmileFace/" target="_blank">SmileFace</a> 2009-08-28 04:28 <a href="http://www.blogjava.net/SmileFace/archive/2009/08/28/292919.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>install Tomcat6 in centOS5</title><link>http://www.blogjava.net/SmileFace/archive/2009/08/20/291931.html</link><dc:creator>SmileFace</dc:creator><author>SmileFace</author><pubDate>Thu, 20 Aug 2009 05:12:00 GMT</pubDate><guid>http://www.blogjava.net/SmileFace/archive/2009/08/20/291931.html</guid><wfw:comment>http://www.blogjava.net/SmileFace/comments/291931.html</wfw:comment><comments>http://www.blogjava.net/SmileFace/archive/2009/08/20/291931.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/SmileFace/comments/commentRss/291931.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/SmileFace/services/trackbacks/291931.html</trackback:ping><description><![CDATA[I planned to install Roller in my centOS which need tomcat6. But centos5.3 has tomcat5 in it's yum. So I have to install tomcat6 using other way. I searched and found this good install guide in:<br />
&nbsp;&nbsp; &nbsp; http://cloudservers.mosso.com/index.php/CentOS_-_Tomcat_6 ( or http://de0ris.blogspot.com/2008/08/installing-tomcat-6x-on-centos-5.html )<br />
which give detail instructions. I choose some important part and paste here in case for late use.<br />
<br />
1.&nbsp; install appache ant:&nbsp; （note： download and put the tar file in /usr/share first ）<br />
<pre>   tar -xzf apache-ant-1.7.1-bin.tar.gz<br />
<br />
<br />
<br />
2. install tomcat:（note： download and put the tar file in /usr/share first ）<br />
<br />
<br />
<br />
tar -xzf apache-tomcat-6.0.18.tar.gz<br />
<br />
</pre>
3.&nbsp; create a symbolic link for Ant so other applications can easily find
it. Be sure to select the correct version when you create your link.
<pre>ln -s /usr/share/apache-ant-1.7.1/bin/ant /usr/bin<br />
<br />
</pre>
4. set JAVA_HOME:<br />
<pre>cd /usr/share/apache-tomcat-6.0.18/bin<br />
<br />
vi catalina.sh<br />
<br />
</pre>
<p> enter insert mode.  Enter the following:
</p>
<pre>JAVA_HOME=/usr/java/jdk1.6.0_14<br />
<br />
</pre>
Test:<br />
<pre>cd /usr/share/apache-tomcat-6.0.18/bin<br />
<br />
./startup.sh<br />
<br />
</pre>
5.Automating atartup:&nbsp;&nbsp; Right now Tomcat will not start up on it's own so we need to create a startup script for this.  To do this:
<pre>cd /etc/init.d<br />
<br />
vi tomcat<br />
<br />
</pre>
<p>Press <strong>i</strong> to enter insert mode and paste in the following:
</p>
<pre>#!/bin/bash<br />
<br />
# chkconfig: 234 20 80<br />
<br />
# description: Tomcat Server basic start/shutdown script<br />
<br />
# processname: tomcat<br />
<br />
JAVA_HOME=/usr/java/jdk1.6.0_14<br />
<br />
export JAVA_HOME<br />
<br />
TOMCAT_HOME=/usr/share/apache-tomcat-6.0.18/bin<br />
<br />
START_TOMCAT=/usr/share/apache-tomcat-6.0.18/bin/startup.sh<br />
<br />
STOP_TOMCAT=/usr/share/apache-tomcat-6.0.18/bin/shutdown.sh<br />
<br />
start() {<br />
<br />
echo -n "Starting tomcat: "<br />
<br />
cd $TOMCAT_HOME<br />
<br />
${START_TOMCAT}<br />
<br />
echo "done."<br />
<br />
}<br />
<br />
stop() {<br />
<br />
echo -n "Shutting down tomcat: "<br />
<br />
cd $TOMCAT_HOME<br />
<br />
${STOP_TOMCAT}<br />
<br />
echo "done."<br />
<br />
}<br />
<br />
case "$1" in<br />
<br />
start)<br />
<br />
start<br />
<br />
;;<br />
<br />
stop)<br />
<br />
stop<br />
<br />
;;<br />
<br />
restart)<br />
<br />
stop<br />
<br />
sleep 10<br />
<br />
start<br />
<br />
;;<br />
<br />
*)<br />
<br />
echo "Usage: $0 {start|stop|restart}"<br />
<br />
esac<br />
<br />
exit 0<br />
<br />
</pre>
<pre><strong>Be sure to change the following items in the above file:</strong><br />
<br />
* JAVA_HOME path<br />
<br />
* TOMCAT_HOME path<br />
<br />
* START_TOMCAT path<br />
<br />
* STOP_TOMCAT path<br />
<br />
</pre>
<p>Once you have those changes made, save the file and quit.
</p>
<p>Now we need to change the permissions on the file.
</p>
<pre>chmod 755 tomcat</pre>
<p>We need to set the script to start with other system services and set the runlevels.
</p>
<pre>chkconfig --add tomcat<br />
<br />
chkconfig --level 234 tomcat on<br />
<br />
</pre>
<p>You can verify that it is listed by typing <strong>chkconfig --list tomcat</strong>.
</p>
<pre>tomcat         	0:off	1:off	2:on	3:on	4:on	5:off	6:off</pre>
<p>Test your shutdown and startup script.
</p>
<pre>sudo /sbin/service tomcat stop<br />
<br />
sudo /sbin/service tomcat start<br />
<br />
</pre>
<p>Tomcat 6 should now be installed under CentOS.
</p>
&nbsp;&nbsp;&nbsp;&nbsp; <br />
<br />
<br />
<br />
<img src ="http://www.blogjava.net/SmileFace/aggbug/291931.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/SmileFace/" target="_blank">SmileFace</a> 2009-08-20 13:12 <a href="http://www.blogjava.net/SmileFace/archive/2009/08/20/291931.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>