在CentOS7里安装apache2.4 php7.2 mysql 5.6环境

打算安装magento 2.3.1,需要先安装运行环境。步骤如下:

1.yum install epel-release # 安装epel源
2.rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm # 安装remi源
3.rpm -Uvh http://repo.mysql.com/mysql-community-release-el7-7.noarch.rpm # 安装mysql源
4.yum update # 更新
centos-magento-perpare-1.png
5.yum --enablerepo=remi-php72 install php php-pdo php-mysqlnd php-opcache php-xml php-pecl-mcrypt php-gd php-devel php-intl php-mbstring php-bcmath php-json php-iconv php-soap php-zip # 启用remi php7.2源,安装php7.2及扩展
centos-magento-perpare-2.png
6.yum install mysql-server # 安装mysql 5.6
7.vi /etc/php.ini # 编辑php配置文件,将 memory_limit 值调高,如更改到1280M
centos-magento-perpare-3.png
8.vi /etc/httpd/conf/httpd.conf # 编辑apache配置文件,在适当位置添加 LoadModule rewrite_module modules/mod_rewrite.so , 启用rewrite模块;且将/var/www/html目录的配置内容 AllowOverride None 更改为 AllowOverride All,以让magento的配置文件.htaccess生效
centos-magento-perpare-4.png
9.systemctl restart httpd # 重启apache
10.将magento2的安装文件放到/var/www/html里,从浏览器里访问,开始安装
centos-magento-perpare-5.png

参考:

标签: CentOS7

添加新评论