*New 11.3 series Release:
2019-10-05: XigmaNAS 11.3.0.4.6928 - released, 11.2 series are soon unsupported!

*New 12.0 series Release:
2019-10-05: XigmaNAS 12.0.0.4.6928 - released!

*New 11.2 series Release:
2019-09-23: XigmaNAS 11.2.0.4.6881 - released!

We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

[HOWTO] Install mldonkey on N4F

Only Admin's or Moderators can move thread's to this sub-forum.
Nobody should start a new thread on this sub-forum.
Anybody can reply to a thread on this sub-forum.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
User avatar
raulfg3
Site Admin
Site Admin
Posts: 4921
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

[HOWTO] Install mldonkey on N4F

#1

Post by raulfg3 » 19 Jun 2016 18:34

Instructions to install mldonkey on a full install (NOT valid for embeded install).

Documentation:
https://www.freshports.org/net-p2p/mldonkey-core/
https://www.netroby.com/view/3652
viewtopic.php?f=47&t=1264&p=4821
viewtopic.php?f=79&t=2337&p=64372
http://forums.openmediavault.org/index. ... stID=97018


and something generic for howto start / stop services: https://www.digitalocean.com/community/ ... 1-with-pkg

1 - open a shell
2 -

Code: Select all

pkg install mldonkey-core
done. you must view something like this:
pnas: ~# pkg install mldonkey-core
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100% 944 B 0.9kB/s 00:01
Fetching packagesite.txz: 100% 5 MiB 17.1kB/s 05:29
Processing entries: 100%
FreeBSD repository update completed. 25089 packages processed.
The following 19 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
mldonkey-core: 3.1.5
ocaml: 4.02.3
libX11: 1.6.3,1
xproto: 7.0.28
libXdmcp: 1.1.2
libxcb: 1.11.1
libxml2: 2.9.3
libpthread-stubs: 0.3_6
libXau: 1.0.8_3
kbproto: 1.0.7
libgd: 2.1.0_7,1
fontconfig: 2.11.1_1,1
expat: 2.1.1_1
freetype2: 2.6.3
png: 1.6.21
tiff: 4.0.6_1
jbigkit: 2.1_1
jpeg-turbo: 1.4.2
libiconv: 1.14_9

The process will require 155 MiB more space.
30 MiB to be downloaded.

Proceed with this action? [y/N]:

the complete output must be:

Code: Select all

pnas: ~# pkg install mldonkey-core
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 19 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        mldonkey-core: 3.1.5
        ocaml: 4.02.3
        libX11: 1.6.3,1
        xproto: 7.0.28
        libXdmcp: 1.1.2
        libxcb: 1.11.1
        libxml2: 2.9.3
        libpthread-stubs: 0.3_6
        libXau: 1.0.8_3
        kbproto: 1.0.7
        libgd: 2.1.0_7,1
        fontconfig: 2.11.1_1,1
        expat: 2.1.1_1
        freetype2: 2.6.3
        png: 1.6.21
        tiff: 4.0.6_1
        jbigkit: 2.1_1
        jpeg-turbo: 1.4.2
        libiconv: 1.14_9

The process will require 155 MiB more space.
30 MiB to be downloaded.

