Magento (麥進斗) 是一套專業(yè)開源的電子商務(wù)系統(tǒng),貌似用的人很多,但我個人來說并不了解這個東西,畢竟我不是做網(wǎng)絡(luò)購物的。不過最近在我們公司(宇塵網(wǎng)絡(luò))購買VPS主機架設(shè)magento的越來越多,,以前只裝過ECSHOP、SHOPEX、zencart,所以花了點時間,單獨開了個美國VPS測試安裝magento。
1.了解Magento的安裝系統(tǒng)要求:
- Supported Operating Systems:
- Linux x86, x86-64
- Supported Web Servers:
- Apache 1.3.x
- Apache 2.0.x
- Apache 2.2.x
- Nginx (starting from Magento 1.7 Community and 1.12 Enterprise versions)
- Supported Browsers:
- Microsoft Internet Explorer 7 and above
- Mozilla Firefox 3.5 and above
- Apple Safari 5 and above on Mac only
- Google Chrome 7 and above
- Adobe Flash browser plug-in should be installed
- PHP Compatibility:
- 5.2.13 – 5.3.15
- Required extensions:
- PDO_MySQL
- simplexml
- mcrypt
- hash
- GD
- DOM
- iconv
- curl
- SOAP (if Webservices API is to be used)
- Safe_mode off
- Memory_limit no less than 256Mb (preferably 512)
- MySQL:
- 4.1.20 or newer
- InnoDB storage engine
- SSL:
- If HTTPS is used to work in the admin, SSL certificate should be valid. Self-signed SSL certificates are not supported
- Server – hosting – setup:
- Ability to run scheduled jobs (crontab) with PHP 5
- Ability to override options in .htaccess files
安裝完整下載版方式:
wget http://www.magentocommerce.com/downloads/assets/1.7.0.2/magento-1.7.0.2.tar.gz
tar -zxvf magento-1.7.0.2.tar.gz
mv magento/* magento/.htaccess .
chmod -R o+w media var
chmod o+w app/etc
建議刪除源文件:rm -rf magento/ magento-1.7.0.2.tar.gz
接下來就可以通過網(wǎng)頁,域名訪問來安裝magento了。
對于網(wǎng)絡(luò)條件好的朋友,也可以通過網(wǎng)絡(luò)一步一步安裝:
wget http://www.magentocommerce.com/downloads/assets/1.7.0.0/magento-downloader-1.7.0.0.tar.gz
tar -zxvf magento-downloader-1.7.0.0.tar.gz
rm -rf magento-downloader-1.7.0.0.tar.gz
接下來就通過網(wǎng)絡(luò)http://www.yourwebsite.com/downloader.php來搞定。
美國VPS安裝Magento幾點需要注意的地方:
一、不要是用5.3及其以上的PHP,因為在幾次安裝過程中,凡是涉及5.3及其以上版本的php時,安裝都會出現(xiàn)諸如頁面空白、長時間無反應(yīng)等情況,最終結(jié)果就是安裝失敗,雖然可能數(shù)據(jù)庫內(nèi)容已經(jīng)被建好。
二、對于Nginx,特別是LNMP一鍵包用戶來說,找到對應(yīng)的偽靜態(tài)規(guī)則是當務(wù)之急,所以在我找到之后,不敢獨享,需要的基友拿去!
文件名為:magento.conf(下載),將其放在 /usr/local/nginx/conf/ 文件夾下
然后在 /usr/local/nginx/conf/vhost/www.yourname.com.conf 中將include none.conf; 換成include magento.conf;即可。最后是重啟nginx.
/etc/init.d/nginx restart
三、對于新手來說,不建議使用webmin/virtualmin環(huán)境,一來其默認的php是5.3.x,二來其默認的php缺少幾個magento必需的函數(shù)功能,如果你不想自己編譯php的話,推薦使用LNMP一鍵包。
四、不少環(huán)境配置完成之后,PHP的Memory_limit值都是128M,甚至更少,建議基友們將php.ini中的這個值改為256M,當然,前提是你的vps擁有512M內(nèi)存甚至更多。
五、在magento的安裝步驟到達最后一步時,頁面下半部有一個“skip baseurl check”之類的復(fù)選框(記不太清了),默認沒有選中,建議將其打勾,跳過檢查,否則在漫長的等待之后或許就是安裝失敗。
就這么幾點,不算技巧,更談不上經(jīng)驗,給有同樣安裝需求的基友一點建議。