linux下安裝magento

一.環境:

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章