FreeBSD Concise Installation Guide (English)

zhaozj2021-02-16  90

(Original: http://www.madpenguin.org/cms/?m=show&id=1853)

FreeBSD Install Guide by Narayan Newtona Step-by Narayan Newtona Step-by-Step Guide To Installing Freebsd 5. It Assumes Moderate Experience With Linux and Leaves You With a fully updated freebsd system.

FreeBSD Installation

A. 5.x vs 4.x The First Thing to Undrstand About Freebsd Is That There TWO Lines of Development. The -stable Branch Is Marked with a 4.x Version Number and The Most Recent Version IS 4.10. IT IS Well Tested and very solid, but does not include the most recent technology. The -CURRENT branch, marked with a 5.x version, is the "unstable" branch. However, it is nicely stable at the moment and is coming along quite well. Most Users Should Go with 5.x and these instructions are only valid for what Tree.

NOTE:.. DragonFlyBSD (www.dragonflybsd.org) is a continuation of the 4.x line It uses lock-less (no mutexes) SMP support and a Light Weight Kernel Threading system It has a lot of promise and is developing at a Breakneck Pace, But It Should Still Be Thought of as "R / D."

B. Getting Media I am not going to say much about this. There are links to various ftp mirrors at www.freebsd.org and the directory structure is fairly self-explanatory. There are however several choices for ISO. You should choose the miniinst ISO. It is small and will include everything you need for the base system.

C. Starting Installation After, the CD boots up you will enter the ... ahh ..... majestic sysinstall. You can safely ignore most of the options and just choose a standard installation. Most of the install process is pretty easy and anyone who has some experience with linux or unix will be able to handle it without much stress. However, creating partitions and dealing with drives will seem very odd to your standard linux user.D. Hard Disc Management in FreeBSD Ok, the first thing to Get Used to Here Is That IDE Drives ... etc. They area AD0, AD1 and SO FORTH. SCSI Discs Are DA0, DA1 ... And so on. There is one Other Thing That Is Going to Freak some people out. You create slices, not partitions, on the disc and then create partitions within those slices. For example, the first partition in the first slice on the first IDE disc would be ad0s1a. Just accept it.

E. Partitioning Sysinstall will lead you through the partitioning and its fairly easy to understand. The first part will ask you to choose a disc or discs to partition and then will show you a "slice editor." This is where you will create your slice . I advise you to only make one. While multiple slices are easy to deal with, it just adds complication. If this is not your first installation of a BSD type OS, then you can ignore me and why are you reading this again?

After creating your slice, you will be prompted to choose the drive (s) to install an MBR on. The FreeBSD boot loader is nothing to write home about, but it tends towards working. After this step, you can create partitions. There is NOT MUCH TO SAY Here. at the top of the screen ing.................... .. On The Non-Swap Partitions It Is Usually a Good Idea To Enable Soft-Updates.f. Distribution Sets This Is A Simple Section, SELECT Minimal.

G. Continue Installation The rest of this is pretty simple. Make sure you install from the CD and not the Internet. The bulk of the install is now done. After it copies files to your disc, it will start the configuration process. This is All pretty self-evident, but there is a couple.

NetWork Configuration

Do not be scared by the names, in * BSD devices are named after their drivers. There is also a short description after the name, so you should be able to choose the right one. The rest of the network config is easy, just Follow The Prompts.

System Console Configuration

You can Pretty Much Ignore this, you may want to look around you COULD PICK A Nice Screen Saver Here, But Other The That I Would Leave it alone for now.

Time Zone

All i Have To Say Here Is That If You Live In The US, After You Choose "America? North and South" Hit The end the end The iptid and hitting end is the quickest way there.

Linux

Say No, We will do this later and with itdated linux_base.

Mouse

OK, welcome to the wonderful and amazing world of moused. Answer the first question truthfully, and then you can tweak the settings in the "Please configure your mouse" dialog. Whatever you do, be sure to enable the daemon. Also, for most User $ is all you will have to do. You can savely ignore the other Options.package installation

At this point, The Install Binary Packages. Say No. The Sse Binaries Are Out of Date and Not Included on Our CD.

Of Users and Roots

THISN'THEEN ITWORD AFTER THATION. THE Only Thing I Have To Say About this process is when the new user dialog comes Up Leave the New User Dialog Comes Up Leave the "Group:" BOX Unchanged and add "Wheel" to the Member Groups. You Also Might Want To set your shell to / bin / tcsh. as for setting the root password, if you can't Handle That We Have Bigger Problems.

Rebooting

OK, Next IT WILL Ask if You Would Like to Visit The General Config Area. SELECT No and You Will Be Brought Back to The Main Menu. EXIT The Install, Reboot Without The cd in and enjoy the boot message.

H. The Real Post-Install at this Point, I am Going to Assume That You Are Now Looking At a login prompt and thinking "My My ... Freebsd Boots Quite Quite QUICKLY DOESN '' '台" Well, Our Task Is Not Done YET ... There Is A Reason We Did A Minimal Install. We are going to do most of it ing it u c c c c i c c c c w 店Being tagged stable and -current is rather solid at the moment .first, I Need to explain how things are done in the bsd world.

Sup?

CVS Up; You Up; WE All Cvsup. Cvsup Is A Very Interesting Program That I am Not Going to Explain in Detail Here. All You Really Need To Know Is That It Updates Source Trees. You See, That Is The Thing. You MAY BE Used TO / USR / SRC NOT DOING MUCH. IN BSD IT HAS A Job, IT Holds The Source for the Entire Base System. However, We Did A Minimal Install and no Source is There. It would't be up2date annily. so ., lets fix that Login as root and type the following: pkg_add -r cvsup-without-guipkg_add is the binary installer for FreeBSD and the -r argument tells it to fetch binaries from the net It will also fetch any deps that you might. NEED. Switch to another console while this is happensening and login as root. do the following:

CD / ETC

Cp /usr/share/examples/etc/make.conf /etc/make.conf

CP / USR / Share / Examples / CVSUP / Standard-Suppirl / USR

CP / USR / Share / Examples / CVSUP / PORTS-SUPFILE / USR

CHMOD U W /ETC/make.conf / usr / standard-support / usr / ports-suppile

What was that? Well here is the rundown. Make.conf is the file that controls the building of programs from source on FreeBSD and the supfiles tell cvsup where to get the source for the base system and the ports system, also where to put said source. They come out of / usr / share / examples without the write bit set and that gets annoying. So we set that. Now switch back to the first console and type rehash. This tells tcsh to check its path for new programs. Now Edit The Standard Supfile That IITHER USE EE OR VI. I Like Vi. Scroll Down To The Line That Looks A Bit Odd. It Will BE Something Like:

* Default host = change_this.freebsd.org

The "change_this" is where you put what cvsup server to use. Choose a Number Between 1 and 9, like 4, and put cvsup4 where change_this is. So it wouldered up being: * Default host = cvsup4.freebsd.org

Now EXIT YOUR Editor and Run CvsuP / USR / Standard-Suppirl

IF Everything Goes Correctly, You Will See a Lot of Text Scrolling on The Screen. If IT Says Something About A Bad Connection, Try Another Number.

Make.conf

Now 'Tis Time for All Good Men (and women) to Edit Their make.conf. This is not difficult, in Fact Have a look around the file. It May be long, but it is pretty simple. Now, uncomment the cpu .. setting and the CFLAGS setting Set the CPU to your CPU (there will be a list in the comments above the setting) and set the CFLAGS to -O2 (NOTE: If the base system fails to build, downgrade your CFLAGS back to - O).

Build Your World

When CVSUP finishes (it will be awhile ... go get some coffee), cd to / usr / src and run make buildworld. That command will do exactly what it sounds like. It builds your world, or base system. While its doing That, Lets Get you a kernel. First, CD to / USR / SRC / SYS / I386 / CONF THEN CP Generic To Some File of Your Choosing. Any Name You Want. However, Be aware That Is Going to Show Up in A uname -a. Now, crack open your new file and take a look at what a FreeBSD kernel config is like. There are many things you can do here that will improve performance and subtract in size. However, lets keep it simple. Near the top of the file will be the name GENERIC. Change that to your new name. you can now look through the file and you will find several sections that are just for debugging. These will indeed add size and slow down the kernel a bit, but I Would Leave The for Now. Go to the end of the file and make a new line. Add the folowing: device PCM

THIS WILL. Be aware, you can there, boot, but, but this way. Save the file and exit. Save the file and exit. Go Back to Your Buildworld Console and when ITS DONE EXECUTE MAKE BUILDKERNEL KERNCONF = Your_kernel_config_name

NOTE: NOT The path of the kernel config..it knows to look in / usr / src / sys / i386 / conf

Installing your world

This is not that difficult. First run make installkernel KERNCONF = your config name. Now here is the interesting part. Run mergemaster -p, this program looks through your etc and updates it to match the new / etc in / usr / src. It will display changed files to you, press q and it will give you options. Something like i (install), m (merge) etc. Pick merge and it will open a nice little screen that shows you one file on the right and one on the left. It will go section by section, showing the areas that have changed. Press r or l to choose which section to keep. Its pretty easy to see which section has new stuff and which does not. After the merge, it will prompt you with options for the newly merged file. One of these will be install and this is the one you want. In the latest current, most of what you will be showed is user and group files. Make sure you do select the sections with The New Uses and Groups. After this is done, it will ask you a couple yes to. no W That Your / etc Wes Updated Run Make InstallWorld Then Reboot.note: You Usually Don't Need To Run Mergemaster. However, 5.2.1 IS A Pretty Old Release and -Current Has Come A Long Way.

I. Ports

Welcome to running current. The rest is easy. Cd back to / usr and edit the ports supfile the same way you did the standard one. Run cvsup on it and wait. After its done, you will have a full ports tree. There is not much left to say. you now have a working system and a fully updated one too. to install software from ports cd to / usr / ports / category / softwarename / and run make install clean. If you want linux binary support, install the . linux_base port to find where it is cd to / usr / ports and run make search name = linux_base |.. less Enable loading the kernel modules for linux binary support by editing /etc/rc.conf Just add the line linux_enable = "YES "to the file and your set. if this is a desktop system, I would recommend installing / usr / ports / x11 / xorg and your cho1 :). TIPS: ( Things to look up) Man KldLoad

Man PKG_ADD

Man PKG_Info

Man ports

CD / USR / ports / sysutils / portupgrade && cat pkg-descr | Less

Www.freebsd.org/handbook

Man Tuning

转载请注明原文地址:https://www.9cbs.com/read-12139.html

New Post(0)