[Essence] FreeBSD-FAQ (1)

Source: Internet
Author: User

1: What is BSD? 2
2: What are the advantages of FreeBSD? 3
3: I am now learning how to use FreeBSD. Where should I start? 4
4: Where can I get the FreeBSD CD? 5
5: How should I install FreeBSD? 6
6: Are there any FreeBSD tutorials? 7
7: how to compile the FreeBSD kernel? 8
8: how to install software under FreeBSD? 9
9: How to manage system accounts? 10
10: There is a command Foo. I want to know its details. What should I do? 11
11: Why can't I use root to connect to my Telnet/FTP? 12
12: Why can't I su root? 13
13: My root password is lost. What should I do? 14
14: How can I check my system's ports and programs? 15
15: I found that my system has opened a port XX. How can I disable it? 16
16: What should I do when the system starts automatically? 17
17: I modified/boot/loader. the system cannot be properly guided after Conf. When the machine starts to load/boot/defaults/loader. what should I do if the machine stops responding when conf (not loaded? (Provided by night coders) 18
18: How do I modify the information displayed during my Telnet logon? (Provided by night coders) 19
19: Are there any XXX software under ports? Under which directory? 20
20: What is the relationship between FreeBSD's release, stable, and current? 21
21: How can I move a system to a new hard disk? 22
22: Why am I already root, but I still have no permission to modify and upgrade the system? 23
23: How can I know whether the system is operating normally and whether I receive attacks? 24
24: How can I allow netmeeting to pass through my FreeBSD firewall? 25
25: What should I pay attention to when adduser is used to add users to FreeBSD? 26
26: How can I optimize my FreeBSD system? 27
27: How do I view the make parameter of ports installed? 28
28: Why can't I use PQ to adjust partitions or install FreeBSD? 29
29: how to shorten the download time by 30 when installing ports
30: How to forcibly install the new version ports on the basis of the old version ports? 31
31: How to make ports do not check MD5 and sha25632 of the downloaded software during installation
32: Other information about ports and packages 33. Transferred from freebsdchina, Author: bsdnewbie
33: how to clean man output to text 34
34: how to package the software in ports and its dependencies into TBZ? 35 from: congli
35: how to display and enter Chinese characters 36 in SSH to a remote system
36: in FB, set two ip37 from: webmasters for one Nic.
37: Root Mount failed: 638 from: congli

 

1: Brief History of BSD

To understand FreeBSD, you must first understand BSD. This article introduces the brief history of BSD. By understanding the development history of BSD, we can better understand FreeBSD.

BSD is "Berkely Software
The abbreviation of distribution is "Berkeley Software release ". Obviously, the name BSD is not the operating system we understand now, and its original intention is not a simple operation system.
System, but a whole set of software releases. The evolution from software release to operating system has a historical process, which is very important to FreeBSD.

The emergence of BSD dates back to the 1970s s of the last century. When Bill Joy, a student at UC Berkeley, completed "Berkely Software" in 1971
After the merge of distribution (including the Pascal system and an editor ex), even if BSD gave birth to the first release, and released about thirty free copies of the system
Bay.

The BSD user community has been expanding. By 1978, the software release version was updated and upgraded, and the second version of "Berkely Software" was generated.
Distribution ", that is, 2bsd, which includes the enhanced Pascal system, VI and termcap (Unix users will certainly name VI and termcap
Words are very friendly ). 2bsd's system copy is also free, and its last version 2.11bsd is still running in every corner of the world.

The popularity of VAX computers led to the birth of 3bsd at the end of 1979. 3bsd is Berkely's first VAX release, which is also published by Joy, including C
A large number of additional programs in shell and 2bsd releases, as well as virtual memory kernels and Standard 32/V (the last unix version of Bell Labs, running on VAX) utilities.

In October 1980, Joy launched a new release called 4bsd, including the PASCAL Compiler, Franz lisp system, and mail processing system. 4bsd supports the DARPA network. The copyright control is based on the university rather than a single computer.

In 1980, a Computer System Research
Group, Computer Systems Research Team) was formed to be responsible for the issuance of BSD, and on June 1981 released a new version called 4.1bsd. Note that not 5bsd.
Because at&t thinks that 5bsd will enable users to associate it with at&t UNIX System
V is obfuscated. Berkely agrees to change the naming rules for future BSD versions. Only the version number is kept on 4bsd, and only the minor version number after 4 is added later.

