Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to achieve FreeBSD ports acceleration

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

How to achieve FreeBSD ports acceleration, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

Because ports is downloaded with a single thread by default, no matter how good your network is, the speed is so slow that you can't take advantage of your high bandwidth at all. So we need to use wget or axel software to provide multithreaded downloads.

Since I was transferred by a linux user, I am familiar with wget. Today, we just use wget to speed up the download.

First, install wget

Freebsd does not have wget installed by default, so we need to install it ourselves, as follows.

[root@fb / etc] # whereis wget\\ find the location of wget

Wget:/usr/ports/ftp/wget

[root@fb / etc] # cd / usr/ports/ftp/wget

[root@fb / usr/ports/ftp/wget] # make install clean\\ compile and install wget. As it is a tool, we do not need to add any parameters. The default is fine.

After the installation is complete, look for it with whereis wget

[root@fb / usr/ports/ftp/wget] # whereis wget

Wget: / usr/local/bin/wget / usr/local/man/man1/wget.1.gz / usr/ports/ftp/wget

You will find that there is already an execution file for wget. At this point the wget installation is complete

Second, let ports call wget download tool.

Modify / etc/make.conf with a text editor that you are familiar with, and the content is as follows

[root@fb / usr/ports/ftp/wget] # cat / etc/make.conf

# added by use.perl 2009-12-08 05:34:56

PERL_VERSION=5.8.9

FETCH_CMD=wget-c-t 1

DISABLE_SIZE=yes

The wget-c parameter means that the breakpoint resume function is turned on, and-t is the number of retries to connect.

If you want wget to traverse the proxy server, you need to add the following two lines

FETCH_ENV=http_proxy= http://proxy.isadba.com:3128\\ http proxy

FETCH_ENV=ftp_proxy= http://proxy.isadba.com:3128\\ ftp proxy

\\ proxy.isadba.com is the proxy server 3128 is the port

With axel downloads, because axel is a tool that supports multithreaded downloads, the download speed is better than wget.

First, install axel

[root@fb ~] # whereis axel

Axel: / usr/ports/ftp/axel

[root@fb ~] # cd / usr/ports/ftp/axel/

[root@fb / usr/ports/ftp/axel] # make install clean

II. Modify / etc/make.conf

FETCH_CMD=axel-n 10

If you want axel to traverse the proxy server, you need to add the following two lines

FETCH_ENV=http_proxy= http://proxy.isadba.com:3128\\ http proxy

FETCH_ENV=ftp_proxy= http://proxy.isadba.com:3128\\ ftp proxy

After completing the above work, you can try to install the software using ports, which should be much faster.

After reading the above, have you mastered how to achieve FreeBSD ports acceleration? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report