Index ===== 1. Requires 2. Installation a. Using setup.py from source b. Manually from source step by step 3. Configuration 4. Bugs, Suggestions, Comments 5. Online Help 1. Requires =========== a. squid >= 2.6 b. python >= 2.4 c. python-urlgrabber d. python-iniparse e. Apache (httpd) or any other Web Server 2a. Installation (using setup.py from source) ============================================= a) Download latest version of intelligentmirror from http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/ . b) Untar the package. [root@localhost root]# tar -xvzf intelligentmirror-x.x.tar.gz c) Go to intelligentmirror-x.x directory [root@localhost root]# cd intelligentmirror-x.x d) Run setup.py as root for installing intelligentmirror NOTE : If you have installed squid from rpms, skip this note. If your squid config files are not in /etc/squid/ or you have installed squid from source, then please check the global variables in setup.py and change them accordingly. [root@localhost intelligentmirror-x.x]# python setup.py install BINGO!! You are done with installation. In case you get any error while installing intelligentmirror, there will be proper logging in intelligentmirror_setup.log in current directory. Skip to Configuration step (#3) now. 2b. Installation (from source step by step) ============================================ a) Download latest version of intelligentmirror from http://kulbirsaini.fedorapeople.org/stuff/intelligentmirror/ . b) Untar the package. [root@localhost root]# tar -xvzf intelligentmirror-x.x.tar.gz c) Go to intelligentmirror-x.x directory [root@localhost root]# cd intelligentmirror-x.x d) Copy intelligentmirror_sysconfig.conf to /etc/intelligentmirror.conf [root@localhost intelligentmirror-x.x]# cp intelligentmirror_sysconfig.conf /etc/intelligentmirror.conf e) Copy intelligentmirror_httpd.conf to /etc/httpd/conf.d/intelligentmirror.conf [root@localhost intelligentmirror-x.x]# cp intelligentmirror_httpd.conf /etc/httpd/conf.d/intelligentmirror.conf f) Copy update-im to /usr/sbin/update-im and change permission to executable. [root@localhost intelligentmirror-x.x]# cp update-im /usr/sbin/update-im [root@localhost intelligentmirror-x.x]# chmod 744 /usr/sbin/update-im g) Copy intelligentmirror directory to /etc/squid/ [root@localhost intelligentmirror-x.x]# cp -r intelligentmirror /etc/squid/ h) Create directories to cache rpm/deb packages [root@localhost root]# cd /var/spool/squid/ [root@localhost squid]# mkdir intelligentmirror [root@localhost squid]# mkdir intelligentmirror/tmp intelligentmirror/rpm intelligentmirror/deb [root@localhost squid]# chown -R squid:squid intelligentmirror [root@localhost squid]# chmod -R 755 intelligentmirror 3. Configuration ================ Assuming you have squid installed. The following configurations are required to get it running. Newbies are instructed to stick with default configuration as much as possible otherwise you'll be lost in directory permissions. Reload the httpd service as [root@localhost root]# service httpd reload Add the following lines to your squid.conf which is generally found in /etc/squid/squid.conf . # --BEGIN-- intelligentmirror config for squid # url_rewrite_program /usr/bin/python /etc/squid/intelligentmirror/intelligentmirror.py url_rewrite_children 20 acl intelligentmirror urlpath_regex -i \.rpm$ acl intelligentmirror urlpath_regex -i \.deb$ url_rewrite_access allow intelligentmirror cache deny intelligentmirror redirector_bypass on # --END-- intelligentmirror config for squid # Save squid.conf and reload the squid service using [root@proxy root]# service squid reload SEE README FILE FOR MORE CONFIGURATION OPTIONS. 4. Bugs, Suggestions, Comments =============================== Mail them to Kulbir Saini 5. Online Help ============== 1. Project Website : https://fedorahosted.org/intelligentmirror 2. How to configure squid http://fedora.co.in/content/how-configure-squid-proxy-server 3. How to write custorm squid redirector in python http://fedora.co.in/content/writing-custom-redirector-plugin-squid-python