VideoCache
Videocache is no longer in development.

Installing VideoCache

Once we are done with the steps in Preparing System for VideoCache Setup, we are all set to install VideoCache. If you have VideoCache already installed on your system, you should checkout Upgrading VideoCache instead. You need to run the same installer script to install.

Below are the steps required to install VideoCache. You must be logged in as root or super user to perform this action.

  • Untar the VideoCache software bundle you received in your email

[root@white-magnet ~]$ tar -xvzf videocache-2.3.tar.gz
  • Navigate to the directory videocache-2.3

[root@white-magnet ~]$ cd videocache-2.3
  • Run the installer script (install.sh) to install VideoCache

[root@white-magnet videocache-2.3]$ bash install.sh
Checking root access..................................................Granted


---------------------------Dependency Check---------------------------
Checking which........................................................Installed
Checking python.......................................................Installed
Checking wget.........................................................Installed
Checking tar..........................................................Installed
Checking gcc..........................................................Installed


-----------------Python Modules And Development Files-----------------
Checking setuptools...................................................Installed
Checking iniparse.....................................................Installed
Checking Python.h.....................................................Installed
Checking netifaces....................................................Installed
Checking ctypes.......................................................Installed
Checking importlib....................................................Installed
Checking multiprocessing..............................................Installed
Checking other modules required.......................................Installed


------------------------Database Configuration------------------------
MySQL database is used for hashing cached files for efficient cleanup


------------------------MySQL Dependency Check------------------------
Checking mysql........................................................Installed
Checking mysql_config.................................................Installed
Checking MySQLdb......................................................Installed

Enter hostname ( default: localhost ):
Selected hostname for database........................................localhost
Enter username ( default: videocache ):
Selected username for database........................................videocache
Enter password ( default: videocache ):
Selected password for database........................................videocache
Enter database name ( default: videocache ):
Selected database name................................................videocache
Checking MySQL access.................................................Working


--------------------------------Squid---------------------------------
Checking squid........................................................Installed

Full path to Squid access.log file (default: /var/log/squid3/access.log):
Selected Squid access.log file............................../var/log/squid3/access.log

User who run Squid Proxy Server daemon (default: proxy):
Selected user who runs Squid daemon...................................proxy


-------------------------Apache Configuration-------------------------
Do you want to skip Apache configuration? (y/n): n
Checking Apache.......................................................Installed

Full path to Apache conf.d or extra directory (default: /etc/apache2/conf.d/):
Selected Apache conf.d or extra directory........................./etc/apache2/conf.d/


-----------------------------Client Email-----------------------------
Enter the email address using which you purchased VideoCache: a@b.me
Selected email address................................................a@b.me


-----------------------Cache Host (Web Server)------------------------
IP address with optional port. It will be used as a web server to serve
cached videos. Examples: 192.168.1.14 or 192.168.1.14:81

Enter IP_Address[:port] for cache_host option (available: 192.168.1.2 ): 192.168.1.2
Selected cache_host...................................................192.168.1.2


--------------------------Squid Proxy Server--------------------------
IP_Address:Port combination for Squid proxy running on this machine.
Examples: 127.0.0.1:3128 or 192.168.1.1:8080

Enter IP:Port for Squid on this machine (example: 127.0.0.1:3128): 127.0.0.1:3128
Selected proxy server.................................................127.0.0.1:3128


------------------------Collected Information-------------------------
We will be using the following information to install videocache.
Squid access.log............................................/var/log/squid3/access.log
Squid user..................................................proxy
Apache conf.d.............................................../etc/apache2/conf.d/
Email address...............................................a@b.me
Cache Host..................................................192.168.1.2
Squid proxy.................................................127.0.0.1:3128


--------------------------Install VideoCache--------------------------
Installing VideoCache.................................................Installed

Command used: python setup.py --squid-user proxy --client-email a@b.me --cache-host 192.168.1.2 --this-proxy 127.0.0.1:3128 --squid-access-log /var/log/squid3/access.log --apache-conf-dir /etc/apache2/conf.d/ --db-hostname localhost --db-username videocache --db-password videocache --db-database videocache install 2>&1


------------------------Install init.d Script-------------------------
Trying to set default run levels for vc-scheduler.....................Done


--------------------Post Installation Instructions--------------------
Setup has completed successfully. A file instructions.txt has been created
in the bundle which you should follow to complete the installation process.

FOLLOW EACH STEP CAREFULLY.

----------------------------------Step 1-----------------------------------------
Open the VideoCache configuration file located at /etc/videocache.conf and modify
any options you want. Once you are done, save the file.

----------------------------------Step 2-----------------------------------------
Run vc-update command to update your installation in accordance with new options.
[root@white-magnet ~]# vc-update

----------------------------------Step 3-----------------------------------------
Restart Apache web server on your machine by using the following command
[root@white-magnet ~]# apachectl -k restart

----------------------------------Step 4-----------------------------------------
Depending on the version of your Squid, open vc_squid_2.conf or vc_squid_3.conf
in your VideoCache bundle. Copy all the lines and paste them at the top of your
Squid configuration file squid.conf.

Also, add the following lines at the top of your Squid config file squid.conf.
#-----------------CUT FROM HERE-------------------
access_log /var/log/squid3/access.log
acl this_machine src 127.0.0.1 192.168.1.2
http_access allow this_machine
#-----------------CUT TILL HERE-------------------

----------------------------------Step 5-----------------------------------------
Restart videocache scheduler vc-scheduler using the following command.
[root@white-magnet ~]# vc-scheduler -s restart

----------------------------------Step 6-----------------------------------------
Restart Squid proxy server daemon using the following command.
[root@white-magnet ~]# /etc/init.d/squid restart

----------------------------------Step 7-----------------------------------------
Go the videocache log directory /var/log/videocache/ and check various log files
to have a look at videocache activity.

Check Manual.pdf file for detailed configurations of squid, apache and videocache.
In case of any bugs or problems, visit http://cachevideos.com/ and contact us.
[root@white-magnet videocache-2.3]$