FreeBSD website platform construction whole process

xiaoxiao2021-03-06  49

FreeBSD website platform construction whole process

YHJ1065 published on December 08, 2004

FreeBSD website platform construction whole process first step

Step 1: Installation System This article will provide a detailed diagram of the FreeBSD installation process. Before installation, first make a few suggestions for your reference: 1. Using minimization installation. 2. Enable inetd when installing, and remove the "#" number in front of the line with "ftp" when editing the inetd.conf file. This is to upload files with FTP when installing the software later. 3. Add a user of the WHEEL group so that you can log in to the software (such as SecureCRT) on the Windows system after the system works. FreeBSD 4.7 supports SSH terminal logins at minimum installation, so we need to use terminal software that supports SSH protocol, such as SecureCRT.

For example: The user name I added is YLF, affiliated with the Wheel system group. The system generates a user directory / home / ylf. I can log in to the system as YLF via SecureCRT, and then switch to the root user via the su command. At the same time, I can also type ftp://192.168.0.1 in the IE browser, and enter the YLF username and password login FTP to upload the required files to their own user directory. (Note: 192.168.0.1 is the network card IP address of my server to connect the intranet). In addition to the system installation part, I use terminal way. 4, the sessions are brought / home, / usr and / var, because / usr is the program directory, / var To save the log, / home is the user's home directory, my user files such as web, FTP upload files, etc. place it here. There is also the best time to keep a part of the space for use. There are 2 hard drives on my machine, a fast 18.2G SCSI hard drive, a 40G IDE hard drive. I am here.

128M / 20G / HOME2G / FTP256M / TMP6G / USR5G / VAR where / ftp is dedicated to anonymous FTP users. Remaining space for standby. Of course, if the hard disk space is less, we do our test is also enough. With regard to the installation of articles, you can also refer to Delphij Written "FreeBSD Server Installation and Optimization". This system installation process diagram is designed for beginners. The customization process of the entire system is for system requirements for serial with the article. We use CD to start installing FreeBSD, and only FreeBSD is available on the hard disk. First modify the CMOS to enable the system to boot through the disc. Insert the first disk of FreeBSD. After normal boot, enter the custom kernel interface, as shown in Figure 1: Figure 1 Skip Kernel Configuration and Continue With Installation Skip the kernel customization, we re-customize the kernel after the entire system installation is over. Then enter the system installation main interface, Figure 2: Figure 2 Select Standard to start standard installation. Then the prompt tells you that the next step will be followed, and press Enter to continue (Figure). Enter the FDisk Partition Editor interface, Figure 3: Figure 3 in order to ensure that the system coexisting with FreeBSD can start, by default FreeBSD will retain some disk space (64 CYL). We installed a single system, this part of the space is useless, press "Shift F" to give all spaces for FreeBSD, Figure 4: Figure 4> Select NO. Then press "Q". Then prompt to divide the FreeBSD file system. Enter continuation. Enter the DiskLable Editor interface, press A to automatically divide the system, Figure 5: Figure 5 Then move the cursor to / var and / usr, press D to delete the two partitions first. Move the cursor to the top, press C to create / var, / usr, / home, / ftp partition, respectively. Figure 6: Figure Six in / ftp partitions are designed for anonymous FTP. / var is used to store logs, / usr storage programs, / home store user data. I am a 4G hard drive. If the hard disk space is large, the capacity of these 4 partitions should be appropriately increased. Continue by "Q". The Choose Distributions appears, as shown in Figure 7: Figure 7 Select Minimal minimizes installation. Select OK to continue. Choose Installation Media Select the installation media interface, Figure 8: Figure 8 Hereby 1 CD / DVD is installed through the CD. OK continues. A confirmation interface, this is the chance to regret it! Choose Yes to start installing, showing. After a period of time, the installation is successfully prompted. OK continues, and the graphs. Do you have a network device prompt? Choose Yes, Figure Nine: Figure Nine Next, you will list your network device, choose the first network card, enter, will ask if you enable the IPv6 protocol, select No Continue. Ask if you use DHCP, choose No continues. A network card configuration interface appears, Figure 10: Figure 10 Here, as long as the host name and IP address are added, other in subsequent installations will be configured. Then ask if you have this network card interface now, choose Yes. Then ask if you use this system as a gateway, choose Yes. Does the INTD (Internet Super Server) interface appears. Choose Yes, Figure 11: Figure 11 prompts if inetd is enabled, select Yes.

