大硬盘服务器挂pt

安装应用(快速)

# 从epel库中安装
yum install epel-release
yum install transmission-daemon
# yum transmission-cli transmission-common 

# 移除应用
# yum -y erase transmission

安装应用(编译)

yum install gcc gcc-c++ m4 make automake libtool gettext openssl-devel
yum install pkgconfig intltool libcurl libcurl-devel libevent-devel svn cmake
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

# gun++17
yum install centos-release-scl scl-utils
yum install devtoolset-9-gcc devtoolset-9-gcc-c++
source /opt/rh/devtoolset-8/enable
gcc -v
g++ /home/application/conf/trans.conf0/getaddrinfotest.c -std=gnu++17

yum install devtoolset-8-toolchain 
source /opt/rh/devtoolset-8/enable
make

sed -i 's#/usr/bin/c++#c++#' libtransmission/CMakeFiles/*/link.txt
sed -i 's#/usr/bin/c++#c++#' **/link.txt


svn co svn://svn.transmissionbt.com/Transmission/trunk Transmission
cd Transmission
./autogen.sh && make -s
su # if necessary for the next line
make && make install

优化系统配置(可选)

echo "net.core.rmem_max=4194304" >> /etc/sysctl.conf
echo "net.core.wmem_max=1048576" >> /etc/sysctl.conf
sysctl -p

补充:纯IPv6环境使用

3.x以上版本直接运行即可
# 添加一个假的IPv4地址
ip addr add 123.123.123.123 dev eth0

export TR_CURL_SSL_NO_VERIFY=1

# transmission-daemon --config-dir=/home/application/conf/trans.conf  -f --log-debug --paused
# chown admin:admin /home/application/conf/trans.conf/settings.json
transmission-daemon --config-dir=/home/application/conf/trans.conf
transmission-cli --config-dir=/home/application/conf/trans.conf123
/home/application/conf/trans.conf/stats.benc

# 删除那个假的IPv4地址
ip addr del 123.123.123.123/32 dev eth0

补充:一个没有配置好ipv4出现的问题

启动程序时日志显示:

getaddrinfo: address family for nodename not supported
RPC Server: Unable to bind to 0.0.0.0:8002, retrying in 5 seconds

添加种子链接时日志显示:

gotMetadataFromURL: http response 0

这种情况监察配置文件中bind-address-ipv4是否配置正确

# 默认值:
"bind-address-ipv4": "0.0.0.0",