Proceed with this action? [y/N]: y
Fetching mldonkey-core-3.1.5.txz: 100%    2 MiB  95.8kB/s    00:27
Fetching ocaml-4.02.3.txz: 100%   21 MiB  74.3kB/s    04:58
Fetching libX11-1.6.3,1.txz: 100%    2 MiB  80.2kB/s    00:21
Fetching xproto-7.0.28.txz: 100%   58 KiB  59.8kB/s    00:01
Fetching libXdmcp-1.1.2.txz: 100%   14 KiB  14.1kB/s    00:01
Fetching libxcb-1.11.1.txz: 100%  970 KiB  99.4kB/s    00:10
Fetching libxml2-2.9.3.txz: 100%  789 KiB  73.5kB/s    00:11
Fetching libpthread-stubs-0.3_6.txz: 100%    3 KiB   2.9kB/s    00:01
Fetching libXau-1.0.8_3.txz: 100%   11 KiB  11.3kB/s    00:01
Fetching kbproto-1.0.7.txz: 100%  122 KiB 125.0kB/s    00:01
Fetching libgd-2.1.0_7,1.txz: 100%  179 KiB  91.8kB/s    00:02
Fetching fontconfig-2.11.1_1,1.txz: 100%  287 KiB  98.1kB/s    00:03
Fetching expat-2.1.1_1.txz: 100%   98 KiB 100.6kB/s    00:01
Fetching freetype2-2.6.3.txz: 100%  478 KiB  97.9kB/s    00:05
Fetching png-1.6.21.txz: 100%  266 KiB 136.3kB/s    00:02
Fetching tiff-4.0.6_1.txz: 100%  808 KiB 103.5kB/s    00:08
Fetching jbigkit-2.1_1.txz: 100%   66 KiB  67.3kB/s    00:01
Fetching jpeg-turbo-1.4.2.txz: 100%  270 KiB  92.1kB/s    00:03
Fetching libiconv-1.14_9.txz: 100%  592 KiB  50.5kB/s    00:12
Checking integrity... done (0 conflicting)
[1/19] Installing xproto-7.0.28...
[1/19] Extracting xproto-7.0.28: 100%
[2/19] Installing libXdmcp-1.1.2...
[2/19] Extracting libXdmcp-1.1.2: 100%
[3/19] Installing libxml2-2.9.3...
[3/19] Extracting libxml2-2.9.3: 100%
[4/19] Installing libpthread-stubs-0.3_6...
[4/19] Extracting libpthread-stubs-0.3_6: 100%
[5/19] Installing libXau-1.0.8_3...
[5/19] Extracting libXau-1.0.8_3: 100%
[6/19] Installing libxcb-1.11.1...
[6/19] Extracting libxcb-1.11.1: 100%
[7/19] Installing kbproto-1.0.7...
[7/19] Extracting kbproto-1.0.7: 100%
[8/19] Installing expat-2.1.1_1...
[8/19] Extracting expat-2.1.1_1: 100%
[9/19] Installing freetype2-2.6.3...
[9/19] Extracting freetype2-2.6.3: 100%
[10/19] Installing jbigkit-2.1_1...
[10/19] Extracting jbigkit-2.1_1: 100%
[11/19] Installing jpeg-turbo-1.4.2...
[11/19] Extracting jpeg-turbo-1.4.2: 100%
[12/19] Installing libX11-1.6.3,1...
[12/19] Extracting libX11-1.6.3,1: 100%
[13/19] Installing fontconfig-2.11.1_1,1...
[13/19] Extracting fontconfig-2.11.1_1,1: 100%
Running fc-cache to build fontconfig cache...
/usr/local/share/fonts: caching, new cache contents: 0 fonts, 1 dirs
/usr/local/share/fonts/dejavu: caching, new cache contents: 21 fonts, 0 dirs
/usr/local/lib/X11/fonts: caching, new cache contents: 0 fonts, 1 dirs
/usr/local/lib/X11/fonts/dejavu: caching, new cache contents: 21 fonts, 0 dirs
/root/.local/share/fonts: skipping, no such directory
/root/.fonts: skipping, no such directory
Re-scanning /usr/local/share/fonts: caching, new cache contents: 0 fonts, 1 dirs
Re-scanning /usr/local/lib/X11/fonts: caching, new cache contents: 0 fonts, 1 dirs
/var/db/fontconfig: cleaning cache directory
/root/.cache/fontconfig: not cleaning non-existent cache directory
/root/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded
[14/19] Installing png-1.6.21...
[14/19] Extracting png-1.6.21: 100%
[15/19] Installing tiff-4.0.6_1...
[15/19] Extracting tiff-4.0.6_1: 100%
[16/19] Installing ocaml-4.02.3...
[16/19] Extracting ocaml-4.02.3: 100%
[17/19] Installing libgd-2.1.0_7,1...
[17/19] Extracting libgd-2.1.0_7,1: 100%
[18/19] Installing mldonkey-core-3.1.5...
[18/19] Extracting mldonkey-core-3.1.5: 100%
[19/19] Installing libiconv-1.14_9...
[19/19] Extracting libiconv-1.14_9: 100%
Message from mldonkey-core-3.1.5:
ATTENTION:

- If you want to know how to use mldonkey, read "INSTALL" or
  "FAQ.html" in the port docs (/usr/local/share/doc/mldonkey)

- It is not a bad idea to install mplayer. You will be able
  to preview half-downloaded files (if you have the beginning).

- You can import the downloads you started with eDonkey
  (try "import /home/directory/path/.edonkey2000-core"
  on the console), but you can NOT go back!

- If this is the first time you install mldonkey,
  please go to the mldonkey-gui ports dir as a user and enter:

     make install-user

  this will set up your user config.

- You have to enable the different protocols on the client
  console. Go to the (mldonkey-) console, and try the commands
  'set enable_<protocol> true' (try 'voo' for reference).

+------------------------------------------------------------+
|- For upgraders: The names of the binaries have changed.    |
|  Core and GUI are called "mlnet" and "mlgui", respectively.|
+------------------------------------------------------------+
pnas: ~#

Time to add mlnet_enable=YES on rc.conf
and
mlnet_logfile=/var/log/mlnet.log
and
mlnet_user=p2p:
MLnetr .rc.conf.jpg
and do some job from shell:

Code: Select all

touch /var/log/mldonkey.log
cd /home
ls -l
mkdir /home/p2p
chown p2p:p2p /home/p2p
chmod 0770 /home/p2p
chown p2p:p2p /var/log/mldonkey.log
chmod 0770 /var/log/mldonkey.log
service mlnet start
service mlnet stop



now you need to create group & user in webGUI ( first create the group and then the user, and use same GUUID ( 1000 if is your first user and 1001 if is your second, etc...).
addgroup.jpg
useradd.jpg

Note: you need to start first time mlnet so it can create files on /home/p2p/.mldonkey

but you need to stop to edit downloads.ini ( mlnet config file)

Edit /usr/home/p2p/.mldonkey/downloads.ini <. I use N4F webGUI: Advanced|File Editor

to change allowed IP to:

Code: Select all

allowed_ips = [
  "127.0.0.1";
  "192.168.1.0/24";]
<- 192.168.1.x is my class "C" internal LAN


Now you only need to config first start of mldonkey and connect using sancho or simmilar:
http://mldonkey.sourceforge.net/Sancho
http://mldonkey.sourceforge.net/Gui
You do not have the required permissions to view the files attached to this post.
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4921
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: [HOWTO] Install mldonkey on N4F

#2

Post by raulfg3 » 21 Jun 2016 21:36

Some tricks; as you know, files are donwloaded on /usr/home/p2p/.mldonkey/incoming

and perhaps you want to save on other place to share by SMB, in my case /mnt/DATA/incoming so you only need to do a link ( my destination is on other disk)

so you can do:

Code: Select all

touch /mnt/DATA/incoming
rmdir /usr/home/p2p/.mldonkey/incoming/files
rmdir /usr/home/p2p/.mldonkey/incoming/directories
rmdir /usr/home/p2p/.mldonkey/incoming
ln -s /mnt/DATA/incoming /usr/home/p2p/.mldonkey

rmdir /usr/home/p2p/.mldonkey/temp
ln -s /mnt/DATA/Temp/temp /usr/home/p2p/.mldonkey
PD: You MUST use the trick because incoming & Dowload folders used by mldonkey by default are located on root FS ("/"), that is only 4GB in size so you really have a full "/" if do not use my trick.



Other Trick:

You can add mlnet.log to WebGUI to easy see log entries using this patch:

viewtopic.php?f=55&t=11351
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4921
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: [HOWTO] Install mldonkey on N4F

#3

Post by raulfg3 » 23 Jul 2016 18:26

Side note: I notice from my first install that mlnet (mldonkey service), do not autostart on reboot, I finally found that RRDGrphs that I have installed conflict with boot procedure ( some related to lib that use rrdGrpps).

This is true for rrdgraps 0.3.2 = viewtopic.php?f=71&t=8299
outdated, work fine on latest rrdgraphs for 10.x series.
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

User avatar
alexey123
Moderator
Moderator
Posts: 1563
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: [HOWTO] Install mldonkey on N4F

#4

Post by alexey123 » 23 Jul 2016 20:59

but you need to stop to edit downloads.ini ( mlnet config file)

Edit /usr/home/p2p/.mldonkey/downloads.ini <. I use N4F webGUI: Advanced|File Editor

to change allowed IP to:

Code: Select all

allowed_ips = [
  "127.0.0.1";
  "192.168.1.0/24";]
<- 192.168.1.x is my class "C" internal LAN
This way not work because mlnet rewrite file download.ini each start.
You must use selfbuild /usr/local/etc/rc,d/mlnet file

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 <lioux@FreeBSD.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
  if [ ! -f ${mlnet_logfile} ]; then 
   /usr/bin/touch ${mlnet_logfile}
  fi
  chown ${mlnet_user}:${mlnet_user} ${mlnet_logfile}
  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} \
   -allowed_ips `ifconfig | grep broadcast | awk '//{print $6}'` \
   >> ${mlnet_logfile} 2>&1 &"
  else
    su -l ${mlnet_user} -c "/bin/sh -c \
   \"${command} \
   ${mlnet_logcommand} \
   ${mlnet_flags} \
   -allowed_ips `ifconfig | grep broadcast | awk '//{print $6}'` \
   >> ${mlnet_logfile} 2>&1 &\""
  fi
}