The icon prompts whether to edit the Inetd profile, inetd.conf, and select Yes. The graph has shown the file editing interface, Figure 12: Figure 12 Moving the cursor to a row with FTP, deleting the front #, only deleting the head two lines. Press ESC to exit and save it. Then ask if you enable anonymous FTP access, choose Yes, and then the prompts are also selected to continue, and the graphs. Figure 13 Figure 13 sets for the group and user directory of anonymous users, do not change, and select OK directly. Then ask if you create an FTP login, welcome information. Select No does not establish continuation. Several few prompts: Do you make the NFS server, select NO. Whether the picture is made to run NFS customers, select NO. The pattern is formulated by default security policies, and then NO. List the settings currently have done to inetd, OK continues. The pattern is a custom system console, select NO. Setting the system time zone, select NO - Asia - China - East China - YES Figure 14 Figure 14 inquiry whether Linux binary compatibility support is enabled, which will allow FreeBSD to run all Linux programs. Choose Yes. Then prompt to formulate non-USB mouse, and select No continues. The graph is then asked if you browse the package collection, select No Continue, and you ask if you add system users and groups, choose Yes, Figure 55 Figure 15 Select User Add A New User to the system, add a new user. OK continues. Figure 16 Here, the user YLF of a WHEEL group is added, and it can be switched to root when the terminal is logged in. After OK, go back to the previous interface, select EXIT exit. This time the prompt requests to enter the root user password. You need to enter 2 times. The picture is then asked if you want to return to the main interface to configure changes, select no - exit install exit installation, and set. Finally, I prompt to quit restart, choose Yes, remember to take the disc. Figure 17. Figure 17 in order to allow the system to re-compiling the kernel and install the application using the Ports. We rerun the system configuration program to install kernel compilation support and ports. After logging in with root users, run: # / standard / sysinstall The system configuration main interface, Figure 18: Figure 18 Select Configure to enter the return. The FreeBSD Configuration menu appears, Figure 19: Figure 19 Selecting Distributions after OK Continue. The component installation selection interface appears, Figure 20: Figure 20 Select SRC - SYS and PORTS, OK, select the installation media interface, select the CD-Wall installation, the latter compilation support and Ports to the system. After the installation is complete, select EXIT - EXIT INSTALL exits.

After installing the system, recompile the kernel. The purpose is to systematically support FIRRWALL and improve operational efficiency. Note: This will be more convenient to operate on the terminal. SecureCRT supports copying and paste text content on the terminal interface. Go to the kernel file directory:

# CD / USR / SRC / SYS / I386 / CONF Edit kernel file:

# vi kernel_wwx # kernel_www For my kernel file name My kernel file is as follows:

# # Generic - generic kernel configuration file for freebsd / i386 # # for more information on this file, please read the handbook section # kernel configuration files: # http://www.freebsd.org/doc/en_us.iso8859 -1 / books / handbook / kernelconfig-config.html # # The handbook is also available locally in / usr / share / doc / handbook # if you've installed the doc distribution, otherwise always see the # FreeBSD World Wide Web server ( Http://www.freebsd.org/) for the # late systemation. # an Exhaust List of Options and more detailed explanations of the # Device Lines is also present in The./lint configuration file. if you are # in doubt as to the purpose or necessity of a line, check first in lint. # $ freebsd: src / sys / i386 / conf / generic, v 1.246.2.48 2002/08/31 20:28:26 Obrien Exp $ Machine i386cpu i586_cpu CPU I686_CPUIDENT KERNEL_WWX # kernel file name, this wants to match your kernel file name MaxUsers 0 Options inet #netkeley fast FiLFS Usable as root device [keep this !] Options SOFTUPDATES #Enable FFS soft updates supportoptions UFS_DIRHASH #Improve performance on big directoriesoptions PROCFS #Process filesystemoptions COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] Options SCSI_DELAY =

