More

    How to install YouPHPTube on your Ubuntu 18.04 server

    This tutorial shows you how to create your own video-sharing site from YouPHPTube to Ubuntu 18.04. YouPHPTube is an alternative to open source websites and self-hosted sites for video sharing sites like YouTube, Vimeo and others. YouPHPTube allows users to upload videos to your server and share them on the Internet.

    YouPHPTube Features

    • Unlimited number of simultaneous live streams and you can connect an unlimited number of users to each live stream.
    • Import and encrypt videos from other websites directly from the Internet
    • Volume coding from the local video folder
    • Recording of private videos
    • Fully integrated function with Youtube, video synchronization with Youtube
    • Transcoding of multiple multimedia file formats to MP4, WebM and MP3 files
    • Support for Amazon S3 (easy storage)
    • Attractive website layout. YouPHPTube looks great on any device. (You can choose the layout in YouTube or Netfilx style)
    • Personalized channels and playlists
    • Subscribe to the channels you like.
    • You can track the performance of your videos using advanced indicators and reports in the statistics section of YouPHPTube.
    • Expand the functionality of the website using plug-ins.
    • SEO-optimized
    • applications available for iOS and Android

    tuftub self-education alternative girlfriend riot-18.04

    YouPHPTube Server Requirements

    First of all, you should be aware that a single-core processor is not practical for a video-sharing site because the encoding process consumes a lot of processor resources.

    Then select the server specification based on the number of users on your site.

    • If you only want to use it to share your videos, you need a server with at least 2 cores and 4 GB of RAM. You can buy a powerful VPS (Virtual Private Server) from Contabo at minimal cost.
    • If you expect dozens of users on your website, consider the Contabo Super Large VPS, which has 10 processor cores, 60 GB RAM, 1 Gbps port speed, 1.6 TB hard disk space, unlimited traffic, but costs only 26.99 euro/month.
    • As your website grows, you will need to purchase a dedicated server.

    Software requirements for installing YouPHPTube on Ubuntu 18.04

    YouPHPTube requires PHP and MySQL/MariaDB. To follow this manual, you must already have a LAMP or LEMP battery installed. If you prefer to use the Apache web server, install the LAMP stack.

    If you prefer to use the Nginx web server, install the LEMP stack.

    Pay attention: Supporting YouPHPTube with Nginx is only experimental. Your website may have problems using Nginx.

    You also need a domain name. I registered my domain name with NameCheap because the price is low and they offer free Whois privacy for life.

    YouPHPTube consists of two parts.

    • The most important component is the upstream stream server, which allows users to view existing videos.
    • The other part is an encoder that allows users to upload their videos.

    The public encoder uses the domain name encoder.youphptube.com. If you don’t want users to leave your site when they download videos, you need to set up your personal encoder. I’ll show you how it’s done. Let’s get going.

    Step 1: Download YouPHPTube on Ubuntu Server 18.04 Server

    Connect to the Ubuntu 18.04 server via SSH. Then go to the main directory of the web.

    CD /var/www/

    Clone Github’s YouPHPTube streamer repository.

    install sudo apt git
    clone sudo git https://github.com/YouPHPTube/YouPHPTube.git

    Then browse the folder.

    YouPHPTube CD /

    Clone Github’s YouPHPTube encoder repository.

    Clone of the Giga ship https://github.com/YouPHPTube/YouPHPTube-Encoder.git

    It is registered as a YouPHPTube encoder. We rename it before downloading so that users can better understand what this URL is used for when downloading videos.

    Upload sudo mv YouPHPTube encoder

    Next we need to make www-data (webserver user) the owner of the web root.

    sudo chown www-data: www-data /var/www/YouPHPTube/ -R

    Step 2: Determination of dependency

    YouPHPTube uses FFmpeg for video encoding. We can easily install FFmpeg from the standard Ubuntu repository.

    sudo apt installation ffmpeg

    To be able to read and write meta-information in multimedia files, you need to install the libimage-exiftool-perl package.

    sudo apt install libimage-exiftool-perl

    You will also need to install some commonly used PHP extensions.

    install sudo apt php7.2-cli php7.2-common php7.2-json php7.2-oncache php7.2-readline php7.2-curl

    To get videos from other sites, we need to install YouTubeDL. Even though it’s at the Ubuntu depot, it’s obsolete. We will install YouTube-DL from the Python package index, which always contains the latest version of YouTube-DL.

    sudo apt install python3-pip
    sudo -H pip3 install youtube-dl

    It is very important that you use the latest version, otherwise you will not be able to download videos from other websites. We can create a cron job to automatically check and install the latest version.

    The centre of the ship’s crown

    Add the following line at the end of the crontab file to try to update YouTubeDL daily.

    @daily sudo -H install pip3 –upgrade youtube-dl > /dev/null

    Step 3: Database and user creation in MariaDB

    Connect to the MariaDB database server with the following command. Since MariaDB now uses the unix_socket plugin to authenticate the user, it is no longer necessary to enter the MariaDB root password. Just give the mysql sudo command prefix.

    Ship’s vehicle

    Then create a database for YouPHPTube. This tutorial gives a name to the YouPHPTube database. You can use any name you want.

    create a YouPHPTube database;

    Create a database user. You can also use your preferred name for this user. Replace your password with the one you want.

    Create a [email protected] user identified by your password;

    Give this user all rights of the Youphptube database.

    offer full rights to YouPHPTube.* for [email protected]

    We also need to create a separate database for the encoder.

    create a YouPHPTubeEncoder database;

    Create a user for this database.

    Create a custom [email protected] identified by your password;

    Granting privileges.

    Grant full rights to YouPHPTubeEncoder.* to [email protected]

    Rinse out the privilege sign and leave it.

    to relinquish those privileges;

    A way out;

    Step 4: Web server configuration

    We can use an Apache or Nginx web server.

    Apache

    If you prefer Apache, create a virtual host file for YouPHPTube using a command line text editor such as Nano.

    sudo nano /etc/apache2/sites-available/youphptube.conf

    Insert the following text into the file. Replace the text in red with current data. I use the subdomain in this manual. You can use the main domain name if you wish. Don’t forget to set the DNS-A-record for the domain name in your DNS record manager. Also note that the main folder of the document is case sensitive and you do not need to add an equal slash at the end.

    Servername tube.yourdomain.com
    Reboot documents /var/www/YouPHPTube

    DirectoryIndex index.php
    Settings +FollowSymLinks
    AllowOverride All
    Requires everything to be provided

    Error Log ${APACHE_LOG_DIR}/youphptube.error.log
    User Log ${APACHE_LOG_DIR}/youphptube.access.log merged.

     

    Save the file and close it. Then turn on this virtual host.

    sudo a2ensite youphptube.conf

    You must activate the override module.

    sudo a2enmod account

    Restart Apache to put the changes into effect.

    sudo systemctl restart apache2

    Now go to tub.yourdomain.com and you will be redirected to the installation wizard page (tube.yourdomain.com/install/index.php). If you see the default Apache page instead of the installation wizard, you must disable the default virtual host.

    sudo a2dissite 000-default.conf

    And restart Apache.

    Before entering information in the configuration wizard, you must activate HTTPS.

    Nginh

    If you prefer Nginx, create youphptube.conf in /etc/nginx/conf.d/.

    ship nano /etc/nginx/conf.d/youphptube.conf

    Insert the following text into the file. Replace the text in red with current data. I use the subdomain in this manual. You can use the main domain name if you wish. Don’t forget to set the DNS-A-record for the domain name in your DNS record manager. Also note that the main folder of the document is case sensitive.

    server {
    hear 80 ;
    server_name tube.yourdomain.com ;

    root /var/www/YouPHPTube ;
    index.php index.html index.htm ;
    utf-8 character set ;
    client_max_body_size 2G ;

    Location / {
    try_files $uri/ /index.php?$query_string;
    }

    access_log /var/log/nginx/youphptube.access.log ;
    error_log /var/log/nginx/youphptube.error.log ;

    location ~ .php$ {
    fastcgi_split_path_info ^(.+.php)(/.+)$ ;
    fastcgi_pass unix:/run/php/php7.2-fpm.sock ;
    fastcgi_index index.php ;
    contains fastcgi_params ;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name ;
    }.

    location = /upload/index.php {
    rewrite ^(.*)$ /upload/view/index.php last;
    }

    location = /upload/isAdmin {
    rewrite ^(.*)$ /upload/view/isAdmin.php last ;
    }

    location = /upload/removeStreamer {
    rewrite ^(.*)$ /upload/view/removeStreamer.php last ;
    }

    location = /upload/priority {
    rewrite ^(.*)$ /upload/view/priority.php last;
    }

    location = /upload/status {
    rewrite ^(.*)$ /upload/view/status.php last;
    }

    location = /upload/serverStatus {
    rewrite ^(.*)$ /upload/view/status.php?serverStatus=1 last;
    }.

    location = /upload/upload {
    rewrite ^(.*)$ /upload/view/upload.php last;
    }

    location = /upload/listFiles.json {
    rewrite ^(.*)$ /upload/view/listFiles.json.php last ;
    }

    location = /upload/deleteQueue {
    rewrite ^(.*)$ /upload/view/deleteQue.php last ;
    }

    location = /upload/saveConfig {
    rewrite ^(.*)$ /upload/view/saveConfig.php last ;
    }

    location = /upload/youtubeDl.json {
    rewrite ^(.*)$ /upload/view/youtubeDl.json.php last ;
    }

    location = /upload/send.json {
    rewrite ^(.*)$ /upload/view/send.json.php last;
    }

    location = /upload/streamers.json {
    rewrite ^(.*)$ /upload/view/streamers.json.php last ;
    }

    location = /upload/queue.json {
    rewrite ^(.*)$ /upload/view/queue.json.php last ;
    }

    location = /upload/queue {
    rewrite ^(.*)$ /upload/view/queue.php last ;
    }

    location = /upload/login {
    rewrite ^(.*)$ /upload/objects/login.json.php last ;
    }

    location = /upload/logoff {
    rewrite ^(.*)$ /upload/objects/logoff.json.php last ;
    }

    location /upload/ {
    rewrite ^/getImage/([A-Za-z0-9]{3})$ /upload/objects/getImage.php ?base64Url=$1&format=$2 last;
    rewrite ^/getImageMP4/([A-Za-z0-9=/]+)/([0-9.]+)$ /upload/objects/getImageMP4.php?base64Url=$1&format=$2&time=$3 last;
    }.

    location /upload/getSpiritsFromVideo {
    rewrite ^/getSpiritsFromVideo/([A-Za-z0-9=/]+)/([0-9]+)$ /upload/objects/getSpiritsFromVideo.php?base64Url=$1&tileWidth=$2&totalClips=$3 last;
    }.

    location /upload/getLinkInfo {
    rewrite ^/getLinkInfo/([A-Za-z0-9=/]+)$ /upload/objects/getLinkInfo.json.php?base64Url=$1 last;
    }.

    }

    Save the file and close it. Then check the Nginx configuration.

    sudo nginx -t

    If the test was successful, restart Nginx to make the changes take effect.

    sudo systemctl restart nginx

    Now go to tub.yourdomain.com and you will be redirected to the installation wizard page (tube.yourdomain.com/install/index.php). Before entering information in the configuration wizard, you must activate HTTPS.

    Step 5: Activation of HTTPS

    To encrypt HTTP traffic, we can activate HTTPS by installing a free TLS certificate issued by the Let’s Encrypt website. Run the following command to install the Let’s Encrypt (certbot) client on the Ubuntu 18.04 server

    install sudo apt certbot

    If you are using Apache, you also need to install the Apache plugin from Certbot.

    install sudo apt python3-certbot-capache

    And execute this command to obtain and install the TLS certificate.

    sudo certbot –apache –agree-tos –redirect –hsts –staple-ocsp –email [protected e-mail] -d tube.yourdomain.com

    If you are using Nginx, install the Certbot Nginx plugin.

    sudo apt python3-certbot-nginx installation

    Then execute the following command to obtain and install the TLS certificate

    sudo certbot –nginx –agree-tos –redirect –hsts –staple-ocsp –email [protected e-mail] -d tube.yourdomain.com

    Where’s that?

    • –…inginx: Use the nginx plugin.
    • –…Apache: Use the Apache plugin.
    • -I agree. -I agree: I accept the terms of use.
    • -directly: Forced diversion from HTTPS to 301.
    • –…. Add a Strict Transport Security header to every HTTP response. Force a browser to always use TLS for a domain. Protection against the dismantling of SSL/TLS.
    • – stepple-oxp : Do not allow OCSP. A valid OCSP response is attached to the certificate issued by the server during the TLS.

    The certificate should now be received and installed automatically.

    Implementation of the start-up system-18.04

    Step 6: Complete the installation with the installation wizard

    Now go to tub.yourdomain.com and the configuration wizard appears. On the left side you can see if your server meets the requirements.

    Youphptube requirements

    If you are using Nginx, you can ignore the following message.

    You will need to install Apache on your nginx/1.14.2 server.

    As you can see, the PHP post_max_size must be at least 100 MB, and the upload_max_files must be at least 100 MB. We need to modify the php.ini file to change these two values.  If you are using the Apache web server, then

    ship nano /etc/php/7.2/apache2/php.ini

    If you are using Nginx with PHP-FPM, you will need to edit the FPM version of the php.ini file.

    ship nano /etc/php/7.2/fpm/php.ini

    Look at the next two lines.

    post_max_size = 8M
    upload_max_filesize = 2M

    Change the values according to the size of the video file you want to upload. For example, if you allow the downloading of a 1G video file, the following is possible

    post_max_size = 1024M
    upload_max_file size = 1024M

    Save the file and close it. Restart Apache to put the changes into effect.

    sudo systemctl restart apache2

    If you are using Nginx with PHP-FPM, restart PHP-FPM.

    reboot sudo systemctl php7.2-fpm

    Now refresh the YouPHPTube installation wizard page. Your server must meet all requirements. You can now enter the name of your video page on the right. Enter the name of the YouPHPTube database, the user, and the password you previously created. (Note: You should use the main database, not the encoder database. Also note the register). And set the system administrator password.

    Youphptube creates databases and tables

    Click the Install Now button and YouPHPTube will be installed successfully.

    Youphptube installation directory

    We now need to remove the /var/www/YouPHPTube/install/directory.

    sudo rm /var/www/YouPHPTube/install/r

    Click the Go home button and you will see the YouPHPTube homepage.

    Youphptube homepage

    You can click on the drop-down menu on the left and log in as an administrator using the password you set a few minutes ago.

    Youphptube administrators login

    Step 7: Encoder configuration

    Go to https://tube.yourdomain.com/upload/. You will be redirected to the encoder configuration wizard. If you are not redirected automatically, you can enter the URL of the installation wizard manually.

    https://tube.yourdomain.com/upload/install/index.php/

    On the left side you can see if your server meets the requirements of the YouPHPTube-encoder.

    Youphptube encryption requirements

    If you are using Nginx, you can ignore the following message.

    You will need to install Apache on your nginx/1.14.2 server.

    As you can see, the maximum running time of PHP must be at least 7200 and the memory limit of PHP must be at least 512M. We need to modify the php.ini file to change these two values.  If you are using the Apache web server, then

    ship nano /etc/php/7.2/apache2/php.ini

    If you are using Nginx with PHP-FPM, you will need to edit the FPM version of the php.ini file.

    ship nano /etc/php/7.2/fpm/php.ini

    Look at the next two lines.

    max_execution time = 30
    Memory_limit = 128M

    Changing the values .

    max_execution time = 7200
    memory_limit = 512M

    Please note that you need to increase the max_execution_time or update your CPU if the subsequent video encoding stops halfway.

    Save the file and close it. Restart Apache to put the changes into effect.

    sudo systemctl restart apache2

    If you are using Nginx with PHP-FPM, restart PHP-FPM.

    reboot sudo systemctl php7.2-fpm

    Now refresh the YouPHPTube encryption wizard page. Your server must meet all requirements. You must now enter the name of the YouPHPTubeEncoder database on the right, the user and the password you created previously.  Note the register and enter the password of the Streamer Streamer website administrator.

    Encryption database

    Click the Install Now button and YouPHPTube Encoder will be installed.

    Installation-Installation-Installation-Installation-18.04

    Uninstall the installation folder.

    sudo rm /var/www/YouPHPTube/upload/install/ -r

    And go to the homepage.

    Administrator signature on the Youphptube encoder

    Step 8: Changing the encoder URL

    By default, a public encoder is used to upload videos to YouPHPTube. To use your own encoder, log in to YouPHPTube (not the YouPHPTube encoder) as the administrator and go to the administration section on the left.

    Youphptube administration area

    Go to Settings -> Location settings -> Advanced configuration. Change the encoder URL to https://tube.yourdomain.com/upload/. Save the settings, delete the cache directory and create a new sitemap.

    Youphptube private coding url

    Sign now and come back. If you click on the video and audio encoder button in the upper right corner, you will be redirected to your own encoder to download the video. Please note that the encoding speed depends on the performance of your server’s processor. This does not require much RAM as the encoder copies the video to a temporary file in the download folder (/var/www/YouPHPTube/upload/videos).

    Step 9: SMTPSetting

    To send e-mail messages (such as registering an account, resetting a password, etc.), you need to configure the SMTP server. If you want to use your own mail server to send e-mails to your customers, read the following article about setting up your own mail server.

    If you want to use the SMTP relay service, I recommend Mailjet. You can follow the instructions below to configure the SMTP relay on your YouPHPTube server

    Activate TCP BBR

    For the video streaming server, it is recommended to enable the TCP BBR anti-congestion algorithm in the Linux kernel, following the instructions in the following article.

    Mobile applications

    You can download a free Android or iOS application by searching YouPHPTube in the Google Play Store or YPT Mobile in the Apple Store. White-label mobile applications require a paid license.

    Troubleshooting

    When the YouPHPTube homepage was not able to download some CSS and JavaScript sources

    Youphptube could not upload sources

    You probably added an extra direct slash to the virtual Apache host file or to Nginx for the root of the website. Instead of

    document root /var/www/YouPHPTube/

    You must

    Document root /var/www/YouPHPTube

    If the main site does not work properly, you can check the log file in /var/www/YouPHPTube/videos/youphptube.log. If your encoder is not working properly, you can check the log file in /var/www/YouPHPTube/upload/videos/youphptube.log.

    Other delicacies

    When encoding the video, you can select the resolutions (Low, SD, HD). If you are using YouPHPTube as a personal video streaming site, I recommend choosing HD resolution only to reduce encoding time and save disk space. If you have already encoded the video in all 3 resolutions, you can go to the YouPHPTube video folder (/var/www/YouPHPTube/videos) and delete the low-resolution and SD videos.

    cd /var/www/YouPHPTube/videos/
    sudo rm *Low.mp4
    sudo rm *SD.mp4

    How to upload all videos from your video site

    You can use the command program youtube-dl to download all videos. First go to the YouPHPTube toolbar, then go to the video list page, scroll down and click the Download Video List button (.txt file from the permanent link). You will see a list with the URLs of all videos.

    Then open the terminal and create a text file with a text editor, copy the URL of the web page and paste it into a file. You can then use the following command to download the video. Replace the video list.txt file with your own filename.

    youtube-dl – video file.

    Packaging

    I hope this tutorial helped you install YouPHPTube on the Ubuntu 18.04. As always, if you find this message useful, subscribe to our free newsletter for more tips and tricks. Take care of yourself.

    Evaluate this training manual.

    On second thought: 2 On average: 5]youphptube install centos 7,how to install lamp server in ubuntu,youphptube tutorial,install lamp on ubuntu 18.04 aws,install php 7.2 ubuntu 18.04 digitalocean,how to install apache on ubuntu 18.04 desktop,youphptube-encoder,install lamp on ubuntu 18.04 ask ubuntu

    Recent Articles

    X-rated ads on the derelict corner of the accountants’ website • Register

    A forgotten subdomain on PricewaterhouseCoopers’ dotcom has been hacked to promote pornographic sites and applications, which clearly shows why DNS records should not be...

    CERT-GIB records upsurge of phishing resource blockages as duration of attacks growsSecurity Affairs

    Group-B, a Singapour-based cyber security company, has noted an increase in the life expectancy of phishing attacks in the second half of 2019. This trend,...

    GSP COVID-19 App-The Peak of Neoliberal Paternalism or National Benevolence?

    There is no doubt that technology made life more bearable during the global pandemic. From the use of unmanned aircraft to deliver medicines and...

    Getting Zoom Security Right-8 Family and Friends Tips

    If you have read the newspaper or seen the news in recent weeks, you will notice a general topic discussed by all the major...

    Nemty Ransomware-Teaching by Doing

    Brief summary The 20th. In August 2019, McAfee’s Advanced Threat Research Group (ATR) discovered a new family of repayable programs called Nemti. This is a time...

    Related Stories