I want know, how I install magento on my Ubuntu with Nginx.
Thanks.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hello,
There are two ways to go about this now,
MarketPlace
You can either use a MarketPlace Droplet : https://marketplace.digitalocean.com/apps/magento-2-open-source
The Droplet comes with everything installed and configured for you to use on the GO as soon as you create and SSH to your Droplet.
Manual Installation
To install Magento on Ubuntu with Nginx, follow these steps:
Update and upgrade your system:
Install required packages:
Install MySQL:
After installing MySQL, run the following command to secure the installation:
Follow the prompts to set a root password and remove anonymous users, disallow remote root login, and remove the test database.
Create a Magento database and user:
Log in to the MySQL shell:
Create a new database and user for Magento (replace
magento_user
,magento_password
, andmagento_database
with your desired values):Install Composer:
Download Magento:
Download the latest Magento version from the official website or use the following command to download the latest version at the time of writing:
Unzip the downloaded file:
Move the Magento files to the desired web directory (e.g.,
/var/www/magento
):Set the correct permissions:
Configure Nginx:
Create a new Nginx configuration file for Magento:
Paste the following configuration, replacing
yourdomain.com
with your domain name and adjusting other values as needed:Save and close the file. Create a symbolic link to enable the configuration:
Then you just need to open your Droplet and start the installation process.
Magento Requires more Resources than usuall
You might need a more powerful droplet if you want to use Magento as the smallest one wouldn’t work, they won’t have enough resources.
Alternatively, you can add SWAP to your Droplet https://www.digitalocean.com/community/tutorial_collections/how-to-add-swap-space
After dealing for a while with Magento a Nginx, i find out that the key for rewrite is to include the following in the location block inside the desire virtual host config file. <br> <br>For example inside the file “sudo nano /etc/nginx/sites-available/mysite.com” <br> <br>Include this in the location block: <br> <br>location / { <br> try_files $uri $uri/ /index.php?q=$uri&$args; <br> } <br> <br> <br>Santiago
Advise 1GB minimum for magento. More if you intend to install a control panel or ispconfig etc. Would be cool if magento lamp/lemp was an application/image option