arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installation of Peerflix on Ubuntu 16.04 LTS Server
#1
Installation of Peerflix on Ubuntu 16.04 LTS Server


Table of content
  1. Introduction
  2. Server Preparation
  3. Installation of NodeJS
  4. Installation of Peerflix
  5. Finale



1. Introduction

Hello Community

I decided to make this tutorial to help a new member of this forum. @Amresh opened a topic a bit ago in which he requested for help with the installation of Peerflix on a VPS.

So in this tutorial you will learn how to install NodeJS and Peerflix on a server with Ubuntu 16.04 LTS Server as its OS. I will try to keep it brief and as easy as possible. On the request of @Amresh this tutorial will also include screenshots of the installation process.

I don't use Peerflix myself! Unfortunately I won't be able to provide any help or support for it therefore. Please use the official ways to get support for it. Neither am I experienced with NodeJS! Just making this tutorial to help with the installation.

Sorry that the last 11 images aren't actually embedded as images. This forums only allows 10 images to be embedded as real images that you can instantly see without having to open another link



2. Server Preparation

Before you can start with installing anything it is always a good idea to keep your server update and fresh. So we will first perform a little bit of preparation before going on with the installation of NodeJS for Peerflix and finally the installation of Peerflix.

Connect to your server via SSH and login as a user with administrative permission via sudo or if you like simply as root. I will be using a normal user account that has administrative permission through sudo.

To login into your server via SSH you need a SSH client. Use PuTTY: https://www.chiark.greenend.org.uk/~sgta...atest.html - Just download the latest putty.exe in 32 Bit or 64 Bit to your computer.
[Image: O74zCl0.png]

After you have downloaded it open the download folder and double click the putty.exe file to start PuTTY.
[Image: nBY7Eox.png]

In the PuTTY window enter the IP address or domain of your server into the "Host name (or IP address)" field and then click on the "Open" button to connect to your server.
[Image: ArkqJ87.png]

If you connect the first time to your server from your computer you will see a security alert. In the security alert window simply accept the warning by clicking on the "Yes" button.
[Image: CPHDfdE.png]

After that enter the username and password of the user you want to login with. Don't worry, in Linux you cannot see passwords when you type them. Hit enter after you have entered the username and password. After successful login you will be greeted by the server.
[Image: DgBQTkX.png]

Now it is time to update the package database on the server to perform a OS and package update. To do so run the command "sudo apt-get update" in PuTTY. If you are logged in as root simply run "apt-get update" as sudo is not necessary when logged in as root. If you use sudo you will be asked to type in your password!
[Image: TPRJg9X.png]

Once that is done it is time to update the OS and the installed packages. Run the command "sudo apt-get upgrade -y" to do this. If you are logged in as root simply run "apt-get uprgade -y" as sudo is not necessary when logged in as root.
[Image: 9rQCove.png]

When the update of the OS and package has finished it will return you automatically to the commandline.

Image: https://i.imgur.com/YTQ6XV9.png


The server preparation part is finished. You have logged into your server with a user that has administrative permission or root and you have updated your OS to keep it fast, fresh and secure.



3. Installation of NodeJS

Peerflix is a NodeJS application and in order to run NodeJS applications on servers or computers we need the NodeJS framework and its additional service programs. At this point we will install NodeJS on the server.

What we need to do first is that we have to add the NodeJS repository to our package manager sources so we can get recent NodeJS version. To do this run the command below. It will download a script that will automatically add the correct repository for Ubuntu 16.04 LTS Server into the package manager sources.
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

Image: https://i.imgur.com/gTJ0I5Z.png

Once it is done you will see the following message and it will also return you back into the commandline.

Image: https://i.imgur.com/xTEDrJ5.png

Now you we can install NodeJS with the command "sudo apt-get install -y nodejs gcc g++ make". If you are logged in as root simply run "apt-get install -y nodejs gcc g++ make" as sudo is not necessary when logged in as root.

Image: https://i.imgur.com/xOnXogg.png

Once that is done you will be brought back to the commandline again.

Image: https://i.imgur.com/9p94fEh.png


You've made it Smile. NodeJS is now installed on your server.



4. Installation of Peerflix

It is finally time to install Peerflix on the server as you have finished server preparation and already installed the necessary NodeJS framework and additional service programs.

You can install peerflix via the NodeJS package manager "npm" with the command "sudo npm install -g peerflix-server". If you are logged in as root simply run "npm install -g peerflix-server" as sudo is not necessary when logged in as root.

Image: https://i.imgur.com/lyifGAg.png

