大家一定喜欢Ubuntu吧?Ubuntu通过apt-get安装软件的方法真是太容易了,既不用去找软件包,而且能够自动解决“包依赖”问题。差不多彻
底解决了安装软件以及升级软件的问题。Solaris也提供了类似的方法"pkg-get"。
1、安装pkg-get
[size=+0] #/usr/sfw/bin/wget
[size=+0] #/usr/sbin/[size=+0]pkgadd -d pkg_get.pkg
2、配置pkg-get源
pkg-get默认的源比较慢,用#注释掉
[size=+0]
#url=http://ibiblio.org/pub/packages/solaris/opencsw/current
改成下面
[size=+0] url=ftp://ftp.math.purdue.edu/mirrors/opencsw.org/current
3、设置
环境变量
因为pkg-get把所有的软件都会安装在/opt/csw目录下,因此为了能够找到man、以及lib需要设置一下环境变量
在profile中添加(profile可以是:/etc/profile;或者~/.profile;或者你针对自己的shell的环境变量配置
文件)
[size=+0] export PATH=/usr/sfw/bin:/opt/csw/bin:$PATH
[size=+0] export MANPATH=$MANPATH:/usr/man:/opt/csw/man:/opt/sfw/man
[size=+0] export
LD_LIBRARY_PATH=/usr/lib:/usr/dt/lib:/usr/openwin/lib:/usr/sfw/lib:/opt/csw/lib
4、试试安装其他软件
比如:
[size=+0] #/opt/csw/bin/pkg-get -i apache2
[size=+0] #/opt/csw/bin/pkg-get -i vim
“源”里面具体有哪些包,你可以通过打开这个链接来查看。
http://mirrors.ibiblio.org/pub/mirrors/opencsw/current/i386/5.10/catalog
参考:
阅读(3577) | 评论(0) | 转发(0) |