stop_precmd="mlnet_check_vars"

run_rc_command "$1"
Differences from original
1. Use id -un instead whoami
2. For mlnet start addded line

Code: Select all

-allowed_ips `ifconfig | grep broadcast | awk '//{print $6}'` \
This line allow access to mldonkey from your LAN
3. Script know open logfile itself

Code: Select all

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
  if [ ! -f ${mlnet_logfile} ]; then <-----------------------HERE!
   /usr/bin/touch ${mlnet_logfile}
  fi
  chown ${mlnet_user}:${mlnet_user} ${mlnet_logfile}
  return 0
}
I not understand, why not use jail for it ?

About conflict with rrdgraphs.

If extension use algo

Code: Select all

if (!is_file (libblalal.so) || !is_link(libblalal.so)) symlink ($from, $to);  
then you can disable extension, reboot, install mlnet, then enable extension.
Home11.0.0.4 - Sayyadina (revision 4249)/ x64-embedded on SAPPHIRE Pure Mini E350 / 8G RAM / UPS Ippon Back Power Pro 600
Lab 10.2.0.2 - Prescience (revision 2545) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600
New XigmanasXigmaNAS version 11.2.0.4.6026 on x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM
TEST1 11.0.0.4 - Pilingitam (revision 4333) bpi-embedded on Allwinner a20 / 1015MiB RAM

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4921
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: [HOWTO] Install mldonkey on N4F

#5

Post by raulfg3 » 24 Jul 2016 20:15

alexey123 wrote:I not understand, why not use jail for it ?
why not.
alexey123 wrote:About conflict with rrdgraphs.

If extension use algo

Code: Select all
if (!is_file (libblalal.so) || !is_link(libblalal.so)) symlink ($from, $to);

then you can disable extension, reboot, install mlnet, then enable extension.
well after analisis of the problem I think this.

I first install rrdgraph that copy neccesary libs and symlink like you say, once rrdgraphs are working I install mldonkey and offending lib is not copied because it exist.

So I can start and stop service when N4F is started and I can access to webgui.

But in the reboot process......

I suspect that BSD first try to start services and one of the last things is to load rrdgraph init script that symlink the libs, so mldonkey do not find libfontconfig.so.1 and do not autostart, only start when rrdgraph init script finish and lib exist ( simlink exist).

This is what actually think.

What do you think?
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

Post Reply

Return to “[HowTo]”