⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 00000000.htm

📁 一份很好的linux入门资料
💻 HTM
📖 第 1 页 / 共 5 页
字号:
----&nbsp;<BR>Additional&nbsp;info&nbsp;for&nbsp;Mac&nbsp;OS&nbsp;X&nbsp;(Server)&nbsp;<BR>What&nbsp;follows&nbsp;are&nbsp;instruction&nbsp;specifically&nbsp;for&nbsp;users&nbsp;of&nbsp;Mac&nbsp;OS&nbsp;X&nbsp;(Server&nbsp;and&nbsp;&nbsp;<BR>Client).&nbsp;As&nbsp;the&nbsp;OS&nbsp;is&nbsp;new,&nbsp;and&nbsp;currently&nbsp;in&nbsp;a&nbsp;state&nbsp;of&nbsp;flux,&nbsp;consider&nbsp;these&nbsp;&nbsp;<BR>instrustions&nbsp;as&nbsp;a&nbsp;helpful&nbsp;guide&nbsp;which&nbsp;may&nbsp;be&nbsp;subtley&nbsp;flawed&nbsp;for&nbsp;now.&nbsp;As&nbsp;the&nbsp;&nbsp;<BR>OS&nbsp;continues&nbsp;towards&nbsp;release,&nbsp;and&nbsp;we&nbsp;become&nbsp;more&nbsp;familiar&nbsp;with&nbsp;it,&nbsp;we&nbsp;will&nbsp;u&nbsp;<BR>pdate&nbsp;this&nbsp;section&nbsp;accordingly.&nbsp;If&nbsp;you&nbsp;have&nbsp;suggestions,&nbsp;or&nbsp;find&nbsp;errors,&nbsp;ple&nbsp;<BR>ase&nbsp;feel&nbsp;free&nbsp;to&nbsp;share&nbsp;.&nbsp;<BR>There&nbsp;are&nbsp;differences&nbsp;in&nbsp;the&nbsp;installation&nbsp;of&nbsp;xinetd&nbsp;on&nbsp;Mac&nbsp;OS&nbsp;X&nbsp;Server&nbsp;1.x&nbsp;a&nbsp;<BR>nd&nbsp;Mac&nbsp;OS&nbsp;X.&nbsp;When&nbsp;these&nbsp;differences&nbsp;are&nbsp;apparent,&nbsp;it&nbsp;will&nbsp;be&nbsp;so&nbsp;noted.&nbsp;Other&nbsp;<BR>&nbsp;unix&nbsp;installs&nbsp;will&nbsp;be&nbsp;similar&nbsp;to&nbsp;MOSX(S),&nbsp;except&nbsp;the&nbsp;startup&nbsp;methods,&nbsp;and&nbsp;t&nbsp;<BR>heir&nbsp;mileage&nbsp;will&nbsp;vary.&nbsp;<BR>Everything&nbsp;that&nbsp;follows&nbsp;needs&nbsp;to&nbsp;be&nbsp;done&nbsp;as&nbsp;root&nbsp;to&nbsp;function&nbsp;as&nbsp;indicated.&nbsp;<BR>Some&nbsp;filenames&nbsp;and&nbsp;paths&nbsp;may&nbsp;need&nbsp;to&nbsp;be&nbsp;changed&nbsp;to&nbsp;protect&nbsp;the&nbsp;innocent.&nbsp;<BR>The&nbsp;compile&nbsp;and&nbsp;install&nbsp;<BR>Download&nbsp;the&nbsp;source&nbsp;to&nbsp;a&nbsp;convenient&nbsp;directory&nbsp;(ie&nbsp;/usr/local/src/).&nbsp;<BR>Decompress&nbsp;the&nbsp;archive&nbsp;and&nbsp;copy&nbsp;the&nbsp;necessary&nbsp;config&nbsp;files&nbsp;from&nbsp;/usr/libexec&nbsp;<BR>∶<I>&nbsp;</I><BR>&nbsp;tar&nbsp;xzvf&nbsp;xinetd-N.N.N.N.tar.gz&nbsp;<BR>&nbsp;cd&nbsp;xinetd-N.N.N.N/&nbsp;<BR>&nbsp;cp&nbsp;/usr/libexec/config.*&nbsp;./&nbsp;<BR>Then&nbsp;download&nbsp;the&nbsp;necessary&nbsp;patch&nbsp;from&nbsp;Macsecurity&nbsp;and&nbsp;place&nbsp;it&nbsp;in&nbsp;the&nbsp;xinet&nbsp;<BR>d-N.N.N.N&nbsp;directory.&nbsp;<BR>Then&nbsp;do&nbsp;the&nbsp;following:&nbsp;<BR>&nbsp;cd&nbsp;/path/to/xinetd-N.N.N.N&nbsp;<BR>&nbsp;tar&nbsp;zxvf&nbsp;xinetd-N.N.N.N-osx.patch.tar.gz&nbsp;<BR>&nbsp;patch&nbsp;-p&nbsp;1&nbsp;-l&nbsp;&lt;&nbsp;xinetd-N.N.N.N-osx.patch&nbsp;<BR>The&nbsp;next&nbsp;thing&nbsp;to&nbsp;do&nbsp;is&nbsp;run&nbsp;./configure&nbsp;with&nbsp;whatever&nbsp;options&nbsp;you'd&nbsp;like&nbsp;(li&nbsp;<BR>bwrap&nbsp;support,&nbsp;different&nbsp;command&nbsp;paths).&nbsp;If&nbsp;compiling&nbsp;with&nbsp;libwrap&nbsp;support,&nbsp;&nbsp;<BR>see&nbsp;the&nbsp;section&nbsp;of&nbsp;tutorial&nbsp;called&nbsp;&quot;Compiling&nbsp;with&nbsp;libwrap&nbsp;support&quot;.&nbsp;Typical&nbsp;<BR>&nbsp;for&nbsp;MOSX(S):&nbsp;<BR>&nbsp;./configure&nbsp;--sbindir=/usr/sbin&nbsp;--mandir=/usr/share/man&nbsp;<BR>Hopefully&nbsp;this&nbsp;will&nbsp;proceed&nbsp;with&nbsp;no&nbsp;errors.&nbsp;Assuming&nbsp;this&nbsp;is&nbsp;so,&nbsp;you&nbsp;need&nbsp;to&nbsp;<BR>&nbsp;make&nbsp;two&nbsp;minor&nbsp;modifications&nbsp;to&nbsp;two&nbsp;Makefiles.&nbsp;You'll&nbsp;want&nbsp;to&nbsp;do&nbsp;these&nbsp;modi&nbsp;<BR>fications&nbsp;with&nbsp;vi,&nbsp;as&nbsp;pico&nbsp;has&nbsp;a&nbsp;tendency&nbsp;to&nbsp;chop&nbsp;long&nbsp;lines&nbsp;in&nbsp;a&nbsp;way&nbsp;that&nbsp;b&nbsp;<BR>reaks&nbsp;the&nbsp;Makefiles.&nbsp;<BR>In&nbsp;/path/to/xinetd-N.N.N.N/Makefile&nbsp;find&nbsp;a&nbsp;line&nbsp;that&nbsp;starts&nbsp;out&nbsp;&quot;CFLAGS&nbsp;=&quot;&nbsp;a&nbsp;<BR>nd&nbsp;insert&nbsp;&quot;-traditional-cpp&quot;&nbsp;into&nbsp;the&nbsp;list&nbsp;of&nbsp;arguments.&nbsp;Then,&nbsp;find&nbsp;a&nbsp;sectio&nbsp;<BR>n&nbsp;that&nbsp;begins&nbsp;with&nbsp;makelibs:&nbsp;Append&nbsp;a&nbsp;line&nbsp;after&nbsp;that&nbsp;which&nbsp;contains&nbsp;;&nbsp;done.&nbsp;<BR>&nbsp;Type&nbsp;in&nbsp;$(RANLIB)&nbsp;libs/lib/*.a&nbsp;<BR>This&nbsp;section&nbsp;should&nbsp;now&nbsp;look&nbsp;as&nbsp;follows:&nbsp;<BR>makelibs:&nbsp;<BR>for&nbsp;lib&nbsp;in&nbsp;$(MANDATORY_LIBS)&nbsp;;&nbsp;do&nbsp;\&nbsp;<BR>&nbsp;(&nbsp;cd&nbsp;libs/src/$$lib&nbsp;;&nbsp;make&nbsp;install&nbsp;&quot;INSTALL=$(INSTALL_CMD)&quot;&nbsp;<BR>&nbsp;&quot;DEFS=$(LIB_DEFS)&quot;&nbsp;RANLIB=true&nbsp;&quot;CC=$(CC)&quot;&nbsp;DEBUG=-O&nbsp;)&nbsp;\&nbsp;<BR>&nbsp;;&nbsp;done&nbsp;<BR>&nbsp;$(RANLIB)&nbsp;libs/lib/*.a&nbsp;<BR>In&nbsp;/path/to/xinetd-N.N.N.N/xinetd/Makefile&nbsp;again&nbsp;find&nbsp;the&nbsp;&quot;CFLAGS&nbsp;=&quot;&nbsp;line,&nbsp;a&nbsp;<BR>nd&nbsp;add&nbsp;&quot;-traditional-cpp&quot;&nbsp;to&nbsp;the&nbsp;list&nbsp;of&nbsp;arguments.&nbsp;<BR>Follow&nbsp;this&nbsp;up&nbsp;with&nbsp;the&nbsp;following&nbsp;in&nbsp;/path/to/xinetd-N.N.N.N/:&nbsp;<BR>make&nbsp;<BR>make&nbsp;install&nbsp;<BR>xinetd&nbsp;is&nbsp;now&nbsp;installed.&nbsp;All&nbsp;that&nbsp;remains&nbsp;is&nbsp;to&nbsp;configure&nbsp;it,&nbsp;and&nbsp;that&nbsp;has&nbsp;a&nbsp;<BR>lready&nbsp;been&nbsp;discussed&nbsp;at&nbsp;length&nbsp;in&nbsp;this&nbsp;document.&nbsp;Once&nbsp;you&nbsp;think&nbsp;you&nbsp;have&nbsp;a&nbsp;&nbsp;<BR>good&nbsp;xinetd.conf&nbsp;file&nbsp;created&nbsp;and&nbsp;in&nbsp;place,&nbsp;it&nbsp;is&nbsp;suggested&nbsp;that&nbsp;you&nbsp;run&nbsp;xin&nbsp;<BR>etd&nbsp;from&nbsp;the&nbsp;command&nbsp;line&nbsp;with&nbsp;the&nbsp;'-d'&nbsp;debug&nbsp;flag.&nbsp;This&nbsp;will&nbsp;help&nbsp;you&nbsp;great&nbsp;<BR>ly&nbsp;in&nbsp;solving&nbsp;any&nbsp;problems&nbsp;that&nbsp;may&nbsp;arise.&nbsp;Also,&nbsp;remember&nbsp;to&nbsp;add&nbsp;the&nbsp;&quot;groups&nbsp;<BR>&nbsp;=&nbsp;yes&quot;&nbsp;attribute&nbsp;to&nbsp;each&nbsp;service&nbsp;definition.&nbsp;<BR>Starting&nbsp;the&nbsp;daemon&nbsp;at&nbsp;startup&nbsp;<BR>Most&nbsp;admins&nbsp;will&nbsp;want&nbsp;to&nbsp;start&nbsp;xinetd&nbsp;from&nbsp;startup.&nbsp;Here&nbsp;again,&nbsp;there&nbsp;is&nbsp;a&nbsp;d&nbsp;<BR>ifference&nbsp;between&nbsp;Mac&nbsp;OS&nbsp;X&nbsp;Server,&nbsp;and&nbsp;Mac&nbsp;OS&nbsp;X.&nbsp;<BR>In&nbsp;Mac&nbsp;OS&nbsp;X&nbsp;Server,&nbsp;there&nbsp;are&nbsp;a&nbsp;few&nbsp;ways&nbsp;to&nbsp;do&nbsp;this.&nbsp;One&nbsp;way&nbsp;is&nbsp;to&nbsp;edit&nbsp;the&nbsp;&nbsp;<BR>/etc/1700_IPServices&nbsp;file&nbsp;and&nbsp;add&nbsp;a&nbsp;line&nbsp;for&nbsp;xinetd&nbsp;(look&nbsp;at&nbsp;the&nbsp;lines&nbsp;for&nbsp;i&nbsp;<BR>netd&nbsp;for&nbsp;a&nbsp;clue&nbsp;on&nbsp;how&nbsp;to&nbsp;proceed).&nbsp;It&nbsp;is&nbsp;possible&nbsp;to&nbsp;run&nbsp;both&nbsp;inetd&nbsp;and&nbsp;xin&nbsp;<BR>etd&nbsp;at&nbsp;the&nbsp;same&nbsp;time,&nbsp;though&nbsp;both&nbsp;may&nbsp;not&nbsp;run&nbsp;the&nbsp;same&nbsp;services&nbsp;(FIFO).&nbsp;<BR>In&nbsp;Mac&nbsp;OS&nbsp;X,&nbsp;the&nbsp;way&nbsp;to&nbsp;do&nbsp;it,&nbsp;is&nbsp;to&nbsp;create&nbsp;a&nbsp;StartupItem&nbsp;for&nbsp;xinetd.&nbsp;To&nbsp;do&nbsp;&nbsp;<BR>this&nbsp;follow&nbsp;these&nbsp;directions:&nbsp;<BR>cd&nbsp;/System/Library/StartupItems&nbsp;<BR>cp&nbsp;-R&nbsp;IPServices&nbsp;SecureIPServices&nbsp;<BR>cd&nbsp;SecureIPServices&nbsp;<BR>mv&nbsp;IPServices&nbsp;SecureIPServices&nbsp;<BR>Edit&nbsp;the&nbsp;file&nbsp;SecureIPServices.&nbsp;Delete&nbsp;everything&nbsp;after&nbsp;'ConsoleMessage&nbsp;&quot;Sta&nbsp;<BR>rting&nbsp;TCP/IP&nbsp;services&quot;'.&nbsp;Modify&nbsp;the&nbsp;remaining&nbsp;text&nbsp;to&nbsp;appear&nbsp;as&nbsp;follows,&nbsp;tak&nbsp;<BR>ing&nbsp;care&nbsp;that&nbsp;the&nbsp;stated&nbsp;paths&nbsp;are&nbsp;the&nbsp;actual&nbsp;paths&nbsp;to&nbsp;the&nbsp;specified&nbsp;file(s)&nbsp;<BR>.&nbsp;<BR>##&nbsp;<BR>#&nbsp;Run&nbsp;the&nbsp;Internet&nbsp;super-server.&nbsp;<BR>##&nbsp;<BR>.&nbsp;/etc/rc.common&nbsp;<BR>ConsoleMessage&nbsp;&quot;Starting&nbsp;Secure&nbsp;TCP/IP&nbsp;services&quot;&nbsp;<BR>/usr/local/sbin/xinetd&nbsp;<BR>Edit&nbsp;StartupParameters.plist&nbsp;to&nbsp;look&nbsp;like&nbsp;the&nbsp;following:&nbsp;<BR>{&nbsp;<BR>Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&quot;Secure&nbsp;Internet&nbsp;services&quot;;&nbsp;<BR>Provides&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;(&quot;SecureSuperServer&quot;&nbsp;<BR>&nbsp;&nbsp;);&nbsp;<BR>Requires&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;(&quot;Resolver&quot;);&nbsp;<BR>Uses&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;(&quot;NetworkTime&quot;);&nbsp;<BR>OrderPreference&nbsp;=&nbsp;&quot;None&quot;;&nbsp;<BR>Messages&nbsp;=&nbsp;<BR>{&nbsp;<BR>start&nbsp;=&nbsp;&quot;Starting&nbsp;secure&nbsp;internet&nbsp;services&quot;;&nbsp;<BR>stop&nbsp;&nbsp;=&nbsp;&quot;Stopping&nbsp;secure&nbsp;internet&nbsp;services&quot;;&nbsp;<BR>};&nbsp;<BR>}&nbsp;<BR>That's&nbsp;it.&nbsp;Xinetd&nbsp;will&nbsp;now&nbsp;startup&nbsp;at&nbsp;boot&nbsp;time.&nbsp;<BR>Compiling&nbsp;with&nbsp;libwrap&nbsp;support&nbsp;<BR>If&nbsp;you're&nbsp;compiling&nbsp;with&nbsp;libwrap&nbsp;(./configure&nbsp;--with-libwrap)&nbsp;support,&nbsp;then&nbsp;&nbsp;<BR>you'll&nbsp;need&nbsp;to&nbsp;make&nbsp;sure&nbsp;the&nbsp;necessary&nbsp;libraries&nbsp;are&nbsp;installed&nbsp;in&nbsp;there&nbsp;prop&nbsp;<BR>er&nbsp;place(s).&nbsp;Look&nbsp;for&nbsp;tcpd.h&nbsp;in&nbsp;/usr/include&nbsp;or&nbsp;/usr/local/include,&nbsp;and&nbsp;libw&nbsp;<BR>rap.a&nbsp;in&nbsp;/usr/lib&nbsp;or&nbsp;/usr/local/lib;&nbsp;if&nbsp;they're&nbsp;not&nbsp;there,&nbsp;you'll&nbsp;need&nbsp;to&nbsp;ge&nbsp;<BR>t&nbsp;them&nbsp;there.&nbsp;How&nbsp;you&nbsp;do&nbsp;this&nbsp;differs&nbsp;between&nbsp;the&nbsp;two&nbsp;versions&nbsp;of&nbsp;Mac&nbsp;OS&nbsp;X.&nbsp;<BR>For&nbsp;Mac&nbsp;OS&nbsp;X&nbsp;Server,&nbsp;follow&nbsp;these&nbsp;directions&nbsp;(excerpted&nbsp;from&nbsp;Joshua&nbsp;Marker's&nbsp;<BR>&nbsp;article&nbsp;on&nbsp;installing&nbsp;SSH1&nbsp;on&nbsp;Mac&nbsp;OS&nbsp;X&nbsp;server&nbsp;on&nbsp;Stepwise):&nbsp;<BR>cd&nbsp;/System/Developer/Source/Commands/tcp_wrappers/&nbsp;<BR>make&nbsp;RC_ARCHS=ppc&nbsp;install&nbsp;<BR>mkdir&nbsp;-p&nbsp;/usr/local/lib&nbsp;<BR>mkdir&nbsp;-p&nbsp;/usr/local/include&nbsp;<BR>cp&nbsp;/tmp/tcp_wrappers/Release/usr/local/lib/libwrap.a&nbsp;\&nbsp;<BR>/usr/local/lib/libwrap.a&nbsp;<BR>ranlib&nbsp;/usr/local/lib/libwrap.a&nbsp;<BR>cp&nbsp;/System/Developer/Source/Commands/tcp_wrappers/tcp_wrappers/tcpd.h&nbsp;\&nbsp;<BR>/usr/local/include/&nbsp;<BR>For&nbsp;Mac&nbsp;OS&nbsp;X,&nbsp;these&nbsp;are&nbsp;the&nbsp;directions&nbsp;(excerpted&nbsp;from&nbsp;Joshua&nbsp;Marker's&nbsp;artic&nbsp;<BR>le&nbsp;on&nbsp;installing&nbsp;SSH1&nbsp;on&nbsp;Mac&nbsp;OS&nbsp;X&nbsp;on&nbsp;Stepwise):&nbsp;<BR>wget&nbsp;<A HREF="ftp://ftp.stepwise.com/pub/macosx/unix/tcp_wrappers-7.6-4.tar.gz">ftp://ftp.stepwise.com/pub/macosx/unix/tcp_wrappers-7.6-4.tar.gz</A>&nbsp;<BR>gnutar&nbsp;-xzf&nbsp;tcp_wrappers-7.6-4.tar.gz&nbsp;<BR>cd&nbsp;tcp_wrappers-4&nbsp;<BR>make&nbsp;RC_A

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -