Mysql create Database and give permission to user to access and write privilege.
mysql -u root -p
Create database command
CREATE DATABASE m2;
Grant privilege
GRANT ALL PRIVILEGES ON m2.* TO 'root'@'localhost';
mysql -u root -p
Create database command
CREATE DATABASE m2;
Grant privilege
GRANT ALL PRIVILEGES ON m2.* TO 'root'@'localhost';
1G
with 2G
.faillocate
is not installed or if you get an error message saying fallocate failed: Operation not supported
then you can use the following command to create the swapsudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
2. Only the root user should be able to write and read the swap file. To set the correct permissions type:
sudo chmod 600 /swapfile
3. Use the mkswap
utility to set up the file as Linux swap area:
sudo mkswap /swapfile
4. Enable the swap with the following command:
sudo swapon /swapfile
/etc/fstab
file and append the following line:/swapfile swap swap defaults 0 0
5. To verify that the swap is active, use either the swapon
or the free
command as shown below:
sudo swapon –show
Output
NAME TYPE SIZE USED PRIO
/swapfile file 1024M 507.4M -1
sudo free -h
Open below URL and follow up step by step then you will not face any problem.
if you have any problem you can comment in this blog i will reply you within 24 hours.
Tutorial: Install a LAMP Web Server with the Amazon Linux AMI
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
$ cd ~
$ sudo curl -sS https://getcomposer.org/installer | sudo php
$ sudo mv composer.phar /usr/local/bin/composer
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer
then you can run
$ sudo composer install
Plugins (Interceptors)
Basically plugin, or interceptor both are same. it is a class only which are modifies the behavior of public class functions by intercepting a functionality and running code before, after, or around that function call. This allows you to substitute or extend the behavior of original, public methods for any class or interface.
Extensions that wish to intercept and change the behavior of a public method can create a Plugin class.
This interception approach reduces conflicts among extensions that change the behavior of the same class or method. Your Plugin class implementation changes the behavior of a class function, but it does not change the class itself. Magento calls these interceptors sequentially according to a configured sort order, so they do not conflict with one another.
Plugins can not be used on following:
Final methods
Final classes
Non-public methods
Class methods (such as static methods)
__construct
Virtual types
Objects that are instantiated before MagentoFrameworkInterception is bootstrapped
Object manager is Maento 2 core class a “Magento/Framework/ObjectManagerInterface”.
Object manager to avoid boilerplate code when composing objects during instantiation.
In the Magento framework, the implementation of the ObjectManagerInterface performs the duties of an object manager.
Responsibilities :
The object manager has the following responsibilities:
1. Object creation in factories and proxies.
2. Implementing the singleton pattern by returning the same shared instance of a class when requested
3. Dependency management by instantiating the preferred class when a constructor requests its interface
4. Automatically instantiating parameters in class constructors
First go to path of CD /use/bin directory and search here. Should be installed your Php version which one you want to switch after that you have to run below command.
sudo update-alternatives --set php /use/bin/php5.5 sudo update-alternatives --set php /use/bin/php7.3 sudo update-alternatives --set php /use/bin/php7.4
First go to path of CD /use/bin directory and search here. Should be installed your Php version which one you want to switch after that you have to run below command.
sudo update-alternatives –set php /use/bin/php5.5
change your php version according to you.
5. What step during the layout loading is the node processed?
A. After the generation of layout blocks.
B. Vefore the generation of layout update XML, but after the generation of layout blocks.
C. Before the generation of layout blocks, but after the generation of layout XML.
D. After the generation of layout blocks, but before rendering the page.
Whatsapp : 9891472590
K2/25, Harijan Colony,
Sangam Vihar, New Delhi 110080
+91 9891472590
mg2dev@gmail.com
Magento 2
WordPress
Shopify
SEO
SMO