0.0.1 • Published 5 years ago
docker-ubuntu-php-magento2 v0.0.1
Docker ubuntu php magento2
sudo docker run -d -p 11197:80 --name=magento2 -it ubuntu
sudo docker start magento2
sudo docker attach magento2
apt update
# docker magento2
apt install software-properties-common
add-apt-repository ppa:ondrej/php
apt update
apt upgrade
apt install wget php7.3 php7.3-mysql php7.3-xml php7.3-xmlrpc php7.3-curl php7.3-gd php7.3-imagick php7.3-cli php7.3-dev php7.3-imap php7.3-mbstring php7.3-opcache php7.3-soap php7.3-zip php7.3-intl php7.3-bcmath
wget http://192.168.0.183:8000/magento-ce-2.3.5-p1-2020-04-24-08-59-28.tar.bz2
tar xf magento-ce-2.3.5-p1-2020-04-24-08-59-28.tar.bz2
apt install nano mysql-server
nano /etc/mysql/my.cnf
# Comment 2 line bottom and save file
# ...
# !includedir /etc/mysql/conf.d/
# !includedir /etc/mysql/mysql.conf.d/
# ctrl + S => ctrl + X
service mysql start
mysql_secure_installation
# ...
#Press y|Y for Yes, any other key for No: n
#Please set the password for root here.
#
#New password:
# ...
#Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
# ...
#Disallow root login remotely? (Press y|Y for Yes, any other key for No) : n
# ...
#Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
# ...
#Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
#Success.
#
#All done!
mysql -u root -p
# ...
CREATE DATABASE magento CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'magento'@'%';
ALTER USER 'magento'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'magento'@'%' WITH GRANT OPTION;
exit
service mysql restart
mkdir ~/magento2 && cd ~/magento2/
php -S 0.0.0.0:80
# ctrl + P + Q
0.0.1
5 years ago