[Essence] FreeBSD-FAQ (3)

Source: Internet
Author: User
Tags proxychains

24: How can I allow netmeeting to pass through my FreeBSD firewall?

Http://www.chinaunix.net/forum/viewtopic.php? T = 16320

 

25: What should I pay attention to when adduser is used to add users to FreeBSD?

I encountered such a problem when creating a user. Could you please give me some advice !!! The following are my steps. Is this correct.
Dell2650b # adduser
Use Option ''-silent'' if you don't want to see all warnings and questions.

Check/etc/shells
Shell:/usr/local/bin/bash not executable!
Check/etc/master. passwd
Check/etc/group
User ''/wheel/Tony'' has GID 1002 but a group with this GID does not exist.
Usernames must match Regular Expression: [lydong]:
Enter your default shell: CSH date no sh tcsh [tcsh]:
Your default shell is: tcsh->;/bin/tcsh
Enter your default home partition: [/home/lydong]:
Create/home/lydong
Copy dotfiles from:/usr/share/skel no [/usr/share/skel]:
Send message from file:/etc/adduser. Message no Y [y]: N
Use passwords (y/n) [y]: Y

Write your changes to/etc/adduser. conf? (Y/n) [N]: Y

OK, let's go.
Don't worry about mistakes. I will give you the chance later to correct any input.
Enter username [lydong]: luoyaodong
Username doesn' t match the Regexp/lydong/
Enter username [lydong]: lydong
Please enter a username
Enter username [lydong]: oeheonse
Username doesn' t match the Regexp/lydong/
Enter username [lydong]: ^ C

In adduser. conf, usernameregexp specifies a regular expression used to verify the new user name. You can modify this value to force the user name to comply with your requirements.
The default value is:
Usernameregexp = '^ [a-z0-9 _] [a-z0-9 _-] * $'
This means that the user name must start with a-Z, 0-9, and '_', followed by multiple A-Z, 0-9, '_', and '-' characters, when you add a new user, adduser uses this regular expression to verify whether your user name is compliant.

After reading your output:
Usernames must match Regular Expression: [lydong]:
This indicates that you have set the regular expression to lydong, and then apply this regular expression to verify that your new user name cannot be used (unless you enter lydong ).

Modification is also simple, modify to usernameregexp = '^ [a-z0-9 _] [a-z0-9 _-] * $.

 

26: How can I optimize my FreeBSD system?
Http://www.chinaunix.net/forum/viewtopic.php? T = 98645
This link is a Chinese version of man tuning.

 

27: how to view make parameters of ports installed
Example: view the make install parameter of the php4-extensions
CAT/var/DB/ports/php4-extensions/options

Copying/var/DB/ports/php4-extensions/files to another server at the same location saves the trouble of manually specifying the make Parameter

28: Why can't I use PQ to adjust partitions or install FreeBSD?

Because FreeBSD cannot be installed in the FAT32 or NTFS file system!

FreeBSD installation problems:

First, several terms should be put forward:

Available space: unused part of the "partition"
Free Space: Extended partitions in Windows that are not divided into logical drives
Unallocated space: unformatted space when you buy a new hard disk

Many of my friends said they used software such as PQ to adjust the disk through excessive partitions (I don't know if PQ can be adjusted out of "unallocated space". I personally don't like the software.
To install FB. However, you ignore this: Unix cannot be installed in the extended partition of windows. Of course, it also includes various logical drives and can only be installed in "unallocated space ". Great
The mistake is to use PQ to adjust the existing windows logical drive so that there is a relatively large logical drive, but FreeBSD only recognizes Win's primary score when splitting "slices ".
Partition and extended partition. The specific expansion partition contains several logical drives, BSD is not concerned, which leads to the reason that the XX disk cannot be installed after a lot of effort.

 

For friends who want to install Bsd on a real hard disk through a VM, they should also pay attention to this point. The hard disk can only use "unallocated space ", select the entire disk for installation instead
Select partitions for installation. Relatively speaking, if you choose to use the entire disk for installation, it will be consistent with the situation when we install the dual system, making it easier to ensure that data will not be lost during the installation process.

"Slice" and "partition" in FreeBSD system"

This problem may be troublesome. We need to compare it with win.

In Windows, we all know that the system divides hard disks into logical drives for management. We can understand this management method in Windows as follows: the entire hard disk is a building.
Floor, C, D, E, and other disks become the first floor, second floor, and third floor of the building .... The room on each floor is equivalent to various folders in the drive; FreeBSD divides such a building into one piece.
(Slice), each floor corresponds to a mount point: //,/root,/var,/usr ...... then each folder corresponds to each room on the floor. If you do not understand
For Windows, there are four logical drivers C, D, E, F, for FB, it becomes /,
Swap, I am a 40 Gb hard drive,
If the space is relatively sufficient, 1 GB space is allocated.)/var (or something else) and/usr (it is generally recommended to separate this partition ).

