FreeBSD 5.3 on Vmware 4.5.2

Source: Internet
Author: User
Click to enter my new blog: http://www.sofee.cn/blog/

/*
*CopyrightPhpsalon.comAll, reprinted in any form without permission
*
* Author: Justin Wu
*/


I believe many of my friends have installed FreeBSD on virtual machines. I have installed FreeBSD recently. The following are some of my installation records, so the installation process of the basic system will not be described, you only need to install X server in one step. This article describes how to install and configure FreeBSD 5.3 in VMware Workstation 4.5.2 build 8848.

This article stipulates that the command line uses black and white characters, while the configuration file uses black characters.

I have referenced a lot of information on the Internet and I will not list them here. I would like to thank those who have contributed to the development of FreeBSD.

Preview a chart (click to view the chart ):

1. Install VMware Tools
================================
If you have Installed VMware Tools, uninstall VMware Tools first. The command is as follows:
#/Usr/local/bin/vmware-uninstall-tools.pl

After installation, press CTRL + ALT to release the mouse, select "Install VMware Tools..." under the VM menu, and then go to the FreeBSD interface to execute the following command:
# Mount/CDROM
# Cd/CDROM
# Cp vmware-tools-distrib.tar.gz/tmp.
# Umount/CDROM
# Cd/tmp
# Tar-zxvf vmware-freebsd-tools.tar.gz
# Cd vmware-tools-distrib
FreeBSD 5.3 uses Xorg to replace xfree86, while VMware 4.5.2 uses xfree86 configuration files. Therefore, a patch is required. Otherwise, the maximum resolution on x Desktop is always 640x480.
There are two patching methods: one is to manually modify the vmware-tools-distrib/bin/vmware-config-tools.pl file, the other is to use my already prepared vmware-4.5.2-freebsd-5.3.patch (see the appendix ), you only need to install the patch.
Method 1: manually modify the vmware-config-tools.pl File
# Cd Bin
# Ee bin/vmware-config-tools.pl
2,852nd rows
Return xserver_bin (). '/xfree86 ';
Change
Return xserver_bin (). '/Xorg ';

3,055th rows
/X.org Foundation /? '4. 100': '0. 100 ';
Change
/Release 6.7 /? '4. 100': '0. 100 ';