4.2bsd was officially released on December 18, August 1983. It issued more than 1000 site licenses within 18 months and is a well-known version. By June 1986, 4.3bsd
Released. In 1988, csrg released 4.3bsd-Tahoe. This is the first version to break down the BSD kernel into two parts: Machine-dependent and machine-independent. This is very valuable.
, Which enables BSD to be transplanted to many different architectures.

BSD uses at&t
Part of the UNIX source code. When the at&t source code license fee increases, some vendors who want to use BSD code to produce TCP/IP-based networking products for PCs require
Berkely separates at&t code from the BSD release and issues them with separate license terms without the need for at&t source code licenses. Therefore
In June 1989, a BSD version without at&t UNIX code was born, called "Networking release
1 ". This is the first free-redistributable Code released by Berkely. It allows authorized users to use source code or binary code.
The modified or modified code is released in the form of, and the royalty can not be reported to Berkely, the only requirement is to keep the Berkely copyright statement intact in the source code file, and
Other product documentation with the above Code states that its product includes code from the University of California and other contributors. This is the origin of the famous BSD license.

In early 1990, csrg released 4.3bsd-Reno, a transitional version. Since then, csrg has almost rewritten all the code of the entire BSD release version, except for 6 kernel processes.
. These six procedures led to a lawsuit between bsdi and usl (UNIX System Laboratory) in the future. The new version to be rewritten is named networking release.
2. It was launched in June 1991. Its license terms are exactly the same as those of the first version, and can be freely reissued. Within six months after the release of this version, Bill
Jolitz overwrites the six missing kernel programs and soon releases a complete system that can run on the kernel PC system, which is called 386/BSD.

Within a few months after the release of version 386/BSD, a group of 386/BSD user groups became a group and they began to maintain and enhance the subsequent systems. This is NetBSD. NetBSD focuses
To support as many platforms as possible, and continue to develop according to the research style established by csrg. Several months after the establishment of the NetBSD group, the FreeBSD group was established with the aim of supporting only
Hold the PC system and release as many systems as possible (now, as a relatively independent system, FreeBSD has been able to support the Alpha and iSCSI systems ). In the middle of 1990s
The NetBSD team separated the OpenBSD team to improve system security and leverage the installation features of many FreeBSD releases. So far, the three most important
The BSD Group is fully formed.

After that, csrg will continue to release three Release versions: 4.4bsd-lite, 4.4bsd-encumbered, and 4.4bsd-lite and Release 2, which will be dissolved after January 1, June 1995, completed the leadership of the BSD release.

