Computer, telephone
and mobile phone
systems specialists
Telephone: +44 208 292 1691 (English or Japanese speeker)
Telephone: +44 870 392 5969 (Japanese speaker)
Telephone: 050 5327 8990 (Domestic Japan)
Email: contact@ukuniversalsupport.com
English   

日本語     
2019063002MagentoVersionUp

Magento Version Up in Centos 7.


Upgrade Magento from 2.2.4 to 2.3.2.

Refer https://www.goivvy.com/blog/magento-2-upgrade for the basic knowledge.
In this, we follow "3. Download the latest version manually and copy/paste" in the reference.
ここでは、上記参考情報の中の "3. Download the latest version manually and copy/paste" をやってみます。

こちらも参考になります。 https://magento.dekirumonn.com/magento-update/ 日本語が読める方は、こちらも参考にして下さい。バージョンアップに関することだけでなく、Magento全般について有用な情報が書いてあります。サイトの作者に感謝いたします。

Before you upgrade, take full backup of the web site. 始める前に、ウェブサイトのフル・バックアップを取って下さい。


==== PHP 7.1 ============
Ver2.2.* provides PHP 7.1 or less. Ver2.3.* requires PHP 7.1 or above. Ceosequently, PHP 7.1 should be used.
# yum install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

# yum-config-manager --disable remi-php54
# yum-config-manager --enable remi-php71

# yum install php php-pdo php-mysqlnd php-opcache php-xml php-mcrypt php-gd php-devel php-intl php-mbstring php-bcmath php-json php-iconv php-soap php-zip

# vi /etc/php.ini
memory_limit = 756M


==== Magento 2.3.2 ============
# php bin/magento maintenance:enableEnter into the maintenance mode.
# cd /var/www/magento
# tar xvf /tmp/Magento-CE-2.3.2.tar.gzOverwrite the older Magento programs with Version 2.3.2. Please pay attension, your modifications are lost if you had modified the older Magento programs.
# chmod -R a+rw /var/www/magento
# chown -R apache:apache /var/www/magento
# chcon -R system_u:object_r:httpd_sys_script_rw_t:s0 /var/www/magentoGive the correct seLinux label.

# php bin/magento cache:clean
# php bin/magento cache:flush
# rm -rf pub/static/* var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/view_processed/pub/* generated/code/* generated/metadata/*
# composer clear-cache
# composer require magento/product-community-edition=2.3.2 --no-update
# composer require --dev phpunit/phpunit:~6.2.0 friendsofphp/php-cs-fixer:~2.10.1 lusitanian/oauth:~0.8.10 pdepend/pdepend:2.5.2 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:3.2.2 --no-update

# vi composer.json
"autoload": {
"psr-4": {
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Magento\\": "app/code/Magento/", Add the comma.
"Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/" Add this line.
},
...
}

# composer update
# php bin/magento setup:upgrade
# php bin/magento deploy:mode:set production
# php bin/magento indexer:reindex
# chmod -R a+rw /var/www/magento
# chown -R apache:apache /var/www/magento
# chcon -R system_u:object_r:httpd_sys_script_rw_t:s0 /var/www/magentoGive the correct seLinux label.


==== Tidy up the `cron_schedule` table ============
# mysql -u root -p
Enter password: HogeHoge
MariaDB [(none)]> use magento;
MariaDB [magento]> select count(*) from `cron_schedule`;
+----------+
| count(*) |
+----------+
| 9232 |
+----------+
1 row in set (0.02 sec)

MariaDB [magento]> delete from `cron_schedule`;
Query OK, 9232 rows affected (0.08 sec)

MariaDB [magento]> commit;
Query OK, 0 rows affected (0.00 sec)

MariaDB [magento]> select count(*) from `cron_schedule`;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)

MariaDB [magento]> select t_b.trx_mysql_thread_id blocking_id,This SQL comand was found somewhere in Internet, but the URL was lost, sorry.
-> t_w.trx_mysql_thread_id requesting_id,
-> p_b.HOST blocking_host,
-> p_w.HOST requesting_host,
-> l.lock_table lock_table,
-> l.lock_index lock_index,
-> l.lock_mode lock_mode,
-> p_w.TIME seconds,
-> p_b.INFO blocking_info,
-> p_w.INFO requesting_info
-> from information_schema.INNODB_LOCK_WAITS w,
-> information_schema.INNODB_LOCKS l,
-> information_schema.INNODB_TRX t_b,
-> information_schema.INNODB_TRX t_w,
-> information_schema.PROCESSLIST p_b,
-> information_schema.PROCESSLIST p_w
-> where w.blocking_lock_id = l.lock_id
-> and w.blocking_trx_id = t_b.trx_id
-> and w.requesting_trx_id = t_w.trx_id
-> and t_b.trx_mysql_thread_id = p_b.ID
-> and t_w.trx_mysql_thread_id = p_w.ID
-> order by requesting_id,
-> blocking_id
-> \G
Empty set (0.04 sec)Confirm not to be locking.

MariaDB [magento]> quit
Bye
#

# php bin/magento maintenance:disable


Test the site by a Web browser.


==== Japanese locale. 日本語対応 ============
# cd /var/www/magento
# php bin/magento maintenance:enableEnter into the maintenance mode.
# php bin/magento deploy:mode:set developer --skip-compilation
# php bin/magento setup:static-content:deploy ja_JP -f

# php bin/magento cache:clean
# php bin/magento cache:flush
# composer clear-cache

# php bin/magento setup:store-config:set --language=ja_JP
# composer require community-engineering/japan-common
Using version ^1.0 for community-engineering/japan-common
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 16 installs, 0 updates, 0 removals
- Installing community-engineering/module-kuromoji (1.0.0): Downloading (100%)
- Installing community-engineering/module-japanese-url-rewrite (1.0.0): Downloading (100%)
- Installing community-engineering/module-japanese-store-address (1.0.0): Downloading (100%)
- Installing community-engineering/module-japanese-yen-formatting (1.0.0): Downloading (100%)
- Installing community-engineering/module-japanese-postal-code (1.0.0): Downloading (100%)
- Installing community-engineering/module-japanese-region (1.0.0): Downloading (100%)
- Installing community-engineering/module-japanese-address (1.0.0): Downloading (100%)
- Installing community-engineering/module-japanese-name (1.0.0): Downloading (100%)
- Installing community-engineering/module-japanese-default-cms-pages (1.0.0): Downloading (100%)
- Installing community-engineering/module-japanese-default-config (1.0.0): Downloading (100%)
- Installing community-engineering/module-font-ipa (1.0.0): Downloading (100%)
- Installing community-engineering/module-font-source-han-sans-japanese (1.0.0): Downloading (100%)
- Installing community-engineering/module-configurable-pdf-font (1.0.0): Downloading (100%)
- Installing community-engineering/module-currency-precision (1.0.0): Downloading (100%)
- Installing community-engineering/language-ja_jp (1.0.0): Downloading (100%)
- Installing community-engineering/japan-common (1.0.0)
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Writing lock file
Generating autoload files
#

# composer update
# php bin/magento setup:upgrade
# php bin/magento deploy:mode:set production
# php bin/magento indexer:reindex
# chmod -R a+rw /var/www/magento
# chown -R apache:apache /var/www/magento
# chcon -R system_u:object_r:httpd_sys_script_rw_t:s0 /var/www/magentoGive the correct seLinux label.

# php bin/magento maintenance:disable


Test the site by a Web browser.