0
0

More than 3 years have passed since last update.

ローカル環境のCentOSにSquidをInstallした

Last updated at Posted at 2020-10-06

検証でSquidセットアップする必要があったのですが、基本的にインターネット接続なし。
ということで、ローカル環境でSquidセットアップする方法をまとめておきます。

経緯

・最初はUbuntu上にInstallしようと思った。
・踏み台サーバ経由でSquidファイル転送した。
・Ubuntuにインストールしようとするも、Gccエラー、Makeエラーで断念。
・結局、CentOSにInstallすることにしました。

環境

  • Ubuntu
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="14.04, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
  • CentOS
[root@centos squid-4.13]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

Ubuntuにインストール(途中まで)

踏み台サーバ経由でtarファイルを転送

 #scp ./squid-4.13.tar.gz root@172.22.2.102:/var/tmp/

SCPのPermissionエラーが出る場合はディレクトリの権限を変更します。

scpコマンドでPermission deniedが出るときの対処法

解凍

[root@centos etc]# tar zxvf squid-4.13.tar.gz

GCCのインストール

コンパイラがないというエラーが出るのでGCCをインストールします。

configure: error: no acceptable C compiler found in $PATH

<参考になったリンク>
https://gcc.gnu.org/
gccをソースからビルド/インストールする
configure, make, make install とは何か
./configure;make;make installにはどんな意味がある?
ソフトウェアパッケージのコンパイル、インストール、実行

makeのインストール

その後、./configureしてmakeしようとしたらmakeがないと怒られました。

ubuntu:~/tmp$ make
The program 'make' is currently not installed. You can install it by typing:
sudo apt-get install make

そこでUbuntu Packageからmakeをインストールしたのですが、考えたらこのファイルをmakeできない…詰んだ。

ということでCentOSにインストールすることにした。

CentOSにSquidインストール

  • 同様にSquidファイルをCentOSに転送
  • configure, make, make install

できました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0