Install Magento Ubuntu
Install Magento Ubuntu
HTTPS protocol.
-Xms1g
-Xmx1g
//This means the Java virtual machine used by ElasticSearch will use 1G RAM. Note
that there should not be any space at the beginning of each line. Restart
ElasticSearch for the change to take effect.
curl http://localhost:9200
$ composer -V
//By default PHP 8.1 is not available in Ubuntu 20.04. Use the command below to add
a repository for it.
//Run the following command to install the latest stable version of PHP 8.1 and all
its modules.
//install mysql
sudo apt install mysql-server-8.0
sudo systemctl enable --now mysql
EXIT
//setup nginx
sudo rm /etc/nginx/sites-enabled/default
sudo ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/
cd /etc/nginx/sites-available
nano magento.conf
upstream fastcgi_backend {
server unix:/run/php/php8.1-fpm.sock;
}
server {
server_name magento.local.com;
listen 80;
set $MAGE_ROOT /var/www/html/ecommerce-project;
set $MAGE_MODE developer; # or production
access_log /var/log/nginx/magento2-access.log;
error_log /var/log/nginx/magento2-error.log;
include /var/www/html/ecommerce-project/nginx.conf.sample;
}
cd ../sites-enabled/
sudo ln -s ../sites-available/magento.conf ./
ls -l
sudo service nginx configtest # make sure the config is good before reloading!
sudo service nginx reload
//them domain
sudo nano /etc/hosts
127.0.0.1 magento.local.com
//build magentocd /
cd to project
composer install
php bin/magento setup:install \
--base-url=http://magento.local.com/ \
--db-host=localhost \
--db-name=magento \
--db-user=magento \
--db-password=magento \
--admin-firstname=admin \
--admin-lastname=admin \
[email protected] \
--admin-user=admin \
--admin-password=admin@123321 \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1 \
--search-engine=elasticsearch7 \
--elasticsearch-port=9200\
//tat 2-auth
php bin/magento module:disable Magento_TwoFactorAuth
//connect mysql
nano /etc/mysql/mysql.conf.d/mysqld.cnf
comment bind_address
//loi nginx