(Note: For data in this article, refer to the article "Twenty years of Berkeley UNIX" by Marshall Kirk mckusick.
-- From at&t-owned to freely
Redistributable ", mckusick is one of the core figures in the BSD release, and also the copyright owner of the BSD daemon icon)

FreeBSD Origin
Http://www.douzhe.com/mirrors/cnfug.org/project/ffs/chapter1.1.2.html
FreeBSD's Development History
Http://study.99net.net/study/system/freebsd/1084937281.html

2: What are the advantages of FreeBSD?

Http://www.freebsd.org/features.html

FreeBSD's real choice [views: 147 times]
By Georges tarbouriech
Zer4tul zer4tul@cnfug.org [/Email]

Author profile:

Georges is an old UNIX user. He enjoys the free version of this great system.

Summary

Yes, you are reading linuxfocus! But there are other free UNIX, and they are very interesting and play an important role. This article is an overview of another free UNIX: FreeBSD.

Why FreeBSD?
When talking about free UNIX, people generally think that "It is Linux ".
Of course, Linux is widely used and (almost) everyone has heard of it. The number of new users has been increasing, and the media (whether professional or not) has publicized it.
One major reason is that Linux runs on the most widely used Intel-compatible computer. Of course, it can also run on many other processors, because one idea of UNIX is that "we don't
Care about what processor ". However, if Linux is only developed for a special processor, it may not be so successful, or, at least, difficult.
But free
UNIX is not only Linux: So is the BSD family. It has three main branches: FreeBSD, NetBSD, and OpenBSD. BSD is "Berkeley
The abbreviation of software distribution. For more information about UNIX History, refer to article
176. (After consideration, the article does not discuss the difference between BSD and System V: you can write a book .)
Each branch has its own characteristics:

NetBSD can run on almost any platform, including many old computers: 30 to 40 different platforms. NetBSD proves that UNIX is not
Care about the processor. If you have an old "junk" at home or at work, this is your good choice. I have been using NetBSD on Amiga and Intel machines for many years, and I feel
Good.

OpenBSD is one of the safest UNIX. It is an ideal server platform. Of course, it can also run on many processors. It may be one of the most widely used servers on the Internet. However, it is not ideal for use at home. However, each person chooses it according to their preferences ......

FreeBSD is the "Combination" of the above two BSD types ". It focuses on Intel and Alpha processors and "inherits" part of the security system from OpenBSD. And
Like Linux, it runs on Intel processors and makes it one of the most widely used BSD. It is also a good choice for family users. But this does not mean that you cannot use it at work!
This
There are also some things about FreeBSD: they (a member of FreeBSD core team) "share" Mac OS with apple
X Free Software section. Besides, I like OS X very much ...... By the way, don't be confused: although the OS
X is based on BSD, but its kernel has nothing to do with FreeBSD. It uses the Mach kernel that has been used in nextstep, OS
X's "father": Obviously, this kernel has developed a lot since nextstep was launched in late 1980s.
Now we see ...... Let's go further.

Obtain and install FreeBSD
Like most free software, FreeBSD can be downloaded from FreeBSD's Web site. Obviously, this requires a high connection speed. Don't worry: You can find FreeBSD CD anywhere in the world.
Currently (when writing this article) the latest release version is 4.6. This article discusses the i386 release.
Slave
Installing FreeBSD on CD-ROM (or other media) is very simple ...... Although it does not have a graphical interface to complete the installation! You will use the pseudo graphic interface. Just follow the prompts, FreeBSD
It will be installed on your hard disk. As in general, you need to partition your hard disk and configure something, such as a network connection or even a kernel (optional ). Next, you will see
Sysinstall is a good Installation tool, just as its name implies. You can choose to install all packages or install only a part of them. You can use any
How to add them.
Its package management method is also very simple. You can use the PKG command like in Solaris, or you can choose to use ports. In short, PKG
Commands are like RPM or Deb in Linux, while ports need to use make and make
Install. In other words, FreeBSD's operations are no different from those in Linux or are difficult.
Let's install a Linux compatibility package-you should install it: it allows you to compile and run Linux applications on FreeBSD.
Everything is simple, and FreeBSD has prepared a good manual to explain every step in detail. In addition, it has many language versions (in the/usr/share/doc directory, you can see the directories named in each language, and the manuals of different languages are in the corresponding directory ).
Therefore, there is no need to spend too much time on this.

Configure FreeBSD
Once again, we cannot cover all aspects of this article. The most important thing is to know where the core file is. As usual, you can find them in the/etc directory. They are named RC. Something and can manage many different parts: general configuration, firewall, network, sysctl, etc.
RC. conf
File is very important, just like its name, you can adjust the system configuration here. In this file, you can tell the system whether to open some daemon (sshd, Sendmail, etc.) and Firewall
Whether you want to activate kernel-level security, whether you want to activate IPv6. There are a lot of options here. Surprisingly, you can call the/etc/defaults/rc. conf
Identify all of them in the file. Do not misunderstand. This file includes the default settings, not examples. In other words, the/etc/rc. CONF/etc/rc. conf does not consider these default settings.
. In other words, do not copy/etc/defaults/rc. conf to/etc. Rc. conf, or try to modify/etc/defaults.
/Rc. conf, which should be modified in/etc/rc. conf.
The project selected in sysinstall will be automatically added to/etc/rc. conf (NIC configuration, host name, security level, etc ).
Note: FreeBSD does not enable any services in/etc/inetd. conf by default. This means that the daemon managed by inetd should be disabled by default when the system is started for the first time. In my opinion, every UNIX system should be like this. In any case, this is a good idea!
In addition, the RC file allows you to configure a firewall or sysctl, and other things. This naturally leads us to the topic of adjusting FreeBSD.

Adjust FreeBSD
One of the best tools to adjust the system is sysctl (the same is true in Linux ). You can use the command line to define some special values, or (we also recommend that you) Write A sysctl. conf file, unless you use the command line for testing only.
Ratio
For example, if your machine is used as a gateway, run the command sysctl-W
Net. inet. IP. Forwarding = 1 allows sysctl to allow IP forwarding. For higher security, you can use sysctl-W
Net. inet. IP. check_interface = 1 command to check whether these packets have reached the network interface corresponding to the target IP address. You can use sysctl to control your system
For most of the behaviors: see man
Page. Obviously, if you want to write these variables to the sysctl. conf file, you only need to add these variables, instead of adding the sysctl command itself.
The sysctl. conf file uses the variable = value format. The preceding example can be written as: net. inet. IP. Forwarding = 1
Net. inet. IP. check_interface = 1
Of course, your sysctl. conf file supports more than two lines of files, so it can control almost anything at the kernel level.
In
At the beginning of this article, we discuss the security level. There are four different levels from-1 to 3, and 3 represent the highest security level. We recommend that you know each level before selecting. It is possible to use other levels except-1 or 0.
As a result, the system cannot run as expected. The first disadvantage is that level 1 will prevent you from using the X server normally. You cannot load or uninstall the kernel module either.
In any case, high security levels are useful for special servers that require high security. As a home user, you can maintain level 0. Of course, it is up to you to decide ......
The chflags command is also related to the security level. To understand this command, read man page: it is a very useful command.
If this topic continues, we will write this article as "secure configuration FreeBSD", so let's go to the next chapter.

Upgrade FreeBSD
Let's assume that you have just purchased FreeBSD 4.5cd. Several days later, FreeBSD 4.6 was released. Unlucky!
Don't worry: FreeBSD has a CVS-based upgrade system. You can choose to use anonymous CVs or CVSup. The former is easier to use, while the latter is more efficient. With these tools, you can get a new source tree and synchronize it.
Lower
You must use the make buildworld command to compile all new code. How to compile on FreeBSD
The handbook has been elaborated in great detail
Part of zer4tul about system upgrade in version 1.73 has completed translation and is being proofread ). The most important thing is that it gives you a brand new system that keeps pace with the upgrade.
However
Yes, not just that. As in general, Free Software
Software) vulnerabilities will soon be discovered and quickly repaired. Unlike a vulnerability in other commercial operating systems that can not be fixed for a long time, the free software community will provide you with the fastest patching service.
Ding. Obviously, your job is to check where patches are needed in the system. The FreeBSD web site has a Security Bulletin Board (Security
Section) provides security bulletins for each release. You can download the. ASC file (Text File) from there to obtain the information you need to know: The description of the system problem about the system problem and the solution.
Method. This information is also provided by other web sites. Such as linuxsecurity and cert.
This does not mean that you must upgrade your system.

