一.环境:

1.windows 2008 :hyper-v

2.centos 6.5-i386 (64位hyper-v不识别)

3.Magento1.8.1.0 社区版(CE)

二.开始:

1.安装centos 6.5

选择语言为:English(English) #生产服务器建议安装英文版本

Minimal 最小化安装 (备注:可以点Customize now,选择安装需要的开发工具包软件,

也可以在需要的时候通过yum源、rpm或者编译来安装软件包。)

vi  /etc/sysconfig/network-scripts/ifcfg-eth0   #编辑配置文件,添加修改以下内容

BOOTPROTO=static   #启用静态IP地址

ONBOOT=yes  #开启自动启用网络连接

IPADDR=192.168.21.129  #设置IP地址

NETMASK=255.255.255.0  #设置子网掩码

GATEWAY=192.168.21.2   #设置网关

DNS1=8.8.8.8 #设置主DNS

DNS2=8.8.4.4 #设置备DNS

IPV6INIT=no  #禁止IPV6

:wq!  #保存退出

service ip6tables stop   #停止IPV6服务

chkconfig ip6tables off  #禁止IPV6开机启动

service yum-updatesd stop   #关闭系统自动更新

chkconfig yum-updatesd off  #禁止开启启动

service network restart  #重启网络连接

ifconfig  #查看IP地址


关闭防火墙:

1) 临时生效,重启后复原
开启: service iptables start
关闭: service iptables stop

2) 永久性生效,重启后不会复原
开启: chkconfig iptables on
关闭: chkconfig iptables off


或者用命令:
#/sbin/iptables -I INPUT -p tcp –dport 80 -j ACCEPT
#/sbin/iptables -I INPUT -p tcp –dport 22 -j ACCEPT
#/etc/rc.d/init.d/iptables save


这样重启计算机后,防火墙默认已经开放了80和22端口

这里应该也可以不重启计算机:
#/etc/init.d/iptables restart

防火墙的关闭,关闭其服务即可:

查看防火墙信息:
#/etc/init.d/iptables status

详细出处参考:http://www.jb51.net/os/128751.html

2.Manually Installing   Zend Server

To setup the environment:

Set up your Zend Server  repository by creating'/etc/yum.repos.d/zend.repo' and adding the following content:

[Zend]
name=zend-server
baseurl=http://repos.zend.com/zend-server/
6.3/rpm/$basearch
enabled=1
gpgcheck=1
gpgkey=http://repos.zend.com/zend.key

[Zend_noarch]
name=zend-server - noarch
baseurl=http://repos.zend.com/zend-server/
6.3/rpm/noarch
enabled=1
gpgcheck=1
gpgkey=http://repos.zend.com/zend.key

To install:

  1. Once  the environment is setup,  run the appropriate command  according to the  PHP version (5.3, 5.4 or 5.5) you require:

# yum install zend-server-php-<PHP Version>

  1. To clean your packages cache and ensure retrieval of updates  from the web, run:

yum clean all

To access the Zend  Server UI, open your browser at: https://<Server_IP>:10082/ZendServer (secure), or http://<Server_IP>:10081/ZendServer.

详细链接:http://files.zend.com/help/Zend-Server/zend-server.htm#rpm_installing_zend_server.htm

安装完成后登陆,更改为免费授权

安装mysql(http://www.centospub.com/make/mysql.html)

yum -y install mysql-server

yum -y install php-mysql

chkconfig mysqld on       chkconfig --list mysqld      /etc/rc.d/init.d/mysqld start

mysql -u root← 用root用户登录MySQL服务器

mysql –u root –p

create database test;


yum -y install wget

wordpress

http://codex.wordpress.org/zh-cn:%E5%AE%89%E8%A3%85_WordPress

http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/installing_magento_via_shell_ssh#installing_magento_via_ssh


  1. wget http://www.magentocommerce.com/downloads/assets/1.8.1.0/magento-1.8.1.0.tar.gz

  2. tar -zxvf magento -1.8 .1 .0.tar.gz
  3. mv magento/* magento/.htaccess .
  4. chmod -R o+w media var
  5. chmod o+w app/etc

cp -r

.当前目录

未关闭selinux  。未修改httpd