您的位置:首页 > 运维架构 > Nginx

Nginx 安装配置magento 1.8.0.0

2014-03-25 14:49 260 查看
1.  下载Magento 

       http://www.magentochina.org/download   Magento-1.8.0.0正式版下载

2.  解压缩magento-1.8.0.0.tar.gz

     cd /var/www

     tar xvf magento-1.8.0.0.tar.gz

     cd magento

     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-1.8.0.0.tar.gz

3. Install Nginx, PHP5, SSL and MySQL.

sudo apt-get install nginx php5 php5-cli php5-cgi spawn-fcgi php5-mysql php5-mcrypt php5-curl php5-gd php5-fpm openssl mysql-server

Choose and enter a secure password for MySQL when prompted and enter again to confirm. This is called mypassword in the following steps
but replace that with the password you have chosen here.

4. Install php-apc. APC is an opcode cache that can significantly speed up your PHP applications, by caching both PHP code and user variables.

sudo apt-get install php-apc

5. Create the MySQL Database

mysql -u root -pmypassword
create database mymagentoshop;
grant all privileges on mydatabasename.* to mydatabasename@localhost identified by 'mypassword';
exit

6. Configure Nginx

nano /etc/nginx/sites-enabled/default
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6

Uncomment listen links above by removing the preceding #
ctrl + x to exit and save

7.  Nginx setup
 

ERROR FIX:

PHP extension "gd" must be loaded.

RESOLVE:

add the following two lines to
the end of /etc/php5/fpm/php.ini 

extension=mysql.so
extension=gd.so

restart php

sudo /etc/init.d/php5-fpm restart

URL “http://localhost/” 无法访问。
Error parsing body - doesn't seem to be a chunked message
RESOLVE:

 Check 在开始下一步之前跳过基本URL验证

如果不能自动验证基本URL,就选中该选项。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: