简单的记下 Magento的安装过程,类似 笔记二中的,首先下载文件。
这边我直接在虚拟机中使用svn下载(首先进入对应的 欲安装目录)
To checkout Magento's latest and greatest, use the checkout command:
svn checkout http://svn.magentocommerce.com/source/branches/1.5
这边下载安装最新的稳定版本 1.5.1 到目录 /tmp/www/magento/ 下
权限问题修改完成后,配置nginx, vhosts 目录下 添加 magento.conf 文件,内容类似笔记二中的phpmyadmin.conf ,稍作修改后如下:
$cat vhosts/magento.conf
server
{
listen 192.168.126.128:8010;
server_name 192.168.126.128:8010;
index index.html index.htm index.php;
root /tmp/www/magento;
#limit_conn crawler 20;
location /1.5/
{
rewrite ^(.+)$ /1.5/index.php last;
}
location ~ .*\.(php|php5)?$
{
# fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
access_log off;
}
同样的重载nginx 配置文件,然后修改防火墙 开启对应配置的端口
这边提一下配置文件中的
location /1.5/
{
rewrite ^(.+)$ /1.5/index.php last;
}
这段主要就是为了magento的重写,由于 nginx 不像apache那样支持 .htaccess 文件。
接下来就开始安装magento咯,建立好对应数据库,安装过程这边就不赘述了。(如果需要示例数据,安装之前先把示例数据装好)
安装完成之后,登录后台重建索引后就可以访问了, 就写到这边,以后有问题再补充 ~~
补 充一点,安装过程中 使用apache rewrite模块 不要勾选,完成安装后 在后台开启 search engine optimization 中的Use Web Server Rewrites项即可实现 url 的重写功能,剔除 url中的/index.php 了