.. index:: squidclamav_5.7 .. meta:: :noindex: robots squidclamav 5.7 ================ .. warning:: このコンテンツは古くなりました。手順通り実施してもインストールできない可能性があります。 .. contents:: Contents =========== 実行環境 =========== :ref:`sl_6.4` =========== 最終検証日 =========== 2014/06/03 =========== 依存関係 =========== * :doc:`../../library/openssl/index` * :doc:`../../middle/squid/index` * :doc:`../../middle/clamav/index` =========== コンパイル =========== .. note:: 基本的には管理者ユーザ(rootなど)で実施していることを前提としています .. code-block:: bash #------------------------------------------------------------ # squidclamav-5.7 #------------------------------------------------------------ BASE=/opt/brew export PATH=${BASE}/bin:${PATH} export PYTHONPATH=${BASE}/seo export LD_LIBRARY_PATH=${BASE}/lib export LD_RUN_PATH=${BASE}/lib export LDFLAGS="-L${BASE}/lib -R${LD_RUN_PATH}" export LC_ALL=C export CPPFLAGS="-I${BASE}/include" # ソースダウンロード先 comp_dir=/usr/local/src # パッケージ名 pack_name=squidclamav # バージョン version=-5.7 # ソースのファイル形式 ext=.tar.gz # tar解凍時のオプション ext_opt=z # インストール先ディレクトリ ins_dir=/opt/${pack_name}/${version##-} # ダウンロード元パッケージ dl_uri="http://downloads.sourceforge.net/project/squidclamav/squidclamav/5.7/squidclamav-5.7.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsquidclamav%2Ffiles%2Fsquidclamav%2F5.7%2F&ts=1402040013&use_mirror=citylan" cd ${comp_dir} rm -rf ${pack_name}${version} test -f ${pack_name}${version}${ext} \ || wget ${dl_uri} -O ${pack_name}${version}${ext} tar ${ext_opt}xf ${pack_name}${version}${ext} cd ${pack_name}${version} ./configure \ --prefix=${ins_dir} \ --with-openssl=${ins_dir} \ && make \ && make install ================ Pathの設定 ================ .. code-block:: bash for type in sbin bin lib lib64 include do for src in $(find ${ins_dir}/${type} -xtype f) do parent=`dirname ${src#*/${type}/}` filename=`basename ${src}` mkdir -p /opt/brew/$type/$parent echo "ln -fs ${src} ${BASE}/${type}/${parent}/${filename}" ln -fs ${src} ${BASE}/${type}/${parent}/${filename} done done grep -q ${BASE}/bin ~/.bashrc \ || echo "export PATH=${BASE}/bin:${BASE}/sbin:"'${PATH}' >> ~/.bashrc \ ; source ~/.bashrc ======================== 主なconfigureオプション ======================== ``--prefix=[DIR]`` インストール先ディレクトリの指定 =============== 設定ファイル =============== squidclamav.conf --------------------- {PREFIX}/etc/ の配下に作成されています。 .. code-block:: bash # ファイルの格納場所がわからない場合、下記コマンドを実行します # -f オプションの説明のところに記載があります squid --help squid.conf ------------ squidの設定ファイルに下記を追記します。 あらかじめ設定が重複している場合は既存を上書きしてください。 .. code-block:: bash url_rewrite_program /opt/brew/bin/squidclamav url_rewrite_children 15 acl purge method PURGE http_access deny to_localhost http_access allow localhost http_access allow purge localhost http_access deny purge url_rewrite_access deny localhost ============== 動作確認 ============== テストウィルスの仕込まれたファイルをダウンロードしてみて、拒否されるかを確認します。 http://www.eicar.org/download/eicar_com.zip