[This post was last edited by Jianxin at on May 11,]

 

29: how to shorten the download time when installing ports

[Color = Green] method A: Use a proxy.

[Color = Blue] Set in/etc/make. conf:
Fetch_env = "http_proxy = IP [: Port]"
If necessary, add a space after the fetch_env value,
Http_proxy_auth = Basic: *: User: Password

[Color = Green] Method B: Fetch on other machines

[Color = Navy] Make fetch-recursive
...
Then, remove/usr/ports/distfiles.

[Color = Green] method C: Use wget/Axel/proz to accelerate your port download

[Color = Navy]
The following functions are implemented by modifying make. conf.

For wget
==========
Fetch_cmd = wget
Fetch_before_args =-c-t 1
Fetch_after_args =
Disable_size = yes # This line is necessary, otherwise...

The first three rows can also be replaced
Fetch_cmd = wget-c-t 1

If you want wget to penetrate the proxy server, add the following two lines
Fetch_env = http_proxy = http://proxy2.zsu.edu.cn: 3128
Fetch_env = ftp_proxy = http://proxy2.zsu.edu.cn: 3128

Or use another traversal agent tool, such as proxychains or SOCKS5 (runsocks)
Fetch_cmd = proxychains wget or runsocks wget

What? I don't know what wget is? First
CD/usr/ports/FTP/wget/
Make install clean

For Axel
==========
Similarly, you can use Axel to replace fetch for multi-thread download.
Fetch_cmd = Axel
Fetch_before_args =-
Fetch_after_args =
Disable_size = Yes
Or write only one row.
Fetch_cmd = Axel-

The method used by Axel to penetrate the proxy server is the same as that used by wget.

Axel in/usr/ports/FTP/Axel location

For proz
==========
Similarly, you can use proz to replace fetch for multi-thread download.
Fetch_cmd = proz-R
Disable_size = Yes

The method for proz to penetrate the proxy server is the same as that for wget.

Proz in/usr/ports/FTP/proz

Add a faster port download site
================================
In addition, the following two lines can be added to allow make to download the port from a faster site.

Master_site_override =/
Ftp://ftp2.tsinghua.edu.cn/mirror/FreeBSD/ports/distfiles/
Ftp://freebsd.csie.nctu.edu.tw/pub/FreeBSD/ports/distfiles/
Ftp://ftp.hk.freebsd.org/pub/FreeBSD/ports/distfiles/
Ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/distfiles/
This is the settings of CERNET. The Internet brothers can do it.

[This post was last edited by vcynosure at]

 

30. How to forcibly install the new version ports on the basis of the old version ports?

# Make install-d "force_pkg_register" clean

It seems to be effective only in some ports that are not very important, my original glib-2.6.x, forced installation of glib-2.8.5 successful, but forced installation of linux_base-8 seems to fail)

 

31. How to make ports do not check MD5 and sha256 of the downloaded software during installation

Sometimes we have some problems when installing the software from ports, for example, vsftpd I like to change something and install it. In this case, we can use
# Make no_checksum = Yes
To skip the MD5 and sha256 checks. unless forced or confident in your modifications, make is recommended not to use this parameter.

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.