Jump to content

TheBB

Moderators
  • Posts

    2428
  • Joined

  • Last visited

  • Days Won

    52

Posts posted by TheBB

  1. create a startup script, e.g.:

    cat > /opt/etc/init.d/S90zerotier <<EOF
    #!/bin/sh
    
    ENABLED=yes
    PROCS=zerotier-one
    ARGS="-d"
    PREARGS=""
    DESC=$PROCS
    PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    
    . /opt/etc/init.d/rc.func
    
    EOF

    and make it executable

    chmod +x /opt/etc/init.d/S90zerotier
    ~ # /opt/etc/init.d/S90zerotier start
     Starting zerotier-one...              done. 
    ~ # /opt/etc/init.d/S90zerotier check
     Checking zerotier-one...              alive. 
    ~ # /opt/etc/init.d/S90zerotier stop
     Checking zerotier-one...              alive. 
     Shutting down zerotier-one...              done. 
    ~ # /opt/etc/init.d/S90zerotier check
     Checking zerotier-one...              dead. 
    ~ # /opt/etc/init.d/S90zerotier start
     Starting zerotier-one...              done. 
    ~ # /opt/etc/init.d/S90zerotier restart
     Shutting down zerotier-one...              done. 
     Starting zerotier-one...              done. 
    ~ # /opt/etc/init.d/S90zerotier check
     Checking zerotier-one...              alive. 
    ~ # 

     

  2. On 2/3/2020 at 8:23 PM, Michael Khaskelberg said:

    С какого фига он продолжает писать про 7.4.1 - не понимаю. Команда ниже не помогает:

    The dependencies are broken.

    On 2/3/2020 at 8:23 PM, Michael Khaskelberg said:

    opkg install /opt/home/php*

    step by step one by one

    On 2/3/2020 at 8:23 PM, Michael Khaskelberg said:

    Чё-то как то грустно.

    "Extra" is a weak device (ну, что поделать)

    The first post was updated

  3. Attention!

    Keenetic provides no official support for third-party packages, such as Entware. If you have questions, comments, or suggestions, feel free to post them here.

    Requirements

    To start using Entware on Keenetic, you need:

    • A Keenetic router with a USB port (except Keenetic 4G) running NDMS 2.07 or higher
    • Either "File and printer sharing (SMB/CIFS protocols)", or "FTP server" component installed
    • The "Open Package support" component installed
    • A USB disk with an ext2/ext3/ext4 partition

    Important: Keenetic should be connected to the Internet.

    Installation instructions

    1. Connect your USB storage to Keenetic
    2. Share the ext2/ext3/ext4 partition via FTP or SMB/CIFS
    3. Create the "install" directory
    4. Copy the following archive to the "install" directory: EN_mipsel-installer.tar.gz ; for KN-2011 and KN-2111 - EN_mips-installer.tar.gz; for KN-2710 - EN_aarch64-installer.tar.gz
    5. Go to the Keenetic web interface: "Applications » OPKG", check "Enable", select the USB drive, and click "Apply"

    Wait for the following message in the system log:

    "... installer: [5/5] Entware installed!"

    ...
    [I] Mar 17 14:47:57 ndm: Opkg::Manager: disk is set to: 13af943c-7374-46f1-9256-f2cc76c2ff1a:
    [I] Mar 17 14:47:58 ndm: kernel: EXT4-fs (sdd1): re-mounted. Opts: (null)
    [I] Mar 17 14:47:58 ndm: Opkg::Manager: /tmp/mnt/E-3x_test mounted to /tmp/mnt/E-3x_test.
    [I] Mar 17 14:47:58 ndm: Opkg::Manager: /tmp/mnt/E-3x_test mounted to /opt/.
    [I] Mar 17 14:47:58 npkg: inflating "EN_mipsel-installer(1).tar.gz".
    [I] Mar 17 14:47:59 ndm: Opkg::Manager: /tmp/mnt/E-3x_test initialized.
    [I] Mar 17 14:47:59 ndm: Opkg::Manager: init script reset to default: /opt/etc/initrc.
    [E] Mar 17 14:47:59 ndm: Opkg::Manager: invalid initrc "/opt/etc/initrc": no such file or directory, trying /opt/etc/init.d/.
    [I] Mar 17 14:47:59 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Partition is OK.
    [I] Mar 17 14:47:59 ndm: Core::ConfigurationSaver: saving configuration...
    [I] Mar 17 11:47:59 installer: [1/5] Starting Entware deployment...
    [I] Mar 17 11:47:59 installer: [2/5] Basic packages installation...
    [I] Mar 17 14:48:01 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/Packages.gz.
    [I] Mar 17 14:48:01 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Updated list of available packages in /opt/var/opkg-lists/entware.
    [I] Mar 17 14:48:01 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/keenetic/Packages.gz.
    [I] Mar 17 14:48:01 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Updated list of available packages in /opt/var/opkg-lists/keendev.
    [I] Mar 17 14:48:01 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing opt-ndmsv2 (1.0-10a) to root...
    [I] Mar 17 14:48:01 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/keenetic/opt-ndmsv2_1.0-10a_mipsel-3.4_kn.ipk.
    [I] Mar 17 14:48:03 ndm: Core::ConfigurationSaver: configuration saved.
    [I] Mar 17 14:48:03 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing libc (2.27-8) to root...
    [I] Mar 17 14:48:03 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/libc_2.27-8_mipsel-3.4.ipk.
    [I] Mar 17 14:48:08 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing libgcc (7.3.0-8) to root...
    [I] Mar 17 14:48:08 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/libgcc_7.3.0-8_mipsel-3.4.ipk.
    [I] Mar 17 14:48:08 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing libssp (7.3.0-8) to root...
    [I] Mar 17 14:48:08 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/libssp_7.3.0-8_mipsel-3.4.ipk.
    [I] Mar 17 14:48:09 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing librt (2.27-8) to root...
    [I] Mar 17 14:48:09 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/librt_2.27-8_mipsel-3.4.ipk.
    [I] Mar 17 14:48:09 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing libpthread (2.27-8) to root...
    [I] Mar 17 14:48:09 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/libpthread_2.27-8_mipsel-3.4.ipk.
    [I] Mar 17 14:48:10 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing libstdcpp (7.3.0-8) to root...
    [I] Mar 17 14:48:10 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/libstdcpp_7.3.0-8_mipsel-3.4.ipk.
    [I] Mar 17 14:48:12 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing ldconfig (2.27-8) to root...
    [I] Mar 17 14:48:12 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/ldconfig_2.27-8_mipsel-3.4.ipk.
    [I] Mar 17 14:48:14 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing findutils (4.6.0-1) to root...
    [I] Mar 17 14:48:14 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/findutils_4.6.0-1_mipsel-3.4.ipk.
    [I] Mar 17 14:48:14 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing terminfo (6.1-1) to root...
    [I] Mar 17 14:48:14 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/terminfo_6.1-1_mipsel-3.4.ipk.
    [I] Mar 17 14:48:14 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing ndmq (1.0.2-3) to root...
    [I] Mar 17 14:48:14 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/keenetic/ndmq_1.0.2-3_mipsel-3.4_kn.ipk.
    [I] Mar 17 14:48:15 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing libndm (1.8.0-1) to root...
    [I] Mar 17 14:48:15 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/keenetic/libndm_1.8.0-1_mipsel-3.4_kn.ipk.
    [I] Mar 17 14:48:16 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing locales (2.27-8) to root...
    [I] Mar 17 14:48:16 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/locales_2.27-8_mipsel-3.4.ipk.
    [I] Mar 17 14:48:18 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing grep (2.26-1) to root...
    [I] Mar 17 14:48:18 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/grep_2.26-1_mipsel-3.4.ipk.
    [I] Mar 17 14:48:19 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing libpcre (8.41-2) to root...
    [I] Mar 17 14:48:19 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/libpcre_8.41-2_mipsel-3.4.ipk.
    [I] Mar 17 14:48:20 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing zoneinfo-asia (2018c-1) to root...
    [I] Mar 17 14:48:20 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/zoneinfo-asia_2018c-1_mipsel-3.4.ipk.
    [I] Mar 17 14:48:20 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing zoneinfo-europe (2018c-1) to root...
    [I] Mar 17 14:48:20 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/zoneinfo-europe_2018c-1_mipsel-3.4.ipk.
    [I] Mar 17 14:48:21 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing entware-release (1.0-2) to root...
    [I] Mar 17 14:48:21 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/entware-release_1.0-2_all.ipk.
    [I] Mar 17 14:48:21 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing opkg (2011-04-08-9c97d5ec-17b) to root...
    [I] Mar 17 14:48:21 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/opkg_2011-04-08-9c97d5ec-17b_mipsel-3.4.ipk.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Installing dropbear (2017.75-5) to root...
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Downloading http://bin.entware.net/mipselsf-k3.4/dropbear_2017.75-5_mipsel-3.4.ipk.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Entware uses separate locale-archive file independent from main system.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: You can download locale sources from http://pkg.entware.net/sources/i18n_glib227.tar.gz.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: You can add new locales to Entware using /opt/bin/localedef.new.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Updating /opt/etc/ld.so.cache... done.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Package ndmq (1.0.2-3) installed in root is up to date.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring libgcc.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring libc.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring libssp.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring libpthread.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring librt.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring terminfo.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring ldconfig.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring libpcre.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring grep.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring locales.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring opkg.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring zoneinfo-europe.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring zoneinfo-asia.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring libndm.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring ndmq.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring dropbear.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring libstdcpp.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring findutils.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring entware-release.
    [I] Mar 17 14:48:22 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Configuring opt-ndmsv2.
    [I] Mar 17 11:48:34 installer: Info: Packages installed...
    [I] Mar 17 11:48:34 installer: [3/5] Generating SSH keys...
    [I] Mar 17 14:48:34 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: Generating key, this may take a while...
    [I] Mar 17 14:48:36 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: .Generating key, this may take a while...
    [I] Mar 17 11:48:38 installer: [4/5] Setting timezone, script initrc and starting dropbear...
    [I] Mar 17 14:48:38 ndm: Core::Server: started Session /var/run/ndm.core.socket.
    [I] Mar 17 14:48:38 ndm: Core::Server: client disconnected.
    [I] Mar 17 11:48:38 dropbear[20781]: Running in background
    [I] Mar 17 14:48:38 ndm: Core::Server: started Session /var/run/ndm.core.socket.
    [I] Mar 17 14:48:38 ndm: Opkg::Manager: configured init script: "/opt/etc/init.d/rc.unslung".
    [I] Mar 17 14:48:38 ndm: Core::Server: client disconnected.
    [I] Mar 17 14:48:38 ndm: Core::Server: started Session /var/run/ndm.core.socket.
    [I] Mar 17 14:48:38 ndm: Core::ConfigurationSaver: saving configuration...
    [I] Mar 17 14:48:38 ndm: Core::Server: client disconnected.
    [I] Mar 17 11:48:38 installer: [5/5] Entware installed!
    [I] Mar 17 11:48:38 installer: Log on at root:keenetic@my.keenetic.net -p 222 to start new SSH session.
    [I] Mar 17 14:48:38 ndm: Opkg::Manager: /opt/etc/init.d/doinstall: .
    [I] Mar 17 14:48:42 ndm: Core::ConfigurationSaver: configuration saved.
    ...

    Further steps

    Connect to the Keenetic by SSH (login/password: root/keenetic) (if installed component "SSH server", connect to the port 222)

    Update package list

    opkg update

    For example, install midnight commander

    opkg install mc

    You can find the list of basic packages here and additional packages for Keenetic here

  4. Introduction

    Syncthing replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it's transmitted over the Internet.

    Requirements

    • RAM >= 128 MB and swap

    Installation

    • Install necessary packages:
    opkg install syncthing
    • Start syncthing:
    /opt/etc/init.d/S92syncthing start

    Using Syncthing

    On the first run  it may take  several minutes to generate certificates. Wait and open http://<ip address of device>:8384 and configure it.

    screen_238.png

    • Thanks 2
  5. Introduction

    Tor is free software and an open network that helps you defend against traffic analysis, a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security.

    Installation

    • Install necessary packages:
    opkg install polipo tor
    • Edit /opt/etc/tor/torrc (uncomment the following strings):
    SOCKSPort 9050 # Default: Bind to localhost:9050 for local connections.
    SOCKSPort 192.168.1.1:9100 # Bind to this address:port too.
    RunAsDaemon 1
    DataDirectory /opt/var/lib/tor
    • Edit /opt/etc/polipo/config  (uncomment and change the following strings):
    proxyAddress = "0.0.0.0"    # IPv4 only
    allowedClients = 127.0.0.1, 192.168.1.0/24
    socksParentProxy = "localhost:9050"
    socksProxyType = socks5
    dnsQueryIPv6 = no
    dnsUseGethostbyname = yes
    • Start tor and polipo:
    /opt/etc/init.d/S28polipo start
    /opt/etc/init.d/S35tor start

    Using Tor

    Configure your web browser. For example, Firefox:

    screen_236.png

    Visit https://check.torproject.org/ to check if you got it right.

    screen_235.png

     

     

     

  6. Adapted for Keenetic, the original manual is   here.

    Introduction

    OwnCloud provides universal access to your files via the web, computer or mobile devices — wherever you are.

    Attention

    Spoiler

    screen_2020-02-05_13-03(OC).png

    comment next lines in /opt/share/www/owncloud/index.php after unpack

    
    
    if (\version_compare(PHP_VERSION, '7.4.0alpha1') !== -1) {
    	echo 'This version of ownCloud is not compatible with PHP 7.4<br/>';
    	echo 'You are currently running PHP ' . PHP_VERSION . '.';
    	return;
    }
    

    example before & after

    
    
    ~ # diff -uraN /opt/share/www/owncloud/index.php.orig /opt/share/www/owncloud/index.php
    --- /opt/share/www/owncloud/index.php	2020-01-08 20:12:56.000000000 +0300
    +++ /opt/share/www/owncloud/index.php	2020-02-05 15:03:02.471994881 +0300
    @@ -36,11 +36,11 @@
     }
     
     // Show warning if PHP 7.4 or later is used as ownCloud is not compatible with PHP 7.4
    -if (\version_compare(PHP_VERSION, '7.4.0alpha1') !== -1) {
    -	echo 'This version of ownCloud is not compatible with PHP 7.4<br/>';
    -	echo 'You are currently running PHP ' . PHP_VERSION . '.';
    -	return;
    -}
    +//if (\version_compare(PHP_VERSION, '7.4.0alpha1') !== -1) {
    +//	echo 'This version of ownCloud is not compatible with PHP 7.4<br/>';
    +//	echo 'You are currently running PHP ' . PHP_VERSION . '.';
    +//	return;
    +//}
     
     // running oC on Windows is unsupported since 8.1, this has to happen here because
     // is seems that the autoloader on Windows fails later and just throws an exception.

     

    Requirements

    • Ability to open TCP81 port to access ownCloud from internet.

    Installation

    • Install necessary packages:
    opkg install bzip2 curl lighttpd-mod-access lighttpd-mod-fastcgi php7-cgi php7-mod-ctype \
    php7-mod-curl php7-mod-dom php7-mod-fileinfo php7-mod-gd php7-mod-iconv php7-mod-intl \
    php7-mod-json php7-mod-mbstring php7-mod-pdo-sqlite php7-mod-session php7-mod-simplexml \
    php7-mod-sqlite3 php7-mod-xml php7-mod-xmlreader php7-mod-xmlwriter php7-mod-zip
    • Download and unpack ownCloud files:
    curl https://download.owncloud.org/community/testing/owncloud-10.4.0RC1.tar.bz2 | \
    bzip2 -cd | tar -xvC /opt/share/www/
    • Create the file `/opt/etc/lighttpd/conf.d/clouds.conf` and add following strings:
    server.port = 81
    
    fastcgi.server = (
      ".php" =>
        ( "localhost" =>
          ( "socket" => "/tmp/php-fcgi.sock",
            "bin-path" => "/opt/bin/php-fcgi",
            "max-procs" => 1,
            "bin-environment" =>
              ( "PHP_FCGI_CHILDREN" => "2",
                "PHP_FCGI_MAX_REQUESTS" => "1000"
              )
            )
         )
     )
    
    $HTTP["url"] =~ "^/owncloud/data/" {
      url.access-deny = ("")
    }
    
    $HTTP["url"] =~ "^/owncloud($|/)" {
      dir-listing.activate = "disable"
    }
    • Edit /opt/etc/php.ini:
    upload_max_filesize = 100M 
    post_max_size = 100M 
    memory_limit = 32M
    • Start lighttpd:
    /opt/etc/init.d/S80lighttpd start

    Using Owncloud

    Open http://<ip address of device>:81/owncloud and create a new account. You can access your files using the Web interface, or a Desktop/Mobile app.

     

    screen_231.pngscreen_232.pngscreen_233.png

×
×
  • Create New...