Cara Install AVideo atau PHPTube di Server Ubuntu 20.04
Referensi : https://www.linuxbabe.com/ubuntu/install-avideo-youphptube-ubuntu-20-04-server
Server Ubuntu sudah diinstal Apache2, MariaDB Server, PHP 7.4
Step 1: Download AVideo on Ubuntu 20.04 Server
cd /var/www/html
sudo apt install git
sudo git clone https://github.com/WWBN/AVideo.git
cd AVideo/
sudo git clone https://github.com/WWBN/AVideo-Encoder.git
sudo mv AVideo-Encoder upload
sudo chown www-data:www-data /var/www/www/AVideo/ -R
Step 2: Install Dependencies
sudo apt install ffmpeg
sudo apt install libimage-exiftool-perl
sudo apt install php7.4-cli php7.4-common php7.4-json php7.4-opcache php7.4-readline php7.4-curl php7.4-gd php7.4-xml
Jika mau ambil video dari youtube misalnya maka harus install berikut :
sudo apt install python3-pip
sudo -H pip3 install youtube-dl
sudo crontab -e
@daily sudo -H pip3 install --upgrade youtube-dl > /dev/null
Step 3: Create Database and User in MariaDB
sudo mysql
create database AVideo;
create user AVideo@localhost identified by '123456';
grant all privileges on AVideo.* to AVideo@localhost;
create database AVideoEncoder;
create user AVideoEncoder@localhost identified by '123456';
grant all privileges on AVideoEncoder.* to AVideoEncoder@localhost;
flush privileges;
exit;
Step 4: Setting Up Web Server
sudo nano /etc/apache2/sites-available/avideo.conf
<VirtualHost *:80>
ServerName tube.yourdomain.com
DocumentRoot /var/www/AVideo
<Directory /var/www/AVideo>
DirectoryIndex index.php
Options +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/avideo.error.log
CustomLog ${APACHE_LOG_DIR}/avideo.access.log combined
</VirtualHost>