Update FreeBSD
You don't want to spend too much time learning about system vulnerabilities, do you? Like other free UNIX systems, FreeBSD provides you with patches. You can
Directly obtain and use these patches. For Linux users, the biggest difference is that you do not capture a modified package, but a patch source code. This means you have to re-compile the patch.
This means that your machine has been installed with patches. This can also be done in Linux, but people usually download modified packages, such as RPM packages, at least for applications,
Sometimes the kernel RPM package that has been patched is also downloaded.
The biggest difference between Linux and FreeBSD is the kernel. FreeBSD is based on BSD
4.4, and there are no different kernel versions like Linux. That is to say, its kernel is a stable version. Of course, it also benefited from the ability to load modules. The disadvantage is that if you want your system
To ensure security, you must compile the kernel more frequently than in Linux.
In any case, I prefer this method compared to the Linux system, but this is just my personal opinion. I am not
Three different kernel versions can bring good stability at the same time. Applications must be "ported" from one version of the kernel to another version, especially in terms of security. Another example is the system
Package: Three Different kernel versions and three different software combinations! Of course there are other problems.
I highly respect those who are involved in this great project. But is this the correct method? Improvement is usually necessary, but does it mean that we must change everything at any time? Don't worry!
Obviously, you can also compile a kernel that better meets your requirements ...... At that time, it was the same as in Linux. The method for completing this work has been described in detail in FreeBSD handbook. Therefore, let's move on to other topics.

Applications
As we have said, most free software (though not all) can run under FreeBSD. You do not need the ports and packages mentioned above ). Whatever the type of software, you can compile them into executable formats under FreeBSD.
Pair
For those who prefer the desktop environment, Kde and gnome can be used ...... And they are included in the release. There are also many Window managers (Window
Magager ). Gnustep can also run well in FreeBSD. To compile it, you need a newer GCC version than the released version: Don't worry! Directly capture
The corresponding file (archive) and compile it. Obviously, the gnustep application, such as gnumail. app, Gorm. app, or
Projectbuilder. app can also run well.
Really, all the software you can run on Linux can be used on FreeBSD ...... And also
More other software available! Really, all the software you run under Linux is available
FreeBSD... and there are already others!
For example, FreeBSD has many security tools. Monitoring tools and management tools are part of the release.
Firewalls, proxy servers, port scanners, IDs, and so on can also be used. For example, you can use IPsec or ipfw. You can use Nessus, Nmap, and PortSentry. Once again, most of them are part of the release, and you can capture, compile, and use the latest version by yourself.
Me
We have discussed the desktop environment and window manager, but for what they depend on, X Window System
Windows) -- not mentioned. The default value is xfree86 4.x. Before FreeBSD 4.5, xfree86
3. X is the default setting. This means that you have xfree86 4.xin the release, but the installation process usually chooses to install xfree86 3.x. Now xfree86
4.x is the default setting, but you can still use version 3.x if you want.

