> ## Content Index
> Fetch the complete content index at: https://note.xdq.me/llms.txt
> Use this file to discover other available public pages before exploring further.

# centos 7  安装polipo
- URL: https://note.xdq.me/centos-7-an-zhuang-polipo/
- Published: 2015-01-19T01:24:40.000Z
- Updated: 2026-10-03T03:08:10.000Z
- Author: xud6
- Tags: centos, linux, proxy, #Import 2026-10-03 02:45

#### 下载

```
git clone https://github.com/jech/polipo.git
cd polipo

```

#### (可选)使用发布的版本

```
git checkout polipo-1.1.1

```

#### 安装

```
make all
su -c 'make install'

```

#### 建立配置文件

```
mkdir /opt/polipo
nano /opt/polipo/config

```

复制http://www.pps.univ-paris-diderot.fr/\~jch/software/polipo/config.sample 内容并编辑

#### 建立polipo账户

```
useradd polipo -r -s /usr/sbin/nologin

```

#### 新建启动脚本

```
nano /etc/systemd/system/polipo.service

```

内容为

```
[Unit]
Description=polipo web proxy
After=network.target

[Service]
Type=simple
WorkingDirectory=/tmp
User=polipo
Group=polipo
ExecStart=/usr/bin/polipo -c /opt/polipo/config
Restart=always
SyslogIdentifier=Polipo

[Install]
WantedBy=multi-user.target

```

#### 打开防火墙

```
firewall-cmd --permanent --add-port=8123/tcp
firewall-cmd --reload

```

#### 尝试启动服务

```
systemctl start polipo

```

#### 查看是否被selinux阻挡

```
sudo cat /var/log/audit/audit.log | grep polipo | grep denied

```

#### 配置selinux rule

```
sudo cat /var/log/audit/audit.log | grep polipo | grep denied | audit2allow -M mypolipo
sudo semodule -i mypolipo.pp

```

#### 重复以上操作直至selinux不再阻挡

#### 自动启动服务

```
systemctl enable polipo

```