-
Notifications
You must be signed in to change notification settings - Fork 978
How to Update your AVideo Platform
To maintain optimal performance and security, it is crucial to keep the Streamer and Encoder components of AVideo up-to-date. Here are detailed instructions for updating your AVideo installation using the most reliable methods.
- Safety and Consistency: Git pull ensures that your local files are synchronized with the latest version from the repository, avoiding conflicts that often arise with manual file transfers.
- Efficiency: Updates through Git are handled automatically, reducing the likelihood of errors and saving time.
- Transparency: Git provides clear records of changes, allowing easy tracking and management of updates.
To update the Streamer, navigate to its directory and execute the following commands:
cd /var/www/html/AVideo/
sudo git pull
For the Encoder, use the same approach:
cd /var/www/html/AVideo/Encoder
sudo git pull
If you encounter errors during the git pull
, you can reset your local copy to match the repository exactly:
sudo git fetch --all
sudo git reset --hard origin/master
If you encounter an issue like the one below:
root@ns5146:/var/www/html/AVideo# git pull
remote: Enumerating objects: 144, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 144 (delta 3), reused 3 (delta 3), pack-reused 128 (from 3)
Receiving objects: 100% (144/144), 39.15 MiB | 38.00 MiB/s, done.
Resolving deltas: 100% (80/80), completed with 1 local object.
From https://github.com/WWBN/AVideo
fb70c2730d..6d0daad7b2 master -> origin/master
Updating fb70c2730d..6d0daad7b2
error: Your local changes to the following files would be overwritten by merge:
plugin/WebRTC/WebRTC2RTMP
Please commit your changes or stash them before you merge.
Aborting
The issue occurs because the WebRTC2RTMP
file has changed permissions or has been modified locally. Resolve it as follows:
cd /var/www/html/AVideo/plugin/WebRTC
pkill WebRTC2RTMP
sudo git fetch --all
sudo git reset --hard origin/master
chmod x WebRTC2RTMP
./WebRTC2RTMP
-
cd /var/www/html/AVideo/plugin/WebRTC
:- Navigates to the
WebRTC
plugin directory where theWebRTC2RTMP
file is located.
- Navigates to the
-
pkill WebRTC2RTMP
:- Terminates any running instance of
WebRTC2RTMP
to ensure it is not in use during the update process.
- Terminates any running instance of
-
sudo git fetch --all
:- Retrieves the latest changes from the remote repository without altering local files yet.
-
sudo git reset --hard origin/master
:- Resets the local files to exactly match the remote repository, discarding any local changes, including the permission changes.
-
chmod x WebRTC2RTMP
:- Ensures that the
WebRTC2RTMP
file has execute permissions, which might be required after the reset.
- Ensures that the
-
./WebRTC2RTMP
:- Runs the
WebRTC2RTMP
script to verify it works correctly after the update.
- Runs the
Don’t forget to update the database after updating the software. Go to AVideo menu -> Update version and run the script update for each version sequentially.
While it is possible to manually download and upload files to update AVideo, this method is not recommended due to several potential issues:
- Risk of Errors: Manual updates are prone to mistakes such as incorrectly copying files, which can disrupt your system.
- Time Consuming: This process requires more time and effort compared to automated methods.
- Potential Conflicts: Manually replacing files can lead to conflicts and inconsistencies, especially if some files are missed or improperly overwritten.
If you must update manually, ensure you handle files carefully and backup your current installation before proceeding:
- Download: Obtain the latest version from GitHub: Download AVideo
- Upload: Use an FTP or SSH method to upload and replace files on your server.
Regularly check and update any plugins you are using with AVideo.
Access the plugin management section within AVideo to see if updates are necessary:
- Download the latest versions from the AVideo Marketplace.
- Follow the instructions to install or update the plugins.
Always execute the install tables for plugins, even for those not currently active, to ensure compatibility and readiness.
If an update causes issues, consider these rollback options:
Directly modify the version in your database to allow re-running update scripts:
mysql -u root -p youPHPTube
UPDATE configurations SET version = '6.5' WHERE id = 1;
Navigate to the update directory and execute the required SQL script:
cd /var/www/html/AVideo/updatedb/
mysql -u root -p youPHPTube < updateDb.v6.5.sql
For maintaining your AVideo installation, using Git for updates is highly recommended over manual methods to ensure a stable, secure, and efficient update process. Always keep your database updated following software updates and manage plugins carefully to maintain system integrity and functionality.