magento安装遇到的问题,注册magento.com

6 Steps to Install Magento 2 on CentOS [Latest] - Sample Data

PHPer 2021-12-15 792 0 0
Step 1.4: Update php.ini file Now time to increase values in php.ini file. Open php.ini file: nano /etc/php.ini Change the following data: file_uploads = On allow_url_fopen = On short_open_tag = On memory_limit = 512M upload_max_filesize = 128M max_execution_time = 3600 Then save this php.ini file. After that, you should restart apache2. Run this command: systemctl restart httpd 这里很重要,之前我命令行运行安装后一直报错:Could not validate a connection to Elasticsearch. No alive nodes found in your cluster,最后的原因是php分配的资源不够导致的。 另外一定要增加虚拟内存,至少要设置4G的虚拟内存。否则Elasticsearch带不动

原文链接:https://www.mageplaza.com/devdocs/how-install-magento-2-centos.html

You are looking forInstall Magento 2 latest version on CentOSfrom Magento repo or Github with Apache/Nginx, MySQL/MariaDB and PHP7.x, this guide is the best place for you. In this post, I will show youhow to install Magento 2.3 on CentOS latestwith Apache2, MariaDB. In previous posts, I talked aboutInstall Magento 2 on MAC OS,Ubuntu/DebianorWindows.

Magento 2 Requirements

You should double-check8 main requirements for Magento 2 here.

Step 1: Install Apache2 PHP and Required Extensions

I introduce the IUS Commyni repository for CentOS and Red Hat. It is a shell script to download and install necessary packages and PGP Keys.

curl 'https://setup.ius.io/' -o ius-installer.sh chmod 755 ius-installer.sh ./ius-installer.sh

After run above command line, Apache2 and MySQL has been installed.

yum update yum install httpd php72u php72u-pdo php72u-opcache php72u-xml php72u-mcrypt php72u-gd php72u-devel php72u-mysql php72u-intl php72u-mbstring php72u-json php72u-iconv php72u-mysqlnd php72u-fpm

Step 1.1 Install Apache2 Server

The Apache HTTP Server, called Apache, it is free and open-source cross-platform web server software. Apache is the most popular HTTP Server now. It runs on Linux, Windows, OpenVMS, NetWare and other operating systems.

To install Apache, you should update packages before running Apache install command:

sudo yum update sudo yum install apache2

Step 1.2 Configure Apache2 Virtual Host

To declear Apache2 site configuration for Magento 2 store, you have to create a new configuration filehttpd.conf:

nano /etc/httpd/conf/httpd.conf

Copy and paste the following content to the above file. Remember, you should changedomain.comto your domain.

ServerAdmin admin@domain.com DocumentRoot /var/www/magento2/ ServerName domain.com ServerAlias www.domain.com Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all ErrorLog /var/log/httpd/magento_error.log CustomLog /var/log/httpd/magento_access.log combined

If you are installing Magento locally, you can changedomain.comtolocalhost.com,dev.comorm2.com. Then you have to updatehostsfile at/etc/hostswith

127.0.0.1 localhost.com 127.0.0.1 dev.com 127.0.0.1 m2.com

IMPORTANT:

In this tutorial, I uselocalhost.com.

To check Apache new configuration run this command line:

apachectl configtest

After passing configuration test, now reload the configuration:

systemctl reload httpd

To run apache automatically during startup, run the following command line:

systemctl enable httpd

Enable Rewrite mod

Make sure you enable rewrite mod to use site friendly URLs, open filehttpd.conf:

nano /etc/httpd/conf/httpd.conf

Find this line:

# LoadModule foo_module modules/mod_foo.so # Include conf.modules.d/*.conf

Then add these following files:

LoadModule rewrite_module modules/mod_rewrite.so

Scroll down find this:

Options Indexes FollowSymLinks# # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # AllowOverride None

Then changeAllowOverride Noneto:

AllowOverride All

After that, reloadhttpdservice:

systemctl reload httpd

Step 1.4: Update php.ini file

Now time to increase values in php.ini file. Openphp.inifile:

nano /etc/php.ini

Change the following data:

file_uploads = On allow_url_fopen = On short_open_tag = On memory_limit = 512M upload_max_filesize = 128M max_execution_time = 3600

Then save thisphp.inifile.

After that, you should restart apache2. Run this command:

systemctl restart httpd

Step 2: Install Database Server

To install mySQL Server and Client, run this command line:...

立即注册
分享的网址网站均收集自搜索引擎以及互联网,非查问网运营,查问网并没有提供其服务,请勿利用其做侵权以及违规行为。

更新于:2021-12-15 18:03:56
    您需要登录后才可以评论。 立即注册
    相关内容

    阿里云香港轻量服务器LNMP搭建yum安装Centos Stream8全流程

    Centos7利用yum安装apache+mysql8+php7 一篇搞定!

    Centos 服务器搭建(Centos8服务器搭建遇到的各种问题及解决方法)

    Centos8 更新yum或安装软件时提示 Failed to download metadata for repo...

    从CentOS 8到CentOS Stream,到底发生什么事了?

    CentOS8出现“ Error: Failed to download metadata for repo ‘AppStrea...

    如何将CentOS 8转换为CentOS Stream(202205实测有效)

    Centos中查看nginx、apache、php、mysql配置文件路径

    Centos7 安装Apache过程详解

    推荐内容

    分享几个好用的bt搜索bt资源下载网址网站

    影视电影剧集动漫综艺bt资源在线播放网址网站推荐分享

    全网最新bt磁力搜索引擎bt资源bt网站网址分享

    人气美女女优百度指数排行榜(波多野结衣,苍井空,三上悠亚,深田咏美,桥本有菜,北条...

    最强人造人深田咏美,业界的社交女王

    人生起起落落的三上悠亚,成名前的清纯风,怎么搭配出来的?

    业内第一大长腿,桥本有菜的腿究竟有多长

    波多野结衣,岛国业界著作最多的超级劳模

    日本AV界NO.1,苍井空是多少宅男的疯狂?

    美女女优视频混剪 This Girl-Laza Morgan

    怎样使用V2Ray代理和SSTap玩如魔兽世界/绝地求生/LOL台服/战地3/黑色沙漠/彩...

    sstap游戏代理教程 从此玩如魔兽世界/绝地求生/LOL台服/战地3/黑色沙漠/彩虹六...

    影视电影剧集动漫综艺bt资源在线播放网址网站推荐分享