Install IIS in FreeBSD 5.x

Source: Internet
Author: User
Under FreeBSD 5.x NTInstallation

In the "Display Manager three brothers" article, I wrote about xdm, kdm, andNT. RelatedNTIs actually incorrect. To this day, it is necessary to rewrite this text to read and understand the text.

Even the first successful useNTIt is in FreeBSD 5.1. Let's start with this version. After the xfree and gnome Window managers are installed in FreeBSD 5.1,NTIn fact, it already exists in the system. You only need to make relevant settings to makeNTNormal operation. Let me introduceNTHow to get started as soon as possible, and then explain in detail.

0 prerequisites

Assume that you have installed xfree, gnome, or other Window managers and confirmed that each window manager works properly.

1 InstallationNTShortcut

1.1 install portsNT

NTPort in/usr/ports/X11/NT/Directory, you can also select/usr/ports/X11/gdm2/, but the version is different. Enter the following command:

Code:
Make install clean



Automatic downloadNTSource code, compilation, and installation. If gnome is installed, an error message is usually displayed, indicating that the system already exists.NTFirst, uninstall the original version and then reinstall it:

Code:
Make deinstall

Make install clean

1.2 ActivationNT

In the/usr/x11r6/etc/rc. d directory, we will find a file,NT. Sh. sample. Copy this fileNT. Sh.

Code:
CP/usr/x11r6/etc/rc. d/NT. Sh. Sample/usr/x11r6/etc/rc. d/NT. Sh



If you use xdm or KDM as the display manager before this operation, you must disable them first, that is, the setting for restoring/etc/TTYs is as follows:

Code:
Ttyv8 "/usr/x11r6/bin/xdm-nodaemon" xterm off secure

1.3 UseNT

Restart the system.NTThe login interface should be displayed in front of you. Try it.

I believe you will soon have doubts and find problems. Why re-installNT? Is to maintainNTIs the version up-to-date? Is the old one unavailable? I like Kde, xfce, fluebox, and other Window managers,NTOnly gnome is available. What should I do? For more information, see the next decomposition.

2NTInstallation Details

Install port 2.1NTInside Story

Why re-installNT? Port InstallationNTIn additionNTIn addition to the system, the basicNTSettings, which mainly include:NTAccount settings, directory attribute modification, Startup Script Template, and so on. All of this is browsingNTPKG-install script file, the truth is displayed.

2.1.1NTAccount settings

When PKG-install processes post-install, it adds a new group and user to the system, whose names areNTAnd the ID numbers are both 92. If the system already existsNTGroup or user.

Code:
PW groupaddNT-G 92

PW useraddNT-U 92-GNT-H--d "/nonexistent"-S/sbin/nologin-c "gnome Display Manager"

2.1.2 directory Attribute Modification

While setting the account, PKG-install also modifies the attributes of the two directories.

Code:
Chown-RNT:NT/Usr/x11r6/share/gnome/NT/Usr/x11r6/etc/NT

Chmod 0750/usr/x11r6/share/gnome/NT

2.1.3 launch Script Template

NTStartup Script Template FileNT. Sh. sample, which will be copied to the/usr/x11r6/etc/rc. d directory during installation. After the system is started, if/usr/x11r6/etc/rc. d/exists/NT. Sh, it will startNT. ThereforeNT. Sh. Copy (or rename) The sampleNT. Sh.

2.2 select another window manager

The startup Window Manager settings are saved in/usr/x11r6/etc/NT/Sessions directory. By default, this directory contains several script files, such as gnome, xsession, factory-gnome, and factory-xsession.NTStart different Window managers by running different session scripts.

Start the window manager. If you write it by yourself, it is very troublesome. Generally, we can simplify script writing by calling the xsession method. Take KDE as an example. We only need to create the script for the following content.

Code:
#! /Bin/sh

# $ Xconsortium: xsession/main/10 2004/01/25 23:54:28 Jun Zhang $

Exec/usr/x11r6/etc/NT/Sessions/xsession KDE



The script file name is Kde, which is displayed inNTIn the session List. Of course, do not forget to set the runtime file attributes.

Code:
Chmod + x/usr/x11r6/etc/NT/Sessions/KDE



For other Window managers such as xfce and fluebox, you can change the KDE In the KDE script to the corresponding name and save it with the corresponding file name.

The original xsession script only provides support for gnome, Kde, and TWM, and cannot start other Window managers. You must manually add the xsession script. Even the xsession script adds support for enlightenment, wmaker, sawfish, and xfce after the KDE startup command. The Code is as follows:

Code:
...

KDE | kde1 | kde2)

If [-X "/usr/share/apps/switchdesk/xclients. KDE"]; then

Exec "/usr/share/apps/switchdesk/xclients. KDE"

Else

# Fallback for non-RedHat

Exec startkde

Fi

;;

Enlightenment)

Exec enlightenment

;;

Wmaker)

Xterm &

[! -D $ home/gnustep/library/windowmaker] & amp;/usr/x11r6/bin/wmaker. Inst

Exec/usr/x11r6/bin/wmaker

;;

Sawfish)

Exec sawfish

;;

Xfce)

Exec startxfce

;;

...



In this way, xsession can recognize and start these Window managers. Note that the KDE section in the above Code is the original part of xsession.

Factory-gnome and factory-xsession are useless, removing their executable attributes and removing them fromNTBlocked in the session List.

2.3NTAppearance Configuration

NTThe real configuration file is/usr/x11r6/etc/NT/NT. Conf. This file provides a detailed description of each option, so it is not difficult to understand. Here, I will not add more ink. Most of the content can actually beNTConfiguration program (/usr/x11r6/bin/gdmsetup) to complete, this is a GUI program, it is very easy to use, you can also giveNTChange to different themes. Topics can be downloaded from the http://art.gnome.org. If you are interested, you can also make your favorite theme. Remember to share it with everyone.

2.4NTUse

ModifiedNTConfiguration, want to check the effect, if always restart, it is too much trouble. You can use the following command to stopNTRunning:

Code:
/Usr/x11r6/etc/rc. d/NT. Sh stop



RestartNT, As follows:

Code:
/Usr/x11r6/etc/rc. d/NT. Sh start



NTUnlike xdm and kdm, it cannot be started directly in/etc/TTYs, but through/usr/x11r6/etc/rc. d/NT. Sh, called when the system is started, or you can directly call the script to stop or start.

3. Cultural Processing

3.1 Chinese display

For FreeBSD 5.1, there should be simple and Traditional Chinese options in the language list. After selecting a Chinese language, the corresponding environment variables will be automatically set in the window manager. For gnome, menus, desktops, and help are automatically displayed as Chinese. This is very convenient for multi-user environments.

3.2 Chinese Input

In addition to displaying Chinese characters, you usually need to enter Chinese characters. This can be set before xsession script starts a specific window manager. Here, the fcitx input method is used as an example. Add the following code to xsession:

Code:
...

# Special for zh_cn.euc

Case $ Lang in

Zh_cn.euc)

Lc_all = $ Lang

Export lc_all

Lc_ctype = $ Lang

Export lc_ctype

Xmodifiers = "@ im = fcitx"

Export xmodifiers

;;

Esac

# Run all system xinitrc shell scripts.

...



In this way, you can start the fcitx input method by running the "fcitx &" command before entering Chinese characters. The above settings do not guarantee the Display Effect of Chinese characters. For more information about how to beautify Chinese characters, see other articles. Note: The last annotation in the above Code is original in the xsession script, which serves as a sign for inserting this code.

3.3 set Environment Variables

NTIs to set the language environment variable in xsession, which belongs to the login class setting. Therefore, the Administrator does not need to make individual settings for different users, or modify the hidden files starting with a dot (.) for different shells, which standardizes the settings of the language environment. For more information, see the localization section in FreeBSD handbook.