The installation process may take a bit of time. The NodeJS package manager will resolve package dependencies and actually install everything needed for peerflix automatically before it can install peerflix. When the installation is finished you will see a screen similar to the following one.

Image: https://i.imgur.com/Vgl7WZ2.png

You probably don't want to start peerflix everytime by hand. So you need a daemon service that will run the peerflix-server automatically in the background. You can install the NodeJS daemon program "forever" with the command "sudo npm install -g forever". If you are logged in as root simply run "npm install -g forever" as sudo is not necessary when logged in as root.

Image: https://i.imgur.com/1OFcbwA.png

Once that is installed run the command "sudo forever start $(which peerflix-server)" to launch peerflix-server as a service. If you are logged in as root simply run "forever start $(which peerflix-server)" as sudo is not necessary when logged in as root.

Image: https://i.imgur.com/tykfwYq.png

You can stop the peerflix-server service with the command "sudo forever stop $(which peerflix-server)". If you are logged in as root simply run "forever stop $(which peerflix-server)" as sudo is not necessary when logged in as root.

Image: https://i.imgur.com/ruGyUsj.png


That's it folks. The peerflix-server is now installed and can be ran as a system service. Party  Wink



5. Finale

Let's make a small summary of what we have done so far.

We have updated out server OS and all packages to the latest version. After that we added package sources for the newest NodeJS version and then we installed NodeJS and all necessary additional service programs for it. After that we installed the peerflix server and a tool to run it as a service. At the end we launched the peerflix server as a service.

Now the last step is to open the browser of your choice and access the installed peerflix server over the URL:
http:\\<IP address of your server>:9000\#\

Image: https://i.imgur.com/bisjFLj.png


Happy Streaming!
[Image: zHHqO5Q.png]
#2
Thanks Bro For your Great Tutorial ...

Now I can install it with no doubts and problem....
Also thnx for that screenshots....for making a clear visual of the steps....
Again Thnx!
Smile
Terminal
Thankyou Post4VPS, @Pacific Spirit (Hostlease) for a Free VPS!
+
Thankyou to @Neoon for a Free NanoKVM VPS
#3
Good one @HR, man i would say peerflix is one awesome product i have been using peerflix since 2 years(hosted on heroku) and the tragedy i lost my heroku credentials but server is running fine maybe because i barely use it for streaming and i don't want to share it with public(i don't want my container suspended) but still its good have something when i don't want to torrent clients just for streaming a show.
[Image: a3ad5cfbf5.png]
[Image: trk1]
#4
So long thread from HR, but great tutorials.
But please, @Amresh, don't quote those long tutorials XD. I need to scroll so long.

I'm intrested with this. I would like to try la sometimes.
Thanks to Limitless Hosting and Post4VPS for providing me excellent VPS 13!
#5
Please, how do I modify the Port from "9000" to "8080". My Company Proxy has limited number of open ports on their server. So after checking, I found out that Port 8080 is Open on their server.
#6
@K1r1k4z3

Look at https://github.com/asapach/peerflix-serv.../README.md and there at the Configuration part.
[Image: zHHqO5Q.png]
#7
(08-23-2018, 08:33 AM)Hidden Refuge Wrote: @K1r1k4z3

Look at https://github.com/asapach/peerflix-serv.../README.md and there at the Configuration part.

Thanks, but I 've seen that, tried what was suggested, but still couldnt get it to work.
Thanks anyways!
#8
(08-23-2018, 01:58 PM)K1r1k4z3 Wrote: Thanks, but I 've seen that, tried what was suggested, but still couldnt get it to work.
Thanks anyways!

As I explained already in the guide: I'm not using Peerflix and have never worked with it. I can't and won't give any support.

All I can think of that if you store the configs with a normal user and run the server as root it won't load the normal user configurations because it looks for configurations at the root account.


If you really need help look for a site that has a dicussion area about Peerflix. Maybe Reddit? Stackoverflow and such sites.
[Image: zHHqO5Q.png]
#9
(08-23-2018, 02:54 PM)Hidden Refuge Wrote: As I explained already in the guide: I'm not using Peerflix and have never worked with it. I can't and won't give any support.

All I can think of that if you store the configs with a normal user and run the server as root it won't load the normal user configurations because it looks for configurations at the root account.


If you really need help look for a site that has a dicussion area about Peerflix. Maybe Reddit? Stackoverflow and such sites.

Found out how to change the port.

Just go ahead and hardcode your preferred port into the
/usr/lib/node_modules/peerflix-server/server/bin.js



person_pin_circle Users browsing this thread: 4 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting