From 29d64bd184ff467e36e40d1e642bf3a9dd8fc825 Mon Sep 17 00:00:00 2001 From: river-etoa Date: Fri, 8 Apr 2022 20:22:27 +0000 Subject: [PATCH 01/18] fix ubuntu php pkgs and names --- provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provision.sh b/provision.sh index d32d2a1d7..58c37c27a 100644 --- a/provision.sh +++ b/provision.sh @@ -15,7 +15,7 @@ echo "mysql-server mysql-server/root_password_again password " | debconf-set-sel sudo apt-get install -q -y -f git mysql-server mysql-client nginx php8.0 php8.0-fpm php8.0-xdebug # Install commonly used php packages -sudo apt-get install -q -y -f php8.0-curl php8.0-cli php8.0-mysqli php8.0-gd php8.0-dom php8.0-zip php8.0-mbstring php8.0-intl php8.0-redis +sudo apt-get install -q -y -f php8.0-curl php8.0-cli php8.0-mysql php8.0-gd php8.0-zip php8.0-mbstring php8.0-intl php8.0-redis php8.0-xml sudo apt-get upgrade libpcre3 From 8220dedbdaad5cbe32c5fc7fa493a8a252a0de5b Mon Sep 17 00:00:00 2001 From: river-etoa Date: Fri, 8 Apr 2022 20:29:11 +0000 Subject: [PATCH 02/18] prevent installation of pkg-php-tools which cross-installs wrong php version --- provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provision.sh b/provision.sh index 58c37c27a..125d76fa7 100644 --- a/provision.sh +++ b/provision.sh @@ -12,7 +12,7 @@ echo "mysql-server mysql-server/root_password password " | debconf-set-selection echo "mysql-server mysql-server/root_password_again password " | debconf-set-selections # Install mysql, nginx, php8.0-fpm -sudo apt-get install -q -y -f git mysql-server mysql-client nginx php8.0 php8.0-fpm php8.0-xdebug +sudo apt-get install -q -y -f --no-install-recommends git mysql-server mysql-client nginx php8.0 php8.0-fpm php8.0-xdebug # Install commonly used php packages sudo apt-get install -q -y -f php8.0-curl php8.0-cli php8.0-mysql php8.0-gd php8.0-zip php8.0-mbstring php8.0-intl php8.0-redis php8.0-xml From efadd4837a016cfefbf3280844d6c817b50b6b7a Mon Sep 17 00:00:00 2001 From: river-etoa Date: Fri, 8 Apr 2022 20:39:19 +0000 Subject: [PATCH 03/18] improve log readability --- provision.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/provision.sh b/provision.sh index 125d76fa7..52a03e01f 100644 --- a/provision.sh +++ b/provision.sh @@ -5,7 +5,7 @@ export DEBIAN_FRONTEND=noninteractive sudo add-apt-repository ppa:ondrej/php echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections -sudo apt-get update && sudo apt-get upgrade +sudo apt-get update -q && sudo apt-get upgrade -q # Force a blank root password for mysql echo "mysql-server mysql-server/root_password password " | debconf-set-selections @@ -17,11 +17,11 @@ sudo apt-get install -q -y -f --no-install-recommends git mysql-server mysql-cli # Install commonly used php packages sudo apt-get install -q -y -f php8.0-curl php8.0-cli php8.0-mysql php8.0-gd php8.0-zip php8.0-mbstring php8.0-intl php8.0-redis php8.0-xml -sudo apt-get upgrade libpcre3 +sudo apt-get upgrade -q libpcre3 -sudo apt-get -y install curl dirmngr apt-transport-https lsb-release ca-certificates unzip +sudo apt-get -y -q install curl dirmngr apt-transport-https lsb-release ca-certificates unzip curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - -sudo apt-get install -y nodejs +sudo apt-get install -y -q nodejs npm install --global yarn sudo rm /etc/nginx/sites-available/default From 53a9b738f74bbc2c3bf0031ba29d135ed305792d Mon Sep 17 00:00:00 2001 From: river-etoa Date: Fri, 8 Apr 2022 20:49:58 +0000 Subject: [PATCH 04/18] streamline directory references --- provision.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/provision.sh b/provision.sh index 52a03e01f..0ade9aaac 100644 --- a/provision.sh +++ b/provision.sh @@ -28,7 +28,7 @@ sudo rm /etc/nginx/sites-available/default sudo cp /var/www/etoa/vagrant/nginx-default /etc/nginx/sites-available/default sudo cp /var/www/etoa/vagrant/xdebug.ini /etc/php/8.0/mods-available/xdebug.ini cp /var/www/etoa/vagrant/db.conf /var/www/etoa/htdocs/config -cp /var/www/etoa/vagrant/roundx.conf /vagrant/htdocs/config/eventhandler.conf +cp /var/www/etoa/vagrant/roundx.conf /var/www/etoa/htdocs/config/eventhandler.conf sudo service nginx restart sudo service php8.0-fpm restart @@ -44,7 +44,7 @@ cd /var/www/etoa && mkdir htdocs/web/build && echo "{}" > htdocs/web/build/manif cd /var/www/etoa && export COMPOSER_ALLOW_SUPERUSER=1;php composer.phar install --no-interaction # Install node dependencies and trigger build -cd /vagrant && yarn install --frozen-lockfile +cd /var/www/etoa && yarn install --frozen-lockfile cd /var/www/etoa && yarn run build # Setup database From dcb430533568f0ba391702d25f7b312388a9c2d1 Mon Sep 17 00:00:00 2001 From: river-etoa Date: Fri, 8 Apr 2022 20:57:11 +0000 Subject: [PATCH 05/18] change order of commands --- provision.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/provision.sh b/provision.sh index 0ade9aaac..ab418b04d 100644 --- a/provision.sh +++ b/provision.sh @@ -19,10 +19,15 @@ sudo apt-get install -q -y -f php8.0-curl php8.0-cli php8.0-mysql php8.0-gd php8 sudo apt-get upgrade -q libpcre3 +# install nodejs and yarn sudo apt-get -y -q install curl dirmngr apt-transport-https lsb-release ca-certificates unzip curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - sudo apt-get install -y -q nodejs npm install --global yarn +cd /var/www/etoa && yarn install --frozen-lockfile + +# Install PHP composer dependencies +cd /var/www/etoa && export COMPOSER_ALLOW_SUPERUSER=1;php composer.phar install --no-interaction sudo rm /etc/nginx/sites-available/default sudo cp /var/www/etoa/vagrant/nginx-default /etc/nginx/sites-available/default @@ -40,11 +45,7 @@ PHP=`which php` # Setup dummy client files cd /var/www/etoa && mkdir htdocs/web/build && echo "{}" > htdocs/web/build/manifest.json && echo '{"entrypoints": {"admin": {}}}' > htdocs/web/build/entrypoints.json -# Install PHP composer dependencies -cd /var/www/etoa && export COMPOSER_ALLOW_SUPERUSER=1;php composer.phar install --no-interaction - -# Install node dependencies and trigger build -cd /var/www/etoa && yarn install --frozen-lockfile +# trigger yarn build cd /var/www/etoa && yarn run build # Setup database From 3839554b4c4409d4d5cae298c7bad72c5e070eb6 Mon Sep 17 00:00:00 2001 From: river-etoa Date: Fri, 8 Apr 2022 21:13:44 +0000 Subject: [PATCH 06/18] fix user creation sql --- provision.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/provision.sh b/provision.sh index ab418b04d..57b859788 100644 --- a/provision.sh +++ b/provision.sh @@ -51,13 +51,15 @@ cd /var/www/etoa && yarn run build # Setup database Q0="SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));" Q1="CREATE DATABASE IF NOT EXISTS etoa;" -Q2="GRANT USAGE ON *.* TO etoa@localhost IDENTIFIED BY 'etoa';" +Q2="CREATE USER 'etoa'@'localhost' IDENTIFIED BY 'etoa';" +#Q2="GRANT USAGE ON *.* TO etoa@localhost IDENTIFIED BY 'etoa';" Q3="GRANT ALL PRIVILEGES ON etoa.* TO etoa@localhost;" Q4="CREATE DATABASE IF NOT EXISTS etoa_test;" -Q5="GRANT USAGE ON *.* TO etoa_test@localhost IDENTIFIED BY 'etoa';" +#Q5="GRANT USAGE ON *.* TO etoa_test@localhost IDENTIFIED BY 'etoa';" Q6="GRANT ALL PRIVILEGES ON etoa_test.* TO etoa@localhost;" Q7="FLUSH PRIVILEGES;" -SQL="${Q0}${Q1}${Q2}${Q3}${Q4}${Q5}${Q6}${Q7}" +*SQL="${Q0}${Q1}${Q2}${Q3}${Q4}${Q5}${Q6}${Q7}" +SQL="${Q0}${Q1}${Q2}${Q3}${Q4}${Q6}${Q7}" $MYSQL -uroot -e "$SQL" $PHP /var/www/etoa/bin/console database:migrate From edd5243cd4a5c9b72c5a2e286948593adc0b5053 Mon Sep 17 00:00:00 2001 From: river-etoa Date: Fri, 8 Apr 2022 21:16:48 +0000 Subject: [PATCH 07/18] typo --- provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provision.sh b/provision.sh index 57b859788..085841009 100644 --- a/provision.sh +++ b/provision.sh @@ -58,7 +58,7 @@ Q4="CREATE DATABASE IF NOT EXISTS etoa_test;" #Q5="GRANT USAGE ON *.* TO etoa_test@localhost IDENTIFIED BY 'etoa';" Q6="GRANT ALL PRIVILEGES ON etoa_test.* TO etoa@localhost;" Q7="FLUSH PRIVILEGES;" -*SQL="${Q0}${Q1}${Q2}${Q3}${Q4}${Q5}${Q6}${Q7}" +#SQL="${Q0}${Q1}${Q2}${Q3}${Q4}${Q5}${Q6}${Q7}" SQL="${Q0}${Q1}${Q2}${Q3}${Q4}${Q6}${Q7}" $MYSQL -uroot -e "$SQL" From 18fa685878efdbe6f86185b70dbb60b3320f961b Mon Sep 17 00:00:00 2001 From: river-etoa Date: Fri, 8 Apr 2022 21:43:57 +0000 Subject: [PATCH 08/18] Allow world write access to tmp directory --- provision.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/provision.sh b/provision.sh index 085841009..785ac2c36 100644 --- a/provision.sh +++ b/provision.sh @@ -67,6 +67,9 @@ $PHP /var/www/etoa/bin/console database:migrate --env=test Q8="INSERT INTO config (config_name, config_value, config_param1, config_param2) VALUES ('loginurl','', '', '') ON DUPLICATE KEY UPDATE config_value='';" $MYSQL -uroot -D etoa -e "$Q8" +# Allow world write access to tmp directory +sudo chmod 777 /var/www/etoa/htdocs/tmp + # Setup cronjob echo "* * * * * php /var/www/etoa/bin/console cron:run" | crontab From 61edea3a909d9ac31ab455fae5fd23a62867aad1 Mon Sep 17 00:00:00 2001 From: river-etoa Date: Fri, 8 Apr 2022 21:50:42 +0000 Subject: [PATCH 09/18] create directory only if not existing --- provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provision.sh b/provision.sh index 785ac2c36..c5dfbf8b6 100644 --- a/provision.sh +++ b/provision.sh @@ -43,7 +43,7 @@ MYSQL=`which mysql` PHP=`which php` # Setup dummy client files -cd /var/www/etoa && mkdir htdocs/web/build && echo "{}" > htdocs/web/build/manifest.json && echo '{"entrypoints": {"admin": {}}}' > htdocs/web/build/entrypoints.json +cd /var/www/etoa && mkdir -p htdocs/web/build && echo "{}" > htdocs/web/build/manifest.json && echo '{"entrypoints": {"admin": {}}}' > htdocs/web/build/entrypoints.json # trigger yarn build cd /var/www/etoa && yarn run build From db413355535bcca7c06fb1d135965a998cc9afc0 Mon Sep 17 00:00:00 2001 From: river Date: Fri, 13 May 2022 18:48:44 +0200 Subject: [PATCH 10/18] fix ordering, again // https://github.com/etoa/etoa-gui/pull/501/files#r846744228 --- provision.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/provision.sh b/provision.sh index c5dfbf8b6..111e3a101 100644 --- a/provision.sh +++ b/provision.sh @@ -19,16 +19,18 @@ sudo apt-get install -q -y -f php8.0-curl php8.0-cli php8.0-mysql php8.0-gd php8 sudo apt-get upgrade -q libpcre3 -# install nodejs and yarn +# install nodejs and yarn npm pkg sudo apt-get -y -q install curl dirmngr apt-transport-https lsb-release ca-certificates unzip curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - sudo apt-get install -y -q nodejs npm install --global yarn -cd /var/www/etoa && yarn install --frozen-lockfile # Install PHP composer dependencies cd /var/www/etoa && export COMPOSER_ALLOW_SUPERUSER=1;php composer.phar install --no-interaction +# install yarn dependencies +cd /var/www/etoa && yarn install --frozen-lockfile + sudo rm /etc/nginx/sites-available/default sudo cp /var/www/etoa/vagrant/nginx-default /etc/nginx/sites-available/default sudo cp /var/www/etoa/vagrant/xdebug.ini /etc/php/8.0/mods-available/xdebug.ini From 46635cd50baac580097a46b9e9dbb87ec760d8ea Mon Sep 17 00:00:00 2001 From: river Date: Fri, 13 May 2022 18:50:17 +0200 Subject: [PATCH 11/18] and yet another ordering fix https://github.com/etoa/etoa-gui/pull/501/files#r846744886 --- provision.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/provision.sh b/provision.sh index 111e3a101..d6c7e47b6 100644 --- a/provision.sh +++ b/provision.sh @@ -25,6 +25,9 @@ curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - sudo apt-get install -y -q nodejs npm install --global yarn +# Setup dummy client files +cd /var/www/etoa && mkdir -p htdocs/web/build && echo "{}" > htdocs/web/build/manifest.json && echo '{"entrypoints": {"admin": {}}}' > htdocs/web/build/entrypoints.json + # Install PHP composer dependencies cd /var/www/etoa && export COMPOSER_ALLOW_SUPERUSER=1;php composer.phar install --no-interaction @@ -44,9 +47,6 @@ sudo chown -R www-data:www-data /var/lib/php/sessions MYSQL=`which mysql` PHP=`which php` -# Setup dummy client files -cd /var/www/etoa && mkdir -p htdocs/web/build && echo "{}" > htdocs/web/build/manifest.json && echo '{"entrypoints": {"admin": {}}}' > htdocs/web/build/entrypoints.json - # trigger yarn build cd /var/www/etoa && yarn run build From 8c93ee597182d8ae213a3b0b6c71858f6b4cbb60 Mon Sep 17 00:00:00 2001 From: river Date: Fri, 13 May 2022 18:56:45 +0200 Subject: [PATCH 12/18] removed obsolete code https://github.com/etoa/etoa-gui/pull/501#discussion_r846745123 --- provision.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/provision.sh b/provision.sh index d6c7e47b6..a2ecdb05d 100644 --- a/provision.sh +++ b/provision.sh @@ -54,13 +54,10 @@ cd /var/www/etoa && yarn run build Q0="SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));" Q1="CREATE DATABASE IF NOT EXISTS etoa;" Q2="CREATE USER 'etoa'@'localhost' IDENTIFIED BY 'etoa';" -#Q2="GRANT USAGE ON *.* TO etoa@localhost IDENTIFIED BY 'etoa';" Q3="GRANT ALL PRIVILEGES ON etoa.* TO etoa@localhost;" Q4="CREATE DATABASE IF NOT EXISTS etoa_test;" -#Q5="GRANT USAGE ON *.* TO etoa_test@localhost IDENTIFIED BY 'etoa';" Q6="GRANT ALL PRIVILEGES ON etoa_test.* TO etoa@localhost;" Q7="FLUSH PRIVILEGES;" -#SQL="${Q0}${Q1}${Q2}${Q3}${Q4}${Q5}${Q6}${Q7}" SQL="${Q0}${Q1}${Q2}${Q3}${Q4}${Q6}${Q7}" $MYSQL -uroot -e "$SQL" From 74e7f9a8238ea47ee6fb374c9d44165c218b1009 Mon Sep 17 00:00:00 2001 From: coo1ness Date: Fri, 8 Mar 2024 16:40:37 +0100 Subject: [PATCH 13/18] updated nodesource version --- provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provision.sh b/provision.sh index a2ecdb05d..552a4a35f 100644 --- a/provision.sh +++ b/provision.sh @@ -21,7 +21,7 @@ sudo apt-get upgrade -q libpcre3 # install nodejs and yarn npm pkg sudo apt-get -y -q install curl dirmngr apt-transport-https lsb-release ca-certificates unzip -curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - +curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt-get install -y -q nodejs npm install --global yarn From 224e94f9edd34e6665379b41a8c5a1a650513da6 Mon Sep 17 00:00:00 2001 From: coo1ness Date: Fri, 8 Mar 2024 16:57:23 +0100 Subject: [PATCH 14/18] nfs is not supported under windows --- Vagrantfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 89ee15c1a..fadc651d2 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,7 +7,13 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.network "private_network", ip: '192.168.33.11' - config.vm.synced_folder './', '/var/www/etoa', :nfs => true + if Vagrant::Util::Platform.windows? then + config.vm.synced_folder './', '/var/www/etoa' + else + config.vm.synced_folder './', '/var/www/etoa', :nfs => true + end + + config.vm.provider "virtualbox" do |vb| vb.customize [ From 4d10f372604967bc10621122679eccca547125b5 Mon Sep 17 00:00:00 2001 From: coo1ness Date: Fri, 8 Mar 2024 16:59:36 +0100 Subject: [PATCH 15/18] updated box to ubuntu 22 lTS --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index fadc651d2..56ce22b51 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -2,7 +2,7 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - config.vm.box = "ubuntu/bionic64" + config.vm.box = "ubuntu/jammy64" config.vm.hostname = "etoa-gui" config.vm.network "private_network", ip: '192.168.33.11' From d890fa54a0462f59fe900db919ce8170c775d966 Mon Sep 17 00:00:00 2001 From: coo1ness Date: Tue, 12 Mar 2024 17:11:21 +0100 Subject: [PATCH 16/18] updated INSTALL.md for symlink workaround --- INSTALL.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index f074f7f69..8b8e7e277 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -15,6 +15,8 @@ Install [Vagrant](https://www.vagrantup.com/). In your etoa root run ```vagrant up```. + + #### Linux Install [Network File System](https://en.wikipedia.org/wiki/Network_File_System) if necessary. Start/Enable NFS-Server with UDP and Version 3 support. @@ -42,7 +44,11 @@ Additional steps because I haven't figured out yet how to reset the db config vi * enable CPU Virtualization in BIOS * disable Hyper-V * ssh connection timeout: Try Virtualbox 5.2 - +* Provision can't create symlinks: + * Open Start > Windows Administrative Tools > Local Security Policy + * Go to Local Policies/User Rights Assignment in tree view. + * Add user name or user groups you belongs to, to entry Create symbolic links + * Restart ## All steps below are only necessary if you dont want to use the vagrant box!!!! From 4e7b2cf7cdd221e3c1ab9e559c37e0c104d783c7 Mon Sep 17 00:00:00 2001 From: coo1ness Date: Tue, 19 Mar 2024 13:25:50 +0100 Subject: [PATCH 17/18] updated php to 8.1 --- provision.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/provision.sh b/provision.sh index 552a4a35f..909677b11 100644 --- a/provision.sh +++ b/provision.sh @@ -11,11 +11,11 @@ sudo apt-get update -q && sudo apt-get upgrade -q echo "mysql-server mysql-server/root_password password " | debconf-set-selections echo "mysql-server mysql-server/root_password_again password " | debconf-set-selections -# Install mysql, nginx, php8.0-fpm -sudo apt-get install -q -y -f --no-install-recommends git mysql-server mysql-client nginx php8.0 php8.0-fpm php8.0-xdebug +# Install mysql, nginx, php8.1-fpm +sudo apt-get install -q -y -f --no-install-recommends git mysql-server mysql-client nginx php8.1 php8.1-fpm php8.1-xdebug # Install commonly used php packages -sudo apt-get install -q -y -f php8.0-curl php8.0-cli php8.0-mysql php8.0-gd php8.0-zip php8.0-mbstring php8.0-intl php8.0-redis php8.0-xml +sudo apt-get install -q -y -f php8.0-curl php8.1-cli php8.1-mysql php8.1-gd php8.1-zip php8.1-mbstring php8.1-intl php8.1-redis php8.1-xml sudo apt-get upgrade -q libpcre3 From 010461e407512f1822ecd5a11f7763321a648ac8 Mon Sep 17 00:00:00 2001 From: coo1ness Date: Tue, 19 Mar 2024 13:26:47 +0100 Subject: [PATCH 18/18] updated php to 8.1 --- provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provision.sh b/provision.sh index 909677b11..768dbc564 100644 --- a/provision.sh +++ b/provision.sh @@ -15,7 +15,7 @@ echo "mysql-server mysql-server/root_password_again password " | debconf-set-sel sudo apt-get install -q -y -f --no-install-recommends git mysql-server mysql-client nginx php8.1 php8.1-fpm php8.1-xdebug # Install commonly used php packages -sudo apt-get install -q -y -f php8.0-curl php8.1-cli php8.1-mysql php8.1-gd php8.1-zip php8.1-mbstring php8.1-intl php8.1-redis php8.1-xml +sudo apt-get install -q -y -f php8.1-curl php8.1-cli php8.1-mysql php8.1-gd php8.1-zip php8.1-mbstring php8.1-intl php8.1-redis php8.1-xml sudo apt-get upgrade -q libpcre3