📄 syslog howto.htm
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" ><head><title>Syslog HOWTO - FreeRADIUS Wiki</title><meta http-equiv="Content-type" content="text/html; charset=UTF-8" /><meta name="keywords" content="Syslog HOWTO" /><link rel="shortcut icon" href="/favicon.ico" /><link rel="search" type="application/opensearchdescription+xml" href="/opensearch_desc.php" title="FreeRADIUS Wiki (English)" /><link rel='stylesheet' type='text/css' media='print' href='/skins/common/wikiprintable.css' /><script type= "text/javascript"> var skin = "cologneblue"; var stylepath = "/skins"; var wgArticlePath = "/$1"; var wgScriptPath = ""; var wgServer = "http://wiki.freeradius.org"; var wgCanonicalNamespace = ""; var wgNamespaceNumber = 0; var wgPageName = "Syslog_HOWTO"; var wgTitle = "Syslog HOWTO"; var wgArticleId = 1940; var wgIsArticle = true; var wgUserName = null; var wgUserLanguage = "en"; var wgContentLanguage = "en"; </script> <script type="text/javascript" src="/skins/common/wikibits.js"></script><style type='text/css'>/*/*/ /*<![CDATA[*/@import "/skins/common/cologneblue.css?2";@import "/index.php?title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";@import "/index.php?title=MediaWiki:Cologneblue.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";a.new, #quickbar a.new { color: #CC2200; }#quickbar { position: absolute; left: 4px; }#article { margin-left: 148px; margin-right: 4px; }/*]]>*/ /* */</style></head><body bgcolor='#FFFFFF' onload='' class='ns-0 ltr'><div id='content'><div id='topbar'><table width='100%' border='0' cellspacing='0' cellpadding='8'><tr><td class='top' align='left' valign='middle' nowrap='nowrap'><a href="/Main_Page"><span id='sitetitle'>FreeRADIUS Wiki</span></a></td><td class='top' align='right' valign='bottom' width='100%'><a href="/Main_Page" title="Main Page">Main Page</a> | <a href="/FreeRADIUS_Wiki:About" title="FreeRADIUS Wiki:About">About</a> | <a href="/Help:Contents" title="Help:Contents">Help</a> | <a href="/FreeRADIUS_Wiki:FAQ" title="FreeRADIUS Wiki:FAQ">FAQ</a> | <a href="/Special:Specialpages" title="Special:Specialpages">Special pages</a> | <a href="/index.php?title=Special:Userlogin&returnto=Syslog_HOWTO" title="Special:Userlogin">Log in</a></td></tr><tr><td valign='top'><font size='-1'><span id='sitesub'></span></font></td><td align='right'><font size='-1'><span id='langlinks'><br /><a href="/index.php?title=Syslog_HOWTO&printable=yes">Printable version</a> | <a href="/FreeRADIUS_Wiki:General_disclaimer" title="FreeRADIUS Wiki:General disclaimer">Disclaimers</a> | <a href="/FreeRADIUS_Wiki:Privacy_policy" title="FreeRADIUS Wiki:Privacy policy">Privacy policy</a></span></font></td></tr></table></div><div id='article'><h1 class="pagetitle">Syslog HOWTO</h1><p class='subtitle'>From FreeRADIUS Wiki</p><table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div><ul><li class="toclevel-1"><a href="#Syslog_HOWTO_.281.1.4.29"><span class="tocnumber">1</span> <span class="toctext">Syslog HOWTO (1.1.4)</span></a><ul><li class="toclevel-2"><a href="#Modify_.2Fetc.2Fsyslog.conf:"><span class="tocnumber">1.1</span> <span class="toctext">Modify /etc/syslog.conf:</span></a></li><li class="toclevel-2"><a href="#Restart_the_syslog_daemon:"><span class="tocnumber">1.2</span> <span class="toctext">Restart the syslog daemon:</span></a></li><li class="toclevel-2"><a href="#Modify_.2Fetc.2Fraddb.2Fradiusd.conf:"><span class="tocnumber">1.3</span> <span class="toctext">Modify /etc/raddb/radiusd.conf:</span></a></li><li class="toclevel-2"><a href="#Syslog_Priorities:"><span class="tocnumber">1.4</span> <span class="toctext">Syslog Priorities:</span></a></li></ul></li></ul></td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script><div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Syslog_HOWTO&action=edit&section=1" title="Edit section: Syslog HOWTO (1.1.4)">edit</a>]</div><a name="Syslog_HOWTO_.281.1.4.29"></a><h2>Syslog HOWTO (1.1.4)</h2><p>For the example we will be using local1 as the facility. </p><p>We will discuss the different priorities with regard to the types of messages that are produced.</p><p>Keep in mind that the file locations may be different for your distribution.</p><p>The process to get FreeRADIUS to start using syslog is fairly straight forward. The basic steps are:</p><ol><li> Modify /etc/syslog.conf </li><li> Restart the syslog daemon </li><li> Modify /etc/raddb/radiusd.conf</li><li> Start radius with the -l syslog and -g <facility></li></ol><p><br /></p><div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Syslog_HOWTO&action=edit&section=2" title="Edit section: Modify /etc/syslog.conf:">edit</a>]</div><a name="Modify_.2Fetc.2Fsyslog.conf:"></a><h3>Modify /etc/syslog.conf:</h3><pre>#Radius logging choices - Commented lines are not required. ;)# .=notice will log only authentication messages (L_AUTH)#local1.=notice /var/log/radius/radius-notice.log# .=err will log only module errors for radius#local1.=err /var/log/radius/radius-errors.log# .* will log all messages in the same log filelocal1.* /var/log/radius/radius.log</pre><div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Syslog_HOWTO&action=edit&section=3" title="Edit section: Restart the syslog daemon:">edit</a>]</div><a name="Restart_the_syslog_daemon:"></a><h3>Restart the syslog daemon:</h3><pre>On the distro we use it is - services restart sysklogdRedHat - service syslog restartUbuntu - ?</pre><p><br /></p><div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Syslog_HOWTO&action=edit&section=4" title="Edit section: Modify /etc/raddb/radiusd.conf:">edit</a>]</div><a name="Modify_.2Fetc.2Fraddb.2Fradiusd.conf:"></a><h3>Modify /etc/raddb/radiusd.conf:</h3><pre>logdir = sysloglog_destination = syslog</pre><p>Because of the logdir entry above, you must locate all references to ${logdir}, comment the line out and replace it with an absolute path. There must be better ways to do this, but it isn't immediatedly obvious.</p><p><br /></p><pre>Start radius with the -l syslog and -g <facility>:</pre><pre>Putting these options in the startup script is different for each distribution.</pre><pre>Ours is in /etc/sysconf/options/radiusdRedhat - ?Ubuntu - ?</pre><p><br /></p><div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Syslog_HOWTO&action=edit&section=5" title="Edit section: Syslog Priorities:">edit</a>]</div><a name="Syslog_Priorities:"></a><h3>Syslog Priorities:</h3><pre>There are 8 different priorities for syslog - debug,info, notice, warning, err, crit, alert, emerg.</pre><pre>debug - ?info - ?notice - authentication messageswarning - ?err - radius errorscrit - ?alert - ?emerg - ?</pre><!-- Saved in parser cache with key wikiradius-fr_:pcache:idhash:1940-0!1!0!!en!2 and timestamp 20081119024801 --><div class="printfooter"><p>Retrieved from "<a href="http://wiki.freeradius.org/Syslog_HOWTO">http://wiki.freeradius.org/Syslog_HOWTO</a>"</p><p>This page has been accessed 7,558 times. This page was last modified 01:31, 15 April 2007. </p></div></div><br clear='all' /><div id='footer'><br /><script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">_uacct = "UA-1186926-2";urchinTracker();</script><table width='98%' border='0' cellspacing='0'><tr><td width='152' rowspan='1'> </td><td class='bottom' align='center' valign='top'><strong><a href="/index.php?title=Syslog_HOWTO&action=edit" title="Syslog HOWTO">Edit this page</a></strong> |<a href="/index.php?title=Talk:Syslog_HOWTO&action=edit" class="new" title="Talk:Syslog HOWTO">Discuss this page</a> |<a href="/index.php?title=Syslog_HOWTO&action=history" title="Syslog HOWTO">Page history</a> |<a href="/index.php?title=Special:Whatlinkshere&target=Syslog_HOWTO" title="Special:Whatlinkshere">What links here</a> |<a href="/index.php?title=Special:Recentchangeslinked&target=Syslog_HOWTO" title="Special:Recentchangeslinked">Related changes</a><br /><br /><br /><a href="/Main_Page" title="Main Page">Main Page</a> | <a href="/FreeRADIUS_Wiki:About" title="FreeRADIUS Wiki:About">About FreeRADIUS Wiki</a> | <form id="search" method="get" class="inline" action="/Special:Search">Find: <input type='text' name="search" size='14' value="" /><br /><input type='submit' name="go" value="Go" /> <input type='submit' name="fulltext" value="Search" /></form><br />This page has been accessed 7,558 times. This page was last modified 01:31, 15 April 2007. </td></tr></table></div></div><div id='quickbar'><h6>Find</h6><form id="search" method="get" class="inline" action="/Special:Search"><input type='text' name="search" size='14' value="" /><br /><input type='submit' name="go" value="Go" /> <input type='submit' name="fulltext" value="Search" /></form><h6>Browse</h6><a href="/Main_Page">Main Page</a><br /><a href="/FreeRADIUS_Wiki:Community_Portal">Community portal</a><br /><a href="/Current_events">Current events</a><br /><a href="/Special:Recentchanges">Recent changes</a><br /><a href="/Special:Random">Random page</a><br /><a href="/Help:Contents">Help</a><br /><a href="/FreeRADIUS_Wiki:Site_support">Donations</a><br /><h6>Edit</h6><strong><a href="/index.php?title=Syslog_HOWTO&action=edit" title="Syslog HOWTO">Edit this page</a></strong><br /><a href="/Help:Editing" title="Help:Editing">Editing help</a><br /><h6>This page</h6><a href="/index.php?title=Talk:Syslog_HOWTO&action=edit" class="new" title="Talk:Syslog HOWTO">Discuss this page</a><br /><a href="/index.php?title=Talk:Syslog_HOWTO&action=edit&section=new" title="Talk:Syslog HOWTO">Post a comment</a><br /><a href="/index.php?title=Syslog_HOWTO&printable=yes">Printable version</a><br /><h6>Context</h6><a href="/index.php?title=Syslog_HOWTO&action=history" title="Syslog HOWTO">Page history</a><br /><a href="/index.php?title=Special:Whatlinkshere&target=Syslog_HOWTO" title="Special:Whatlinkshere">What links here</a><br /><a href="/index.php?title=Special:Recentchangeslinked&target=Syslog_HOWTO" title="Special:Recentchangeslinked">Related changes</a><br /><h6>My pages</h6><a href="/Special:Userlogin" title="Special:Userlogin">Log in / create account</a><h6>Special pages</h6><a href="/Special:Newpages" title="Special:Newpages">New pages</a><br /><a href="/Special:Imagelist" title="Special:Imagelist">File list</a><br /><a href="/Special:Statistics" title="Special:Statistics">Statistics</a><br /><a href="/FreeRADIUS_Wiki:Bug_reports" title="FreeRADIUS Wiki:Bug reports">Bug reports</a><br /><a href="/Special:Specialpages" title="Special:Specialpages">More...</a><br /></div> <script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script><!-- Served by wiki.freeradius.org in 0.302 secs. --></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -