Tip of the day: If you don't want to receive private messages, set user mode +D . You can also force it on all users.Or, if you only want to allow private messages from people who are identified to Services then set |
透過原始程式安裝
要將 UnrealIRCd 安裝於 Linux、FreeBSD、OpenBSD、OS X 以及其他 *NIX 系統,基本上需要取得原始程式進行編譯及安裝。除此之外,你也需要去手動設定 UnrealIRCd。本頁面將會解釋如何去完成這些動作,即使你對 UnrealIRCd 是完全的新手,根據教學步驟只需 30 分鐘以內就可以讓 IRCd 成功地運作。
NOTE: If you are upgrading an existing installation from UnrealIRCd 5.x or 6.x, then read Upgrading instead.
Prerequisites
At a minimum, UnrealIRCd needs a compiler and the OpenSSL library. Even better is if you install a few other libraries, but this is not required as UnrealIRCd will fallback to its own libraries if you miss them.
- Ubuntu 20.04/22.04/24.04:
sudo apt-get install build-essential pkg-config gdb libssl-dev libpcre2-dev libargon2-dev libsodium-dev libc-ares-dev libcurl4-openssl-dev
- Ubuntu 18.04:
sudo apt-get install build-essential pkg-config gdb libssl-dev libpcre2-dev libargon2-0-dev libsodium-dev libc-ares-dev libcurl4-openssl-dev
- Debian 11/12:
sudo apt-get install build-essential pkg-config gdb libssl-dev libpcre2-dev libargon2-0-dev libsodium-dev libc-ares-dev libcurl4-openssl-dev
- For unlisted Linux distro's which use apt-get, the minimum requirement is:
sudo apt-get install build-essential libssl-dev
- For Linux distro's that use yum: you need a compiler and the openssl-dev/openssl-devel/libssl-dev package.
- FreeBSD 13.*/14.*: Your system normally already has a compiler (clang) and the openssl development library installed, but you need to install gmake to build:
pkg install devel/gmake
, and you are good to go.
If, for some reason, you are curious what libraries UnrealIRCd uses or can use, then see Libraries used by UnrealIRCd.
Don't run as root
Be sure to build and run the IRCd as a regular user and not as root. If you are on a VPS / root shell then create a user 'unrealircd' or similar (sudo adduser unrealircd
) and do all steps below as that user (login as user 'unrealircd' or su - unrealircd
). If you need more information, see Do not run as root.
Upgrading?
If you are upgrading an existing UnrealIRCd installation, then we recommend using ./unrealircd upgrade
which will do all the work for you. See also Upgrading.
取得原始程式 (.tar.gz)
在 Shell 中進行安裝
透過 SSH 連線至 *NIX 機器。接下來所有的指令將會在 *NIX 機器上執行。
wget --no-check-certificate --trust-server-names https://www.unrealircd.org/downloads/Unreal3.4-latest.tar.gz
在 FreeBSD 上,你可以使用下面指令:
fetch https://www.unrealircd.org/downloads/Unreal3.4-latest.tar.gz
如果兩種方式都失敗,例如出現錯誤訊息 'unknown command',則代表你需要在你的機器中安裝 'wget' 套件,或透過上傳的方式安裝它 ( 參考下個部分 )。
替代解決案: 手動上傳
你可以選擇透過瀏覽器直接下載 Unreal3.4 的安裝檔,然後使用 SCP 或 SFTP 上傳至特定的機器中。
解壓縮原始程式
解壓縮 .tar.gz 並輸入 Unreal 3.4.x 資料夾:
tar xzvf Unreal3.4-alpha999.tar.gz cd Unreal3.4-alpha999
備註:如果檔案名稱為 Unreal3.4.0-lala1.tar.gz,執行解壓縮後檔案會存在於一個名為 Unreal3.4.0-lala1 的資料夾內。每一次釋出版本的檔案名稱都會不同,所以資料夾名稱也會不同,這樣可以避免你不小心在解壓縮時覆蓋已存在的檔案。
Replace the 6.1.X
with the actual version number!
NOTE: There's some logic here. If the file is called, say, unrealircd-6.1.0.tar.gz
then it will extract to the unrealircd-6.1.0/
directory. The he directory name is different for each release to make sure you don't accidentally overwrite your existing installation.
編譯
首先執行 "./Config",隨後會出現一些安裝相關的問題,若想使用預設值可直接 Enter 下一步。
./Config
接著,執行 "make" 指令來編譯 UnrealIRCd,這將會花費 1 至 2 分鐘。
make
最後重要的一步,執行 "make install":
make install
建立設定檔
- 進入 UnrealIRCd 所在路徑,預設值為 /home/yourusername/unrealircd ( 更多資訊請參考UnrealIRCd 檔案與路徑).
cd ~/unrealircd
- 複製 conf/example/example.conf 到 conf/, 並將檔案名稱改為 unrealircd.conf
syzop@vulnscan:~/unrealircd$ cp conf/examples/example.conf conf/unrealircd.conf
- 使用文字編輯器打開該檔案 ( 例如:nano conf/unrealircd.conf)
- 閱讀設定檔語法文章。閱讀該文章只花費你短短的時間就可以幫助你在接下來的步驟中避免許多問題!
- 透過修改 unrealircd.conf,逐一針對每個單元設定來符合你的需求。只需花費 10 - 20 分鐘。
- 於 ~/unrealircd 執行 ./unrealircd start 來啟動你的 UnrealIRCd。
- 發生錯誤 ? 修改 unrealircd.conf ( 一般問題請參考FAQ ),修改完請重新啟動 UnrealIRCd。
- UnrealIRCd 是否運作正常 ? 透過 IRC client 連線至伺服器,並請繼續參考下一章節。
- Change to the installed UnrealIRCd directory, this is /home/yourusername/unrealircd by default (For more information on the directory structure see UnrealIRCd files and directories).
cd ~/unrealircd
- If you are using UnrealIRCd 6.1.10-rc1 or newer on *NIX then you can skip this step. If you are using Windows or 6.1.9 or older then you need to manually copy conf/example/example.conf to your conf/ directory and rename it to unrealircd.conf
cp conf/examples/example.conf conf/unrealircd.conf
TIP: Is your native language not English? Then check the conf/examples directory. We ship with several example configuration files in different languages. If you want to use one of those, simply copy that one instead. - Open
conf/example/example.conf
with an editor (eg: nano conf/unrealircd.conf) - Read the Configuration file syntax article. It will only take a few minutes and will save you a lot of trouble in next step(s)!
- Walk through the unrealircd.conf block by block / line by line and edit the settings to suit your needs. This takes 10 - 20 minutes.
DO NOT RUSH THIS because you NEED to change some values, otherwise the server will refuse to start! - Boot UnrealIRCd by running ./unrealircd start from your ~/unrealircd directory.
- Errors while trying to start UnrealIRCd?
- Did you really go through the config file from top to bottom? You need to, because some values MUST be changed.
- Read the error on your screen and edit your unrealircd.conf to fix the error, then try starting UnrealIRCd again.
- See the FAQ for common configuration mistakes!
- Up and running? Connect with an IRC client to your server and have fun. See next section too.