CentOS 6.4安装配置squid

一、环境

系统     CentOS 6.4x64最小化安装

IP      192.168.1.11

二、安装squid

下载软件包

[[email protected] ~]# wget http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE20.tar.gz

安装

[[email protected] ~]# tar xf squid-3.0.STABLE20.tar.gz 
[[email protected] ~]# cd squid-3.0.STABLE20

#设置打开最大文件数目
[[email protected] squid-3.0.STABLE20]# ulimit  -Hn 20480
[[email protected] squid-3.0.STABLE20]# echo "ulimit -Hn 20480" >>/etc/rc.local 

#设置端口范围
[[email protected] squid-3.0.STABLE20]# echo "net.ipv4.ip_local_port_range = 4000   65000" >>/etc/sysctl.conf 
[[email protected] squid-3.0.STABLE20]# sysctl -p |grep port_range
net.ipv4.ip_local_port_range = 4000   65000

[[email protected] squid-3.0.STABLE20]# ./configure  --prefix=/usr/local/squid3.0 > --enable-async-io=100 > --with-pthreads > --enable-storeio="aufs,diskd,ufs" > --enable-removal-policiles="heap,lru" > --enable-icmp > --enable-delay-pools > --enable-useragent-log > --enable-referer-log > --enable-kill-parent-hack > --enable-cachemgr-hostname=localhost > --enable-arp-acl > --enable-default-err-language=English > --enable-err-languages="Simplify_Chinese English" > --disable-pool > --disable-wccp > --disable-wccpv2 > --disable-ident-lookups > --disable-internal-dns > --enable-basic-auth-helpers="NSCA" \        #在编译的时候这个选项报错,ERROR: Basic auth helper NSCA does not exists
> --enable-stacktrace > --with-large-files > --disable-mempools > --with-filedescriptors=64000 > --enable-ssl > --enable-x-accelerator-vary > --disable-snmp > --with-aio > --enable-linux-netfilter > --enable-linux-tproxy

#注在make阶段如果报关于ssl的错误,请安装yum install openssl-devel后重新./configure
[[email protected] squid-3.0.STABLE20]# make
[[email protected] squid-3.0.STABLE20]# make install
[[email protected] squid-3.0.STABLE20]# ln -s /usr/local/squid3.0/ /usr/local/squid
[[email protected] squid-3.0.STABLE20]# ll /usr/local/ |grep squid
lrwxrwxrwx  1 root root   20 Jul 19 22:09 squid -> /usr/local/squid3.0/
drwxr-xr-x  8 root root 4096 Jul 19 22:06 squid3.0
时间: 2024-08-07 13:00:17

CentOS 6.4安装配置squid的相关文章

CentOS 6.5安装配置LNMP服务器(Nginx+PHP+MySQL)

CentOS 6.5安装配置LNMP服务器(Nginx+PHP+MySQL) 一.准备篇: 1 /etc/init.d/iptables stop #关闭防火墙 2 关闭SELINUX 3 vi /etc/selinux/config 4 #SELINUX=enforcing #注释掉 5 #SELINUXTYPE=targeted #注释掉 6 SELINUX=disabled #增加 7 :wq 8 shutdown -r now #重启系统 二.安装篇 1.安装nginx 1 yum re

CentOS 7.0安装配置Vsftp服务器步骤详解

安装Vsftp讲过最多的就是在centos6.x版本中了,这里小编看到有朋友写了一篇非常不错的CentOS 7.0安装配置Vsftp服务器教程,下面整理分享给各位. 一.配置防火墙,开启FTP服务器需要的端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止

CentOS 7.0安装配置LAMP服务器(Apache+PHP+MariaDB)

原文 CentOS 7.0安装配置LAMP服务器(Apache+PHP+MariaDB) 一.配置防火墙,开启80端口.3306端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 2.安装iptables防火墙 yum insta

[LTMP搭建] Centos 6.5 安装配置 PHP

接上篇:http://www.cnblogs.com/antarctican/p/3748427.html (安装Mysql) 下载PHP. 我选择了日本线路,比内地和台湾线路快得多. [[email protected] src]# wget -c http://jp2.php.net/distributions/php-5.3.28.tar.gz 4. 安装 tengine 2.0.4 查看 version时, 提示 libssl.so.1.0.0 找不到 ? 1 2 [[email pro

Centos 6.4安装配置apache平台的svn服务器

一.安装apache.subversion服务 #yum install httpd subversion subversion-devel mod_dav_svn -y 二.配置apache服务器 # sed '{/^$/d;/#/d}' /etc/httpd/conf/httpd.conf ServerTokens OS ServerRoot "/etc/httpd" PidFile run/httpd.pid Timeout 60 KeepAlive Off MaxKeepAli

CentOS下Redisserver安装配置

1.CentOS 6.6下Redis安装配置记录 2.CentOS下Redisserver安装配置

CentOS 7.x安装配置

简述 VMware可以创建多个虚拟机,每个虚拟机上都可以安装各种类型的操作系统.安装方法也有很多种.下面,主要以ISO镜像安装为例,介绍CentOS 7.x的安装过程及相关的参数设置. 简述 创建虚拟机 安装CentOS 重启 更多参考 创建虚拟机 打开VMware,单击右侧的[创建新虚拟机]选项,开始创建虚拟机. 选择[稍后安装操作系统],单击[下一步]按钮. 选择要在虚拟机上安装的[客户机操作系统]及对应的[版本],选择"Linux"与"CentOS"(注意:如

CentOS 7.0 安装配置LAMP服务器方法(Apache+PHP+MariaDB)

一.配置防火墙,开启80端口.3306端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 2.安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/ip

如何在CentOS系统中安装配置SNMP服务

CentOS(Community Enterprise Operating System,中文意思是:社区企业操作系统)是Linux发行版之一,现在有一大部分服务器在使用此操作系统:SNMP(简单网络管理协议)能够使网络管理员提高网络管理效能,及时发现并解决网络问题以及规划网络的增长.网络管理员还可以通过SNMP接收网络节点的通知消息以及告警事件报告等来获知网络出现的问题.本文主要介绍如何在CentOS系统中安装配置SNMP服务. 工具/原料 CentOS操作系统 方法/步骤 使用SNMP服务前