操作方法
程序多功能设计是很有必要的: 提供不同的用途 例如:在你配置你的web服务器的安全套接子层(SSL),你可以运行安装程序设置SSL选项。 纠正之前安装中的错误。 在不同的数据库实例中安装Magento
1.登陆到Magento服务器,或者交换机,有文件系统权限的账户。如果使用bash shell 也可以使用下面的语法转换到有Magento文件系统权限的账户 su <Magento file system owner> -s /bin/bash -c <command> If the Magento file system owner does not allow logins you can do the followingsudo -u <Magento file system owner> <command>
1.从任何目录运行magento的命令,添加<your Magento install dir>/bin 到系统path。 Shells有不同的语法。 bash shell example for CentOS: export PATH=$PATH:/var/www/html/magento2/bin 你也可以通过以下方式运行命令: cd <your Magento install dir>/bin 并运行 ./magento <command name> php <your Magento install dir>/bin/magento <command name> <your Magento install dir>是你的Web服务器一个目录的子目录。
以下总结了部分可用的命令,更多命令请访问官网 magento setup:install 安装Magento软件 magento setup:uninstall 卸载magento magento setup:upgrade 更新 magento maintenance:{enable|disable} 启用或者禁用维修模式(维护 模式 下,只有被豁免的IP地址 可以访问 Magento管理或店 面) php magento config:set 创建部署配置 magento module:{enable|disable} 启用或禁用模块 magento setup:store-config:set 集店面相关的选项,如URL、 语 言、时区、等等。 magento setup:db-schema:upgrade 更新Magento的数据库模式 magento setup:db-data:upgrade Magento数据库更新的日期 magento setup:db:status 检查数据库是否是最新代码 magento list 列出所有可用的命令 magento help 提供用于指定命令的帮助 帮助命令 显示一个完整的命令列表: magento --list 为某个特定命令获得帮助: magento --help <command> 例如: magento --help setup:installmagento --help cache:enable