Add the following two sentences after row 3:
} Elsif (file_name_exist ($ xconfig_path. '/Xorg. conf ')){
$ Xconfig_file_name = 'xorg. conf ';
Save and exit.

Method 2: Use the patch Tool
Download the patch file first
# Fetch http://www.wenhepc.com/justin/freebsd/vmware-4.5.2-freebsd-5.3.patch
Then patch the patch.
# Patch-Np1-I vmware-4.5.2-freebsd-5.3.patch

After completing the patch, you can install VMware Tools now.
#./Vmware-install.pl
During the installation process will prompt you install in which place, generally choose the default good, the last step is to remind you whether to execute the vmware-config-tools.pl configuration immediately, select Yes, and then select a resolution (resolution ), either 800x600 or 1024x768 can be used by the reader.
After everything is done, an Xorg. conf file is generated in the/etc/X11 directory.


Ii. Update ports

================
1. Install CVSup
If you have not installed CVSup, run the following command to install it:
# Cd/usr/ports/NET/CVSup
# Make install clean

2. Copy the ports configuration file to/etc/ports-supfile.
# Cp/usr/share/examples/CVSup/ports-supfile/etc/ports-supfile
# Ee/etc/ports-supfile
Change the line # host = change_this.freebsd.org to host = cvsup.freebsd.org.

3. Update ports
#/Usr/local/bin/CVSup-g-L 2/etc/ports-supfile

4. Modify/etc/make. CONF file and add Chinese support (Remark: Thanks to Firefly for its contribution). If not, refer to/etc/defaults/make. create a new CONF file, which is mainly used during compilation.
# Echo "with_cjk = yes">/etc/make. conf

The contents of the make. conf file are as follows:
Sup_update = Yes
Sup =/usr/local/bin/CVSup
Supflags =-g-L 2
Suphost = cvsup.cn.freebsd.org
Portsupfile =/etc/ports-supfile

With_cjk = Yes


3. install x Desktop

==================
Readers can choose a desktop based on their preferences, such as gnome, Kde, and xfce. I chose xfce because it is very small and does not take much time.
1. Install xfce4
# Cd/usr/ports/x11-wm
# Make all install clean
After several hours, the xfce is installed.

2. Modify ~ /. Xinitrc file. If the file does not exist, create a new one. Add the following sentence:
# EE ~ /. Xinitrc
Exec startxfce4

3. Modify/etc/X11/Xorg. conf and comment out the defaultdepth line.
# Ee/etc/X11/Xorg. conf


Iv. Cultural Process

====================
1. Modify the/etc/login. conf file and insert the following content before umask = 022 in the first default block:
# Ee/etc/login. conf
: Lang = zh_cn.gbk :/
: Charset = zh_cn.gbk :/
: Umask = 022:

2. Modify the. cshrc file and set environment variables.
Among them,/etc/CSH. cshrc is shared by all users, and ~ /. Cshrc is used by the current user. You can select any file and modify the file as follows:
# EE ~ /. Cshrc
Alias LS-G
Alias mount_msdosfs-l zh_cn.gbk # support for loading msdos Chinese file names
Alias mount_cdrom mount_cd9660-c gbk # supports loading optical drive Chinese file names

Setenv Lang zh_cn.gbk
Setenv lc_all zh_cn.gbk

3. Modify ~ /. Xinitrc file. Add the following two sentences at the beginning of the file:
# EE ~ /. Xinitrc
Export lang = zh_cn.gbk
Export lc_ctype = zh_cn.gbk

4. Install the fireflyttf font
# Cd/usr/ports/Chinese/fireflyttf
# Make install clean

5. Install simsun, mingliu, and tahoma commercial fonts (optional)
These two fonts can be obtained in Windows. The file name of is simsun. TTC, and the file name of the new simsun is mingliu. TTC. tahoma fonts include tahoma. TTF and tahomabd. TTF.
You can copy files from these windows systems to the/usr/x11r6/lib/X11/fonts/TrueType directory through FTP, temporary server, or other means, and. the TTC extension is changed. TTF. If the directory does not exist, create a new one.
# Cp *. TTF/usr/x11r6/lib/X11/fonts/TrueType/
Then refresh the font cache list
# FC-Cache-F-V

6. Create a. fonts. conf file in the user's home directory.
# Cd ~ /
# Ee. fonts. conf
For the file content, see the appendix. This file mainly solves the font blur problem on x Desktop.
Or use the. fonts. conf file prepared by the author. The command is as follows:
# Cd ~ /
# Fetch http://www.wenhepc.com/justin/freebsd/dot.fonts.conf
# Mv dot. fonts. conf. fonts. conf


5. Install Application Software

====================
1. Install the penguin Input Method fcitx
# Cd/usr/ports/Chinese/fcitx
# Make install clean
After installation, modify the settings ~ Add the following two sentences to the/. xinitrc file:
# EE ~ /. Xinitrc
Export xmodfiers = "@ im = fcitx"
Fcitx &

2. Install the PDF reading software xpdf
# Cd/usr/ports/Chinese/xpdf
# Make install clean

3. Install QQ plug-in and Gaim
# Cd/usr/ports/NET/Gaim-openq
# Make install clean

4. Install the MP3 player
# Cd/usr/ports/multimedia/beep-media-player
# Make install clean

5. Install a media player
# Cd/usr/ports/multimedia/mplayer
# Make with_gtk2 = Yes install clean

6. Success
================
Now, the installation of a basic system is complete. All you need to do is log out and re-log in to make the previous settings take effect.
1. Log On again
# Logout
Then enter the user and password to log on.
Go to the desktop and execute
# Startx

2. If you want to make the font of fcitx look better, you can go to the terminal to modify it ~ /. Fcitx/profile and ~ /. Fcitx/config file
# EE ~ /. Fcitx/Profile
GBK = 1
# EE ~ /. Fcitx/config
Show font = simsun

3. After Entering the x Desktop, modify the user interface and change the font to simsun 10 or ar pl new versions 10. Select one you like :)

