我在上传包并安装 curl 命令时遇到问题,它对我不起作用。这在 AEM 6.1 中不可用吗?
curl -u admin:admin -F file=@"压缩文件名" -F name="包名" -F force=true -F install=true http://localhost:4502/crx/packmgr/service. jsp
当我第一次使用 curl -u admin:admin -F package=@"name_of_package.zip" http://localhost:4502/crx/packmgr/service/.json/?cmd=upload 上传包时
并使用 curl -u admin:admin -X POST http://localhost:4505/crx/packmgr/service/.json/etc/packages/export/name of package?cmd=install 安装它
然后它工作正常。
这是我上传和安装的响应
<crx version="1.2.11" user="admin" workspace="crx.default">
<request>
<param name="package" value="common-tools-package-1.0.6.zip"/>
<param name="name" value="common-tools-package"/>
<param name="force" value="true"/>
<param name="install" value="true"/>
</request>
<response>
<data> +------------+-----------------------------------------+ | Arguments | Comment | +------------+-----------------------------------------+ | cmd=help | print this help | +------------+-----------------------------------------+ | cmd=ls | print a list of all packages | +------------+-----------------------------------------+ | cmd=rm | remove a package | | name | package name | | [group] | group name (optional) | +------------+-----------------------------------------+ | cmd=build | build a package | | name | package name | | [group] | group name (optional) | +------------+-----------------------------------------+ | cmd=inst | install a package | | name | package name | | [strict] | true to fail on error | | [group] | group name (optional) | +------------+-----------------------------------------+ | cmd=uninst| uninstall a package | | name | package name | | [group] | group name (optional) | +------------+-----------------------------------------+ | GET | download a package | | | (content-disposition header contains | | | the correct filename) | | [cmd=get] | optional | | name | package name | | [group] | group name (optional) | +------------+-----------------------------------------+ | POST | upload a new package | | file | package to upload | | [name] | optional name | | [strict] | true to fail on install error | | [install] | automatically install package if 'true' | +------------+-----------------------------------------+ </data>
<status code="200">ok</status>
</response>
</crx>