Of course, for KDE, this operation is ineffective and does not display Chinese characters. You also need to use KDE's desktop selection program. Maybe there are some shortcuts. I don't know at the moment. Please add. However, this can produce unexpected results. IfNTIf you select Simplified Chinese and KDE as English, you can start fcitx to enter Chinese in the English environment. It's a bad thing. Note that the font in konsole is ugly enough at this time. The Character spacing and line spacing are large, so you need to beautify the Chinese font.

4 New Changes under FreeBSD 5.2.1

From FreeBSD 5.1NTYesNT-2.2.5.5, in FreeBSD 5.2.1NTHas been upgraded to the gdm2-2.4.4.5, the corresponding configuration also has a small change. Mainly include: Start session settings for different Window managers, and set the Simplified Chinese language.

4.1 set different sessions

Go to/usr/x11r6/etc/Under FreeBSD 5.2.1/NTThe/sessions directory will find that there are no files in it, even xsession and gnome. How can I start different Window managers?NTThe default window manager set in. conf isNT. Desktop. In the/usr/x11r6/share/gnome/xsessions directory, a file named gnome. desktop exists. Copy this file to KDE. desktop, xfce. desktop, enlightenment. desktop, and so on. Take KDE. desktop as an example to modify the settings:

Code:
...

Name = KDE

...

Startcommand = startkde

...



The name displayed in the name setting list. startcommand sets the startup command. In this way, the above window manager options will appear inNTIn the session List. This process seems to be simpler than version 5.1.

The default desktop file is located in/usr/x11r6/etc/dm/sessions/Default. desktop.NTStart the default window manager of the xsession script, or the window manager specified by. xsession in the user directory.

4.2 Simplified Chinese language options

Perform the preceding settings.NT, Everything is normal, basically the same as in FreeBSD 5.1. The only exception is that English, traditional Chinese, and other languages are available in the language selection list, but simplified Chinese is missing. FollowNTDescription in this document. The language list is from/usr/x11r6/etc/NT/Locale. Alias. Check the file. The simplified Chinese item does exist.

Code:
Chinese (simplified) zh_CN.UTF-8, zh_cn.euc



So why?NTBut there is no simplified Chinese in the language list? Carefully compare and think, and solve the problem. Originally,NTWhen generating the language list, first load/usr/x11r6/etc/NT/Locale. Alias, and then check whether the language items exist in the system one by one. This check is to check whether the corresponding language encoding exists in/usr/share/locale. For the preceding Simplified Chinese settings, the/usr/x11r6/share/locale/zh_cn.euc directory is required. However, in FreeBSD 5.2.1, the default language encoding of Simplified Chinese has been changed, and the/usr/x11r6/share/locale/zh_cn.euc directory no longer exists. The new language encoding is zh_cn.gb2312. Set/usr/x11r6/etc/NTIn/locale. Alias, the simplified Chinese setting is changed:

Code:
Chinese (simplified) zh_CN.UTF-8, zh_cn.gb2312



RestartNTNow the Simplified Chinese option appears in the language list. Test results show that everything is normal in simplified Chinese.

4.3 set the Chinese Input Method

Xsession has been migrated to/usr/x11r6/etc/NTDirectory. However, the content of xsession changes a lot and must be modified with caution.

Speaking of this, I believe you should understand that you do not need to reinstall it.NT, OriginalNTJust configure it according to the above content. It only takes more time. Of course, if you want to be lazy, it's still faster than just cut. Note that if CVSup is used to synchronize ports, the FreeBSD 5.1NTThe port may already be a new version in 5.2.1.

EvenNTThe topic is delicious, a hungry guy.NTIt's really delicious. Can FreeBSD's desktop dinner be missing. Do you really want to try it ?!

Gdm2 starts from 2.6.0.1 and uses/usr/x11r6/etc/dm/sessions to save session settings.

When xfce4 is installed on ports, the with_tpd option is provided to add session settings to the sessions directory. (Script xfce4->/usr/x11r6/etc/NT/Sessions, xfce4.desktop->/usr/x11r6/etc/dm/sessions)

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.