4. That's all, enjoy it!


VII. Appendix

==========
1. Contents of vmware-4.5.2-freebsd-5.3.patch files
--- Vmware-tools-distrib.orig/bin/vmware-config-tools.pl Fri Jun 11 08:52:59 2004
++ Vmware-tools-distrib/bin/vmware-config-tools.pl Fri Dec 17 16:37:04 2004
@-2849,7 + 2849,7 @@
}
 
Sub xserver4 {
-Return xserver_bin (). '/xfree86 ';
+ Return xserver_bin (). '/Xorg ';
}
 
Sub xserver3 {
@-3052,7 + 3052,7 @@
# String. Maybe it will once it settles down.
If ($ xversionall EQ "0.0.0 "){
$ Xversionall = direct_command (shell_string (xserver4 (). '-Version 2> & 1') = ~
-/X.org Foundation /? '4. 100': '0. 100 ';
+/Release 6.7 /? '4. 100': '0. 100 ';
}
 
# This search order is issued from the xf86config man page.
@-3063,6 + 3063,8 @@
File_name_exist ('/usr/x11r6/etc/X11/'. $ ENV {'xf86config '})){
$ Xconfig_path = '/usr/x11r6/etc/x11 ';
$ Xconfig_file_name = $ ENV {'xf86config '};
+} Elsif (file_name_exist ($ xconfig_path. '/Xorg. conf ')){
+ $ Xconfig_file_name = 'xorg. conf ';
} Elsif (file_name_exist ($ xconfig_path. '/XF86Config-4 ')){
$ Xconfig_file_name = 'xf86config-4 ';
} Elsif (file_name_exist ($ xconfig_path. '/xf86config ')){

2. fonts. conf file content
<? XML version = "1.0"?>
<! Doctype fontconfig System "fonts. DTD">
<Fontconfig>
<! -- For simsun. TTC -->
<Match target = "font">
<Test name = "family"> <string> simsun </string> </test>
<Edit name = "antialias"> <bool> true </bool> </Edit>
<Edit name = "hinting"> <bool> true </bool> </Edit>
<Edit name = "autohint"> <bool> false </bool> </Edit>
</Match>

<Match target = "font">
<Test name = "family"> <string> nsimsun </string> </test>
<Edit name = "antialias"> <bool> true </bool> </Edit>
<Edit name = "hinting"> <bool> true </bool> </Edit>
<Edit name = "autohint"> <bool> false </bool> </Edit>
</Match>

<Match target = "font">
<Test name = "family"> <string> simsun </string> </test>
<Test name = "size" compare = "less_eq"> <int> 16 </int> </test>
<Edit name = "antialias" mode = "Assign"> <bool> false </bool> </Edit>
<Edit name = "hinting" mode = "Assign"> <bool> true </bool> </Edit>
</Match>

<Match target = "font">
<Test name = "family"> <string> nsimsun </string> </test>
<Test name = "size" compare = "less_eq"> <int> 16 </int> </test>
<Edit name = "antialias" mode = "Assign"> <bool> false </bool> </Edit>
<Edit name = "hinting" mode = "Assign"> <bool> true </bool> </Edit>
</Match>

<Match target = "font">
<Test name = "family"> <string> nsimsun </string> </test>
<Edit name = "globaladvance"> <bool> false </bool> </Edit>
</Match>

<! -- For mingliu. TTC -->
<Match target = "font">
<Test name = "family"> <string> mingliu </string> </test>
<Edit name = "antialias"> <bool> true </bool> </Edit>
<Edit name = "hinting"> <bool> true </bool> </Edit>
<Edit name = "autohint"> <bool> false </bool> </Edit>
</Match>

<Match target = "font">
<Test name = "family"> <string> mingliu </string> </test>
<Test name = "size" compare = "less_eq"> <int> 12 </int> </test>
<Edit name = "antialias" mode = "Assign"> <bool> false </bool> </Edit>
<Edit name = "hinting" mode = "Assign"> <bool> true </bool> </Edit>
</Match>
</Fontconfig>

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.