Hardware
Because we are talking about the i386-based release, we can say that most of the hardware that can work under FreeBSD, although it may be somewhat old. For example
One block 3Com
The combo Nic works well after you specify the media type using the ifconfig command. If you are using a BNC connection, you only need
Add media 10base2/BNC to the final ifconfig line.
This is also true for some old graphics cards: the use of xfree86 4.x can solve most problems. Especially for older ATI graphics cards.
In short, you can refer to the FreeBSD web site's Hardware list.

Security
We have mentioned many security tools, such as firewalls and port scanners. FreeBSD comes with many security tools. OpenSSH, OpenSSL,
Kerberos and MD5 are all part of the release. If you do not have these tools, you cannot use FreeBSD. Of course, you have to repeat them again.
A possible vulnerability.
A recent example shows the importance of being cautious. Suppose you have noticed the vulnerabilities found in OpenSSH. The correct method is to download the corrected version (corrected version) on its home page ).
Yes, but this is not enough! Check the package.
This
An example of OpenSSH was not fabricated: A few weeks ago, someone replaced the original file with a modified file. OpenSSH staff quickly responded. However
A user who downloads the file within a certain period of time and does not proofread the file installs an "invalid" version. Therefore, you must proofread ...... The verification process must be controlled.
Even if this is beyond the scope of this article, we still insist that security is the first priority.

Network Communication
FreeBSD has advanced network functions. IPv6 is well managed. Now, the network communication function is integrated with the system. If you are using ADSL or cable modem, you can easily configure them.
Xu
Multiple ISPs now use pppoe. FreeBSD supports it in a simple way: several lines in PPP. conf can complete this task. If you connect to pppoa,
Currently, FreeBSD only supports Alcatel modem. This situation will change soon (maybe some other modem is supported now ).

Related Documents
FreeBSD handbook is not the only available document. You can also find the FAQ and Install guide on the FreeBSD web site. Other important documents can be found in the http://www.freebsd-howto.com.

What is next?
This is just a brief introduction to FreeBSD. This system is also very interesting like other free UNIX systems. It has many features and is worth a try. Unfortunately, this article cannot provide a complete overview of it, and many important features are not mentioned.
FreeBSD requires more UNIX knowledge than some Linux distributions similar to Windows, but it is also easy to use.
Of course, some people without any UNIX knowledge will encounter some difficulties, because he must often recompile his system after updating the system. Although it will take some time, it is a good way to learn. Today, people seem to have forgotten that at the beginning, Unix was developed by developers rather than home users or ordinary users.
He
Fortunately, both free and commercial Unix have changed their initial approach. We should thank developers who have made such efforts. In 1980s, most of the current Linux Users
The number will avoid UNIX, just because of its complicated installation process. The release is stored on tape, and the installation may last for a whole day, and the configuration still takes one day. Configuration we are not talking about
Application! Today, you can use it without even understanding UNIX, such as Mac OS X. In early 1990s
X's "father", that is, nextstep, becomes a fact.
This seems to be a problem, but nextstep leads the trend of free UNIX and commercial Unix ...... And
Some other systems! Bringing UNIX to family users is a challenge and it has been launched. Congratulations to all those involved in this challenge, whether they work for money or free. More people who work for free
Should be put forward and given more thanks :-)
I am very optimistic about the "sharing" between FreeBSD and apple ". Both of them benefit from the other party through the correct channel. Vendors
Industry software usually uses free software ...... With no sound. The same is true for Apple and SGI. There are others ...... But for some concealed purposes. In any case, I still think there is enough space.
Provided to all ...... Of course, except for those who want to occupy all space and do not make any contribution to Unix!
The hype about Linux has overwhelmed other free UNIX: so far, it is still so good. This also has its good side ...... This is the main reason why I use FreeBSD. Of course, I am still using Linux (there are other systems): I like it differently!

If you plan to give FreeBSD a chance, this article will become more meaningful. Experience it by yourself. You will find many things that are not mentioned in this article.
I said: we are living in a great ti!

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.