15000 #Delay (in ms) before probing SCSIoptions SYSVSHM # SYSV-style shared memoryoptions SYSVMSG # SYSV-style message queuesoptions SYSVSEM # SYSV-style semaphoresoptions P1003_1B #Posix P1003_1B real-time extensionsoptions _KPOSIX_PRIORITY_SCHEDULINGoptions ICMP_BANDLIM #Rate limit bad repliesoptions AHC_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~ 128k to driver.options AHD_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~ 215k to driver. device tun 1 options IPFIREWALL # firewall options IPFIREWALL_FORWARD # allow transparent proxy options IPFIREWALL_VERBOSE # allows the firewall log options IPFIREWALL_VERBOSE_LIMIT = # 100 limit log options IPFIREWALL_DEFAULT_TO_ACCEPT # allow all default options IPDIVERT # IP packet to enable steering by the use ipfw divert IP sockets # to make an SMP kernel, the next two are needed # options SMP # Symmetric MultiProcessor Kernel # options APIC_IO # Symmetric (APIC) I / O Device Isadevice Eisa Device PCI # ATA and Atapi DevicesDevice Ata Device Atadisk # ATA Disk Drives # SCSI Controllers # No SCSI device does not need this D evice ahb # EISA AHA1742 family device ahc # AHA2940 and onboard AIC7xxx devicesdevice ahd # AHA39320 / 29320 and onboard AIC79xx devicesdevice amd # AMD 53C974 (Tekram DC-390 (T)) device isp # Qlogic familydevice mpt # LSI-Logic MPT / Fusiondevice ncr # Ncr / symbios logicDevice SYM # ncr / symbios logic (new case) Options Sym_setup_lp_probe_map =

0x40 # Allow ncr to attach legacy NCR devices when # both sym and ncr are configured device adv0 at isa? Device adw device bt0 at isa? Device aha0 at isa? Device aic0 at isa? Device ncv # NCR 53C500device nsp # Workbit Ninja SCSI- 3 Device STG # TMC 18C30 / 18C50 # SCSI Peripherals # No SCSI device does not require this DEVICE SCBUS # SCSI Bus (Required) Device Da # Direct Access (Tape etc) Device CD # cddevice pass # Passthrough device (direct SCSI access) # atkbdc0 controls both the keyboard and the PS / 2 mouse device atkbdc0 at isa? port IO_KBD device atkbd0 at atkbdc? irq 1 flags 0x1 device vga0 at isa? # syscons is the default console driver, resembling an SCO consoledevice sc0 at isa flags 0x100 # Floating point support -?.?? do not disable device npx0 at nexus port IO_NPX irq 13 # Serial (COM) portsdevice sio0 at isa port IO_COM1 flags 0x10 irq 4 # I use the 8139 and Dlink DFE-530TX network card, you can reserve or delete the version of your own network card model, using a public MII bus controller code PCI Ethernet adapter # Note: Be sure to retain 'Device Miibus' to ensure available # pci Ethernet NICs that use the common MII bus controller code # NOTE:.! Be sure to keep the 'device miibus' line in order to use these NICs device miibus # MII bus supportdevice fxp # Intel EtherExpress PRO / 100B (82557, 82558) device rl # RealTek 8129 / 8139device vr # VIA Rhine, Rhine IIdevice xl # 3Com 3c90x ( `` Boomerang '', `` Cyclone '') # pseudo devices - the number indicates how many units to allocate.pseudo-device loop # Network loopback pseudo -device ether # Ethernet supportpseudo-device sl 1 # Kernel SLIPpseudo-device ppp 1 # Kernel PPPpseudo-device tun # Packet tunnel.pseudo-device pty # pseudo-ttys (telnet etc) pseudo-device md # Memory "disks"

pseudo-device gif # IPv6 and IPv4 tunnelingpseudo-device faith 1 # IPv6-to-IPv4 relaying (translation) # The `bpf 'pseudo-device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! pseudo- Device BPF #Berkeley Packet Filter I use the 8139 network card and DLINK DFE-530TX network card, if you use other models of the NIC, you need to view the generic kernel file of the current directory, find the segment describing your own network card model and add it to the new The kernel file. Other do not change directly to copy it. Next compilation and installing the new kernel: # / usr / sbin / config kernel_wwx #kernel_wwx for your kernel file name # cd ../../compile/kernel_wwx # make depend # make # make install Restart (Reboot) If the system is upgraded The excess code tree, compile the kernel according to the following method:

# CD / usr / src # make kernel kernconf = kernel_wwwx #kernel_wwx Restart for your kernel file name.

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

New Post(0)