How to modify the installation source under FreeBSD

Source: Internet
Author: User

There are generally two ways to install software in

Description:
FreeBSD:

(i), using Pk_add-r Package To install the software, package installed a compiled binary package, package the path of the default download package is in/var/db/pkg
(ii), using ports to compile the installation, ports is the download source to the local, To perform a compilation installation, the ports package path is in/usr/ports

The above two installation methods need to download the software package from the network, the default is to download the package from the official source, the speed is slow, You can modify the configuration file to specify a domestic mirror source to quickly install the software

1, modify pcakage source to 163 mirror source

setenv packagesite http://mirrors.163.com/FreeBSD/releases/i386/8.1-RELEASE/packages/Latest/
Pkg_add-r Package      #package为要安装的软件名

2, install ports source

portsnap Fetch- s portsnap.cn.freebsd.org      #安装ports
ee/etc/portsnap.conf   #编辑文件
servername=portsnap.cn.freebsd.org     #更改服务器为国内镜像
Press ESC to enter and press A to save
Portsnap Fetch extract    #下载ports快照
Portsnap update  #更新
ee/etc/make.conf  #编辑文件, add the following code
master_site_backup?=http://mirrors.163.com/freebsd/distfiles/${dist_subdir}/
Master_site_override?=${master_site_backup}
cd /usr/ports
Make search name=nginx     #查找ports中是否有nginx这个软件
cd /usr/ports/www/nginx   #进入软件包目录
Make install clean     #安装
Make deinstall clean   #卸载
make deinstall reinstall clean  #升级

Source system Operation Dimension osyunwei.com

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.