Transmission在线安装的版本比较旧,源码更新到2.94,需要编译安装。下面就在debian 9.9系统下面进行安装。

一,更新软件包和编译工具

apt-get install -y ca-certificates libcurl4-openssl-dev libssl-dev pkg-config build-essential checkinstall intltool

二,下载Transmission 2.94源码

github下载地址:https://raw.githubusercontent.com/transmission/transmission-releases/master/transmission-2.94.tar.xz

libevent下载:https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz

zlib源码下载:http://www.zlib.net/zlib-1.2.11.tar.gz

三,开始编译安装,如下

1,编译安装libevent,编译安装transmission,需要用到libevent,所以这里要先安装,否则安装transmission会出错

sudo tar zxf libevent-2.1.8-stable.tar.gz
sudo cd /root/libevent-2.1.8-stable
sudo ./configure
sudo make
sudo make install

2,编译安装zlib

sudo tar zxf zlib-1.2.11.tar.gz
sudo cd /root/zlib-1.2.11
sudo ./configure
sudo make
sudo make install

3,编译安装transmission 2.94

sudo tar xvf transmission-2.94.tar.xz
sudo cd transmission-2.94
sudo ./configure

出现以下图片,就表示系统环境已配置成功,可以开始编译了

开始编译

sudo make

sudo make install

四,配置

1,配置进程守护脚本

nano /etc/systemd/system/transmission.service

内容如下

[Unit]
Description=Transmission BitTorrent Daemon
After=network.target

[Service]
User=root
LimitNOFILE=100000
ExecStart=/usr/local/bin/transmission-daemon -f --log-error -g /usr/local/share/transmission

[Install]
WantedBy=multi-user.target

2,生成配置文件

systemctl start transmission

运行上面的命令后,会在/usr/local/share/transmission生成一个settings.json的配置文件,然后运行下面命令停止

systemctl stop transmission

可以自行对settings.json文件进行修改,教程很多


3,开机启动

systemctl enable transmission


五,其它操作命令如下

systemctl start transmission  启动

systemctl stop transmission  停止

systemctl enable transmission  开机启动

systemctl status transmission  运行状态

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注