|
|
发表于 2006-8-10 02:51:59
|
显示全部楼层
Post by mylynx
[color="Magenta"]
确切的说,如果你想安装一个TARBALL格式的软件。如foobar-1.0.tar.gz,先解压这个软件到你指定的目录下,通常为/usr/local/,然后进入到其中:
- $cd /usr/local/foobar-1.0
- #read the README FILE first
- $./configure
- $make
- $make install
复制代码
我这样解释够清楚了吧!!!!
In general, it is suggested to use root only to carry out administrative tasks such as installing (not compiling) software as described by KevinChen in 2nd floor.
As a rule of thumb, source trees should be extracted to somewhere else and compiled by a normal user. Once compilation is finished, install the software by root.
It is not a good idea to extract your source tree into /usr/local for 2 reasons:
1. /usr/local is usually owned by root, this means you need root privilege to write /usr/local and compile the source codes as root
2. /usr/local may be used as the location for compiled binaries rather than a location for source trees, otherwise, it will be messed up with source trees and binaries.
Further information about the desire installing directory, please read "[color="Blue"]The /usr Versus /usr/local Debate"
On the other hand, it is possible to specify the target installation path of the binaries during configure, e.g.
$tar xf *.tar.gz
$cd <path>
$./configure [color="Blue"]--prefix=/usr
$make
$su
[color="Red"]#make install (root用户)
For detail installation instructions, you should read the relevant documentation such as README and INSTALL etc, supplied with your software. |
|