<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>System Management on Freedom Wolf</title>
    <link>https://www.freedomwolf.cc/tags/system-management/</link>
    <description>Recent content in System Management on Freedom Wolf</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-tw</language>
    <lastBuildDate>2023-06-04 00:00 +0800</lastBuildDate><atom:link href="https://www.freedomwolf.cc/tags/system-management/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>在 RedHat 4 上安裝 Rsyslog 8</title>
      <link>https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/</link>
      <pubDate>2023-06-04 00:00 +0800</pubDate>
      
      <guid>https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/</guid>
      <description>&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-1&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/00-cover.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/00-cover.png&#34;
          
          alt=&#34;Cover&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;

&lt;p&gt;你驚訝嗎？我也很驚訝，撰文時間 2023 年我還需要用到 RHEL4？反正既然都遇到了，那就順便紀錄紀錄，不過倒底什麼時候會用到呢？搞不好寫這篇文章其實就是在浪費我時間吧。&lt;br&gt;
總之，這篇沒有什麼重點，主要就是紀錄我在 RHEL4 要執行 Rsyslog 但 Repo 早就關光光，只能從 SourceCode 自己編譯的過程。&lt;br&gt;
一層一層解開相依關係，最後完成安裝，折騰自己的紀錄。&lt;/p&gt;
&lt;h2 id=&#34;前情提要&#34;&gt;前情提要&lt;/h2&gt;
&lt;p&gt;因為工作需要（沒錯，老公司老機器老系統死不更新），所以要在 RHEL4 上安裝 Rsyslog，也就因為出現了這篇文。不過在這篇文章我採用比較比我當時處理還要再完整一點的作法去處理，畢竟我也不敢動系統東西太多，保守一點。&lt;br&gt;
後來自己弄了一個虛擬機環境出來，用 RHEL4 全新安裝，一些 devel package，應該會是符合當時的環境，於是就開始囉。&lt;br&gt;


&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/01-RHEL4_LoginScreen.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/01-RHEL4_LoginScreen.png&#34;
          
          alt=&#34;RHEL4 GUI 登入畫面&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/02-RHEL4_LoginScreen_tty.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/02-RHEL4_LoginScreen_tty.png&#34;
          
          alt=&#34;RHEL4 TTY 登入畫面&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;

&lt;em&gt;在2023年還可以看到 RHEL4 啊（冏&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;必要的套件包&#34;&gt;必要的套件包&lt;/h2&gt;
&lt;p&gt;如圖片所示，需要的套件包有以下：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.rsyslog.com/&#34;&gt;Rsyslog (本文主角)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://libestr.adiscon.com/&#34;&gt;libestr&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.rsyslog.com/tag/libfastjson/&#34;&gt;libfastjson&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/&#34;&gt;util-linux (libuuid)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://curl.se/download.html&#34;&gt;curl (libcurl)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://gnupg.org/download/index.html&#34;&gt;libgcrypt&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://gnupg.org/download/index.html&#34;&gt;libgpg-error&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;都下載完成後，我將他們解壓縮到另一個資料&lt;code&gt;unpack&lt;/code&gt;中。


&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/03-Source_packages_list.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/03-Source_packages_list.png&#34;
          
          alt=&#34;原始套件包列表&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/04-Source_unpack_packages_list.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/04-Source_unpack_packages_list.png&#34;
          
          alt=&#34;解壓縮後套件列表&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;
&lt;/p&gt;
&lt;h2 id=&#34;rsyslog-第一次見面&#34;&gt;Rsyslog 第一次見面&lt;/h2&gt;
&lt;h3 id=&#34;編譯步驟&#34;&gt;編譯步驟&lt;/h3&gt;
&lt;p&gt;OK，進到這部份，最簡單的部份結束了（&lt;strong&gt;笑&lt;/strong&gt;），接下來才是困難的地方。&lt;br&gt;
首先要先進入到&lt;code&gt;rsyslog&lt;/code&gt;的資料夾內，然後編譯步驟基本上大同小異：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;./configure&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;make&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;make install&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That&amp;rsquo;s ALL.&lt;/p&gt;
&lt;p&gt;於是乎，開始進行第一步驟吧！


&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-1&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/05-1-rsyslog-1.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/05-1-rsyslog-1.png&#34;
          
          alt=&#34;rsyslog configure&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-1&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/06-1-rsyslog-2.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/06-1-rsyslog-2.png&#34;
          
          alt=&#34;rsyslog configure failed&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;
&lt;/p&gt;
&lt;h3 id=&#34;configure-失敗&#34;&gt;configure 失敗？&lt;/h3&gt;
&lt;p&gt;沒想到第一個難題馬上就遇到了，事情總是沒想像中順利，不過，這都不是大問題，它很明確跟你說哪裡有問題對吧？我們再看一次圖片：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Package requirements (libestr &amp;gt;= 0.1.9) were not met:&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;No package &#39;libestr&#39; found&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;聰明的各位應該知道問題在哪吧？沒錯，把&lt;code&gt;libestr&lt;/code&gt;安裝進去就可以囉。不過事情總不是想像中那麼順利，是吧？&lt;br&gt;
因為 RHEL4 是一個上古版本，你在網路上都沒有辦法找到還有在維護的 repo，所以你只剩下手動編譯一途，讓我們繼續吧！&lt;/p&gt;
&lt;h2 id=&#34;解決相依問題&#34;&gt;解決相依問題&lt;/h2&gt;
&lt;p&gt;沒有特別的步驟，就參照上述&lt;a href=&#34;#%E7%B7%A8%E8%AD%AF%E6%AD%A5%E9%A9%9F&#34;&gt;編譯步驟&lt;/a&gt;對以下每一個進行編譯安裝。&lt;/p&gt;
&lt;h3 id=&#34;libestr&#34;&gt;libestr&lt;/h3&gt;
&lt;p&gt;一樣進入到&lt;code&gt;libestr&lt;/code&gt;資料夾中編譯安裝它。


&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/07-libestr-1.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/07-libestr-1.png&#34;
          
          alt=&#34;libestr configure&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/08-libestr-2.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/08-libestr-2.png&#34;
          
          alt=&#34;libestr configured&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-1&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/09-libestr-3.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/09-libestr-3.png&#34;
          
          alt=&#34;libestr make &#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-1&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/10-libestr-4.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/10-libestr-4.png&#34;
          
          alt=&#34;libestr make install&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;

繼續回到&lt;code&gt;rsyslog&lt;/code&gt;去 configure 它：

 
 &lt;div class=&#34;pure-g&#34;&gt;
 
   
   
   
   
   &lt;div class=&#34;pure-u-1-1&#34;&gt;
     &lt;div style=&#34;padding: 0 .2em&#34;&gt;
       
     
     
     
       &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/11-2-rsyslog.png&#34;&gt; 
         &lt;img 
     
           class=&#34;pure-img-responsive&#34;
           
           src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/11-2-rsyslog.png&#34;
           
           alt=&#34;rsyslog configure failed&#34;
           &gt;
         &lt;/a&gt;
     &lt;/div&gt;
   &lt;/div&gt;
   
 
 &lt;/div&gt;

OK，這次換成了 &lt;code&gt;libfastjson&lt;/code&gt;，那一樣繼續下去囉！&lt;/p&gt;
&lt;h3 id=&#34;libfastjson&#34;&gt;libfastjson&lt;/h3&gt;
&lt;p&gt;進入到&lt;code&gt;libfastjson&lt;/code&gt;資料夾中編譯安裝它。


&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/12-libfastjson-1.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/12-libfastjson-1.png&#34;
          
          alt=&#34;libfastjson configured&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/13-libfastjson-2.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/13-libfastjson-2.png&#34;
          
          alt=&#34;libfastjson make &#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-1&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/14-libfastjson-3.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/14-libfastjson-3.png&#34;
          
          alt=&#34;libfastjson make install&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;

繼續回到&lt;code&gt;rsyslog&lt;/code&gt;去 configure 它：

 
 &lt;div class=&#34;pure-g&#34;&gt;
 
   
   
   
   
   &lt;div class=&#34;pure-u-1-1&#34;&gt;
     &lt;div style=&#34;padding: 0 .2em&#34;&gt;
       
     
     
     
       &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/15-3-rsyslog.png&#34;&gt; 
         &lt;img 
     
           class=&#34;pure-img-responsive&#34;
           
           src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/15-3-rsyslog.png&#34;
           
           alt=&#34;rsyslog configure failed&#34;
           &gt;
         &lt;/a&gt;
     &lt;/div&gt;
   &lt;/div&gt;
   
 
 &lt;/div&gt;

