AceProxy/Ubuntu-14.04.4 Setup

Установка AceProxy: HTTP прокси для Ace Stream на базе Ubuntu 14.04.4-Server-amd64 LTS).

Были использованы следующие Источники:

Устанавливаем ubuntu-14.04.4-server, при этом в процессе установки можно выбрать btrfs как файловую систему, cоздаём пользователя «tv» и устанавливаем openssh-server для последующего управления через ssh-client допустим putty:

login as: tv
tv@192.168.178.34's password:
Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 4.2.0-27-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Sun Jul 17 13:05:11 CEST 2016

  System load:    0.88      Processes:           208
  Usage of /home: unknown   Users logged in:     0
  Memory usage:   6%        IP address for eth0: 192.168.178.34
  Swap usage:     0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

72 packages can be updated.
48 updates are security updates.

Last login: Sun Jul 17 13:05:11 2016
tv@aceserver:~$ sudo -i
[sudo] password for tv:
root@aceserver:~# df -T
Dateisystem    Typ      1K-Blöcke Benutzt Verfügbar Verw% Eingehängt auf
udev           devtmpfs   1004332       4   1004328    1% /dev
tmpfs          tmpfs       203128     892    202236    1% /run
/dev/dm-0      btrfs     39591936 1232008  36419832    4% /
none           tmpfs            4       0         4    0% /sys/fs/cgroup
none           tmpfs         5120       0      5120    0% /run/lock
none           tmpfs      1015620       0   1015620    0% /run/shm
none           tmpfs       102400       0    102400    0% /run/user
/dev/dm-0      btrfs     39591936 1232008  36419832    4% /home
/dev/sda1      ext4        236876   39400    180939   18% /boot

*если openssh-server не установился сразу или зыбыли то сделайте потом вручную

