Installation of Peerflix on Ubuntu 16.04 LTS Server - Printable Version +- Post4VPS Forum | Free VPS Provider (https://post4vps.com) +-- Forum: VPS Discussion (https://post4vps.com/Forum-VPS-Discussion) +--- Forum: Tutorials (https://post4vps.com/Forum-Tutorials) +--- Thread: Installation of Peerflix on Ubuntu 16.04 LTS Server (/Thread-Installation-of-Peerflix-on-Ubuntu-16-04-LTS-Server) |
Installation of Peerflix on Ubuntu 16.04 LTS Server - Mashiro - 08-09-2018 Installation of Peerflix on Ubuntu 16.04 LTS Server
Table of content
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/~sgtatham/putty/latest.html - Just download the latest putty.exe in 32 Bit or 64 Bit to your computer. After you have downloaded it open the download folder and double click the putty.exe file to start PuTTY. 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. 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. 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. 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! 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. 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. Code: 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 . 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. 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: Code: http:\\<IP address of your server>:9000\#\ Image: https://i.imgur.com/bisjFLj.png Happy Streaming! RE: Installation of Peerflix on Ubuntu 16.04 LTS Server - Amresh - 08-09-2018 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! RE: Installation of Peerflix on Ubuntu 16.04 LTS Server - TrK - 08-09-2018 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. RE: Installation of Peerflix on Ubuntu 16.04 LTS Server - tiwil - 08-09-2018 So long thread from HR, but great tutorials. But please, @Amresh, don't quote those long tutorials . I need to scroll so long. I'm intrested with this. I would like to try la sometimes. RE: Installation of Peerflix on Ubuntu 16.04 LTS Server - K1r1k4z3 - 08-23-2018 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. RE: Installation of Peerflix on Ubuntu 16.04 LTS Server - Mashiro - 08-23-2018 @K1r1k4z3 Look at https://github.com/asapach/peerflix-server/blob/master/README.md and there at the Configuration part. RE: Installation of Peerflix on Ubuntu 16.04 LTS Server - K1r1k4z3 - 08-23-2018 (08-23-2018, 08:33 AM)Hidden Refuge Wrote: @K1r1k4z3 Thanks, but I 've seen that, tried what was suggested, but still couldnt get it to work. Thanks anyways! RE: Installation of Peerflix on Ubuntu 16.04 LTS Server - Mashiro - 08-23-2018 (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. 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. RE: Installation of Peerflix on Ubuntu 16.04 LTS Server - K1r1k4z3 - 08-25-2018 (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. Found out how to change the port. Just go ahead and hardcode your preferred port into the Code: /usr/lib/node_modules/peerflix-server/server/bin.js |