(转载)MacPorts 基本用法
MacPort基本用法总结
1.MacPort的下载地址
http://www.macports.org/install.php
2.MacPort的说明文档
http://guide.macports.org/
3.MacPort中第三方软件下载包存放的默认路径是:/opt/local/var/macports/distfiles/
为了提高安装速度,可以在安装新port时直接将此目录下的文件拷贝到新的MacPort相同的目录中就可以避免Port去网上下载。
4.使用MacPort前应该首先更新Port的index
引用
$sudoportselfupdate
Password:
Warning:portdefinitionsaremorethantwoweeksold,considerusingselfupdate
--->Updatingtheportstree
--->UpdatingMacPortsbasesourcesusingrsync
MacPortsbaseversion1.9.2installed,
MacPortsbaseversion1.9.2downloaded.
--->MacPortsbaseisalreadythelatestversion
Theportstreehasbeenupdated.Toupgradeyourinstalledports,youshouldrun
portupgradeoutdated
5.查看MacPort中当前可用的软件包及其版本
引用
$portlist
[email protected]/rabbitmq-server
[email protected]/AppHack
[email protected]/AppKiDo
[email protected]/AquaLess
[email protected]/ArpSpyX
[email protected]/AssignmentTrackerX
[email protected]/BigSQL
[email protected]/BiggerSQL
[email protected]/Books
......
4.在MacPort如何搜索需要安装的软件包?
引用
$portsearchmaven
[email protected](java,devel)
Ajava-basedbuildandprojectmanagementenvironment.
[email protected](devel,java)
UsemanyofMaven'sartifacthandlingfeaturesfromAnt.
[email protected](java,devel)
Ajava-basedbuildandprojectmanagementenvironment.
[email protected](java,devel)
Ajava-basedbuildandprojectmanagementenvironment.
[email protected](sysutils)
SwitchthedefaultMavenjavabuildtool
Found5ports.
5.搜索到需要安装的软件包之后,如何查看具体的软件包的内容和说明?
引用
$portinfomaven2
[email protected],Revision3(java,devel)
Description:MavenisaJavaprojectmanagementandprojectcomprehensiontool.Mavenisbasedontheconceptofa
projectobjectmodel(POM)inthatalltheartifactsproducedbyMavenarearesultofconsultinga
welldefinedmodelforyourproject.Builds,documentation,sourcemetrics,andsourcecross-references
areallcontrolledbyyourPOM.Maven2.0isacompleterewriteofMaven1.0andassuchisbetter
organized,fasterandeasiertouse.
Homepage:http://maven.apache.org/
BuildDependencies:kaffe
LibraryDependencies:maven_select
Platforms:darwin
License:unknown
Maintainers:[email protected],[email protected]
6.查看即将安装的或者已经安装的软件包的依赖关系
引用
$portdepsmaven2
FullName:[email protected]_3
BuildDependencies:kaffe
LibraryDependencies:maven_select
7.查看安装时允许客户定制的参数
引用
$portvariantsmaven2
maven2hasnovariants
8.查看了软件包的内容和说明,并确认确实要安装,则
引用
$sudoportinstallmaven2
9.安装完毕之后,清除安装时产生的临时文件
引用
$sudoportclean--allmaven2
--->Cleaningmaven2
10.卸载已经用MacPort安装的软件
引用
sudoportuninstallmaven2