apt install openssh-server
  1.  Устанавливаем acestream-engine, Python 2, gevent, psutil и greenlet а также для работы новой версии движка должен быть установлен пакет python-setuptools:

    root@aceserver:~# echo 'deb http://repo.acestream.org/ubuntu/ trusty main' > /etc/apt/sources.list.d/acestream.list
    root@aceserver:~# cd /tmp
    root@aceserver:/tmp# curl -O http://repo.acestream.org/keys/acestream.public.key
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  1756  100  1756    0     0  12455      0 --:--:-- --:--:-- --:--:-- 12542
    root@aceserver:/tmp# apt-key add acestream.public.key
    OK
    root@aceserver:/tmp# apt-get update -y
    OK   http://security.ubuntu.com trusty-security InRelease
    ...
    Es wurden 6.452 B in 4 s geholt (1.316 B/s).
    Paketlisten werden gelesen... Fertig
    root@aceserver:/tmp#
    root@aceserver:/tmp# apt-get install -y acestream-engine vlc-nox python-gevent unzip ca-certificates supervisor
    root@aceserver:/tmp# apt-get install -y python-setuptools python-pip python-dev build-essential wget mc nano
    root@aceserver:/tmp# pip install greenlet gevent psutil
    Requirement already satisfied (use --upgrade to upgrade): greenlet in /usr/lib/p 
    Requirement already satisfied (use --upgrade to upgrade): gevent in /usr/lib/pyt 
    Downloading/unpacking psutil
     Downloading psutil-4.3.0.tar.gz (316kB): 316kB downloaded
    ...
    Successfully installed psutil
    Cleaning up...
    root@aceserver:/tmp# cd ..
    root@aceserver:/# apt-get clean
    root@aceserver:/# rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
    /usr/share/man /usr/share/groff /usr/share/info \
    /usr/share/lintian /usr/share/linda /var/cache/man
    root@aceserver:/#
    

     

  2. Cкачиваем Ace Stream HTTP Proxy

    root@aceserver:/# wget https://github.com/AndreyPavlenko/aceproxy/archive/master.zip
    --2016-07-17 15:28:03--  https://github.com/AndreyPavlenko/aceproxy/archive/master.zip
    Auflösen des Hostnamen »github.com (github.com)«... 192.30.253.113
    Verbindungsaufbau zu github.com (github.com)|192.30.253.113|:443... verbunden.
    HTTP-Anforderung gesendet, warte auf Antwort... 302 Found
    Platz: https://codeload.github.com/AndreyPavlenko/aceproxy/zip/master [folge]
    --2016-07-17 15:28:03--  https://codeload.github.com/AndreyPavlenko/aceproxy/zip/master
    Auflösen des Hostnamen »codeload.github.com (codeload.github.com)«... 192.30.253.121
    Verbindungsaufbau zu codeload.github.com (codeload.github.com)|192.30.253.121|:443... verbunden.
    HTTP-Anforderung gesendet, warte auf Antwort... 200 OK
    Länge: nicht spezifiziert [application/zip]
    In »»master.zip«« speichern.
    
        [ <=>                                   ] 73.756       454KB/s   in 0,2s
    
    2016-07-17 15:28:04 (454 KB/s) - »master.zip« gespeichert [73756]

  3. Распаковываем и кидаем в /home/tv/aceproxy-master acesu1 acesu2

  4. Запускаем

    root@aceserver:/# /home/tv/aceproxy-master/acehttp.py
    17.07 15:48:39 DEBUG Dummy-1 acehttp.py:603 INIT| Plugin loaded: Allfon
    17.07 15:48:39 DEBUG Dummy-1 acehttp.py:603 INIT| Plugin loaded: P2pproxy
    17.07 15:48:39 DEBUG Dummy-1 acehttp.py:603 INIT| Plugin loaded: Stat
    17.07 15:48:39 DEBUG Dummy-1 acehttp.py:603 INIT| Plugin loaded: Torrenttelik
    17.07 15:48:39 DEBUG Dummy-1 acehttp.py:603 INIT| Plugin loaded: Torrenttv
    17.07 15:48:39 INFO Dummy-1 acehttp.py:862 HTTP| Using gevent 1.0
    17.07 15:48:39 INFO Dummy-1 acehttp.py:863 HTTP| Using psutil 4.3.0
    17.07 15:48:39 INFO Dummy-1 acehttp.py:866 HTTP| Server started.

     

  5. Обновляем AceStream движок(скачиваем и скопировать соответствующие файлы в корневые папки /usr/bin/ и /usr/share/acestream)

    root@aceserver:/# wget http://dl.acestream.org/ubuntu/14/acestream_3.0.5.1_ubuntu_14.04_x86_64.tar.gz
    --2016-07-17 16:01:23--  http://dl.acestream.org/ubuntu/14/acestream_3.0.5.1_ubuntu_14.04_x86_64.tar.gz
    Auflösen des Hostnamen »dl.acestream.org (dl.acestream.org)«... 85.10.246.140, 148.251.41.164, 77.120.101.25, ...
    Verbindungsaufbau zu dl.acestream.org (dl.acestream.org)|85.10.246.140|:80... verbunden.
    HTTP-Anforderung gesendet, warte auf Antwort... 200 OK
    Länge: 5017173 (4,8M) [application/octet-stream]
    In »»acestream_3.0.5.1_ubuntu_14.04_x86_64.tar.gz«« speichern.
    
    100%[======================================>] 5.017.173   3,73MB/s   in 1,3s
    
    2016-07-17 16:01:24 (3,73 MB/s) - »»acestream_3.0.5.1_ubuntu_14.04_x86_64.tar.gz«« gespeichert [5017173/5017173]

     

  6. Проверяем

    root@aceserver:/# acestreamengine --version
    version: 3.0.5.1 revision: 1415

     

  7. Настраиваем запуск в фоновом режиме с помощью supervisor, загружаем файл supervisord.conf и кидаем в /etc/supervisor/conf.d/supervisord.conf

    root@aceserver:/# wget http://cloud.sybdata.com/supervisord.conf
    --2016-07-17 16:21:19--  http://cloud.sybdata.com/supervisord.conf
    Auflösen des Hostnamen »cloud.sybdata.com (cloud.sybdata.com)«... 192.185.5.59
    Verbindungsaufbau zu cloud.sybdata.com (cloud.sybdata.com)|192.185.5.59|:80... verbunden.
    HTTP-Anforderung gesendet, warte auf Antwort... 200 OK
    Länge: 606 [text/x-config]
    In »»supervisord.conf«« speichern.
    
    100%[======================================>] 606         --.-K/s   in 0s
    
    2016-07-17 16:21:20 (9,16 MB/s) - »»supervisord.conf«« gespeichert [606/606]

     

  8. Редактируем плагины P2pproxy и Torrenttv и конфиг aceconfig.py acesu3

  9. Перезапускаем сервер и проверяем работу supervisor и весь старт aceproxy и движка acestream : /var/log/supervisor

    17.07 16:36:59 DEBUG Dummy-1 acehttp.py:603 INIT| Plugin loaded: Allfon
    17.07 16:37:00 DEBUG Dummy-1 acehttp.py:603 INIT| Plugin loaded: P2pproxy
    17.07 16:37:00 DEBUG Dummy-1 acehttp.py:603 INIT| Plugin loaded: Stat
    17.07 16:37:00 DEBUG Dummy-1 acehttp.py:603 INIT| Plugin loaded: Torrenttelik
    17.07 16:37:00 DEBUG Dummy-1 acehttp.py:603 INIT| Plugin loaded: Torrenttv
    17.07 16:37:01 INFO Dummy-1 acehttp.py:862 HTTP| Using gevent 1.0
    17.07 16:37:01 INFO Dummy-1 acehttp.py:863 HTTP| Using psutil 4.3.0
    17.07 16:37:01 INFO Dummy-1 acehttp.py:866 HTTP| Server started.
    2016-07-17 16:37:04,015|MainThread|acestream|platform=linux
    2016-07-17 16:37:04,103|MainThread|acestream|app=acestream
    2016-07-17 16:37:04,104|MainThread|acestream|version=3.0.5.1 code=3000501 revision=1415 date=2014-12-10
    2016-07-17 16:37:04,104|MainThread|acestream|use_local_db=True
    2016-07-17 16:37:04,104|MainThread|acestream|use_m2crypto=True
    2016-07-17 16:37:04,104|MainThread|acestream|enable debug: 0
    2016-07-17 16:37:04,105|MainThread|acestream|get_default_api_version: 2
    2016-07-17 16:37:04,105|MainThread|acestream.coreapp|use fixed i2i_port: 62062
    2016-07-17 16:37:04,352|MainThread|acestream.coreapp|cannot load session config, use default
    2016-07-17 16:37:05,154|MainThread|acestream.SocketHandler.InterruptSocket|bound on 127.0.0.1:58187
    2016-07-17 16:37:05,155|MainThread|acestream.SocketHandler.SocketHandler|bind: socket bound: host=0.0.0.0 port=8621
    2016-07-17 16:37:05,155|MainThread|acestream.LM|listen on 8621
    2016-07-17 16:37:05,156|MainThread|acestream.localdb|No existing database found. Attempting to creating a new database u'/root/.ACEStream/sqlite/torrentstream.sdb'
    2016-07-17 16:37:05,440|MainThread|acestream.VideoServer|start: addr=127.0.0.1 port=6878
    2016-07-17 16:37:05,450|MainThread|acestream.SocketHandler.InterruptSocket|bound on 127.0.0.1:51176
    2016-07-17 16:37:05,451|MainThread|acestream.SocketHandler.SocketHandler|bind: socket bound: host=127.0.0.1 port=62062
    2016-07-17 16:37:05,452|Instance2InstanceThread-24|acestream.APIServer|run: ready to receive remote commands on 62062
    
    2016-07-17 14:19:50,159 CRIT Supervisor running as root (no user in config file)
    2016-07-17 14:19:50,268 INFO RPC interface 'supervisor' initialized
    2016-07-17 14:19:50,268 CRIT Server 'unix_http_server' running without any HTTP authentication checking
    2016-07-17 14:19:50,269 INFO daemonizing the supervisord process
    2016-07-17 14:19:50,269 INFO supervisord started with pid 14279
    2016-07-17 16:36:09,441 WARN received SIGTERM indicating exit request
    2016-07-17 16:36:53,232 CRIT Supervisor running as root (no user in config file)
    2016-07-17 16:36:53,232 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
    2016-07-17 16:36:53,597 INFO RPC interface 'supervisor' initialized
    2016-07-17 16:36:53,597 CRIT Server 'unix_http_server' running without any HTTP authentication checking
    2016-07-17 16:36:53,597 INFO supervisord started with pid 1047
    2016-07-17 16:36:54,630 INFO spawned: 'acehttp' with pid 1072
    2016-07-17 16:36:54,666 INFO spawned: 'acestream' with pid 1073
    2016-07-17 16:36:54,704 INFO spawned: 'vlc' with pid 1074
    2016-07-17 16:36:55,726 INFO success: acehttp entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
    2016-07-17 16:36:55,729 INFO success: acestream entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
    2016-07-17 16:36:55,732 INFO success: vlc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
    

     

  10. Наслаждаемся просмотром acesu4

  11. Обновляем vlc

    root@aceserver:/# add-apt-repository ppa:mc3man/trusty-media
    root@aceserver:/# apt-get update
    root@aceserver:/# apt-get dist-upgrade
    root@aceserver:/# apt-get install vlc-nox
    
  12. Дополнительная тонкая настройка кофига supervisor:   https://github.com/Supervisor/supervisor/issues/122

Добавить комментарий