Magento SSH 下载安装
http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/installing_magento_via_shell_ssh
请注意SSH 脚本中代码的版本号。
This article will outline a few different approaches to installing the latest version of Magento using the command-line shell via SSH.
We will cover how to install Magento with and without sample data, and how to install Magento in a subdirectory or the web root directory.
The web root directory simply means what immediately comes up when you access your domain, compared to a sub-directory install, which is how Magento is setup by default.
Using SSH is the easiest and fastest way to install Magento, especially when you’re trying to setup a store with sample data. Normally, that requires you to download about 45 MB worth of data and then re-upload it to your website. With SSH, we can take advantage of the connection of the server to grab the necessary files.
Latest Stable Release
The latest stable version of Magento is 1.9.1.0 (26.6 MB)
http://www.magentocommerce.com/downloads/assets/1.9.1.0/magento-1.9.1.0.tar.gz
The latest stable version of Magento Downloader (not Magento itself!) is 1.9.0.01 (45.6 KB)
http://www.magentocommerce.com/downloads/assets/1.9.1.0/magento-downloader-1.9.1.0.tar.gz
(The downloader will install the latest stable release of Magento Commerce.)
Installing Magento With The Full Download |
Installing Into The Website Document Root |
- wget http://www.magentocommerce.com/downloads/assets/1.9.1.0/magento-1.9.1.0.tar.gz
- tar -zxvf magento-1.9.0.0.tar.gz
- mv magento/* magento/.htaccess .
- chmod -R o+w media var
- chmod o+w app/etc
Optionally delete the download file and empty directory from the extracted files:
- rm -rf magento/ magento-1.9.0.0.tar.gz
Then simply follow through with the web-based installation process.
Installing Magento With The PEAR Downloader |
Using the PEAR downloader is a convenient way to ensure that you install the latest version of Magento, as it provides a simple mechanism to install the latest stable version that is available. It is a small download and is updated less frequently than the full Magento package.
Installing Into The Website Document Root |
- wget http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-downloader-1.9.0.0.tar.gz
- tar -zxvf magento-downloader-1.9.0.0.tar.gz
- rm -rf magento-downloader-1.9.0.0.tar.gz
Now load http://www.yourwebsite.com/downloader.php in your web browser.
Installing into a Subdirectory |
For this install you only need to replace SUBDIRECTORY below (two times) with the name of the subdirectory that you want Magento installed in.
- mkdir SUBDIRECTORY
- cd SUBDIRECTORY
- wget http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-downloader-1.9.0.0.tar.gz
- tar -zxvf magento-downloader-1.9.0.0.tar.gz
- rm -rf magento-downloader-1.9.0.0.tar.gz
Now load http://www.yourwebsite.com/SUBDIRECTORY/downloader.php in your web browser.
Installing Magento With The Full Download & Sample Data |
Installing Magento with sample data is useful if you want to familiarize yourself with Magento and see how categories and products are set up.
Installing into the Root Web Directory |
This is almost the same as above, except you don’t need to know the directory name. You will only have to replaceDBHOST, DBNAME, DBUSER, and DBPASS.
- wget http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-1.9.0.0.tar.gz
- tar -zxvf magento-1.9.0.0.tar.gz
- wget http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-sample-data-1.9.0.0.tar.gz
- tar -zxvf magento-sample-data-1.9.0.0.tar.gz
- mv magento-sample-data-1.9.0.0/media/* magento/media/
- mv magento-sample-data-1.9.0.0/magento_sample_data_for_1.9.0.0.sql magento/data.sql
- mv magento/* magento/.htaccess* .
- chmod -R o+w media var
- mysql -h DBHOST -u DBUSER -pDBPASS DBNAME < data.sql
- chmod o+w var var/.htaccess app/etc
- rm -rf magento/ magento-sample-data-1.9.0.0/ magento-1.9.0.0.tar.gz magento-sample-data-1.9.0.0.tar.gz data.sql
Installing Magento With The PEAR Downloader & Sample Data |
WARNING: This PEAR downloader & sample data info needs to be fixed... not working
Installing Magento with sample data is useful if you want to familiarize yourself with Magento and see how categories and products are set up.
Installing into the Root Web Directory |
This is almost the same as above, except you don’t need to know the directory name. You will only have to replaceDBHOST, DBNAME, DBUSER, and DBPASS.
- wget http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-downloader-1.9.0.0.tar.gz
- wget http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-sample-data-1.9.0.0.tar.gz
- tar -zxvf magento-downloader-1.9.0.0.tar.gz
- tar -zxvf magento-sample-data-1.9.0.0.tar.gz
- mv magento-sample-data-1.9.0.0/media/* magento/media/
- mv magento-sample-data-1.9.0.0/magento_sample_data_for_1.9.0.0.sql magento/data.sql
- mv magento/* magento/.htaccess .
- chmod -R o+w media
- mysql -h DBHOST -u DBUSER -pDBPASS DBNAME < data.sql
- ./pear mage-setup .
- ./pear install magento-core/Mage_All_Latest-stable
- touch var/.htaccess | mkdir app/etc
- chmod o+w var var/.htaccess app/etc
- rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
- rm -rf magento/ magento-sample-data-1.9.0.0/
- rm -rf magento-downloader-1.9.0.0.tar.gz magento-sample-data-1.9.0.0.tar.gz data.sql
Installing into a Subdirectory |
For this install, there are five things you will need to know before you copy and paste the SSH commands and run the install.
- Subdirectory name where Magento will be installed
- The database host name, localhost works for most
- The name of the database that Magento will use
- The username that has privileges to use the database
- The password for that user
Once you have that information, you’ll want to copy and paste the commands for the type of install you want and replace what’s there with the information from above. It’s best to copy this into notepad or something similar.
So that means you’ll be replacing the word SUBDIRECTORY below (two times) to the name of the subdirectory where you want Magento installed, and DBHOST, DBNAME, DBUSER, and DBPASS.
- mkdir SUBDIRECTORY
- cd SUBDIRECTORY
- wget http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-downloader-1.9.0.0.tar.gz
- wget http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-sample-data-1.9.0.0.tar.gz
- tar -zxvf magento-downloader-1.9.0.0.tar.gz
- tar -zxvf magento-sample-data-1.9.0.0.tar.gz
- mv magento-sample-data-1.9.0.0/media/* magento/media/
- mv magento-sample-data-1.9.0.0/magento_sample_data_for_1.9.0.0.sql magento/data.sql
- mv magento/* magento/.htaccess .
- chmod -R o+w media
- mysql -h DBHOST -u DBUSER -pDBPASS DBNAME < data.sql
- ./pear mage-setup .
- ./pear install magento-core/Mage_All_Latest-stable
- touch var/.htaccess | mkdir app/etc
- chmod o+w var var/.htaccess app/etc
- rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
- rm -rf magento/ magento-sample-data-1.9.0.0/
- rm -rf magento-downloader-1.9.0.0.tar.gz magento-sample-data-1.9.0.0.tar.gz data.sql
Running the Web-Based Installer to Finish the Installation |
After you have installed Magento via SSH, you can proceed through the web-based installer. You’ll use the same database details in that as well.
You can actually bypass the web-based installer and use the Command Line Interface (CLI) instead.
Alternatively, there’s an SSH script you can use that automates both the main steps of this article and the CLI installer.
Troubleshooting |
Permissions not correct/insufficient |
In case not all permissions are set correctly, you can run these commands. The code highlighter is stripping the off the end. Should be {} backslash;
- find . -type f -exec chmod 644 {} ;
- find . -type d -exec chmod 755 {} ;
which will give files the 644 and directories the 755 permissions respectively. While you can change the directories to 777, this should never be done. It is a big security risk.
URL Not Accessible |
As mentioned in this thread, if you receive an error message that says URL not accessible, you’ll want to remove the following lines:
- ./pear mage-setup .
- ./pear install magento-core/Mage_All_Latest-stable
After you’ve gone through the web-based installer, then you can run those two commands to upgrade Magento to the lastest version, or use Magento Connect.
404 Error On Sample Products |
If you get a 404 error when clicking on a product from the main page, you’ll need to login the backend of Magento and go to:
System -> Cache Management
In the Catalog section, click on the Refresh button for Catalog Rewrites.
This will also fix the URL structure for the categories and rest of the products.
Download An Archived Magento Connect Extension |
If for some reason you need to download a Magento Connect extension archive from command line, use the following :
- wget http://connect.magentocommerce.com/TYPE/get/EXTENSION_NAME-X.X.X.tgz
TYPE must be replaced with real extension type(usually core or community), EXTENSION_NAME with real(machine readable) extension name and X.X.X must be replaced with the real version number. To retrieve real TYPE and the real machine readable EXTENSION_NAME simply look at it’s extension key and take into a count it’s format magento-TYPE/EXTENSION_NAME.
For example:
- Extension key: magento-core/Interface_Frontend_Default_Blank
- Version(at the time of writing): 1.4.1.1
- Download URL:
- wget http://connect.magentocommerce.com/core/get/Interface_Frontend_Default_Blank-1.4.1.1.tgz
Other example:
- Extension key: magento-community/Yoast_Blank_Seo_Theme
- Version(at the time of writing): 1.4.1
- Download URL:
- wget http://connect.magentocommerce.com/community/get/Yoast_Blank_Seo_Theme-1.4.1.tgz
Guess it’s would be nice to have “Releases” tab with links and release notes at extension page? ![]()
Use PEAR to download and install Magento Connect Extension |
If you also need some extension to be installed from command line, then use following:
- ./pear install EXTENSION_KEY
And refresh the cache (System → Cache Management)
This way extension will be properly deployed(i.e. app, frontend template/layout, etc. will be copied to it’s places) and activated.
If you simply need to download archived extension package for some reason, use following:
- ./pear download EXTENSION_KEY
NOTE: in order to have properly functioning ./pear command, your magento instance must be installed following one of the steps explained at this page.
Other Pages You May Find Useful When Upgrading to 1.9http://www.magentocommerce.com/boards/viewthread/248230/http://www.magentocommerce.com/wiki/groups/227/installing_magento_via_shell_sshhttp://www.magentocommerce.com/wiki/1_-_installation_and_configuration/magento_1.5_to_1.6_upgradehttp://www.magentocommerce.com/wiki/1_-_installation_and_configuration/manual_upgrade_using_fresh_install_and_original_database#process
Magento SSH 下载安装的更多相关文章
- 06_Linux基础-NGINX和浏览器、网页的关系-云服务器ssh登陆-安装NGINX-上传网页-压缩命令-xz-gzip-bzip2-zip-tar-配置NGINX服务器支持下载功能-备份脚本
06_Linux基础-NGINX和浏览器.网页的关系-云服务器ssh登陆-安装NGINX-上传网页-压缩命令-xz-gzip-bzip2-zip-tar-配置NGINX服务器支持下载功能-备份脚本 一 ...
- PuTTY的下载安装和基本使用方法教程
PuTTY是一款开源(Open Source Software)的连接软件,主要由Simon Tatham维护,使用MIT许可证授权.包含的组件有:PuTTY, PuTTYgen,PSFTP, PuT ...
- Git以及TortoiseGit的下载安装使用
Git以及TortoiseGit的下载安装使用 下载git 下载地址:https://git-scm.com/然后进行一系列的安装,傻瓜式的操作即可 TortoiseGit Tortoise 英[ˈt ...
- Redis安装教程及可视化工具RedisDesktopManager下载安装
Redis安装教程: 1. Windows下安装教程: 下载:https://github.com/MSOpenTech/redis/releases Redis 支持 32 位和 64 位.这个需要 ...
- 二、putty的下载安装和基本使用方法教程
转载自:https://baijiahao.baidu.com/s?id=1597811787635071952&wfr=spider&for=pc PuTTY是一款开源(Open S ...
- magento 2.3安装测试数据
前面我们一步步composer安装Magento2.3,但是没有数据的话各项设置不是很熟悉,所以最好还是安装一下测试数据.下面我们就跟ytkah一起填充数据.假设magento 2.3安装目录是/ww ...
- web前端工程师在移动互联网时代里的地位问题 为啥C/S系统在PC端没有流行起来,却在移动互联网下流行了起来 为啥移动端的浏览器在很多应用里都是靠边站,人们更加倾向于先麻烦自己一下,下载安装个客户端APP
web前端工程师在移动互联网时代里的地位问题 支付宝十周年推出了一个新产品:支付宝的十年账单,我也赶个时髦查看了一下我的支付宝十年账单,哎,感慨自己真是太屌丝了,不过这只是说明我使用淘宝少了,当我大规 ...
- 从零开始使用git第一篇:下载安装配置
从零开始使用git 第一篇:下载安装配置 第一篇:从零开始使用git第一篇:下载安装配置 第二篇:从零开始使用git第二篇:git实践操作 第三篇:从零开始使用git第三篇:git撤销操作.分支操作和 ...
- Visual Studio for Mac Preview离线下载安装
Visual Studio for Mac离线下载安装. 环境:OS X EI Caption 10.11.2 .NET Core SDK 1.1 需预先安装 .NET Core 1.1 SDK ma ...
随机推荐
- BZOJ3784 : 树上的路径
树的点分治,在分治的时候将所有点到根的距离依次放入一个数组q中. 对于一棵子树里的点,合法的路径一定是q[L]..q[R]的某个数加上自己到重心的距离. 定义五元组(v,l,m,r,w),表示当前路径 ...
- TYVJ P1075 硬币游戏 Label:dp
背景 农民John的牛喜欢玩硬币,所以John就为它们发明了一个新的两人硬币游戏,叫做Xoinc. 描述 最初地面上有一堆n个硬币(5<=n<=2000),从上面数第i个硬币的价值为C_i ...
- 深度解析开发项目之 05 - 解决textField编辑之后点击其他内容改变的问题
深度解析开发项目之 05 - 解决textField编辑之后点击其他内容改变的问题 问题的解决: 只需要给HeadeVIew加上这句代码
- iOS-TextField知多少
iOS-TextField知多少 //初始化textfield并设置位置及大小 UITextField *text = [[UITextField alloc]initWithFrame:CGRect ...
- lintcode :Coins in Line II 硬币排成线 II
题目 硬币排成线 II 有 n 个不同价值的硬币排成一条线.两个参赛者轮流从左边依次拿走 1 或 2 个硬币,直到没有硬币为止.计算两个人分别拿到的硬币总价值,价值高的人获胜. 请判定 第一个玩家 是 ...
- Odoo 二次开发教程【一】 Odoo 的安装
一,安装的两种方式: 1) deb包安装: 此安装方式适用于简单不需要太多的人工干预,大多数插件都在deb中涵盖了.具体的步骤如下: 1.编辑 /etc/apt/source.list 文件,在末尾添 ...
- hdu Collect More Jewels
思路: 先用bfs求出入口,宝物,出口,两两之间的最短距离. 在用dfs搜索所有情况,求出从入口走到出口能获得的最大价值. 我们要解决几个问题:1.求入口到第一个取宝物的地方的最短距离 2.求第i个取 ...
- 转载:hdu 动态规划题集
1.Robberies 连接 :http://acm.hdu.edu.cn/showproblem.php?pid=2955 背包;第一次做的时候把概率当做背包(放大100000倍化为整数): ...
- jquery CDN(内容分发网络)使用
jquery CDN 给开发者提供一种捷径,即不下载jquary 就通过CDN能使用各个版本的jquery. 使用方法很简单,就是在HTML 文档中引用相关版本的jquery. 例如:我用百度的CDN ...
- 【Objective-C】Windows下Objective-C开发环境配置
[Objective-C]Windows下Objective-C开发环境配置 ftp://ftpmain.gnustep.org/pub/gnustep/binaries/windows/ 最近打 ...