- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。
我们不允许在 Stack Overflow 上提出有关专业服务器或网络相关基础设施管理的问题。您可以编辑问题,使其成为 on-topic对于堆栈溢出。
3个月前关闭。
Improve this question
我想在 Ubuntu 上安装最新的 tinyproxy 版本 1.11.0。我怎样才能做到这一点?
不幸的是 sudo apt update; sudo apt install tinyproxy -y;
不适合我,只给我 2018 年最新的稳定版本 1.10.0。
所以我尝试在 GitHub 上下载并解压缩最新版本
https://github.com/tinyproxy/tinyproxy/releases
但我还不能让它正常安装。
到目前为止我尝试过的:
sudo apt update;
... [loading the unzipped tinyproxy 1.11.0 folder via own GitHub repo]
cd OwnGitHubRepo/tinyproxy-1.11.0
sudo apt-get install build-essential -y
sudo apt install autoconf -y
autoconf
./configure
make
sudo make install
安装似乎一直以
tinyproxy -v
的方式运行。返回:
tinyproxy 1.11.0
但是我现在无法运行我通常会执行的以下命令:
sudo /etc/init.d/tinyproxy restart;
因为有
/etc/ 内没有 tinyproxy 文件夹尚未上市。 :/
sudo lsof -i:8888
还没有显示任何列表服务器)
最佳答案
ubuntu@ip-172-30-2-209:~$ sudo su -
root@ip-172-30-2-209:~#
root@ip-172-30-2-209:~# apt-get update
root@ip-172-30-2-209:~# apt-get dist-upgrade
如果有新内核可用,您可以重新启动服务器
root@ip-172-30-2-209:~# reboot
root@ip-172-30-2-209:~# apt-get install build-essential
root@ip-172-30-2-209:~# apt-get install autoconf
root@ip-172-30-2-209:~# wget https://github.com/tinyproxy/tinyproxy/releases/download/1.11.0/tinyproxy-1.11.0.tar.bz2
root@ip-172-30-2-209:~# tar -jxvf tinyproxy-1.11.0.tar.bz2
root@ip-172-30-2-209:~# cd tinyproxy-1.11.0/
root@ip-172-30-2-209:~/tinyproxy-1.11.0# ./configure
root@ip-172-30-2-209:~/tinyproxy-1.11.0# make
root@ip-172-30-2-209:~/tinyproxy-1.11.0# make install
要跟踪的重要目录/文件:
/usr/bin/mkdir -p '/usr/local/bin'
/usr/bin/install -c tinyproxy '/usr/local/bin'
/usr/bin/mkdir -p '/usr/local/share/tinyproxy'
/usr/bin/install -c -m 644 debug.html default.html stats.html '/usr/local/share/tinyproxy'
/usr/bin/mkdir -p '/usr/local/etc/tinyproxy'
/usr/bin/install -c -m 644 tinyproxy.conf '/usr/local/etc/tinyproxy'
/usr/bin/mkdir -p '/usr/local/share/man/man5'
/usr/bin/install -c -m 644 tinyproxy.conf.5 '/usr/local/share/man/man5'
/usr/bin/mkdir -p '/usr/local/share/man/man8'
/usr/bin/install -c -m 644 tinyproxy.8 '/usr/local/share/man/man8'
/usr/bin/mkdir -p '/usr/local/share/doc/tinyproxy'
/usr/bin/install -c -m 644 AUTHORS NEWS README README.md '/usr/local/share/doc/tinyproxy'
root@ip-172-30-2-209:~/tinyproxy-1.11.0# ln -s /usr/local/etc/tinyproxy /etc/
root@ip-172-30-2-209:~/tinyproxy-1.11.0# ls -la /etc/ | grep tinyproxy
lrwxrwxrwx 1 root root 24 Apr 3 09:53 tinyproxy -> /usr/local/etc/tinyproxy
检查nobody用户组
root@ip-172-30-2-209:~/tinyproxy-1.11.0# cat /etc/passwd | grep nobody
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
root@ip-172-30-2-209:~/tinyproxy-1.11.0# cat /etc/group | grep 65534
nogroup:x:65534:
由于nobody 被分配到nogroup 组,因此将tinyproxy 配置中的Group 元素从nobody 组更改为nogroup
root@ip-172-30-2-209:~/tinyproxy-1.11.0# sed -i s/'Group nobody'/'Group nogroup'/g /etc/tinyproxy/tinyproxy.conf
根据您的期望配置其余的 tinyproxy(这是最小设置)
root@ip-172-30-2-209:~/tinyproxy-1.11.0# cat /etc/tinyproxy/tinyproxy.conf | grep -v "^#\|^$"
User nobody
Group nogroup
Port 8888
Timeout 600
DefaultErrorFile "/usr/local/share/tinyproxy/default.html"
StatFile "/usr/local/share/tinyproxy/stats.html"
LogLevel Info
MaxClients 100
Allow 127.0.0.1
Allow ::1
ViaProxyName "tinyproxy"
测试连接
root@ip-172-30-2-209:~/tinyproxy-1.11.0# tinyproxy -d -c /etc/tinyproxy/tinyproxy.conf
NOTICE Apr 03 09:56:13.294 [8179]: Initializing tinyproxy ...
NOTICE Apr 03 09:56:13.294 [8179]: Reloading config file
INFO Apr 03 09:56:13.294 [8179]: Setting "Via" header to 'tinyproxy'
NOTICE Apr 03 09:56:13.294 [8179]: Reloading config file finished
INFO Apr 03 09:56:13.294 [8179]: listen_sock called with addr = '(NULL)'
INFO Apr 03 09:56:13.294 [8179]: trying to listen on host[0.0.0.0], family[2], socktype[1], proto[6]
INFO Apr 03 09:56:13.294 [8179]: listening on fd [3]
INFO Apr 03 09:56:13.294 [8179]: trying to listen on host[::], family[10], socktype[1], proto[6]
INFO Apr 03 09:56:13.294 [8179]: listening on fd [4]
INFO Apr 03 09:56:13.294 [8179]: Now running as group "nogroup".
INFO Apr 03 09:56:13.294 [8179]: Now running as user "nobody".
INFO Apr 03 09:56:13.294 [8179]: Setting the various signals.
INFO Apr 03 09:56:13.294 [8179]: Starting main loop. Accepting connections.
CTRL+C
root@ip-172-30-2-209:~/tinyproxy-1.11.0# nano /lib/systemd/system/tinyproxy.service
[Unit]
Description=tinyproxy service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=nobody
Group=nogroup
ExecStart=/usr/local/bin/tinyproxy -d -c /etc/tinyproxy/tinyproxy.conf
[Install]
WantedBy=multi-user.target
root@ip-172-30-2-209:~/tinyproxy-1.11.0# systemctl enable tinyproxy.service
Created symlink /etc/systemd/system/multi-user.target.wants/tinyproxy.service → /lib/systemd/system/tinyproxy.service.
root@ip-172-30-2-209:~/tinyproxy-1.11.0# systemctl status tinyproxy.service
● tinyproxy.service - tinyproxy service
Loaded: loaded (/lib/systemd/system/tinyproxy.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-04-03 10:00:20 UTC; 5s ago
Main PID: 8236 (tinyproxy)
Tasks: 1 (limit: 1145)
Memory: 1.0M
CGroup: /system.slice/tinyproxy.service
└─8236 /usr/local/bin/tinyproxy -d -c /etc/tinyproxy/tinyproxy.conf
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: Setting "Via" header to 'tinyproxy'
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: NOTICE Apr 03 10:00:20.980 [8236]: Reloading config file finished
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: listen_sock called with addr = '(NULL)'
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: trying to listen on host[0.0.0.0], family[2], socktype[1], proto[6]
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: listening on fd [3]
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: trying to listen on host[::], family[10], socktype[1], proto[6]
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: listening on fd [4]
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: Not running as root, so not changing UID/GID.
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: Setting the various signals.
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: Starting main loop. Accepting connections.
安装 net-tools 检查监听端口
root@ip-172-30-2-209:~/tinyproxy-1.11.0# apt-get install net-tools
root@ip-172-30-2-209:~/tinyproxy-1.11.0# netstat -napt | grep LISTEN | grep tinyproxy
tcp 0 0 0.0.0.0:8888 0.0.0.0:* LISTEN 8236/tinyproxy
tcp6 0 0 :::8888 :::* LISTEN 8236/tinyproxy
root@ip-172-30-2-209:~/tinyproxy-1.11.0# lsof -i:8888
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
tinyproxy 8236 nobody 3u IPv4 34119 0t0 TCP *:8888 (LISTEN)
tinyproxy 8236 nobody 4u IPv6 34120 0t0 TCP *:8888 (LISTEN)
root@ip-172-30-2-209:~/tinyproxy-1.11.0# mkdir /var/run/tinyproxy/
root@ip-172-30-2-209:~/tinyproxy-1.11.0# mkdir /var/log/tinyproxy/
root@ip-172-30-2-209:~/tinyproxy-1.11.0# chown -R nobody:nogroup /var/run/tinyproxy/
root@ip-172-30-2-209:~/tinyproxy-1.11.0# chown -R nobody:nogroup /var/log/tinyproxy/
在 tinyproxy 配置中添加 pid 和 log 参数
root@ip-172-30-2-209:~/tinyproxy-1.11.0#
root@ip-172-30-2-209:~/tinyproxy-1.11.0# cat /etc/tinyproxy/tinyproxy.conf | grep ^LogFile
LogFile "/var/log/tinyproxy/tinyproxy.log"
root@ip-172-30-2-209:~/tinyproxy-1.11.0# cat /etc/tinyproxy/tinyproxy.conf | grep ^PidFile
PidFile "/var/run/tinyproxy/tinyproxy.pid"
重启服务
root@ip-172-30-2-209:~/tinyproxy-1.11.0# systemctl restart tinyproxy.service
b) 过程限制
root@ip-172-30-2-209:~# ps aux | grep tinyproxy
nobody 64427 9.8 0.5 789836 10232 ? Ssl 12:11 0:00 /usr/local/bin/tinyproxy -d -c /etc/tinyproxy/tinyproxy.conf
root 65436 0.0 0.0 7696 644 pts/0 S+ 12:11 0:00 grep --color=auto tinyproxy
root@ip-172-30-2-209:~# cat /proc/64427/limits | grep "Max processes\|Max open files"
Max processes 7151 7151 processes
Max open files 1024 524288 files
要提高这些,请编辑/lib/systemd/system/tinyproxy.service 文件并在 [Service] 部分添加以下行
[Service]
...
LimitNOFILE=700000
LimitNPROC=700000
...
然后重新加载systemd并重启服务
root@ip-172-30-2-209:~# systemctl daemon-reload
root@ip-172-30-2-209:~# systemctl restart tinyproxy.service
检查结果
root@ip-172-30-2-209:~# ps axu | grep tinyproxy
nobody 68439 0.6 0.1 533092 3068 ? Ssl 12:13 0:00 /usr/local/bin/tinyproxy -d -c /etc/tinyproxy/tinyproxy.conf
root 68490 0.0 0.0 7696 656 pts/0 S+ 12:13 0:00 grep --color=auto tinyproxy
root@ip-172-30-2-209:~# cat /proc/68439/limits | grep "Max processes\|Max open files"
Max processes 700000 700000 processes
Max open files 700000 700000 files
关于linux - tinyproxy:如何在 Ubuntu 上手动安装最新版本 1.11.0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71717463/
我正在尝试使用以下命令在远程 Ubuntu 服务器的后台运行进程: sshpass -p PASSWORD ssh root@HOST 'nohup COMMAND-THAT-BLOCKS &' 不幸
普通 Ubuntu 和 ARM Ubuntu 有什么区别。我可以运行所有应用程序吗也在 ARM Ubuntu 中的普通 Ubuntu 下运行? Ubuntu 更新会自动发生吗? Torrent 下载器
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题? Update the question所以它是on-topic对于堆栈溢出。 9年前关闭。 Improve this que
我正在尝试预置 Xenial 图像,它工作得很好,除了分区。 cloud-init 只能增长根分区,并且在使用扩展分区内的根文件系统构建镜像时不起作用: NAME MAJ:MIN RM SIZ
我对 Ubuntu 和 OpenFoam 真的很陌生,所以尝试学习并做一些教程。我正在使用 Docker 在 Ubuntu 上使用 OpenFoam。 我将文件夹复制到特定目录,但是当我尝试使用终端访
我在使用系统启动设置运行软件时遇到问题。我有 ubuntu 20.04。我试图将这些行插入到 etc/rc.local #!/bin/bash /usr/bin/clamonacc 它不起作用。第二次
TARGETS = client server CL_OBJ = clientMain.o Controller.o UI.o List.o Movie.o Server.o Serializer.o
我有一个 ubuntu服务器系统是8.04 hardy ,我在哪里安装rabbitmq。 rabbitmq依赖于 erlang-nox (>= 1:12.b.3) ,但是在当前的 ubuntu 版本中
我有一个用于开发的 Ubuntu virtualbox 设置。当我在文件中处于 org-mode 时,org-mode 的任何热键都不起作用(例如 M-RETURN 用于创建新标题)。我该怎么做才能让
我的 SchemaCrawler(版本 15.01.03)模式图在 Ubuntu 18.04 LTS 上截断表名。看起来表格通常被画得太窄,因为“[TABLE]”符号也开箱即用。在我的 Mac 上渲染
在 Ubuntu 中,设置应用程序中有几个地方有一个非常漂亮的 ListView ,带有添加/删除按钮,包括外观、键盘布局、隐私、蓝牙等。他们使用什么小部件?我开始使用 Glade 开发我的第一个 U
需要帮助卸载 jjrofiler。没有意识到它需要许可证。通过 .sh 可执行文件安装。 最佳答案 如果您转到 jProfiler 安装目录,您将找到名为 uninstall 的可执行文件,只需从终端
我一直在寻找几天,我没有想出解决方案。我是 ruby 新手,但我想通过使用 spree 开发自己的在线商店。 我使用:rails:Rails 3.2.13 ruby :ruby-1.9.3-p42
我尝试使用以下命令从/usr/local/bin 中删除我的 python2.7 和 python3 文件夹:sudo rm -rf python2.7 和 sudo rm -rf python3。后
在 ubuntu 服务器中(使用 ssh 协议(protocol)), 如何更改因不活动而断开连接的时间? 最佳答案 你能在 .bash_profile 中加入“exec screen -R”,在 .
我使用以下配置在 /etc/apache2/site-available/mysite.local 中创建了一个虚拟主机: ServerAdmin webmaster@localhost
我为大约 210 个用户新设置了一个代理服务器。它运行 ubuntu server 2012 和 squid3。问题是在凌晨 1:30 之后,如果用户尝试打开 google.com、youtube.c
gitlab-ci-multi-runner 1.0.2 (ea19241) Using Shell executor... Running on ip-... Cloning repository.
我有一个备份服务器,它每小时接收许多 rsync 连接。由于打开太多 rsync 实例可能会导致崩溃,我想使用 Semaphore 来限制并发实例的数量。 .我的想法是这样的: ssh root@ba
我有同一个库的多个版本,我的程序动态链接到这些库。有时我想更改使用的版本。 我一直在阅读,出于安全原因,新版本的 Ubuntu 不再支持 LD_LIBRARY_PATH。我可以将路径添加到 /etc/
我是一名优秀的程序员,十分优秀!