這次是 &lt;code&gt;uuid&lt;/code&gt;，有在往前推進度呢！持續下去！&lt;/p&gt;
&lt;h3 id=&#34;libuuid&#34;&gt;libuuid&lt;/h3&gt;
&lt;p&gt;因為&lt;code&gt;libuuid&lt;/code&gt;是&lt;code&gt;util-linux&lt;/code&gt;中的一部分，所以這是進去的資料夾不一樣。&lt;br&gt;
進入到&lt;code&gt;util-linux&lt;/code&gt;資料夾中編譯安裝它。&lt;/p&gt;
&lt;p&gt;不過因為&lt;code&gt;util-linux&lt;/code&gt;裡面有很多東西，我只要&lt;code&gt;libuud&lt;/code&gt;，所以 configure 參數要改一下： &lt;br&gt;
&lt;code&gt;./configure --disable-all-programs --enable-libuuid&lt;/code&gt;


&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/16-util_linux-1.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/16-util_linux-1.png&#34;
          
          alt=&#34;uuid configured&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/17-util_linux-2.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/17-util_linux-2.png&#34;
          
          alt=&#34;uuid make install&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;

繼續回到&lt;code&gt;rsyslog&lt;/code&gt;去 configure 它：

 
 &lt;div class=&#34;pure-g&#34;&gt;
 
   
   
   
   
   &lt;div class=&#34;pure-u-1-1&#34;&gt;
     &lt;div style=&#34;padding: 0 .2em&#34;&gt;
       
     
     
     
       &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/18-4-rsyslog.png&#34;&gt; 
         &lt;img 
     
           class=&#34;pure-img-responsive&#34;
           
           src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/18-4-rsyslog.png&#34;
           
           alt=&#34;rsyslog configure failed&#34;
           &gt;
         &lt;/a&gt;
     &lt;/div&gt;
   &lt;/div&gt;
   
 
 &lt;/div&gt;

訊息好像不一樣？不過沒關係，還是可以看出端倪，去找&lt;code&gt;libgcrypt&lt;/code&gt;玩吧！&lt;/p&gt;
&lt;h3 id=&#34;libgcrypt&#34;&gt;libgcrypt&lt;/h3&gt;
&lt;p&gt;進入到&lt;code&gt;libgcrypt&lt;/code&gt;資料夾中編譯安裝它。


&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-1&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/19-1-libgcrypt.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/19-1-libgcrypt.png&#34;
          
          alt=&#34;libgcrypt configure failed&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;

慘了，編譯不起來，同時缺少這麼多東西，不過不用緊張，&lt;code&gt;make&lt;/code&gt;只有跟你說他需要&lt;code&gt;libgpg-error&lt;/code&gt;而已，先是試看吧！&lt;/p&gt;
&lt;h3 id=&#34;案外案-libgpg-error&#34;&gt;案外案 libgpg-error&lt;/h3&gt;
&lt;p&gt;進入到&lt;code&gt;libgpg-error&lt;/code&gt;資料夾中編譯安裝它。


&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/20-libgpg-error-1.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/20-libgpg-error-1.png&#34;
          
          alt=&#34;libgpg-error configure&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/21-libgpg-error-2.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/21-libgpg-error-2.png&#34;
          
          alt=&#34;libgpg-error make&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-1&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/22-libgpg-error-3.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/22-libgpg-error-3.png&#34;
          
          alt=&#34;libgpg-error make instll&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;

看起來很順利，繼續回到&lt;a href=&#34;#libgcrypt&#34;&gt;&lt;code&gt;libgcrypt&lt;/code&gt;&lt;/a&gt;吧。&lt;br&gt;


&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/23-2-libgcrypt.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/23-2-libgcrypt.png&#34;
          
          alt=&#34;libgcrypt configure&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/24-3-libgcrypt.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/24-3-libgcrypt.png&#34;
          
          alt=&#34;libgcrypt make instll&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;

OK 收工，大家可以下班了（誤）。&lt;br&gt;
還記得剛剛卡在缺少&lt;a href=&#34;#libuuid&#34;&gt;&lt;code&gt;libgcrypt&lt;/code&gt;&lt;/a&gt;的話，那繼續編譯 rsyslog 吧。&lt;/p&gt;
&lt;p&gt;

&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-1&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/25-5-rsyslog.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/25-5-rsyslog.png&#34;
          
          alt=&#34;rsyslog configure failed&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;

是是是，&lt;code&gt;libcurl&lt;/code&gt;是吧，我知道了知道了。&lt;/p&gt;
&lt;h3 id=&#34;libcurl&#34;&gt;libcurl&lt;/h3&gt;
&lt;p&gt;依照慣例去找&lt;code&gt;curl&lt;/code&gt;然後完成你知道該做的事情。&lt;br&gt;
不過這裡要注意一下，因為&lt;code&gt;CURL&lt;/code&gt;跟 TLS 連線有關，所以你要手動跟他說你要找誰的 SSL 套件參照，這裡用最方便系統有的&lt;code&gt;openssl&lt;/code&gt;處理，所以 configure 指令會變成： &lt;br&gt;
&lt;code&gt;./configure --with-openssl&lt;/code&gt;


