Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set up FreeBSD WEB Server

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to set up a FreeBSD WEB server, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

System installation, upgrade, kernel customization

FreeBSD 5.2.1 RELEASE

Mysql 4.0

Apache 2.0.50

PHP 4.3.8

Pure Ftpd 1.0.20

I. system installation

Choose standard mode for system installation

Minimal installation, start the system after installation

Code: [Copy to clipboard]

/ stand/sysinstall

Configure- > distributions

Select: src- > sys and ports, install system kernel source code and ports tree

This section is of no use to the server, just to facilitate access to the Internet with ADSL at home in order to debug the server.

=

Enable adsl:

Edit ppp.conf profile

Code: [Copy to clipboard]

Ee / etc/ppp/ppp.conf

Add the following code:

Code: [Copy to clipboard]

Adsl: # configuration cod

Set device PPPoE: em0 # replace xl1 with the device name of your network card

Set authname * your ADSL login name

Set authkey * * your account password

Set dial

Set login

Set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0

Add default HISADDR# Add a (sticky) default route

Enable dns # get the correct DNS server address from the dial-up server

Note: each setting line must be preceded by a space, adsl: this configuration code line cannot be preceded by a space.

Enable ADSL manually:

Code: [Copy to clipboard]

Ppp-ddial adsl

If you want to enable adsl:ee / etc/rc.conf automatically when the system starts up

Add the following code:

Code: [Copy to clipboard]

Ppp_enable= "YES"

Ppp_mode= "ddial"

Ppp_profile= "adsl"

= =

Second, cvsup upgrade source code

Make sure the machine is connected to the Internet.

Code: [Copy to clipboard]

Cd / usr/ports/net/cvsup-without-gui

Make install clean

It's going to be a long process. Go and see China Open, ho.

All right, cvsup is installed, now let's upgrade the source code

Supfile is too lazy to write it himself, so you can copy sample to use it:

In order not to write supfile for future upgrades, set up a directory for supfile.

Code: [Copy to clipboard]

Mkdir / usr/cvusp

Cp / usr/share/examples/cvsup/stable-fupfile / usr/cvsup

Cp / usr/share/examples/cvsup/standard-fupfile / usr/cvsup

Cp / usr/share/examples/cvsup/ports-fupfile / usr/cvsup

Usually use these three. If you don't think it's enough, you can copy all the supfile under / usr/share/examples/cvsup.

Update ports tree

Edit supfile

Code: [Copy to clipboard]

Ee / usr/cvsup/ports-supfile

In order to accelerate the speed of cvsup, use the domestic cvsup server

Code: [Copy to clipboard]

* default host=cvsup3.cn.freebsd.org # changed the line

As a web server, there is no need to upgrade all ports tree, and then change it

Code: [Copy to clipboard]

# ports-all # this line is preceded by a comment number, otherwise all ports tree will be updated

Then, if the following paragraph has been marked with a comment number, it should also be changed.

Code: [Copy to clipboard]

Ports-base

# ports-arabic

Ports-archivers

# ports-astro

# ports-audio

# ports-benchmarks

# ports-biology

# ports-cad

# ports-chinese

Ports-comms

Ports-converters

Ports-databases

Ports-deskutils

Ports-devel

Ports-dns

Ports-editors

Ports-emulators

# ports-finance

# ports-french

Ports-ftp

# ports-games

# ports-german

# ports-graphics

# ports-hebrew

# ports-hungarian

# ports-irc

# ports-japanese

Ports-java

# ports-korean

Ports-lang

Ports-mail

Ports-math

# ports-mbone

Ports-misc

# ports-multimedia

Ports-net

# ports-news

# ports-palm

# ports-picobsd

# ports-polish

# ports-portuguese

Ports-print

# ports-russian

# ports-science

Ports-security

Ports-shells

Ports-sysutils

Ports-textproc

# ports-ukrainian

# ports-vietnamese

Ports-www

# ports-x11

# ports-x11-clocks

# ports-x11-fm

# ports-x11-fonts

# ports-x11-servers

# ports-x11-toolkits

# ports-x11-wm

Change the save disk, and then update ports tree

Code: [Copy to clipboard]

Cvsup-g-L 2 / usr/cvsup/ports-supfile

All right, let's go see China Open for a while, Hector.

Update the system source code

Edit supfile

Code: [Copy to clipboard]

Ee / usr/cvsup/standard-supfile

There are two areas to be changed:

Code: [Copy to clipboard]

* default host=cvsup3.cn.freebsd.org

* default release=cvs tag=RELENG_5_2_1_RELEASE

Note: the cvs tag in the original file is a point, be sure to change it (I forgot to change this line, as a result, updated to 6. 8, sweating), especially friends who use the current branch, and be sure to change it, you can go to this page to check cvs tag: http://www.freebsd.org/cgi/cvsweb.cgi/src/

Custom kernel

There is nothing to say about this. You can read more tutorials.

It is important to note that if you have not updated the system source code, edit and install the new kernel with the following code

Code: [Copy to clipboard]

/ usr/sbin/config your kernel file name

Cd.. / complie/ your kernel file name

Make depend

Make

Make install

If the system source code has been updated:

Code: [Copy to clipboard]

Cd / usr/src

Make buildkernel KERNCONF= your kernel file name

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report