Page 1 of 1

[How to]MlDonkey - client p2p

Posted: Feb 27th, '21, 08:32
by Hiji56
"
by alexey123ยป19 Sep 2012 12:36
I install it on full version.
1. Create working directory for mldonkey on your disk space. I call it /mnt/DISK/mlnet and give permissions for it 777
2. Create user mlnet member of daemon and give shell access in web-gui. Working directory for it define as new created /mnt/DISK/mlnet
Attachment dead(Hiji56)
3. Add packages for run mldonkey.
Code: Select all

Code: Select all

pkg_add -r bzip2
pkg_add -r expat
pkg_add -r fontconfig
pkg_add -r gd
pkg_add -r libiconv
In this step I download ml-donkey-core with web browser and install it over webgui tab System|Packages
For 9.0.x.x i386 version from here ""http://ftp.freebsd.org/pub/FreeBSD/rele ... -3.1.0.tbz"" target=""_blank"" rel=""noreferrer"" title=""Opens in new window"" class=""elonw"">mldonkey-core-3.1.0
For 9.1.x.x i386 --- ""http://ftp.freebsd.org/pub/FreeBSD/rele ... -3.1.2.tbz"" target=""_blank"" rel=""noreferrer"" title=""Opens in new window"" class=""elonw"">mldonkey-core-3.1.2
For 9.0.x.x amd64 - - - ""http://ftp.freebsd.org/pub/FreeBSD/rele ... -3.1.0.tbz"" target=""_blank"" rel=""noreferrer"" title=""Opens in new window"" class=""elonw"">mldonkey-core-3.1.0
For 9.1.x.x amd 64 --- ""http://ftp.freebsd.org/pub/FreeBSD/rele ... -3.1.2.tbz"" target=""_blank"" rel=""noreferrer"" title=""Opens in new window"" class=""elonw"">mldonkey-core-3.1.2
All software installed. Now need replace not working on NAS4Free parts.
Edit file /usr/local/etc/rc.d/mlnet Replace with preferable way its content on next:
Code: Select all

Code: Select all

#!/bin/sh
#
# $FreeBSD: ports/net-p2p/mldonkey/files/mlnet.in,v 1.8 2012/01/14 08:56:43 dougb Exp $
#
# Under a BSDL license. Copyright 2005. Mario S F Ferreira <liouxFreeBSD.org>
# PROVIDE: mlnet
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable mlnet:
#
# mlnet_enable=""YES""
# mlnet_user=""user""
# mlnet_logfile=""file""
# mlnet_flags(Set as needed)
. /etc/rc.subr
name=""mlnet""
rcvar=mlnet_enable
command=""/usr/local/bin/${name}""
procname=""/usr/local/bin/${name}-real""
load_rc_config ""${name}""
: ${mlnet_enable=""NO""}
: ${mlnet_user=""$(id -un)""}
pidfile=""$(eval echo ~${mlnet_user}/.mldonkey/$(basename ${procname}).pid)""
required_dirs=""$(eval echo ~${mlnet_user})""
mlnet_check_vars()
{
  if [ ""x${mlnet_user}"" = ""xroot"" ]; then
    warn ""You have to set mlnet_user to a non-root user for security reasons""
    return 1
  fi
  return 0
}
start_precmd=""mlnet_check_vars""
start_cmd=""start_cmd""
start_cmd()
{
  if [ -z ""${rc_fast}"" -a -n ""${rc_pid}"" ]; then
    echo 1>&2 ""${name} already running? (pid=${rc_pid}).""
    return 1
  fi
  check_startmsgs && echo ""Starting ${name}.""
  if [ -n ""${mlnet_logfile}"" ]; then
    mlnet_logcommand=""-log_file ${mlnet_logfile}""
  else
    mlnet_logfile=""/dev/null""
  fi
  if [ ""x${mlnet_user}"" = ""x$(id -un)"" ]; then
    eval ""${command} \
${mlnet_logcommand} \
${mlnet_flags} \
>> ${mlnet_logfile} 2>&1 &""
  else
    su -l ${mlnet_user} -c ""/bin/sh -c \
\""${command} \
${mlnet_logcommand} \
${mlnet_flags} \
>> ${mlnet_logfile} 2>&1 &\""""
  fi
}
stop_precmd=""mlnet_check_vars""
run_rc_command ""$1""
___________________________________________________________________________________________________________
Now need download FreeBSD-disk1 iso image from this location
""http://ftp.freebsd.org/pub/FreeBSD/rele ... MAGES/9.0/"" target=""_blank"" rel=""noreferrer"" title=""Opens in new window"" class=""elonw"">x86 9.0
""http://ftp.freebsd.org/pub/FreeBSD/rele ... MAGES/9.1/"" target=""_blank"" rel=""noreferrer"" title=""Opens in new window"" class=""elonw"">x86 9.1
""http://ftp.freebsd.org/pub/FreeBSD/rele ... MAGES/9.0/"" target=""_blank"" rel=""noreferrer"" title=""Opens in new window"" class=""elonw"">amd64 9.0
""http://ftp.freebsd.org/pub/FreeBSD/rele ... MAGES/9.1/"" target=""_blank"" rel=""noreferrer"" title=""Opens in new window"" class=""elonw"">x64 9.1
And grab from image folder /usr/lib/ file libmagic.so.4. This file need place into /usr/local/lib/ folder and give permission for it 444
____________________________________________________________________________________________________________________
Add to /etc/rc.conf over webgui
mlnet_enable=""YES""
mlnet_logfile=""mlnet.log""
mlnet_user=""mlnet""
Now You can run manually mldonkey
Code: Select all

Code: Select all

/usr/local/etc/rc.d/mlnet start
stop it
Code: Select all

Code: Select all

/usr/local/etc/rc.d/mlnet stop
restart it
Code: Select all

Code: Select all

/usr/local/etc/rc.d/mlnet restart
After mlnet run first time, it create his directory
/mnt/DISK/mlnet/.mldonkey/
and log file
/mnt/DISK/mlnet/mlnet.log
Now need stop it Code: Select all

Code: Select all

/usr/local/etc/rc.d/mlnet stop
and edit file /mnt/DISK/mlnet/.mldonkey/downloads.ini - Allow access for admin interface.
Find and edit for your lan
allowed_ips = [ ""127.0.0.1""; ""10.0.0.0/24"";]
Code: Select all

Code: Select all

/usr/local/etc/rc.d/mlnet start
Now you can access to mldonkey web interface over yournas-ip:4080 and configure your p2p client as you want.
Mldonkey's help and wiki work!!
"