Magento build
1. Install apache slightly
2. Install php
need to support the following components, php installation file comes with, php install file/ext/
Curl
ZIP
Zlib
GD Library
Mcrypt
Mbstrings
Xml
libxml2 download
http://linux.softpedia.com/get/ Programming/Libraries/libxml2-162.shtml
CURL problem
yum install curl curl-devel
configure: error: png.h not found. GD problem
yum install libpng
yum install libpng-devel
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
https://sourceforge.net/projects/mcrypt/files/Libmcrypt/
yum -y install gd-devel zlib-devel libjpeg-devel libpng-devel libiconv-devel freetype-devel libxml2 libxml2-devel openssl openssl-devel curl-devel libxslt-devel libmcrypt-devel mhash mcrypt
wget http://download.icu-project.org/files/icu4c/52.1/icu4c-52_1-src.tgz
tar xf icu4c-52_1-src.tgz
cd icu/source
mkdir /usr/local/icu
./configure --prefix=/usr/local/icu
make && make install
php5
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/httpd/bin/apxs --with-libxml-dir=/usr/local/libxml2 --with-curl --with-zlib --with-mcrypt --with-openssl --with-mysql --with-pdo-mysql --enable-mbstring --enable-xml --enable-zip
安装错误
[ERROR] exception 'Exception' with message 'Warning: call_user_func() expects parameter 1 to be a valid callback, function 'imagecreatefromjpeg' not found or invalid function name in /usr/local/magento/vendor/magento/framework/Image/Adapter/Gd2.php on line 65' in /usr/local/magento/vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'call_user_func(...', '/usr/local/mage...', 65, Array)
单独装gd
先装jpeg
http://www.ijg.org/files/jpegsrc.v9b.tar.gz
tar zxvf jpegsrc.v8d.tar.gz
cd jpeg-8d/
./configure --prefix=/usr/local/jpeg --enable-shared
make && make install
cd ../gd
phpize
./configure --with-jpeg-dir=/usr/local/jpeg --with-php-config=@php-config-path@
make clean
make && make install install
intl separately
--with-xsl
--enable- intl --with-icu-dir=/usr/local/icu/
Open the apache rewrite module
Open the httpd.conf configuration file: remove the # sign in front of LoadModule rewrite_module modules/mod_rewrite.so.
Set the value of AllowOverride to All, and pay special attention to cancel the comment symbol in front of RewriteBase.
Finally enable the search engine optimization function in the magento background: system->configuration->web->Search Engines Optimization->Use
Web Server Rewrites ->Yes
Problem: The background resource file 404 could not be found
Solution :
First enlarge the memory_limit in PHP.ini to 512
and rename the pub file in magentor to pub.bak to
manually generate the resource file:
/usr/local/php/bin/php bin/ magento setup:static-content:deploy
When finished, a new pub file will appear in magentor. Rename
the pub file to pub.bak2 and
then change the previous pub.bak back to pub
cp -r pub.bak2/static/adminhtml pub/static/
magento build
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326287920&siteId=291194637
Recommended
Ranking