&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/26-libcurl-1.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/26-libcurl-1.png&#34;
          
          alt=&#34;libcurl configure&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/27-libcurl-2.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/27-libcurl-2.png&#34;
          
          alt=&#34;libcurl make &#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-1&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/28-libcurl-3.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/28-libcurl-3.png&#34;
          
          alt=&#34;libcurl make instll&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;回到編譯&lt;code&gt;rsyslog&lt;/code&gt;編譯，如果你直接下&lt;code&gt;./confiugre&lt;/code&gt;的話應該還是會出現錯誤：&lt;br&gt;


&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-1&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/25-5-rsyslog.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/25-5-rsyslog.png&#34;
          
          alt=&#34;rsyslog configure failed&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;

我不是裝了CURL嗎，怎麼跟我說沒有？那是因為一般來說，lib 有優先順序，所以他在系統預設的&lt;code&gt;/lib&lt;/code&gt;中有找到，就不會去找我們自己編譯的&lt;code&gt;/usr/local/lib&lt;/code&gt;，也就是這樣。&lt;br&gt;
因此我們要手動跟他說「誒！CURL在這裡，去這裡找！」&lt;/p&gt;
&lt;p&gt;把&lt;code&gt;./configure&lt;/code&gt;參數前面增加變數，變成：&lt;br&gt;
&lt;code&gt;CURL_LIBS=/usr/local/lib/ CURL_CFLAGS=&amp;quot;-I/usr/local/lib/&amp;quot;  ./configure&lt;/code&gt;&lt;br&gt;
這樣就會成功了。&lt;/p&gt;


&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/29-6-rsyslog.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/29-6-rsyslog.png&#34;
          
          alt=&#34;rsyslog configure&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-2&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/30-7-rsyslog.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/30-7-rsyslog.png&#34;
          
          alt=&#34;rsyslog make &#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

  
  
  
  
  &lt;div class=&#34;pure-u-1-1&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/31-8-rsyslog.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/31-8-rsyslog.png&#34;
          
          alt=&#34;rsyslog make instll&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;

&lt;h2 id=&#34;rsyslog-終局&#34;&gt;Rsyslog 終局&lt;/h2&gt;
&lt;p&gt;

&lt;div class=&#34;pure-g&#34;&gt;

  
  
  
  
  &lt;div class=&#34;pure-u-1-1&#34;&gt;
    &lt;div style=&#34;padding: 0 .2em&#34;&gt;
      
    
    
    
      &lt;a target=&#34;_blank&#34; href=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/32-9-rsyslog.png&#34;&gt; 
        &lt;img 
    
          class=&#34;pure-img-responsive&#34;
          
          src=&#34;https://www.freedomwolf.cc/2023/06/rhel4-rsyslog-compile/images/32-9-rsyslog.png&#34;
          
          alt=&#34;rsyslog version&#34;
          &gt;
        &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  

&lt;/div&gt;

真高興看到他可以噴版本給我，堂堂正正&lt;code&gt;Rsyslog 8.2304.0&lt;/code&gt;在 RHEL4 上的 i686 架構。&lt;br&gt;
辛苦各位了。（鞠躬）&lt;/p&gt;
&lt;h2 id=&#34;錯誤訊息&#34;&gt;錯誤訊息？&lt;/h2&gt;
&lt;p&gt;上途中第一行還是有錯誤，那個沒問題嗎？&lt;br&gt;
恩&amp;hellip;那是因為在&lt;code&gt;/lib/tls/&lt;/code&gt;中放著 RHEL4 自己的 lib，優先順序似乎高於所有，暫時我也沒有找到解決方法，不過手動&lt;code&gt;ln&lt;/code&gt;過去的話就會正常，會不會影響到整個系統我就不確定了（逃）。&lt;/p&gt;
&lt;h2 id=&#34;結語&#34;&gt;結語&lt;/h2&gt;
&lt;p&gt;其實我這篇超級亂寫，很多東西略過，像是看到 Rsyslog 裡面的很多功能支援，如果要啟用應該要編很多東西，所以最後我就只是給一個很基本可以用的 Rsyslog 出來，反正就交差了事（攤手）。&lt;br&gt;
剩下有興趣就請各位自己弄啦，大致上都大同小異就是了。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;下台一鞠躬。&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>