Magento
Magento Setup
Section titled “Magento Setup”Create a new GCP instance. Normally open HTTPS and give it a static internal and external IP.
Install nginx
Section titled “Install nginx”sudo apt updatesudo apt upgradesudo apt -y install nginx wgetInstall php7.4
Section titled “Install php7.4”sudo apt -y install lsb-release apt-transport-https ca-certificatessudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpgecho "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.listsudo apt updatesudo apt -y install php7.4-fpm php7.4-clisudo apt -y install php7.4-{bcmath,ctype,bz2,curl,dom,fileinfo,intl,gd,iconv,json,mbstring,mysql,simplexml,soap,sockets,tokenizer,xmlwriter,xsl,zip}Set php.ini for magento
Section titled “Set php.ini for magento”sudo nano /etc/php/7.4/fpm/php.inisudo nano /etc/php/7.4/cli/php.inidate.timezone = Europe/Londonrealpath_cache_size = 10Mrealpath_cache_ttl = 7200opcache.enable = 1opcache.save_comments = 1memory_limit = 2Gmax_execution_time = 1800zlib.output_compression = Onsudo systemctl restart php7.4-fpmInstall mariadb / mysql
Section titled “Install mariadb / mysql”sudo apt install mariadb-serversudo mysql_secure_installationLog into mariadb and create the magento database and user
Section titled “Log into mariadb and create the magento database and user”sudo mysql -u root -pcreate database magento;create user 'magento'@'localhost' IDENTIFIED BY 'magento';GRANT ALL ON magento.* TO 'magento'@'localhost';flush privileges;Setup my.cnf for magento
Section titled “Setup my.cnf for magento”Find the file location
mysql --help | grep /my.cnf | xargs lshttps://docs.day.marketing/books/webservers/page/mariadb-mycnf