Development Environment Installation and Settings on Solaris

xiaoxiao2021-03-06  101

Author: BadcoffeeEmail: blog.oliver@gmail.com2004年 October

Original source: http://blog.9cbs.net/yayong copyright: When reprint, please be sure to indicate the original source, author information and this statement by hyperlink.

1 Introduction

Since the Solaris distribution is the default, the C compiler is not installed and the development environment, so it is necessary to develop C progents in the Solaris platform.

Buying Sun Compiler Sun Studio Installing the Free GNU Development Tool If you need to compile and optimize the SPARC platform, the Performance of the generated code is higher, and Sun Studio may be the best choice. Considering costs and other factors, the free GNU development tools are undoubtedly preferred. In fact, GCC can support cross-compilation of a variety of platforms including SPARC and X86.

Solaris released version of the Companion CD, including a lot of GNU development tools:

GCC (C / C compiler) binutils (GAS / LD / AR / NM equivalent, can be installed) GDB (Debug tool, debug code, and disassembly) GMAKE (GNU Make, no installation) Vim (editor , Can support the syntax highlighting function of C / C and other languages) Coreutils (including the common commands of the GNU, using the LS - COLOR parameter to implement the same color terminal function as Linux), of course, except for installing the above installation package, generally The installation package for the following program is required: Glib GTK Libiconv NCurses In addition to the Solaris release version of the Companion CD, you can also download the binary package of the above tools from www.sunfreeWare.com Sites. The SUNFREEWARE's site offers downloads of the free tools for all major versions of Solaris 7/8/9.

All installation packs mentioned above must be installed with the pkgadd -d command with the gzip to decompress.

2. Install and set additional www.blastwave.org also provides a large number of Solaris platform applications, and provides the PKG-GET network installation method. Since PKG-GET can automatically download all software packs dependent on the specified package Make software installation easier. First download and install the pkg-get command, you can use the following command to complete all installations:

# pkg-get install gcc3 # pkg-get install gdb # pkg-get install vim # pkg-get install coreutils

Note: If you are online through the Proxy, you need to set the proxy server address and port in /opt/csw/pkg-get.conf. For the installation and use of PKG-GET, please refer to the official site document http://www.blastwave.org here, no binutils package, Solaris's Sunw package already contains a similar function command, can be in / usr / ccs / bin found.

Create the default shell of the root to Bash and create a .bashrc file at the root directory:

#vi /.profile Term = DTTERM EXPORT TERM PATH = $ PATH: / USR / local / bin: / usr / ccs / bin; Export Path

Alias ​​ls = '/ usr / local / bin / ls - Color' Alias ​​Vi = '/ usr / local / bin / vim' The above setting makes the VIM and GNU LS instead of the system's VI and LS, to support the colored terminals of Linux Set the TERM variable.

Set the configuration file for the root directory, set the working mode of VIM:

#vi /.vimrc set autoindent "always set autoindenting on set nobackup" do not keep a backup file, use versions instead set history = 50 "keep 50 lines of command line history set showcmd" display incomplete commands set tabstop = 4

SYNTAX ON Set HLSearch

FILETYPE PLUGIN INDENT ON

AutoCmd filetype text setlocal textwidth = 80

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

New Post(0)