From 5a96cbaeb388c3d60b49de570ac4729217eb2118 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 27 Aug 2017 03:27:30 -0400 Subject: [PATCH 001/360] corrections Added missing directory creations and updated the permissions to be the correct ones. --- install.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/install.sh b/install.sh index 326f7bc6..36f43f3f 100644 --- a/install.sh +++ b/install.sh @@ -81,12 +81,16 @@ clear sudo make cd .. sudo cp -r web /var/ + sudo mkdir /var/stratum + cd stratum + sudo cp -a config.sample/. /var/stratum/config sudo cp -r stratum /var/stratum + sudo cp -r run.sh /var/stratum sudo cp -a bin/. /bin/ sudo cp -r blocknotify/blocknotify /var/stratum - sudo mkdir /etc/yiimp - sudo cp /etc/stratum/config /etc/stratum/config.old - sudo cp /etc/stratum.config.sample /etc/stratum/config + sudo mkdir /etc/yiimp + sudo mkdir /root/backup/ + sudo cp -r /var/web/keys.sample.php /etc/yiimp output "Update default timezone." output "Thanks for using this installation script. Donations welcome" # check if link file @@ -426,15 +430,13 @@ $configAlgoNormCoef = array( output "Final Directory permissions" sudo usermod -aG www-data $whoami -sudo chown -R www-data:www-data /var/www/$SERVNAME/html sudo chown -R www-data:www-data /var/log sudo chown -R www-data:www-data /var/stratum -sudo chmod -R 775 /var/www/$SERVNAME/html -sudo chmod -R 775 /var/log -sudo chmod -R 775 /var/stratum sudo chown -R www-data:www-data /var/web -sudo chmod -R 775 /var/web -sudo mkdir /root/backup/ +sudo chmod -R 777 /var/web +sudo chmod -R 777 /var/stratum +sudo chmod -R 777 /root/backup/ +sudo chmod -R 777 /var/log sudo service nginx restart sudo service php7.0-fpm reload clear From 0a232b4e894ef8b2666ceebbb01ef2a0a9776767 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 27 Aug 2017 11:13:30 -0400 Subject: [PATCH 002/360] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ef9dff4c..3dba833b 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ After you add the missing information to those files then run: ./block.sh curl -Lo install.sh https://raw.githubusercontent.com/crombiecrunch/yiimp/master/install.sh + bash install.sh You will be prompted for email, FDQN, and time zone. You onkly get one shot to enter this information correctly! From a6957ca23f7734eb7fad071e0f1f1b55e5bf7fa1 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 27 Aug 2017 11:19:08 -0400 Subject: [PATCH 003/360] typo fix added spacing --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 36f43f3f..0f81f06b 100644 --- a/install.sh +++ b/install.sh @@ -428,6 +428,7 @@ $configAlgoNormCoef = array( ); ' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 + output "Final Directory permissions" sudo usermod -aG www-data $whoami sudo chown -R www-data:www-data /var/log @@ -440,9 +441,12 @@ sudo chmod -R 777 /var/log sudo service nginx restart sudo service php7.0-fpm reload clear -output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.conf. this installer did not directly install anything required to build coins." +output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." +output "" output "Please make sure to chnage your wallet addresses in the /var/web/serverconfig.php file." +output "" output "Please make sure to add your public and private keys." +output "" output "If you found this script helpful please consider donating some BTC Donation: 1AxK9a7dgeHvf3VFuwZ2adGiQTX6S1nhrp" From f18924c0dc66aab5888f016daec927751820bcda Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 27 Aug 2017 12:40:46 -0400 Subject: [PATCH 004/360] More Updates Added option to install fail2ban. Added additional input questions. Added silent install of phpmyaqdmin. --- install.sh | 162 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 131 insertions(+), 31 deletions(-) diff --git a/install.sh b/install.sh index 0f81f06b..acd8d271 100644 --- a/install.sh +++ b/install.sh @@ -22,12 +22,34 @@ displayErr() { exit 1; } clear - read -p "Enter admin email (e.g. admin@example.com) : " EMAIL - read -p "Enter servername (e.g. portal.example.com) : " SERVNAME +output "Make sure you double check before hitting enter! Only one shot at these! +output "" + read -p "Enter support email (e.g. admin@example.com) : " EMAIL read -p "Enter time zone (e.g. America/New_York) : " TIME + read -e -p "New server name (like srv.company.tld) : " server_name + read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban + if [[ "$server_name" != "" ]]; then + echo $server_name > /etc/hostname + IP=$(ip addr show | grep eth0 | grep inet | tr -s " " | cut -f3 -d " " | cut -f1 -d "/") + + hosts_ip=$(grep -q $IP /etc/hosts) + if [[ "$hosts_ip" != "" ]]; then + sed -i "s/$IP.*/$IP $server_name/" /etc/hosts + else + echo "$IP $server_name" >> /etc/hosts + fi + + hostname $server_name + + /etc/init.d/hostname.sh + fi + read -e -p "Server Admin contact email : " root_email + fi output "If you found this helpful, please donate to BTC Donation: 1AxK9a7dgeHvf3VFuwZ2adGiQTX6S1nhrp" + output "" output "Updating system and installing required packages." + output "" #Disable AppArmor sudo service apparmor stop @@ -40,20 +62,24 @@ clear sudo apt-get -y autoremove clear output "Switching to Aptitude" + output "" sudo apt-get -y install aptitude output "Installing Nginx server." + output "" sudo aptitude -y install nginx sudo service nginx start sudo service cron start output "Installing Mariadb Server." + output "" # create random password rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" sudo aptitude -y install mariadb-server output "Installing php7.x and other needed files" + output "" sudo aptitude -y install php7.0-fpm sudo aptitude -y install php7.0-opcache php7.0-fpm php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring sudo phpenmod mcrypt @@ -68,8 +94,51 @@ clear sudo aptitude -y install librtmp-dev sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils sudo aptitude -y install sendmail + sudo aptitude -y install pwgen -y + clear + + #Generating Random Passwords + password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + AUTOGENERATED_PASS=`pwgen -c -1 20` + output "Testing to see if server emails are sent" + output "" + if [[ "$root_email" != "" ]]; then + echo $root_email > ~/.email + echo $root_email > ~/.forward + + read -e -p "Send an mail to test the smtp service? [Y/n] : " send_email + if [[ ("$send_email" == "y" || "$send_email" == "Y" || "$send_email" == "") ]]; then + echo "This is a mail test for the SMTP Service." > /tmp/email.message + echo "You should receive this !" >> /tmp/email.message + echo "" >> /tmp/email.message + echo "Cheers" >> /tmp/email.message + sendmail -s "SMTP Testing" $root_email < /tmp/email.message + + rm -f /tmp/email.message + echo "Mail sent" + fi + + output "Some optional installs" + if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then + sudo aptitude -y install fail2ban + fi + clear + output "Installing phpmyadmin" + output "" + echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | debconf-set-selections + echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/admin-user string root" | debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/admin-pass password $rootpasswd" | debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/app-pass password $AUTOGENERATED_PASS" |debconf-set-selections + echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | debconf-set-selections + sudo aptitude -y install phpmyadmin + + output " Installing yiimp" + output "" output "Grabbing yiimp fron Github, building files and setting file structure." + output "" cd ~ git clone https://github.com/tpruvot/yiimp.git cd yiimp @@ -90,7 +159,7 @@ clear sudo cp -r blocknotify/blocknotify /var/stratum sudo mkdir /etc/yiimp sudo mkdir /root/backup/ - sudo cp -r /var/web/keys.sample.php /etc/yiimp + sudo cp -r /var/web/keys.sample.php /etc/yiimp/ output "Update default timezone." output "Thanks for using this installation script. Donations welcome" # check if link file @@ -104,18 +173,19 @@ clear output "Making Web Server Magic Happen!" # adding user to group, creating dir structure, setting permissions whoami=`whoami` - sudo mkdir -p /var/www/$SERVNAME/html - sudo chown -R $whoami:$whoami /var/www/$SERVNAME/html - sudo chmod -R 775 /var/www/$SERVNAME/html + sudo mkdir -p /var/www/$server_name/html + sudo chown -R $whoami:$whoami /var/www/$server_name/html + sudo chmod -R 775 /var/www/$server_name/html output "Creating webserver initial config file" + output "" echo ' server { listen 80; listen [::]:80; - server_name '"${SERVNAME}"'; + server_name '"${server_name}"'; - root "/var/www/'"${SERVNAME}"'/html/web"; + root "/var/www/'"${server_name}"'/html/web"; index index.html index.htm index.php; charset utf-8; @@ -130,7 +200,7 @@ echo ' location = /robots.txt { access_log off; log_not_found off; } access_log off; - error_log /var/log/nginx/'"${SERVNAME}"'.app-error.log error; + error_log /var/log/nginx/'"${server_name}"'.app-error.log error; # allow larger file uploads and longer script runtimes client_max_body_size 100m; @@ -159,22 +229,22 @@ echo ' allow all; } } -' | sudo -E tee /etc/nginx/sites-available/$SERVNAME.conf >/dev/null 2>&1 +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 -sudo ln -s /etc/nginx/sites-available/$SERVNAME.conf /etc/nginx/sites-enabled/$SERVNAME.conf -sudo ln -s /var/web /var/www/$SERVNAME/html +sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf +sudo ln -s /var/web /var/www/$server_name/html sudo service nginx restart output "Install LetsEncrypt and setting SSL" sudo aptitude -y install letsencrypt - sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$SERVNAME" - sudo rm /etc/nginx/sites-available/$SERVNAME.conf + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" + sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 # I am SSL Man! echo ' server { listen 80; listen [::]:80; - server_name '"${SERVNAME}"'; + server_name '"${server_name}"'; # enforce https return 301 https://$server_name$request_uri; } @@ -182,13 +252,13 @@ sudo service nginx restart server { listen 443 ssl http2; listen [::]:443 ssl http2; - server_name '"${SERVNAME}"'; + server_name '"${server_name}"'; - root /var/www/'"${SERVNAME}"'/html/web; + root /var/www/'"${server_name}"'/html/web; index index.php; - access_log /var/log/nginx/'"${SERVNAME}"'.app-accress.log; - error_log /var/log/nginx/'"${SERVNAME}"'.app-error.log error; + access_log /var/log/nginx/'"${server_name}"'.app-accress.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log error; # allow larger file uploads and longer script runtimes client_max_body_size 100m; @@ -197,8 +267,8 @@ sudo service nginx restart sendfile off; # strengthen ssl security - ssl_certificate /etc/letsencrypt/live/'"${SERVNAME}"'/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/'"${SERVNAME}"'/privkey.pem; + ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; @@ -238,28 +308,43 @@ sudo service nginx restart location ~ /\.ht { deny all; } - } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } -' | sudo -E tee /etc/nginx/sites-available/thecryptopool.com.conf >/dev/null 2>&1 +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 sudo service nginx restart sudo service php7.0-fpm reload clear output "Now for the database fun!" # create database - password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" Q3="FLUSH PRIVILEGES;" SQL="${Q1}${Q2}${Q3}" - sudo mysql -u root -p="" -e "$SQL" # create stratum user - password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` Q1="GRANT ALL ON *.* TO 'stratum'@'localhost' IDENTIFIED BY '$password2';" Q2="FLUSH PRIVILEGES;" SQL="${Q1}${Q2}" - sudo mysql -u root -p="" -e "$SQL" + + #Create my.cnf + echo ' [clienthost1] user=panel @@ -277,6 +362,7 @@ password='"${rootpasswd}"' ' | sudo -E tee ~/.my.cnf >/dev/null 2>&1 sudo chmod 0600 ~/.my.cnf +#Create keys file echo ' /dev/null 2>&1 +output "Updating stratum config files with database connection info." +output "" +cd /var/stratum/config +sudo sed -i 's/server = yaamp.com/server = '$server_name'/g' *.conf +sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf +sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf +sudo sed -i 's/username = root/username = stratum/g' *.conf +sudo sed -i 's/password = patofpaq/password = '$password2}'/g' *.conf +cd ~ - output "Final Directory permissions" + +output "Final Directory permissions" +output "" sudo usermod -aG www-data $whoami sudo chown -R www-data:www-data /var/log sudo chown -R www-data:www-data /var/stratum @@ -443,7 +543,7 @@ sudo service php7.0-fpm reload clear output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." output "" -output "Please make sure to chnage your wallet addresses in the /var/web/serverconfig.php file." +output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." output "" output "Please make sure to add your public and private keys." output "" From 9399b600229001bf1388b5f75bc3015cf986499b Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 27 Aug 2017 12:48:55 -0400 Subject: [PATCH 005/360] bah missing " --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index acd8d271..de2b0e0b 100644 --- a/install.sh +++ b/install.sh @@ -22,7 +22,7 @@ displayErr() { exit 1; } clear -output "Make sure you double check before hitting enter! Only one shot at these! +output "Make sure you double check before hitting enter! Only one shot at these!" output "" read -p "Enter support email (e.g. admin@example.com) : " EMAIL read -p "Enter time zone (e.g. America/New_York) : " TIME From 2db2493e2d0ff4d7b2545dd24a7ca54c09797f76 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 27 Aug 2017 12:59:41 -0400 Subject: [PATCH 006/360] more bugs fixed permission issues with the new inputs --- install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index de2b0e0b..9d07df4a 100644 --- a/install.sh +++ b/install.sh @@ -28,15 +28,16 @@ output "" read -p "Enter time zone (e.g. America/New_York) : " TIME read -e -p "New server name (like srv.company.tld) : " server_name read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban + read -e -p "Send an mail to test the smtp service? [Y/n] : " send_email if [[ "$server_name" != "" ]]; then - echo $server_name > /etc/hostname + echo $server_name > sudo tee --append /etc/hostname IP=$(ip addr show | grep eth0 | grep inet | tr -s " " | cut -f3 -d " " | cut -f1 -d "/") hosts_ip=$(grep -q $IP /etc/hosts) if [[ "$hosts_ip" != "" ]]; then sed -i "s/$IP.*/$IP $server_name/" /etc/hosts else - echo "$IP $server_name" >> /etc/hosts + echo "$IP $server_name" >> sudo tee --append /etc/hosts fi hostname $server_name @@ -104,10 +105,9 @@ output "" output "Testing to see if server emails are sent" output "" if [[ "$root_email" != "" ]]; then - echo $root_email > ~/.email - echo $root_email > ~/.forward + echo $root_email > sudo tee --append ~/.email + echo $root_email > sudo tee --append ~/.forward - read -e -p "Send an mail to test the smtp service? [Y/n] : " send_email if [[ ("$send_email" == "y" || "$send_email" == "Y" || "$send_email" == "") ]]; then echo "This is a mail test for the SMTP Service." > /tmp/email.message echo "You should receive this !" >> /tmp/email.message From 3b4e0c56d2c06f8040944012fb254fb01cb5a42a Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 27 Aug 2017 18:46:08 -0400 Subject: [PATCH 007/360] Update install.sh --- install.sh | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/install.sh b/install.sh index 9d07df4a..ccd0190b 100644 --- a/install.sh +++ b/install.sh @@ -24,27 +24,30 @@ displayErr() { clear output "Make sure you double check before hitting enter! Only one shot at these!" output "" - read -p "Enter support email (e.g. admin@example.com) : " EMAIL - read -p "Enter time zone (e.g. America/New_York) : " TIME - read -e -p "New server name (like srv.company.tld) : " server_name + read -e -p "Enter time zone (e.g. America/New_York) : " TIME + read -e -p "Server name (like srv.company.tld) : " server_name + ifconfig | perl -nle'/dr:(\S+)/ && print $1' + read -e -p "Please enter your servers IP address, if only 127.0.0.1 is shown, enter that : " server_ip + read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL + read -e -p "Server Admin contact email : " root_email read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban read -e -p "Send an mail to test the smtp service? [Y/n] : " send_email - if [[ "$server_name" != "" ]]; then - echo $server_name > sudo tee --append /etc/hostname - IP=$(ip addr show | grep eth0 | grep inet | tr -s " " | cut -f3 -d " " | cut -f1 -d "/") - - hosts_ip=$(grep -q $IP /etc/hosts) - if [[ "$hosts_ip" != "" ]]; then - sed -i "s/$IP.*/$IP $server_name/" /etc/hosts - else - echo "$IP $server_name" >> sudo tee --append /etc/hosts - fi - - hostname $server_name - - /etc/init.d/hostname.sh - fi - read -e -p "Server Admin contact email : " root_email + +otput "adding host"; + HOSTS_LINE="$server_ip\t$server_name" + if [ -n "$(grep $HOSTNAME /etc/hosts)" ] + then + echo "$HOSTNAME already exists : $(grep $HOSTNAME $ETC_HOSTS)" + else + echo "Adding $HOSTNAME to your $ETC_HOSTS"; + sudo -- sh -c -e "echo '$HOSTS_LINE' >> /etc/hosts"; + + if [ -n "$(grep $HOSTNAME /etc/hosts)" ] + then + echo "$HOSTNAME was added succesfully \n $(grep $HOSTNAME /etc/hosts)"; + else + echo "Failed to Add $HOSTNAME, Try again!"; + fi fi output "If you found this helpful, please donate to BTC Donation: 1AxK9a7dgeHvf3VFuwZ2adGiQTX6S1nhrp" From f7030fb0244a9151102461eb21fc2e5adb72fe76 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 27 Aug 2017 18:53:25 -0400 Subject: [PATCH 008/360] missing sudo added missing sudo to myphpadmin isnstall --- install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index ccd0190b..85b57acb 100644 --- a/install.sh +++ b/install.sh @@ -130,12 +130,12 @@ otput "adding host"; clear output "Installing phpmyadmin" output "" - echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | debconf-set-selections - echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | debconf-set-selections - echo "phpmyadmin phpmyadmin/mysql/admin-user string root" | debconf-set-selections - echo "phpmyadmin phpmyadmin/mysql/admin-pass password $rootpasswd" | debconf-set-selections - echo "phpmyadmin phpmyadmin/mysql/app-pass password $AUTOGENERATED_PASS" |debconf-set-selections - echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | debconf-set-selections + echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/admin-user string root" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/admin-pass password $rootpasswd" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/app-pass password $AUTOGENERATED_PASS" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections sudo aptitude -y install phpmyadmin output " Installing yiimp" From a0bd81e8c0ded85e7ec35b66e1917ddacd2f8ba0 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 27 Aug 2017 19:27:11 -0400 Subject: [PATCH 009/360] fi foo sudo missed a fi or two with a sudo here and there --- install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 85b57acb..7c191447 100644 --- a/install.sh +++ b/install.sh @@ -112,15 +112,16 @@ otput "adding host"; echo $root_email > sudo tee --append ~/.forward if [[ ("$send_email" == "y" || "$send_email" == "Y" || "$send_email" == "") ]]; then - echo "This is a mail test for the SMTP Service." > /tmp/email.message - echo "You should receive this !" >> /tmp/email.message - echo "" >> /tmp/email.message - echo "Cheers" >> /tmp/email.message - sendmail -s "SMTP Testing" $root_email < /tmp/email.message + echo "This is a mail test for the SMTP Service." > sudo tee --append /tmp/email.message + echo "You should receive this !" >> sudo tee --append /tmp/email.message + echo "" >> sudo tee --append /tmp/email.message + echo "Cheers" >> sudo tee --append /tmp/email.message + sudo sendmail -s "SMTP Testing" $root_email < sudo tee --append /tmp/email.message - rm -f /tmp/email.message + sudo rm -f /tmp/email.message echo "Mail sent" fi + fi output "Some optional installs" if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then From 2014fdf156e848929458ae06e0775366c28de52d Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 27 Aug 2017 19:42:19 -0400 Subject: [PATCH 010/360] damn random ; removed the random ; --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 7c191447..2bbcb626 100644 --- a/install.sh +++ b/install.sh @@ -33,7 +33,7 @@ output "" read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban read -e -p "Send an mail to test the smtp service? [Y/n] : " send_email -otput "adding host"; +output "adding host" HOSTS_LINE="$server_ip\t$server_name" if [ -n "$(grep $HOSTNAME /etc/hosts)" ] then From 1217271b9961fc38c592d2f3bf53287abf519992 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 27 Aug 2017 20:22:51 -0400 Subject: [PATCH 011/360] fixed run.sh and /bin/yiimp fixed run.sh and /bin/yiimp --- install.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/install.sh b/install.sh index 2bbcb626..90574c2d 100644 --- a/install.sh +++ b/install.sh @@ -159,7 +159,26 @@ output "adding host" sudo cp -a config.sample/. /var/stratum/config sudo cp -r stratum /var/stratum sudo cp -r run.sh /var/stratum + cd .. sudo cp -a bin/. /bin/ + #fixing yiimp + sudo sed -i 's/ROOTDIR=/data/yiimp/ROOTDIR=/data//g' /bin/yiimp + #fixing run.sh + sudo rm -r /var/stratum/config/run.sh +echo ' +#!/bin/bash + +ulimit -n 10240 +ulimit -u 10240 + +cd /var/stratum +while true; do + ./stratum /var/stratum/config/$1 + sleep 2 +done +exec bash +' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 +sudo chmod +x run.sh sudo cp -r blocknotify/blocknotify /var/stratum sudo mkdir /etc/yiimp sudo mkdir /root/backup/ From 23d1653938711009d6d9604f68555c4746c1e897 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 27 Aug 2017 20:56:53 -0400 Subject: [PATCH 012/360] Update README.md --- README.md | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3dba833b..02821808 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,38 @@ # yiimp Install script for yiimp on Ubuntu 16.04 -This script will install yimmp on your Ubuntu 16.04 system. Before running this script make sure you are on a fresh server and running as a user. Do not run this script under root! +This script has an interactive begining and will ask for the following information: +1. Your time zone +2. Server Name - IMPORTANT - You must already have your domain name pointed to your server before running the script or else the SSL install will fail! +3. Server IP for hosts file update +4. Support Email Address +5. Server Admin Email Address +6. If you would like fail2ban installed +7. Send test email from server + +Once those questions are answered the script will then be fully automated for the rest of the install. + +The script will update your hosts file with server ip and server name. +Disable and remove AppAromor +Update and Upgrade Ubuntu Packages +Install Aptitude +Install and configure Nginx +Install MariaDB with random root password +Install php7 +Install various dev packages required for building blocknotify and stratum +Install SendMail +Install Fail2Ban if selected +Install and configur phpmyadmin with random password for phpmyadmin user +Clone yiimp build packages, create directory structure, set file permissions, and more +Update server clock +Install LetsEncrypt +Create yiimp database, create 2 users with random passwords - passwords saved in ~/.my.cnf +Import the sql dumps from yiimp +Create base yiimp serverconfig.php file to get you going +Updates all directory permissions + This install script will get you 95% ready to go with yiimp. There are a few things you need to do after the main install is finished. You must update the following files: @@ -16,11 +45,12 @@ After you add the missing information to those files then run: ./loop2.sh ./block.sh +To download and run + curl -Lo install.sh https://raw.githubusercontent.com/crombiecrunch/yiimp/master/install.sh bash install.sh -You will be prompted for email, FDQN, and time zone. You onkly get one shot to enter this information correctly! If this helped you or you feel giving please donate BTC Donation: 1AxK9a7dgeHvf3VFuwZ2adGiQTX6S1nhrp From ce41743028657c982e419c69e40559c27725672f Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 27 Aug 2017 21:01:03 -0400 Subject: [PATCH 013/360] Update README.md --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 02821808..72158b8f 100644 --- a/README.md +++ b/README.md @@ -14,24 +14,24 @@ This script has an interactive begining and will ask for the following informati Once those questions are answered the script will then be fully automated for the rest of the install. -The script will update your hosts file with server ip and server name. -Disable and remove AppAromor -Update and Upgrade Ubuntu Packages -Install Aptitude -Install and configure Nginx -Install MariaDB with random root password -Install php7 -Install various dev packages required for building blocknotify and stratum -Install SendMail -Install Fail2Ban if selected -Install and configur phpmyadmin with random password for phpmyadmin user -Clone yiimp build packages, create directory structure, set file permissions, and more -Update server clock -Install LetsEncrypt -Create yiimp database, create 2 users with random passwords - passwords saved in ~/.my.cnf -Import the sql dumps from yiimp -Create base yiimp serverconfig.php file to get you going -Updates all directory permissions +1. The script will update your hosts file with server ip and server name. +2. Disable and remove AppAromor +3. Update and Upgrade Ubuntu Packages +4. Install Aptitude +5. Install and configure Nginx +6. Install MariaDB with random root password +7. Install php7 +8. Install various dev packages required for building blocknotify and stratum +9. Install SendMail +10. Install Fail2Ban if selected +11. Install and configur phpmyadmin with random password for phpmyadmin user +13. Clone yiimp build packages, create directory structure, set file permissions, and more +14. Update server clock +15. Install LetsEncrypt +16. Create yiimp database, create 2 users with random passwords - passwords saved in ~/.my.cnf +17. Import the sql dumps from yiimp +18. Create base yiimp serverconfig.php file to get you going +19. Updates all directory permissions This install script will get you 95% ready to go with yiimp. There are a few things you need to do after the main install is finished. From f3e748295a8e7eeeb1e7597b5cf4e7cc4ff13dfd Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 27 Aug 2017 23:48:10 -0400 Subject: [PATCH 014/360] removed the rogue } In the stratum algo conf files for the database password there was a } left over. --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 90574c2d..f7603a59 100644 --- a/install.sh +++ b/install.sh @@ -547,7 +547,7 @@ sudo sed -i 's/server = yaamp.com/server = '$server_name'/g' *.conf sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf sudo sed -i 's/username = root/username = stratum/g' *.conf -sudo sed -i 's/password = patofpaq/password = '$password2}'/g' *.conf +sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf cd ~ From 252d169576f5e0f96465e8c1733c001097931565 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Mon, 28 Aug 2017 14:32:23 -0400 Subject: [PATCH 015/360] added option to update hosts file --- install.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index f7603a59..95a83f06 100644 --- a/install.sh +++ b/install.sh @@ -26,13 +26,34 @@ output "Make sure you double check before hitting enter! Only one shot at these! output "" read -e -p "Enter time zone (e.g. America/New_York) : " TIME read -e -p "Server name (like srv.company.tld) : " server_name + read -e -p "Do you want the script to update your host file? If not sure answer no : " host_file ifconfig | perl -nle'/dr:(\S+)/ && print $1' read -e -p "Please enter your servers IP address, if only 127.0.0.1 is shown, enter that : " server_ip read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL read -e -p "Server Admin contact email : " root_email read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban read -e -p "Send an mail to test the smtp service? [Y/n] : " send_email - + + if [[ ("$host_file" == "y" || "$host_file" == "Y" || "$host_file" == "") ]]; then + ifconfig | perl -nle'/dr:(\S+)/ && print $1' + read -e -p "Please enter your servers IP address, if only 127.0.0.1 is shown, enter that : " server_ip + output "adding host" + HOSTS_LINE="$server_ip\t$server_name" + if [ -n "$(grep $HOSTNAME /etc/hosts)" ] + then + echo "$HOSTNAME already exists : $(grep $HOSTNAME $ETC_HOSTS)" + else + echo "Adding $HOSTNAME to your $ETC_HOSTS"; + sudo -- sh -c -e "echo '$HOSTS_LINE' >> /etc/hosts"; + + if [ -n "$(grep $HOSTNAME /etc/hosts)" ] + then + echo "$HOSTNAME was added succesfully \n $(grep $HOSTNAME /etc/hosts)"; + else + echo "Failed to Add $HOSTNAME, Try again!"; + fi + fi + fi output "adding host" HOSTS_LINE="$server_ip\t$server_name" if [ -n "$(grep $HOSTNAME /etc/hosts)" ] From 79dd4fd87d78486010144268abac3d91312d635d Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Mon, 28 Aug 2017 17:52:27 -0400 Subject: [PATCH 016/360] Added option to install SSL or not --- install.sh | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/install.sh b/install.sh index 95a83f06..ced2f126 100644 --- a/install.sh +++ b/install.sh @@ -26,12 +26,11 @@ output "Make sure you double check before hitting enter! Only one shot at these! output "" read -e -p "Enter time zone (e.g. America/New_York) : " TIME read -e -p "Server name (like srv.company.tld) : " server_name - read -e -p "Do you want the script to update your host file? If not sure answer no : " host_file - ifconfig | perl -nle'/dr:(\S+)/ && print $1' - read -e -p "Please enter your servers IP address, if only 127.0.0.1 is shown, enter that : " server_ip read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL read -e -p "Server Admin contact email : " root_email read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban + read -e -p "Do you want the script to update your host file? If not sure answer no [Y/n]: " host_file + read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install read -e -p "Send an mail to test the smtp service? [Y/n] : " send_email if [[ ("$host_file" == "y" || "$host_file" == "Y" || "$host_file" == "") ]]; then @@ -54,23 +53,6 @@ output "" fi fi fi -output "adding host" - HOSTS_LINE="$server_ip\t$server_name" - if [ -n "$(grep $HOSTNAME /etc/hosts)" ] - then - echo "$HOSTNAME already exists : $(grep $HOSTNAME $ETC_HOSTS)" - else - echo "Adding $HOSTNAME to your $ETC_HOSTS"; - sudo -- sh -c -e "echo '$HOSTS_LINE' >> /etc/hosts"; - - if [ -n "$(grep $HOSTNAME /etc/hosts)" ] - then - echo "$HOSTNAME was added succesfully \n $(grep $HOSTNAME /etc/hosts)"; - else - echo "Failed to Add $HOSTNAME, Try again!"; - fi - fi - output "If you found this helpful, please donate to BTC Donation: 1AxK9a7dgeHvf3VFuwZ2adGiQTX6S1nhrp" output "" output "Updating system and installing required packages." @@ -272,12 +254,29 @@ echo ' location ~ /.well-known { allow all; } - } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html sudo service nginx restart + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then output "Install LetsEncrypt and setting SSL" sudo aptitude -y install letsencrypt sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" @@ -371,6 +370,7 @@ sudo service nginx restart } ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + fi sudo service nginx restart sudo service php7.0-fpm reload clear From 0add574023a47443ab12a740d35f45764d4eba81 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Mon, 28 Aug 2017 20:05:37 -0400 Subject: [PATCH 017/360] added git to install --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index ced2f126..bb13ab05 100644 --- a/install.sh +++ b/install.sh @@ -101,6 +101,7 @@ output "" sudo aptitude -y install librtmp-dev sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils sudo aptitude -y install sendmail + sudo aptitude -y install git sudo aptitude -y install pwgen -y clear From 4e49ec1af96e786e006e67bbb28b767c04e27b2f Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Fri, 8 Sep 2017 11:07:10 -0400 Subject: [PATCH 018/360] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 72158b8f..70403de9 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,6 @@ curl -Lo install.sh https://raw.githubusercontent.com/crombiecrunch/yiimp/master bash install.sh -If this helped you or you feel giving please donate BTC Donation: 1AxK9a7dgeHvf3VFuwZ2adGiQTX6S1nhrp +If this helped you or you feel giving please donate BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y Crombie Crunch From 1da509197b87fa0d383b7f09e086b354a6f6a292 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Fri, 8 Sep 2017 11:08:52 -0400 Subject: [PATCH 019/360] Update install.sh --- install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index bb13ab05..a266998a 100644 --- a/install.sh +++ b/install.sh @@ -6,7 +6,7 @@ # # Program: # Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.x -# BTC Donation: 1AxK9a7dgeHvf3VFuwZ2adGiQTX6S1nhrp +# BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y # ################################################################################ output() { @@ -53,7 +53,7 @@ output "" fi fi fi - output "If you found this helpful, please donate to BTC Donation: 1AxK9a7dgeHvf3VFuwZ2adGiQTX6S1nhrp" + output "If you found this helpful, please donate to BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y" output "" output "Updating system and installing required packages." output "" @@ -435,7 +435,7 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" output "" - output "BTC Donation: 1AxK9a7dgeHvf3VFuwZ2adGiQTX6S1nhrp" + output "BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y" output "" output "Peforming the SQL import" @@ -501,7 +501,7 @@ define('"'"'YIIMP_FIAT_ALTERNATIVE'"'"', '"'"'USD'"'"'); // USD is main define('"'"'YAAMP_USE_NICEHASH_API'"'"', false); -define('"'"'YAAMP_BTCADDRESS'"'"', '"'"'1Auhps1mHZQpoX4mCcVL8odU81VakZQ6dR'"'"'); +define('"'"'YAAMP_BTCADDRESS'"'"', '"'"'1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y'"'"'); define('"'"'YAAMP_SITE_URL'"'"', '"'"''"${server_name}"''"'"'); define('"'"'YAAMP_STRATUM_URL'"'"', YAAMP_SITE_URL); // change if your stratum server is on a different host define('"'"'YAAMP_SITE_NAME'"'"', '"'"'TheCryptoPool'"'"'); @@ -541,7 +541,7 @@ define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); $cold_wallet_table = array( - '"'"'1C23KmLeCaQSLLyKVykHEUse1R7jRDv9j9'"'"' => 0.10, + '"'"'1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y'"'"' => 0.10, ); // Sample fixed pool fees @@ -592,6 +592,6 @@ output "Please make sure to change your wallet addresses in the /var/web/serverc output "" output "Please make sure to add your public and private keys." output "" -output "If you found this script helpful please consider donating some BTC Donation: 1AxK9a7dgeHvf3VFuwZ2adGiQTX6S1nhrp" +output "If you found this script helpful please consider donating some BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y" From e1e0401688f9f1594bf5bf190ea8dc59bebff01f Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Fri, 8 Sep 2017 11:10:30 -0400 Subject: [PATCH 020/360] removed hosts option --- install.sh | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/install.sh b/install.sh index a266998a..ebbcceac 100644 --- a/install.sh +++ b/install.sh @@ -29,30 +29,9 @@ output "" read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL read -e -p "Server Admin contact email : " root_email read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban - read -e -p "Do you want the script to update your host file? If not sure answer no [Y/n]: " host_file read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install read -e -p "Send an mail to test the smtp service? [Y/n] : " send_email - if [[ ("$host_file" == "y" || "$host_file" == "Y" || "$host_file" == "") ]]; then - ifconfig | perl -nle'/dr:(\S+)/ && print $1' - read -e -p "Please enter your servers IP address, if only 127.0.0.1 is shown, enter that : " server_ip - output "adding host" - HOSTS_LINE="$server_ip\t$server_name" - if [ -n "$(grep $HOSTNAME /etc/hosts)" ] - then - echo "$HOSTNAME already exists : $(grep $HOSTNAME $ETC_HOSTS)" - else - echo "Adding $HOSTNAME to your $ETC_HOSTS"; - sudo -- sh -c -e "echo '$HOSTS_LINE' >> /etc/hosts"; - - if [ -n "$(grep $HOSTNAME /etc/hosts)" ] - then - echo "$HOSTNAME was added succesfully \n $(grep $HOSTNAME /etc/hosts)"; - else - echo "Failed to Add $HOSTNAME, Try again!"; - fi - fi - fi output "If you found this helpful, please donate to BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y" output "" output "Updating system and installing required packages." From 92d76e63b1f6ecdef32aa5893912f5f9619952d9 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Fri, 8 Sep 2017 11:17:58 -0400 Subject: [PATCH 021/360] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 70403de9..6c4b4e2f 100644 --- a/README.md +++ b/README.md @@ -54,4 +54,6 @@ bash install.sh If this helped you or you feel giving please donate BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y +Feel free to join our Discord channel at https://discord.gg/zdBbAQ + Crombie Crunch From 926244ae7c4c5dbdeaafc0e6838c9d647f941335 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sat, 9 Sep 2017 14:16:25 -0400 Subject: [PATCH 022/360] added some additional security features. --- install.sh | 60 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 50 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index ebbcceac..d2d4e5fa 100644 --- a/install.sh +++ b/install.sh @@ -25,13 +25,16 @@ clear output "Make sure you double check before hitting enter! Only one shot at these!" output "" read -e -p "Enter time zone (e.g. America/New_York) : " TIME - read -e -p "Server name (like srv.company.tld) : " server_name + read -e -p "Server name (e.g. srv.company.tld) : " server_name read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL read -e -p "Server Admin contact email : " root_email + read -e -p "Send an mail to test the smtp service? [Y/n] : " send_email + output "These next questions are to help secure your yiimp installation." read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install - read -e -p "Send an mail to test the smtp service? [Y/n] : " send_email - + read -e -p "Please enter a new location for /adminRights this is to customize the admin entrance url (e.g. example.com/myAdminpanel) : " admin_panel + + clear output "If you found this helpful, please donate to BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y" output "" output "Updating system and installing required packages." @@ -56,6 +59,16 @@ output "" sudo aptitude -y install nginx sudo service nginx start sudo service cron start + #Hardning Nginx + echo 'map $http_user_agent $blockedagent { +default 0; +~*malicious 1; +~*bot 1; +~*backdoor 1; +~*crawler 1; +~*bandit 1; +} +' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 output "Installing Mariadb Server." output "" @@ -126,16 +139,20 @@ output "" output "" output "Grabbing yiimp fron Github, building files and setting file structure." output "" + #Generating Random Password for stratum + blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` cd ~ git clone https://github.com/tpruvot/yiimp.git cd yiimp cd blocknotify + sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp sudo make cd ~/yiimp/stratum/iniparser sudo make cd .. sudo make cd .. + sudo sed -i 's/AdminRights/'$admin_panel'/' web/yaamp/modules/site/SiteController.php sudo cp -r web /var/ sudo mkdir /var/stratum cd stratum @@ -185,12 +202,18 @@ sudo chmod +x run.sh output "Creating webserver initial config file" output "" -echo ' +echo 'include /etc/nginx/blockuseragents.rules; server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } listen 80; listen [::]:80; server_name '"${server_name}"'; - + Server_tokens off; root "/var/www/'"${server_name}"'/html/web"; index index.html index.htm index.php; charset utf-8; @@ -209,8 +232,10 @@ echo ' error_log /var/log/nginx/'"${server_name}"'.app-error.log error; # allow larger file uploads and longer script runtimes - client_max_body_size 100m; - client_body_timeout 120s; + client_body_buffer_size 1k; + client_header_buffer_size 1k; + client_max_body_size 1k; + large_client_header_buffers 2 1k; sendfile off; @@ -263,16 +288,29 @@ sudo service nginx restart sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 # I am SSL Man! - echo ' +echo 'include /etc/nginx/blockuseragents.rules; server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } listen 80; listen [::]:80; server_name '"${server_name}"'; + Server_tokens off; # enforce https return 301 https://$server_name$request_uri; } server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } listen 443 ssl http2; listen [::]:443 ssl http2; server_name '"${server_name}"'; @@ -284,8 +322,10 @@ sudo service nginx restart error_log /var/log/nginx/'"${server_name}"'.app-error.log error; # allow larger file uploads and longer script runtimes - client_max_body_size 100m; - client_body_timeout 120s; + client_body_buffer_size 1k; + client_header_buffer_size 1k; + client_max_body_size 1k; + large_client_header_buffers 2 1k; sendfile off; From 649835631147c63494f82f0832152f6767f8c781 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sat, 9 Sep 2017 14:21:22 -0400 Subject: [PATCH 023/360] add $blckntifypass to stratum configs --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index d2d4e5fa..2ae899d1 100644 --- a/install.sh +++ b/install.sh @@ -584,6 +584,7 @@ $configAlgoNormCoef = array( output "Updating stratum config files with database connection info." output "" cd /var/stratum/config +sudo sed -i 's/password = tu8tu5/password = '$blckntifypass'/g' *.conf sudo sed -i 's/server = yaamp.com/server = '$server_name'/g' *.conf sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf From 99fe4b926da45beecb43c4b8475cf05ed3477f36 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sat, 9 Sep 2017 14:44:51 -0400 Subject: [PATCH 024/360] Update install.sh --- install.sh | 50 +++++++------------------------------------------- 1 file changed, 7 insertions(+), 43 deletions(-) diff --git a/install.sh b/install.sh index 2ae899d1..0fd940bb 100644 --- a/install.sh +++ b/install.sh @@ -59,17 +59,7 @@ output "" sudo aptitude -y install nginx sudo service nginx start sudo service cron start - #Hardning Nginx - echo 'map $http_user_agent $blockedagent { -default 0; -~*malicious 1; -~*bot 1; -~*backdoor 1; -~*crawler 1; -~*bandit 1; -} -' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 - + output "Installing Mariadb Server." output "" # create random password @@ -202,18 +192,10 @@ sudo chmod +x run.sh output "Creating webserver initial config file" output "" -echo 'include /etc/nginx/blockuseragents.rules; - server { - if ($blockedagent) { - return 403; - } - if ($request_method !~ ^(GET|HEAD|POST)$) { - return 444; - } +echo 'server { listen 80; listen [::]:80; server_name '"${server_name}"'; - Server_tokens off; root "/var/www/'"${server_name}"'/html/web"; index index.html index.htm index.php; charset utf-8; @@ -232,10 +214,8 @@ echo 'include /etc/nginx/blockuseragents.rules; error_log /var/log/nginx/'"${server_name}"'.app-error.log error; # allow larger file uploads and longer script runtimes - client_body_buffer_size 1k; - client_header_buffer_size 1k; - client_max_body_size 1k; - large_client_header_buffers 2 1k; + client_max_body_size 100m; + client_body_timeout 120s; sendfile off; @@ -288,29 +268,15 @@ sudo service nginx restart sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 # I am SSL Man! -echo 'include /etc/nginx/blockuseragents.rules; - server { - if ($blockedagent) { - return 403; - } - if ($request_method !~ ^(GET|HEAD|POST)$) { - return 444; - } +echo 'server { listen 80; listen [::]:80; server_name '"${server_name}"'; - Server_tokens off; # enforce https return 301 https://$server_name$request_uri; } server { - if ($blockedagent) { - return 403; - } - if ($request_method !~ ^(GET|HEAD|POST)$) { - return 444; - } listen 443 ssl http2; listen [::]:443 ssl http2; server_name '"${server_name}"'; @@ -322,10 +288,8 @@ echo 'include /etc/nginx/blockuseragents.rules; error_log /var/log/nginx/'"${server_name}"'.app-error.log error; # allow larger file uploads and longer script runtimes - client_body_buffer_size 1k; - client_header_buffer_size 1k; - client_max_body_size 1k; - large_client_header_buffers 2 1k; + client_max_body_size 100m; + client_body_timeout 120s; sendfile off; From b0165d83d3854784513e95007bea38bf62c28f01 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sat, 9 Sep 2017 16:14:32 -0400 Subject: [PATCH 025/360] nginx harden and chmod changes --- install.sh | 56 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index 0fd940bb..30fbc3d8 100644 --- a/install.sh +++ b/install.sh @@ -59,6 +59,16 @@ output "" sudo aptitude -y install nginx sudo service nginx start sudo service cron start + #Making Nginx a bit hard + echo 'map $http_user_agent $blockedagent { +default 0; +~*malicious 1; +~*bot 1; +~*backdoor 1; +~*crawler 1; +~*bandit 1; +} +' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 output "Installing Mariadb Server." output "" @@ -192,7 +202,14 @@ sudo chmod +x run.sh output "Creating webserver initial config file" output "" -echo 'server { +echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } listen 80; listen [::]:80; server_name '"${server_name}"'; @@ -214,9 +231,10 @@ echo 'server { error_log /var/log/nginx/'"${server_name}"'.app-error.log error; # allow larger file uploads and longer script runtimes - client_max_body_size 100m; - client_body_timeout 120s; - + client_body_buffer_size 1k; + client_header_buffer_size 1k; + client_max_body_size 1k; + large_client_header_buffers 2 1k; sendfile off; location ~ \.php$ { @@ -268,7 +286,14 @@ sudo service nginx restart sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 # I am SSL Man! -echo 'server { +echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } listen 80; listen [::]:80; server_name '"${server_name}"'; @@ -277,6 +302,12 @@ echo 'server { } server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } listen 443 ssl http2; listen [::]:443 ssl http2; server_name '"${server_name}"'; @@ -288,10 +319,11 @@ echo 'server { error_log /var/log/nginx/'"${server_name}"'.app-error.log error; # allow larger file uploads and longer script runtimes - client_max_body_size 100m; - client_body_timeout 120s; - - sendfile off; + client_body_buffer_size 1k; + client_header_buffer_size 1k; + client_max_body_size 1k; + large_client_header_buffers 2 1k; + sendfile off; # strengthen ssl security ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; @@ -563,10 +595,12 @@ sudo usermod -aG www-data $whoami sudo chown -R www-data:www-data /var/log sudo chown -R www-data:www-data /var/stratum sudo chown -R www-data:www-data /var/web -sudo chmod -R 777 /var/web -sudo chmod -R 777 /var/stratum +sudo chmod -R 755 /var/web +sudo chmod -R 755 /var/stratum +sudo chmod -R 777 /var/web/yaamp/runtime sudo chmod -R 777 /root/backup/ sudo chmod -R 777 /var/log +sudo chmod -R 644 serverconfig.php sudo service nginx restart sudo service php7.0-fpm reload clear From c64571d5133efc4fa9914218f46af81b435cecdb Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sat, 9 Sep 2017 18:50:13 -0400 Subject: [PATCH 026/360] Update install.sh --- install.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/install.sh b/install.sh index 30fbc3d8..0330b87b 100644 --- a/install.sh +++ b/install.sh @@ -39,11 +39,6 @@ output "" output "" output "Updating system and installing required packages." output "" - - #Disable AppArmor - sudo service apparmor stop - sudo update-rc.d -f apparmor remove - sudo apt-get -y remove apparmor apparmor-utils # update package and upgrade Ubuntu sudo apt-get -y update From 320f6fb9d90792828632857027f4d8033917b947 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sat, 9 Sep 2017 23:53:04 -0400 Subject: [PATCH 027/360] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c4b4e2f..7e23b60f 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ After you add the missing information to those files then run: To download and run -curl -Lo install.sh https://raw.githubusercontent.com/crombiecrunch/yiimp/master/install.sh +curl -Lo install.sh https://raw.githubusercontent.com/crombiecrunch/yiimp_install_scrypt/master/install.sh bash install.sh From 3fd615cef44e2c2b19d38d73e42db039c0bb43dd Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 10 Sep 2017 00:10:21 -0400 Subject: [PATCH 028/360] Update install.sh --- install.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 0330b87b..d5aa27d0 100644 --- a/install.sh +++ b/install.sh @@ -190,11 +190,7 @@ sudo chmod +x run.sh clear output "Making Web Server Magic Happen!" # adding user to group, creating dir structure, setting permissions - whoami=`whoami` - sudo mkdir -p /var/www/$server_name/html - sudo chown -R $whoami:$whoami /var/www/$server_name/html - sudo chmod -R 775 /var/www/$server_name/html - + sudo mkdir -p /var/www/$server_name/html output "Creating webserver initial config file" output "" echo 'include /etc/nginx/blockuseragents.rules; @@ -586,10 +582,12 @@ cd ~ output "Final Directory permissions" output "" +whoami=`whoami` sudo usermod -aG www-data $whoami sudo chown -R www-data:www-data /var/log sudo chown -R www-data:www-data /var/stratum sudo chown -R www-data:www-data /var/web +sudo chmod -R 755 /var/www/$server_name/html sudo chmod -R 755 /var/web sudo chmod -R 755 /var/stratum sudo chmod -R 777 /var/web/yaamp/runtime From ef042e1e2ccd3e1795436f73c7124a40fcfc1d6e Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 10 Sep 2017 07:41:26 -0400 Subject: [PATCH 029/360] more nginx harden --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index d5aa27d0..ead3a261 100644 --- a/install.sh +++ b/install.sh @@ -228,7 +228,7 @@ echo 'include /etc/nginx/blockuseragents.rules; large_client_header_buffers 2 1k; sendfile off; - location ~ \.php$ { + location ~ ^/index\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; @@ -340,7 +340,7 @@ echo 'include /etc/nginx/blockuseragents.rules; } - location ~ \.php$ { + location ~ ^/index\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; From 6e6c1df8992b9947a3610e2ebc4af52e07f29cc7 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 10 Sep 2017 08:10:43 -0400 Subject: [PATCH 030/360] another nginx config update --- install.sh | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index ead3a261..84718a47 100644 --- a/install.sh +++ b/install.sh @@ -240,15 +240,22 @@ echo 'include /etc/nginx/blockuseragents.rules; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; + try_files $uri $uri/ =404; } - - location ~ /\.ht { - deny all; + location ~ \.php$ { + return 404; + } + + location ~ \.sh { + return 404; } - location ~ /.well-known { - allow all; + location ~ /\.ht { + deny all; } - location /phpmyadmin { + location ~ /.well-known { + allow all; + } + location /phpmyadmin { root /usr/share/; index index.php; try_files $uri $uri/ =404; @@ -353,7 +360,15 @@ echo 'include /etc/nginx/blockuseragents.rules; fastcgi_send_timeout 300; fastcgi_read_timeout 300; include /etc/nginx/fastcgi_params; - } + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + + location ~ \.sh { + return 404; + } location ~ /\.ht { deny all; From 5231c583e107a3ec74af279ba36bc53ff88f3da1 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 10 Sep 2017 14:48:14 -0400 Subject: [PATCH 031/360] Update install.sh --- install.sh | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/install.sh b/install.sh index 84718a47..568c8508 100644 --- a/install.sh +++ b/install.sh @@ -137,7 +137,7 @@ default 0; #Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` cd ~ - git clone https://github.com/tpruvot/yiimp.git + git clone https://github.com/magnatum/yiimp.git cd yiimp cd blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp @@ -173,7 +173,7 @@ while true; do done exec bash ' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 -sudo chmod +x run.sh +sudo chmod +x /var/stratum/config/run.sh sudo cp -r blocknotify/blocknotify /var/stratum sudo mkdir /etc/yiimp sudo mkdir /root/backup/ @@ -466,14 +466,6 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); # import sql dump sudo zcat 2016-04-03-yaamp.sql.gz | sudo mysql --defaults-group-suffix=host1 # oh the humanity! - sudo mysql --defaults-group-suffix=host1 --force < 2015-07-01-accounts_hostaddr.sql - sudo mysql --defaults-group-suffix=host1 --force < 2015-07-15-coins_hasmasternodes.sql - sudo mysql --defaults-group-suffix=host1 --force < 2015-09-20-blocks_worker.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-02-17-payouts_errmsg.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-02-23-shares_diff.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-03-26-markets.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-03-30-coins.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-04-03-accounts.sql sudo mysql --defaults-group-suffix=host1 --force < 2016-04-24-market_history.sql sudo mysql --defaults-group-suffix=host1 --force < 2016-04-27-settings.sql sudo mysql --defaults-group-suffix=host1 --force < 2016-05-11-coins.sql @@ -605,10 +597,10 @@ sudo chown -R www-data:www-data /var/web sudo chmod -R 755 /var/www/$server_name/html sudo chmod -R 755 /var/web sudo chmod -R 755 /var/stratum -sudo chmod -R 777 /var/web/yaamp/runtime -sudo chmod -R 777 /root/backup/ -sudo chmod -R 777 /var/log -sudo chmod -R 644 serverconfig.php +sudo chmod -R 755 /var/web/yaamp/runtime +sudo chmod -R 755 /root/backup/ +sudo chmod -R 755 /var/log +sudo chmod -R 500 /var/web/serverconfig.php sudo service nginx restart sudo service php7.0-fpm reload clear From 2825fb7defef309c018df8fd85b1e9f75c7e3f89 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 10 Sep 2017 20:40:56 -0400 Subject: [PATCH 032/360] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 568c8508..125b22d8 100644 --- a/install.sh +++ b/install.sh @@ -137,7 +137,7 @@ default 0; #Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` cd ~ - git clone https://github.com/magnatum/yiimp.git + git clone https://github.com/tpruvot/yiimp.git cd yiimp cd blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp From f12e872808fe9b76d50718d385814e6ff42f1226 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 10 Sep 2017 20:46:31 -0400 Subject: [PATCH 033/360] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 125b22d8..568c8508 100644 --- a/install.sh +++ b/install.sh @@ -137,7 +137,7 @@ default 0; #Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` cd ~ - git clone https://github.com/tpruvot/yiimp.git + git clone https://github.com/magnatum/yiimp.git cd yiimp cd blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp From 1d3569f5f3b4ac7d10f0aa2a644198394415b664 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Mon, 11 Sep 2017 11:43:03 -0400 Subject: [PATCH 034/360] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 568c8508..125b22d8 100644 --- a/install.sh +++ b/install.sh @@ -137,7 +137,7 @@ default 0; #Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` cd ~ - git clone https://github.com/magnatum/yiimp.git + git clone https://github.com/tpruvot/yiimp.git cd yiimp cd blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp From d83aad203c499486c3b73e26842294f4fdcb9565 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Mon, 11 Sep 2017 16:30:55 -0400 Subject: [PATCH 035/360] Update install.sh --- install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 125b22d8..15508131 100644 --- a/install.sh +++ b/install.sh @@ -25,7 +25,7 @@ clear output "Make sure you double check before hitting enter! Only one shot at these!" output "" read -e -p "Enter time zone (e.g. America/New_York) : " TIME - read -e -p "Server name (e.g. srv.company.tld) : " server_name + read -e -p "Server name (no http:// or www. just example.com) : " server_name read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL read -e -p "Server Admin contact email : " root_email read -e -p "Send an mail to test the smtp service? [Y/n] : " send_email @@ -52,6 +52,7 @@ output "" output "Installing Nginx server." output "" sudo aptitude -y install nginx + sudo rm /etc/nginx/sites-enabled/default sudo service nginx start sudo service cron start #Making Nginx a bit hard @@ -157,7 +158,7 @@ default 0; cd .. sudo cp -a bin/. /bin/ #fixing yiimp - sudo sed -i 's/ROOTDIR=/data/yiimp/ROOTDIR=/data//g' /bin/yiimp + sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp #fixing run.sh sudo rm -r /var/stratum/config/run.sh echo ' @@ -203,7 +204,7 @@ echo 'include /etc/nginx/blockuseragents.rules; } listen 80; listen [::]:80; - server_name '"${server_name}"'; + server_name '"${server_name}"' www.'"${server_name}"'; root "/var/www/'"${server_name}"'/html/web"; index index.html index.htm index.php; charset utf-8; @@ -280,7 +281,7 @@ sudo service nginx restart if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then output "Install LetsEncrypt and setting SSL" sudo aptitude -y install letsencrypt - sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 # I am SSL Man! @@ -308,7 +309,7 @@ echo 'include /etc/nginx/blockuseragents.rules; } listen 443 ssl http2; listen [::]:443 ssl http2; - server_name '"${server_name}"'; + server_name '"${server_name}"' www.'"${server_name}"'; root /var/www/'"${server_name}"'/html/web; index index.php; From 105295166450b4c8fd48d2bbdc485ccd325c4ed2 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Tue, 12 Sep 2017 07:53:51 -0400 Subject: [PATCH 036/360] Update install.sh --- install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 15508131..b31680be 100644 --- a/install.sh +++ b/install.sh @@ -223,10 +223,10 @@ echo 'include /etc/nginx/blockuseragents.rules; error_log /var/log/nginx/'"${server_name}"'.app-error.log error; # allow larger file uploads and longer script runtimes - client_body_buffer_size 1k; - client_header_buffer_size 1k; - client_max_body_size 1k; - large_client_header_buffers 2 1k; + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; sendfile off; location ~ ^/index\.php$ { @@ -318,10 +318,10 @@ echo 'include /etc/nginx/blockuseragents.rules; error_log /var/log/nginx/'"${server_name}"'.app-error.log error; # allow larger file uploads and longer script runtimes - client_body_buffer_size 1k; - client_header_buffer_size 1k; - client_max_body_size 1k; - large_client_header_buffers 2 1k; + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; sendfile off; # strengthen ssl security From d196098f2a7458a638d8fbac7b0bf715a52bb7cd Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Thu, 14 Sep 2017 09:05:40 -0400 Subject: [PATCH 037/360] Update install.sh --- install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index b31680be..1e409aa5 100644 --- a/install.sh +++ b/install.sh @@ -595,13 +595,13 @@ sudo usermod -aG www-data $whoami sudo chown -R www-data:www-data /var/log sudo chown -R www-data:www-data /var/stratum sudo chown -R www-data:www-data /var/web -sudo chmod -R 755 /var/www/$server_name/html -sudo chmod -R 755 /var/web -sudo chmod -R 755 /var/stratum -sudo chmod -R 755 /var/web/yaamp/runtime -sudo chmod -R 755 /root/backup/ -sudo chmod -R 755 /var/log -sudo chmod -R 500 /var/web/serverconfig.php +sudo chmod -R 775 /var/www/$server_name/html +sudo chmod -R 775 /var/web +sudo chmod -R 775 /var/stratum +sudo chmod -R 775 /var/web/yaamp/runtime +sudo chmod -R 775 /root/backup/ +sudo chmod -R 775 /var/log +sudo chmod -R 775 /var/web/serverconfig.php sudo service nginx restart sudo service php7.0-fpm reload clear From ff84ba39ed7c57f5ae93cefbcc8e164abb0ee9f9 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sat, 16 Sep 2017 08:36:26 -0400 Subject: [PATCH 038/360] Update README.md --- README.md | 65 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 7e23b60f..a02d8bce 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,42 @@ # yiimp Install script for yiimp on Ubuntu 16.04 -Before running this script make sure you are on a fresh server and running as a user. Do not run this script under root! +While I did add some server security to the script, it is every server owners responsibility to fully secure their own servers. After the installation you will still need to customize your serverconfig.php file to your liking, add your API keys, and build/add your coins to the control panel. -This script has an interactive begining and will ask for the following information: -1. Your time zone -2. Server Name - IMPORTANT - You must already have your domain name pointed to your server before running the script or else the SSL install will fail! -3. Server IP for hosts file update -4. Support Email Address -5. Server Admin Email Address -6. If you would like fail2ban installed -7. Send test email from server +There will be several wallets already in yiimp. These have nothing to do with the installation script and are from the database import from the yiimp github. + +If you need further assistance we have a small but growing discord channel at https://discord.gg/uQ5wdTC + +*****Do not run the script as root***** + +This script has an interactive beginning and will ask for the following information: + +Your time zone +Server Name +Support Email Address +Server Admin Email Address +If you would like fail2ban installed +If you would like to have SSL (LetsEncrypt) installed - Your domain must be pointed to your server prior to running the script or SSL will fail to install. +New custom location for yiimp admin login. Once those questions are answered the script will then be fully automated for the rest of the install. -1. The script will update your hosts file with server ip and server name. -2. Disable and remove AppAromor -3. Update and Upgrade Ubuntu Packages -4. Install Aptitude -5. Install and configure Nginx -6. Install MariaDB with random root password -7. Install php7 -8. Install various dev packages required for building blocknotify and stratum -9. Install SendMail -10. Install Fail2Ban if selected -11. Install and configur phpmyadmin with random password for phpmyadmin user -13. Clone yiimp build packages, create directory structure, set file permissions, and more -14. Update server clock -15. Install LetsEncrypt -16. Create yiimp database, create 2 users with random passwords - passwords saved in ~/.my.cnf -17. Import the sql dumps from yiimp -18. Create base yiimp serverconfig.php file to get you going -19. Updates all directory permissions +. Update and Upgrade Ubuntu Packages +. Install Aptitude +. Install and configure Nginx +. Install MariaDB with random root password +. Install php7 +. Install various dev packages required for building blocknotify and stratum +. Install SendMail +. Install Fail2Ban if selected +. Install and configur phpmyadmin with random password for phpmyadmin user +. Clone yiimp build packages, create directory structure, set file permissions, and more +. Update server clock +. Install LetsEncrypt if selected +. Create yiimp database, create 2 users with random passwords - passwords saved in ~/.my.cnf +. Import the sql dumps from yiimp +. Create base yiimp serverconfig.php file to get you going +. Updates all directory permissions This install script will get you 95% ready to go with yiimp. There are a few things you need to do after the main install is finished. @@ -41,9 +46,9 @@ You must update the following files: 2. /etc/yiimp/keys.php - update with secrect keys from the exchanges. After you add the missing information to those files then run: -./main.sh -./loop2.sh -./block.sh +bash main.sh +bash loop2.sh +bash block.sh To download and run From 629a691e5dbd121e3b81dc6c6f5fc2ab4bec676b Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sat, 16 Sep 2017 23:04:38 -0400 Subject: [PATCH 039/360] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a02d8bce..7f029191 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ curl -Lo install.sh https://raw.githubusercontent.com/crombiecrunch/yiimp_instal bash install.sh -If this helped you or you feel giving please donate BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y +If this helped you or you feel giving please donate BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD Feel free to join our Discord channel at https://discord.gg/zdBbAQ From c26f2ccdb0f17c2bcc9d79310e0f06e92c358175 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sat, 16 Sep 2017 23:06:06 -0400 Subject: [PATCH 040/360] Update install.sh --- install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 1e409aa5..eaa8c63d 100644 --- a/install.sh +++ b/install.sh @@ -6,7 +6,7 @@ # # Program: # Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.x -# BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y +# BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD # ################################################################################ output() { @@ -35,7 +35,7 @@ output "" read -e -p "Please enter a new location for /adminRights this is to customize the admin entrance url (e.g. example.com/myAdminpanel) : " admin_panel clear - output "If you found this helpful, please donate to BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y" + output "If you found this helpful, please donate to BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" output "" output "Updating system and installing required packages." output "" @@ -457,7 +457,7 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" output "" - output "BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y" + output "BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" output "" output "Peforming the SQL import" @@ -515,7 +515,7 @@ define('"'"'YIIMP_FIAT_ALTERNATIVE'"'"', '"'"'USD'"'"'); // USD is main define('"'"'YAAMP_USE_NICEHASH_API'"'"', false); -define('"'"'YAAMP_BTCADDRESS'"'"', '"'"'1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y'"'"'); +define('"'"'YAAMP_BTCADDRESS'"'"', '"'"'16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD'"'"'); define('"'"'YAAMP_SITE_URL'"'"', '"'"''"${server_name}"''"'"'); define('"'"'YAAMP_STRATUM_URL'"'"', YAAMP_SITE_URL); // change if your stratum server is on a different host define('"'"'YAAMP_SITE_NAME'"'"', '"'"'TheCryptoPool'"'"'); @@ -555,7 +555,7 @@ define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); $cold_wallet_table = array( - '"'"'1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y'"'"' => 0.10, + '"'"'16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD'"'"' => 0.10, ); // Sample fixed pool fees @@ -611,6 +611,6 @@ output "Please make sure to change your wallet addresses in the /var/web/serverc output "" output "Please make sure to add your public and private keys." output "" -output "If you found this script helpful please consider donating some BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y" +output "If you found this script helpful please consider donating some BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" From f6677ea7d901da07bebb0c6a656127e4b854a644 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Mon, 18 Sep 2017 22:03:33 -0400 Subject: [PATCH 041/360] Update README.md --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 7f029191..08938862 100644 --- a/README.md +++ b/README.md @@ -21,22 +21,22 @@ New custom location for yiimp admin login. Once those questions are answered the script will then be fully automated for the rest of the install. -. Update and Upgrade Ubuntu Packages -. Install Aptitude -. Install and configure Nginx -. Install MariaDB with random root password -. Install php7 -. Install various dev packages required for building blocknotify and stratum -. Install SendMail -. Install Fail2Ban if selected -. Install and configur phpmyadmin with random password for phpmyadmin user -. Clone yiimp build packages, create directory structure, set file permissions, and more -. Update server clock -. Install LetsEncrypt if selected -. Create yiimp database, create 2 users with random passwords - passwords saved in ~/.my.cnf -. Import the sql dumps from yiimp -. Create base yiimp serverconfig.php file to get you going -. Updates all directory permissions +1. Update and Upgrade Ubuntu Packages +2. Install Aptitude +3. Install and configure Nginx +4. Install MariaDB with random root password +5. Install php7 +6. Install various dev packages required for building blocknotify and stratum +7. Install SendMail +8. Install Fail2Ban if selected +9. Install and configur phpmyadmin with random password for phpmyadmin user +10. Clone yiimp build packages, create directory structure, set file permissions, and more +11. Update server clock +12. Install LetsEncrypt if selected +13. Create yiimp database, create 2 users with random passwords - passwords saved in ~/.my.cnf +14. Import the sql dumps from yiimp +15. Create base yiimp serverconfig.php file to get you going +16. Updates all directory permissions This install script will get you 95% ready to go with yiimp. There are a few things you need to do after the main install is finished. From 224f2a1e359854e9729da0e19eed29fdca6ecb97 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sat, 23 Sep 2017 21:31:52 -0400 Subject: [PATCH 042/360] ver2 Updated to use https://github.com/crombiecrunch/yiimp-reloaded.git, enhanced nginx security, option to enable autoexchange, code clean up --- install.sh | 444 +++++++++++++++++++++++++---------------------------- 1 file changed, 211 insertions(+), 233 deletions(-) diff --git a/install.sh b/install.sh index eaa8c63d..ac728149 100644 --- a/install.sh +++ b/install.sh @@ -27,12 +27,12 @@ output "" read -e -p "Enter time zone (e.g. America/New_York) : " TIME read -e -p "Server name (no http:// or www. just example.com) : " server_name read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL - read -e -p "Server Admin contact email : " root_email - read -e -p "Send an mail to test the smtp service? [Y/n] : " send_email - output "These next questions are to help secure your yiimp installation." + read -e -p "Set stratum to AutoExchange? i.e. mine any coinf with BTC address? [y/N] : " BTC + read -e -p "Please enter a new location for /site/adminRights this is to customize the admin entrance url (e.g. myAdminpanel) : " admin_panel + read -e -p "Enter your Public IP for admin access (http://www.whatsmyip.org/) : " Public read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install - read -e -p "Please enter a new location for /adminRights this is to customize the admin entrance url (e.g. example.com/myAdminpanel) : " admin_panel + clear output "If you found this helpful, please donate to BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" @@ -55,16 +55,6 @@ output "" sudo rm /etc/nginx/sites-enabled/default sudo service nginx start sudo service cron start - #Making Nginx a bit hard - echo 'map $http_user_agent $blockedagent { -default 0; -~*malicious 1; -~*bot 1; -~*backdoor 1; -~*crawler 1; -~*bandit 1; -} -' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 output "Installing Mariadb Server." output "" @@ -88,7 +78,6 @@ default 0; sudo aptitude -y install gnutls-dev sudo aptitude -y install librtmp-dev sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils - sudo aptitude -y install sendmail sudo aptitude -y install git sudo aptitude -y install pwgen -y clear @@ -97,24 +86,6 @@ default 0; password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` AUTOGENERATED_PASS=`pwgen -c -1 20` - output "Testing to see if server emails are sent" - output "" - if [[ "$root_email" != "" ]]; then - echo $root_email > sudo tee --append ~/.email - echo $root_email > sudo tee --append ~/.forward - - if [[ ("$send_email" == "y" || "$send_email" == "Y" || "$send_email" == "") ]]; then - echo "This is a mail test for the SMTP Service." > sudo tee --append /tmp/email.message - echo "You should receive this !" >> sudo tee --append /tmp/email.message - echo "" >> sudo tee --append /tmp/email.message - echo "Cheers" >> sudo tee --append /tmp/email.message - sudo sendmail -s "SMTP Testing" $root_email < sudo tee --append /tmp/email.message - - sudo rm -f /tmp/email.message - echo "Mail sent" - fi - fi - output "Some optional installs" if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then sudo aptitude -y install fail2ban @@ -138,47 +109,32 @@ default 0; #Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` cd ~ - git clone https://github.com/tpruvot/yiimp.git - cd yiimp - cd blocknotify + git clone https://github.com/crombiecrunch/yiimp-reloaded.git + cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp sudo make - cd ~/yiimp/stratum/iniparser + cd $HOME/yiimp/stratum/iniparser sudo make - cd .. + cd $HOME/yiimp/stratum + if [[ ("$BTC" == "y" || "$BTC" == "Y") ]]; then + sudo sed -i 's/CFLAGS += -DNO_EXCHANGE/#CFLAGS += -DNO_EXCHANGE/' $HOME/yiimp/stratum/Makefile sudo make - cd .. - sudo sed -i 's/AdminRights/'$admin_panel'/' web/yaamp/modules/site/SiteController.php - sudo cp -r web /var/ - sudo mkdir /var/stratum - cd stratum + fi + sudo make + cd $HOME/yiimp + sudo sed -i 's/AdminRights/'$admin_panel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php + sudo cp -r $HOME/yiimp/web /var/ + sudo mkdir -p /var/stratum + cd $HOME/yiimp/stratum sudo cp -a config.sample/. /var/stratum/config sudo cp -r stratum /var/stratum sudo cp -r run.sh /var/stratum - cd .. - sudo cp -a bin/. /bin/ - #fixing yiimp - sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp - #fixing run.sh - sudo rm -r /var/stratum/config/run.sh -echo ' -#!/bin/bash - -ulimit -n 10240 -ulimit -u 10240 - -cd /var/stratum -while true; do - ./stratum /var/stratum/config/$1 - sleep 2 -done -exec bash -' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 -sudo chmod +x /var/stratum/config/run.sh - sudo cp -r blocknotify/blocknotify /var/stratum - sudo mkdir /etc/yiimp - sudo mkdir /root/backup/ - sudo cp -r /var/web/keys.sample.php /etc/yiimp/ + cd $HOME/yiimp + sudo cp -a $HOME/yiimp/bin/. /bin/ + sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum + sudo mkdir -p /etc/yiimp + sudo mkdir -p /$HOME/backup/ + sudo cp -r $HOME/yiimp/var/web/keys.sample.php /etc/yiimp/ output "Update default timezone." output "Thanks for using this installation script. Donations welcome" # check if link file @@ -191,10 +147,26 @@ sudo chmod +x /var/stratum/config/run.sh clear output "Making Web Server Magic Happen!" # adding user to group, creating dir structure, setting permissions - sudo mkdir -p /var/www/$server_name/html + sudo mkdir -p /var/www/$server_name/html output "Creating webserver initial config file" output "" +#Making Nginx a bit hard +echo 'map $http_user_agent $blockedagent { +default 0; +~*malicious 1; +~*bot 1; +~*backdoor 1; +~*crawler 1; +~*bandit 1; +} +' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 + echo 'include /etc/nginx/blockuseragents.rules; + server_tokens off; + add_header X-Frame-Options SAMEORIGIN; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://ssl.google-analytics.com https://assets.zendesk.com https://connect.facebook.net; img-src 'self' https://ssl.google-analytics.com https://s-static.ak.facebook.com https://assets.zendesk.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://assets.zendesk.com; font-src 'self' https://themes.googleusercontent.com; frame-src https://assets.zendesk.com https://www.facebook.com https://s-static.ak.facebook.com https://tautt.zendesk.com; object-src 'none'"; server { if ($blockedagent) { return 403; @@ -275,23 +247,29 @@ echo 'include /etc/nginx/blockuseragents.rules; } ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 -sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf -sudo ln -s /var/web /var/www/$server_name/html -sudo service nginx restart + sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf + sudo ln -s /var/web /var/www/$server_name/html + sudo service nginx restart if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then - output "Install LetsEncrypt and setting SSL" - sudo aptitude -y install letsencrypt - sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" - sudo rm /etc/nginx/sites-available/$server_name.conf - sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 - # I am SSL Man! -echo 'include /etc/nginx/blockuseragents.rules; + output "Install LetsEncrypt and setting SSL" + sudo aptitude -y install letsencrypt + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" + sudo rm /etc/nginx/sites-available/$server_name.conf + sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 + # I am SSL Man! + echo 'include /etc/nginx/blockuseragents.rules; + server_tokens off; + add_header X-Frame-Options SAMEORIGIN; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://ssl.google-analytics.com https://assets.zendesk.com https://connect.facebook.net; img-src 'self' https://ssl.google-analytics.com https://s-static.ak.facebook.com https://assets.zendesk.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://assets.zendesk.com; font-src 'self' https://themes.googleusercontent.com; frame-src https://assets.zendesk.com https://www.facebook.com https://s-static.ak.facebook.com https://tautt.zendesk.com; object-src 'none'"; server { if ($blockedagent) { return 403; } if ($request_method !~ ^(GET|HEAD|POST)$) { return 444; + } listen 80; listen [::]:80; @@ -307,110 +285,107 @@ echo 'include /etc/nginx/blockuseragents.rules; if ($request_method !~ ^(GET|HEAD|POST)$) { return 444; } - listen 443 ssl http2; - listen [::]:443 ssl http2; - server_name '"${server_name}"' www.'"${server_name}"'; - - root /var/www/'"${server_name}"'/html/web; - index index.php; + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name '"${server_name}"' www.'"${server_name}"'; - access_log /var/log/nginx/'"${server_name}"'.app-accress.log; - error_log /var/log/nginx/'"${server_name}"'.app-error.log error; + root /var/www/'"${server_name}"'/html/web; + index index.php; + + ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; + + access_log /var/log/nginx/'"${server_name}"'.app-accress.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log error; + + ssl_session_cache shared:SSL:50m; + ssl_session_timeout 1d; + ssl_session_tickets off; + + ssl_dhparam /etc/nginx/ssl/dhparam.pem; + ssl_prefer_server_ciphers on; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - # allow larger file uploads and longer script runtimes client_body_buffer_size 50k; client_header_buffer_size 50k; client_max_body_size 50k; large_client_header_buffers 2 50k; - sendfile off; - - # strengthen ssl security - ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; - ssl_dhparam /etc/ssl/certs/dhparam.pem; - - # Add headers to serve security related headers - add_header Strict-Transport-Security "max-age=15768000; preload;"; - add_header X-Content-Type-Options nosniff; - add_header X-XSS-Protection "1; mode=block"; - add_header X-Robots-Tag none; - add_header Content-Security-Policy "frame-ancestors 'self'"; - + sendfile off; + + ssl_session_cache shared:SSL:10m; + ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS'; location / { try_files $uri $uri/ /index.php?$args; - } + } + location @rewrite { rewrite ^/(.*)$ /index.php?r=$1; - } - - - location ~ ^/index\.php$ { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_intercept_errors off; - fastcgi_buffer_size 16k; - fastcgi_buffers 4 16k; - fastcgi_connect_timeout 300; - fastcgi_send_timeout 300; - fastcgi_read_timeout 300; - include /etc/nginx/fastcgi_params; - try_files $uri $uri/ =404; - } - location ~ \.php$ { - return 404; - } - - location ~ \.sh { - return 404; - } + } + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + include /etc/nginx/fastcgi_params; + try_files $uri $uri/ =404; + } + + location ~ \.php$ { + return 404; + } + + location ~ \.sh { + return 404; + } - location ~ /\.ht { - deny all; - } - location /phpmyadmin { - root /usr/share/; - index index.php; - try_files $uri $uri/ =404; - - location ~ ^/phpmyadmin/(doc|sql|setup)/ { - deny all; - } + location ~ /\.ht { + deny all; + } + + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } - location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.0-fpm.sock; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include fastcgi_params; - include snippets/fastcgi-php.conf; - } - } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } } +} ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi -sudo service nginx restart -sudo service php7.0-fpm reload - clear - output "Now for the database fun!" - # create database - Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" - Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" - Q3="FLUSH PRIVILEGES;" - SQL="${Q1}${Q2}${Q3}" - sudo mysql -u root -p="" -e "$SQL" - # create stratum user - Q1="GRANT ALL ON *.* TO 'stratum'@'localhost' IDENTIFIED BY '$password2';" - Q2="FLUSH PRIVILEGES;" - SQL="${Q1}${Q2}" - sudo mysql -u root -p="" -e "$SQL" + sudo service nginx restart + sudo service php7.0-fpm reload + clear + output "Now for the database fun!" + # create database + Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" + Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" + Q3="FLUSH PRIVILEGES;" + SQL="${Q1}${Q2}${Q3}" + sudo mysql -u root -p="" -e "$SQL" + # create stratum user + Q1="GRANT ALL ON *.* TO 'stratum'@'localhost' IDENTIFIED BY '$password2';" + Q2="FLUSH PRIVILEGES;" + SQL="${Q1}${Q2}" + sudo mysql -u root -p="" -e "$SQL" - #Create my.cnf + #Create my.cnf echo ' [clienthost1] @@ -455,37 +430,36 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); ' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 - output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" - output "" - output "BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" - output "" + output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" + output "" + output "BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" + output "" - output "Peforming the SQL import" - output "" - cd ~ - cd yiimp/sql - # import sql dump - sudo zcat 2016-04-03-yaamp.sql.gz | sudo mysql --defaults-group-suffix=host1 - # oh the humanity! - sudo mysql --defaults-group-suffix=host1 --force < 2016-04-24-market_history.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-04-27-settings.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-05-11-coins.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-05-15-benchmarks.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-05-23-bookmarks.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-06-01-notifications.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-06-04-bench_chips.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-11-23-coins.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-02-05-benchmarks.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-03-31-earnings_index.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-05-accounts_case_swaptime.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-06-payouts_coinid_memo.sql - - clear - output "Generating a basic serverconfig.php" - output "" - # make config file -echo ' - 2.0, - '"'"'scrypt'"'"' => 20.0, - '"'"'sha256'"'"' => 5.0, +// $configFixedPoolFees = array( +// '"'"'zr5'"'"' => 2.0, +// '"'"'scrypt'"'"' => 20.0, +// '"'"'sha256'"'"' => 5.0, ); // Sample custom stratum ports @@ -576,35 +552,37 @@ $configAlgoNormCoef = array( ); ' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 -output "Updating stratum config files with database connection info." -output "" -cd /var/stratum/config -sudo sed -i 's/password = tu8tu5/password = '$blckntifypass'/g' *.conf -sudo sed -i 's/server = yaamp.com/server = '$server_name'/g' *.conf -sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf -sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf -sudo sed -i 's/username = root/username = stratum/g' *.conf -sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf -cd ~ - - -output "Final Directory permissions" -output "" -whoami=`whoami` -sudo usermod -aG www-data $whoami -sudo chown -R www-data:www-data /var/log -sudo chown -R www-data:www-data /var/stratum -sudo chown -R www-data:www-data /var/web -sudo chmod -R 775 /var/www/$server_name/html -sudo chmod -R 775 /var/web -sudo chmod -R 775 /var/stratum -sudo chmod -R 775 /var/web/yaamp/runtime -sudo chmod -R 775 /root/backup/ -sudo chmod -R 775 /var/log -sudo chmod -R 775 /var/web/serverconfig.php -sudo service nginx restart -sudo service php7.0-fpm reload -clear + output "Updating stratum config files with database connection info." + output "" + cd /var/stratum/config + sudo sed -i 's/password = tu8tu5/password = '$blckntifypass'/g' *.conf + sudo sed -i 's/server = yaamp.com/server = '$server_name'/g' *.conf + sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf + sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf + sudo sed -i 's/username = root/username = stratum/g' *.conf + sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf + cd /var/web + + + output "Final Directory permissions" + output "" + whoami=`whoami` + sudo usermod -aG www-data $whoami + sudo chown -R www-data:www-data /var/log + sudo chown -R www-data:www-data /var/stratum + sudo chown -R www-data:www-data /var/web + sudo chmod -R 775 /var/www/$server_name/html + sudo chmod -R 775 /var/web + sudo chmod -R 775 /var/stratum + sudo chmod -R 775 /var/web/yaamp/runtime + sudo chmod -R 775 /$HOME/backup/ + sudo chmod -R 775 /var/log + sudo chmod -R 775 /var/web/serverconfig.php + sudo mv /$HOME/yiimp /$HOME/yiimp-install-folder-only-do-not-for-use + sudo service nginx restart + sudo service php7.0-fpm reload + clear + clear output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." output "" output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." From 1b554ea71406bbdf79f864028e4906c031eb5982 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sat, 23 Sep 2017 21:39:35 -0400 Subject: [PATCH 043/360] Update install.sh --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index ac728149..5b2f7104 100644 --- a/install.sh +++ b/install.sh @@ -259,6 +259,7 @@ echo 'include /etc/nginx/blockuseragents.rules; # I am SSL Man! echo 'include /etc/nginx/blockuseragents.rules; server_tokens off; + add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; add_header X-Frame-Options SAMEORIGIN; add_header X-Content-Type-Options nosniff; add_header X-XSS-Protection "1; mode=block"; @@ -302,7 +303,7 @@ echo 'include /etc/nginx/blockuseragents.rules; ssl_session_timeout 1d; ssl_session_tickets off; - ssl_dhparam /etc/nginx/ssl/dhparam.pem; + ssl_dhparam /etc/ssl/certs/dhparam.pem; ssl_prefer_server_ciphers on; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; From ac869e2ca67342c825d5b3adfe4a35c994ea7924 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sat, 23 Sep 2017 22:49:41 -0400 Subject: [PATCH 044/360] dded UFW and Ports --- install.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/install.sh b/install.sh index 5b2f7104..c9677412 100644 --- a/install.sh +++ b/install.sh @@ -31,6 +31,7 @@ output "" read -e -p "Please enter a new location for /site/adminRights this is to customize the admin entrance url (e.g. myAdminpanel) : " admin_panel read -e -p "Enter your Public IP for admin access (http://www.whatsmyip.org/) : " Public read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban + read -e -p "Install UFW and configure ports? [Y/n] : " UFW read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install @@ -90,6 +91,43 @@ output "" if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then sudo aptitude -y install fail2ban fi + if [[ ("$UFW" == "y" || "$UFW" == "Y" || "$UFW" == "") ]]; then + sudo apt-get install ufw + sudo ufw default deny incoming + sudo ufw default allow outgoing + sudo ufw allow ssh + sudo ufw allow http + sudo ufw allow https + sudo ufw allow 2142/tcp + sudo ufw allow 3739/tcp + sudo ufw allow 3525/tcp + sudo ufw allow 4233/tcp + sudo ufw allow 3747/tcp + sudo ufw allow 5033/tcp + sudo ufw allow 4262/tcp + sudo ufw allow 3737/tcp + sudo ufw allow 3556/tcp + sudo ufw allow 3553/tcp + sudo ufw allow 4633/tcp + sudo ufw allow 8433/tcp + sudo ufw allow 3555/tcp + sudo ufw allow 3833/tcp + sudo ufw allow 4533/tcp + sudo ufw allow 4133/tcp + sudo ufw allow 5339/tcp + sudo ufw allow 8533/tcp + sudo ufw allow 3334/tcp + sudo ufw allow 4933/tcp + sudo ufw allow 3333/tcp + sudo ufw allow 6033/tcp + sudo ufw allow 3739/tcp + sudo ufw allow 5766/tcp + sudo ufw allow 3533/tcp + sudo ufw allow 4033/tcp + sudo ufw allow 3433/tcp + sudo ufw allow 3633/tcp + sudo ufw enable + fi clear output "Installing phpmyadmin" From 8882ae8c6b5493d0c6c2d0f0e3ff95fb97b48921 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sat, 23 Sep 2017 23:12:30 -0400 Subject: [PATCH 045/360] Update install.sh --- install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index c9677412..d1eac341 100644 --- a/install.sh +++ b/install.sh @@ -120,13 +120,12 @@ output "" sudo ufw allow 4933/tcp sudo ufw allow 3333/tcp sudo ufw allow 6033/tcp - sudo ufw allow 3739/tcp sudo ufw allow 5766/tcp sudo ufw allow 3533/tcp sudo ufw allow 4033/tcp sudo ufw allow 3433/tcp sudo ufw allow 3633/tcp - sudo ufw enable + sudo ufw --force enable fi clear @@ -147,7 +146,7 @@ output "" #Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` cd ~ - git clone https://github.com/crombiecrunch/yiimp-reloaded.git + git clone https://github.com/crombiecrunch/yiimp-reloaded.git yiimp cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp sudo make From 1d7e4c571a4f432cba2d2043c9eeb7600c2904f6 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 24 Sep 2017 00:54:59 -0400 Subject: [PATCH 046/360] Update install.sh --- install.sh | 180 ++++++++++++++++++++++++++--------------------------- 1 file changed, 88 insertions(+), 92 deletions(-) diff --git a/install.sh b/install.sh index d1eac341..da8908c8 100644 --- a/install.sh +++ b/install.sh @@ -164,29 +164,29 @@ output "" sudo mkdir -p /var/stratum cd $HOME/yiimp/stratum sudo cp -a config.sample/. /var/stratum/config - sudo cp -r stratum /var/stratum - sudo cp -r run.sh /var/stratum - cd $HOME/yiimp - sudo cp -a $HOME/yiimp/bin/. /bin/ - sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum - sudo mkdir -p /etc/yiimp - sudo mkdir -p /$HOME/backup/ - sudo cp -r $HOME/yiimp/var/web/keys.sample.php /etc/yiimp/ - output "Update default timezone." - output "Thanks for using this installation script. Donations welcome" +sudo cp -r stratum /var/stratum +sudo cp -r run.sh /var/stratum +cd $HOME/yiimp +sudo cp -a $HOME/yiimp/bin/. /bin/ +sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum +sudo mkdir -p /etc/yiimp +sudo mkdir -p /$HOME/backup/ +sudo cp -r $HOME/yiimp/var/web/keys.sample.php /etc/yiimp/ +output "Update default timezone." +output "Thanks for using this installation script. Donations welcome" # check if link file - sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime +sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime # update time zone - sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime - sudo aptitude -y install ntpdate +sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime +sudo aptitude -y install ntpdate # write time to clock. - sudo hwclock -w - clear - output "Making Web Server Magic Happen!" +sudo hwclock -w +clear +output "Making Web Server Magic Happen!" # adding user to group, creating dir structure, setting permissions - sudo mkdir -p /var/www/$server_name/html - output "Creating webserver initial config file" - output "" +sudo mkdir -p /var/www/$server_name/html +output "Creating webserver initial config file" +output "" #Making Nginx a bit hard echo 'map $http_user_agent $blockedagent { default 0; @@ -407,26 +407,25 @@ echo 'include /etc/nginx/blockuseragents.rules; ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - sudo service nginx restart - sudo service php7.0-fpm reload - clear - output "Now for the database fun!" +sudo service nginx restart +sudo service php7.0-fpm reload +clear +output "Now for the database fun!" # create database - Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" - Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" - Q3="FLUSH PRIVILEGES;" - SQL="${Q1}${Q2}${Q3}" - sudo mysql -u root -p="" -e "$SQL" +Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" +Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" +Q3="FLUSH PRIVILEGES;" +SQL="${Q1}${Q2}${Q3}" +sudo mysql -u root -p="" -e "$SQL" # create stratum user - Q1="GRANT ALL ON *.* TO 'stratum'@'localhost' IDENTIFIED BY '$password2';" - Q2="FLUSH PRIVILEGES;" - SQL="${Q1}${Q2}" - sudo mysql -u root -p="" -e "$SQL" +Q1="GRANT ALL ON *.* TO 'stratum'@'localhost' IDENTIFIED BY '$password2';" +Q2="FLUSH PRIVILEGES;" +SQL="${Q1}${Q2}" +sudo mysql -u root -p="" -e "$SQL" #Create my.cnf - echo ' -[clienthost1] +echo '[clienthost1] user=panel password='"${password}"' database=yiimpfrontend @@ -468,33 +467,33 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); ' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 - output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" - output "" - output "BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" - output "" +output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" +output "" +output "BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" +output "" - output "Peforming the SQL import" - output "" - cd ~ - cd yiimp/sql +output "Peforming the SQL import" +output "" +cd ~ +cd yiimp/sql # import sql dump - sudo zcat 2016-04-03-yaamp.sql.gz | sudo mysql --defaults-group-suffix=host1 +sudo zcat 2016-04-03-yaamp.sql.gz | sudo mysql --defaults-group-suffix=host1 # oh the humanity! - sudo mysql --defaults-group-suffix=host1 --force < 2016-04-24-market_history.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-04-27-settings.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-05-11-coins.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-05-15-benchmarks.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-05-23-bookmarks.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-06-01-notifications.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-06-04-bench_chips.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-11-23-coins.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-02-05-benchmarks.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-03-31-earnings_index.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-05-accounts_case_swaptime.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-06-payouts_coinid_memo.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-09-notifications.sql - clear - output "Generating a basic serverconfig.php" +sudo mysql --defaults-group-suffix=host1 --force < 2016-04-24-market_history.sql +sudo mysql --defaults-group-suffix=host1 --force < 2016-04-27-settings.sql +sudo mysql --defaults-group-suffix=host1 --force < 2016-05-11-coins.sql +sudo mysql --defaults-group-suffix=host1 --force < 2016-05-15-benchmarks.sql +sudo mysql --defaults-group-suffix=host1 --force < 2016-05-23-bookmarks.sql +sudo mysql --defaults-group-suffix=host1 --force < 2016-06-01-notifications.sql +sudo mysql --defaults-group-suffix=host1 --force < 2016-06-04-bench_chips.sql +sudo mysql --defaults-group-suffix=host1 --force < 2016-11-23-coins.sql +sudo mysql --defaults-group-suffix=host1 --force < 2017-02-05-benchmarks.sql +sudo mysql --defaults-group-suffix=host1 --force < 2017-03-31-earnings_index.sql +sudo mysql --defaults-group-suffix=host1 --force < 2017-05-accounts_case_swaptime.sql +sudo mysql --defaults-group-suffix=host1 --force < 2017-06-payouts_coinid_memo.sql +sudo mysql --defaults-group-suffix=host1 --force < 2017-09-notifications.sql +clear +output "Generating a basic serverconfig.php" output "" # make config file echo '/dev/null 2>&1 - output "Updating stratum config files with database connection info." - output "" - cd /var/stratum/config - sudo sed -i 's/password = tu8tu5/password = '$blckntifypass'/g' *.conf - sudo sed -i 's/server = yaamp.com/server = '$server_name'/g' *.conf - sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf - sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf - sudo sed -i 's/username = root/username = stratum/g' *.conf - sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf - cd /var/web - - - output "Final Directory permissions" - output "" - whoami=`whoami` - sudo usermod -aG www-data $whoami - sudo chown -R www-data:www-data /var/log - sudo chown -R www-data:www-data /var/stratum - sudo chown -R www-data:www-data /var/web - sudo chmod -R 775 /var/www/$server_name/html - sudo chmod -R 775 /var/web - sudo chmod -R 775 /var/stratum - sudo chmod -R 775 /var/web/yaamp/runtime - sudo chmod -R 775 /$HOME/backup/ - sudo chmod -R 775 /var/log - sudo chmod -R 775 /var/web/serverconfig.php - sudo mv /$HOME/yiimp /$HOME/yiimp-install-folder-only-do-not-for-use - sudo service nginx restart - sudo service php7.0-fpm reload - clear - clear +output "Updating stratum config files with database connection info." +output "" +cd /var/stratum/config +sudo sed -i 's/password = tu8tu5/password = '$blckntifypass'/g' *.conf +sudo sed -i 's/server = yaamp.com/server = '$server_name'/g' *.conf +sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf +sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf +sudo sed -i 's/username = root/username = stratum/g' *.conf +sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf +cd /var/web + + +output "Final Directory permissions" +output "" +whoami=`whoami` +sudo usermod -aG www-data $whoami +sudo chown -R www-data:www-data /var/log +sudo chown -R www-data:www-data /var/stratum +sudo chown -R www-data:www-data /var/web +sudo chmod -R 775 /var/www/$server_name/html +sudo chmod -R 775 /var/web +sudo chmod -R 775 /var/stratum +sudo chmod -R 775 /var/web/yaamp/runtime +sudo chmod -R 775 /$HOME/backup/ +sudo chmod -R 775 /var/log +sudo chmod -R 775 /var/web/serverconfig.php +sudo mv /$HOME/yiimp /$HOME/yiimp-install-folder-only-do-not-for-use +sudo service nginx restart +sudo service php7.0-fpm reload +clear +clear output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." output "" output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." From 162b7ad921565a1728c83de021ba90817839fece Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sun, 24 Sep 2017 02:03:58 -0400 Subject: [PATCH 047/360] Update install.sh --- install.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install.sh b/install.sh index da8908c8..fba08486 100644 --- a/install.sh +++ b/install.sh @@ -203,7 +203,6 @@ echo 'include /etc/nginx/blockuseragents.rules; add_header X-Frame-Options SAMEORIGIN; add_header X-Content-Type-Options nosniff; add_header X-XSS-Protection "1; mode=block"; - add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://ssl.google-analytics.com https://assets.zendesk.com https://connect.facebook.net; img-src 'self' https://ssl.google-analytics.com https://s-static.ak.facebook.com https://assets.zendesk.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://assets.zendesk.com; font-src 'self' https://themes.googleusercontent.com; frame-src https://assets.zendesk.com https://www.facebook.com https://s-static.ak.facebook.com https://tautt.zendesk.com; object-src 'none'"; server { if ($blockedagent) { return 403; @@ -300,7 +299,6 @@ echo 'include /etc/nginx/blockuseragents.rules; add_header X-Frame-Options SAMEORIGIN; add_header X-Content-Type-Options nosniff; add_header X-XSS-Protection "1; mode=block"; - add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://ssl.google-analytics.com https://assets.zendesk.com https://connect.facebook.net; img-src 'self' https://ssl.google-analytics.com https://s-static.ak.facebook.com https://assets.zendesk.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://assets.zendesk.com; font-src 'self' https://themes.googleusercontent.com; frame-src https://assets.zendesk.com https://www.facebook.com https://s-static.ak.facebook.com https://tautt.zendesk.com; object-src 'none'"; server { if ($blockedagent) { return 403; @@ -350,7 +348,6 @@ echo 'include /etc/nginx/blockuseragents.rules; large_client_header_buffers 2 50k; sendfile off; - ssl_session_cache shared:SSL:10m; ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS'; location / { try_files $uri $uri/ /index.php?$args; @@ -569,7 +566,7 @@ $cold_wallet_table = array( ); // Sample fixed pool fees -// $configFixedPoolFees = array( +$configFixedPoolFees = array( // '"'"'zr5'"'"' => 2.0, // '"'"'scrypt'"'"' => 20.0, // '"'"'sha256'"'"' => 5.0, From cf293e870c20ab971e00959e4cbfbbe85a6285cf Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Mon, 25 Sep 2017 16:23:41 -0400 Subject: [PATCH 048/360] Update install.sh --- install.sh | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/install.sh b/install.sh index fba08486..b90eac15 100644 --- a/install.sh +++ b/install.sh @@ -146,7 +146,7 @@ output "" #Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` cd ~ - git clone https://github.com/crombiecrunch/yiimp-reloaded.git yiimp + git clone https://github.com/tpruvot/yiimp.git cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp sudo make @@ -172,6 +172,22 @@ sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum sudo mkdir -p /etc/yiimp sudo mkdir -p /$HOME/backup/ sudo cp -r $HOME/yiimp/var/web/keys.sample.php /etc/yiimp/ +#fixing yiimp + sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp + #fixing run.sh + sudo rm -r /var/stratum/config/run.sh +echo ' +#!/bin/bash +ulimit -n 10240 +ulimit -u 10240 +cd /var/stratum +while true; do + ./stratum /var/stratum/config/$1 + sleep 2 +done +exec bash +' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 +sudo chmod +x /var/stratum/config/run.sh output "Update default timezone." output "Thanks for using this installation script. Donations welcome" # check if link file @@ -334,10 +350,6 @@ echo 'include /etc/nginx/blockuseragents.rules; access_log /var/log/nginx/'"${server_name}"'.app-accress.log; error_log /var/log/nginx/'"${server_name}"'.app-error.log error; - ssl_session_cache shared:SSL:50m; - ssl_session_timeout 1d; - ssl_session_tickets off; - ssl_dhparam /etc/ssl/certs/dhparam.pem; ssl_prefer_server_ciphers on; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; @@ -599,16 +611,11 @@ output "Final Directory permissions" output "" whoami=`whoami` sudo usermod -aG www-data $whoami -sudo chown -R www-data:www-data /var/log -sudo chown -R www-data:www-data /var/stratum -sudo chown -R www-data:www-data /var/web -sudo chmod -R 775 /var/www/$server_name/html -sudo chmod -R 775 /var/web -sudo chmod -R 775 /var/stratum -sudo chmod -R 775 /var/web/yaamp/runtime -sudo chmod -R 775 /$HOME/backup/ -sudo chmod -R 775 /var/log -sudo chmod -R 775 /var/web/serverconfig.php +sudo find /var/web -type d -exec chmod 755 {} + +sudo find /var/web -type f -exec chmod 644 {} + +sudo chgrp $whoami /var/yaamp/runtime +sudo chmod g+w /var/yaamp/runtime +sudo chmod -R 777 /$HOME/backup/ sudo mv /$HOME/yiimp /$HOME/yiimp-install-folder-only-do-not-for-use sudo service nginx restart sudo service php7.0-fpm reload From 9ae3466e9417410b4a83bff46b116c330011cddc Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Mon, 25 Sep 2017 16:48:39 -0400 Subject: [PATCH 049/360] Update install.sh --- install.sh | 381 ++++++++++++++++++++++++++--------------------------- 1 file changed, 188 insertions(+), 193 deletions(-) diff --git a/install.sh b/install.sh index b90eac15..a7181044 100644 --- a/install.sh +++ b/install.sh @@ -6,7 +6,7 @@ # # Program: # Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.x -# BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD +# BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y # ################################################################################ output() { @@ -34,9 +34,8 @@ output "" read -e -p "Install UFW and configure ports? [Y/n] : " UFW read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install - clear - output "If you found this helpful, please donate to BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" + output "If you found this helpful, please donate to BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y" output "" output "Updating system and installing required packages." output "" @@ -56,6 +55,16 @@ output "" sudo rm /etc/nginx/sites-enabled/default sudo service nginx start sudo service cron start + #Making Nginx a bit hard + echo 'map $http_user_agent $blockedagent { +default 0; +~*malicious 1; +~*bot 1; +~*backdoor 1; +~*crawler 1; +~*bandit 1; +} +' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 output "Installing Mariadb Server." output "" @@ -79,6 +88,7 @@ output "" sudo aptitude -y install gnutls-dev sudo aptitude -y install librtmp-dev sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils + sudo aptitude -y install sendmail sudo aptitude -y install git sudo aptitude -y install pwgen -y clear @@ -87,6 +97,24 @@ output "" password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` AUTOGENERATED_PASS=`pwgen -c -1 20` + output "Testing to see if server emails are sent" + output "" + if [[ "$root_email" != "" ]]; then + echo $root_email > sudo tee --append ~/.email + echo $root_email > sudo tee --append ~/.forward + + if [[ ("$send_email" == "y" || "$send_email" == "Y" || "$send_email" == "") ]]; then + echo "This is a mail test for the SMTP Service." > sudo tee --append /tmp/email.message + echo "You should receive this !" >> sudo tee --append /tmp/email.message + echo "" >> sudo tee --append /tmp/email.message + echo "Cheers" >> sudo tee --append /tmp/email.message + sudo sendmail -s "SMTP Testing" $root_email < sudo tee --append /tmp/email.message + + sudo rm -f /tmp/email.message + echo "Mail sent" + fi + fi + output "Some optional installs" if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then sudo aptitude -y install fail2ban @@ -171,7 +199,6 @@ sudo cp -a $HOME/yiimp/bin/. /bin/ sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum sudo mkdir -p /etc/yiimp sudo mkdir -p /$HOME/backup/ -sudo cp -r $HOME/yiimp/var/web/keys.sample.php /etc/yiimp/ #fixing yiimp sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp #fixing run.sh @@ -188,37 +215,22 @@ done exec bash ' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 sudo chmod +x /var/stratum/config/run.sh -output "Update default timezone." -output "Thanks for using this installation script. Donations welcome" + output "Update default timezone." + output "Thanks for using this installation script. Donations welcome" # check if link file -sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime + sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime # update time zone -sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime -sudo aptitude -y install ntpdate + sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime + sudo aptitude -y install ntpdate # write time to clock. -sudo hwclock -w -clear -output "Making Web Server Magic Happen!" + sudo hwclock -w + clear + output "Making Web Server Magic Happen!" # adding user to group, creating dir structure, setting permissions -sudo mkdir -p /var/www/$server_name/html -output "Creating webserver initial config file" -output "" -#Making Nginx a bit hard -echo 'map $http_user_agent $blockedagent { -default 0; -~*malicious 1; -~*bot 1; -~*backdoor 1; -~*crawler 1; -~*bandit 1; -} -' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 - + sudo mkdir -p /var/www/$server_name/html + output "Creating webserver initial config file" + output "" echo 'include /etc/nginx/blockuseragents.rules; - server_tokens off; - add_header X-Frame-Options SAMEORIGIN; - add_header X-Content-Type-Options nosniff; - add_header X-XSS-Protection "1; mode=block"; server { if ($blockedagent) { return 403; @@ -270,7 +282,6 @@ echo 'include /etc/nginx/blockuseragents.rules; location ~ \.php$ { return 404; } - location ~ \.sh { return 404; } @@ -284,11 +295,9 @@ echo 'include /etc/nginx/blockuseragents.rules; root /usr/share/; index index.php; try_files $uri $uri/ =404; - location ~ ^/phpmyadmin/(doc|sql|setup)/ { deny all; } - location ~ /phpmyadmin/(.+\.php)$ { fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; @@ -299,29 +308,23 @@ echo 'include /etc/nginx/blockuseragents.rules; } ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 - sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf - sudo ln -s /var/web /var/www/$server_name/html - sudo service nginx restart +sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf +sudo ln -s /var/web /var/www/$server_name/html +sudo service nginx restart if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then - output "Install LetsEncrypt and setting SSL" - sudo aptitude -y install letsencrypt - sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" - sudo rm /etc/nginx/sites-available/$server_name.conf - sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 - # I am SSL Man! - echo 'include /etc/nginx/blockuseragents.rules; - server_tokens off; - add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; - add_header X-Frame-Options SAMEORIGIN; - add_header X-Content-Type-Options nosniff; - add_header X-XSS-Protection "1; mode=block"; + output "Install LetsEncrypt and setting SSL" + sudo aptitude -y install letsencrypt + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" + sudo rm /etc/nginx/sites-available/$server_name.conf + sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 + # I am SSL Man! +echo 'include /etc/nginx/blockuseragents.rules; server { if ($blockedagent) { return 403; } if ($request_method !~ ^(GET|HEAD|POST)$) { return 444; - } listen 80; listen [::]:80; @@ -337,104 +340,110 @@ echo 'include /etc/nginx/blockuseragents.rules; if ($request_method !~ ^(GET|HEAD|POST)$) { return 444; } - listen 443 ssl http2; - listen [::]:443 ssl http2; - server_name '"${server_name}"' www.'"${server_name}"'; + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name '"${server_name}"' www.'"${server_name}"'; - root /var/www/'"${server_name}"'/html/web; - index index.php; - - ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; - - access_log /var/log/nginx/'"${server_name}"'.app-accress.log; - error_log /var/log/nginx/'"${server_name}"'.app-error.log error; - - ssl_dhparam /etc/ssl/certs/dhparam.pem; - ssl_prefer_server_ciphers on; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + root /var/www/'"${server_name}"'/html/web; + index index.php; + access_log /var/log/nginx/'"${server_name}"'.app-accress.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log error; + + # allow larger file uploads and longer script runtimes client_body_buffer_size 50k; client_header_buffer_size 50k; client_max_body_size 50k; large_client_header_buffers 2 50k; - sendfile off; - - ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS'; + sendfile off; + + # strengthen ssl security + ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + ssl_dhparam /etc/ssl/certs/dhparam.pem; + + # Add headers to serve security related headers + add_header Strict-Transport-Security "max-age=15768000; preload;"; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header Content-Security-Policy "frame-ancestors 'self'"; + location / { try_files $uri $uri/ /index.php?$args; - } - + } location @rewrite { rewrite ^/(.*)$ /index.php?r=$1; - } - - location ~ ^/index\.php$ { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_intercept_errors off; - fastcgi_buffer_size 16k; - fastcgi_buffers 4 16k; - fastcgi_connect_timeout 300; - fastcgi_send_timeout 300; - fastcgi_read_timeout 300; - include /etc/nginx/fastcgi_params; - try_files $uri $uri/ =404; - } - - location ~ \.php$ { - return 404; - } - - location ~ \.sh { - return 404; - } + } + - location ~ /\.ht { - deny all; - } - - location /phpmyadmin { - root /usr/share/; - index index.php; - try_files $uri $uri/ =404; - location ~ ^/phpmyadmin/(doc|sql|setup)/ { - deny all; - } - - location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.0-fpm.sock; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include fastcgi_params; - include snippets/fastcgi-php.conf; - } + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + include /etc/nginx/fastcgi_params; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + + location ~ /\.ht { + deny all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } } -} ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi sudo service nginx restart sudo service php7.0-fpm reload -clear -output "Now for the database fun!" - # create database -Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" -Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" -Q3="FLUSH PRIVILEGES;" -SQL="${Q1}${Q2}${Q3}" -sudo mysql -u root -p="" -e "$SQL" - # create stratum user -Q1="GRANT ALL ON *.* TO 'stratum'@'localhost' IDENTIFIED BY '$password2';" -Q2="FLUSH PRIVILEGES;" -SQL="${Q1}${Q2}" -sudo mysql -u root -p="" -e "$SQL" + clear + output "Now for the database fun!" + # create database + Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" + Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" + Q3="FLUSH PRIVILEGES;" + SQL="${Q1}${Q2}${Q3}" + sudo mysql -u root -p="" -e "$SQL" + # create stratum user + Q1="GRANT ALL ON *.* TO 'stratum'@'localhost' IDENTIFIED BY '$password2';" + Q2="FLUSH PRIVILEGES;" + SQL="${Q1}${Q2}" + sudo mysql -u root -p="" -e "$SQL" - #Create my.cnf + #Create my.cnf -echo '[clienthost1] + echo ' +[clienthost1] user=panel password='"${password}"' database=yiimpfrontend @@ -454,10 +463,8 @@ password='"${rootpasswd}"' echo ' '"'"'); define('"'"'EXCH_BITSTAMP_SECRET'"'"','"'"''"'"'); @@ -476,51 +483,49 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); ' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 -output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" -output "" -output "BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" -output "" + output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" + output "" + output "BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y" + output "" -output "Peforming the SQL import" -output "" -cd ~ -cd yiimp/sql - # import sql dump -sudo zcat 2016-04-03-yaamp.sql.gz | sudo mysql --defaults-group-suffix=host1 - # oh the humanity! -sudo mysql --defaults-group-suffix=host1 --force < 2016-04-24-market_history.sql -sudo mysql --defaults-group-suffix=host1 --force < 2016-04-27-settings.sql -sudo mysql --defaults-group-suffix=host1 --force < 2016-05-11-coins.sql -sudo mysql --defaults-group-suffix=host1 --force < 2016-05-15-benchmarks.sql -sudo mysql --defaults-group-suffix=host1 --force < 2016-05-23-bookmarks.sql -sudo mysql --defaults-group-suffix=host1 --force < 2016-06-01-notifications.sql -sudo mysql --defaults-group-suffix=host1 --force < 2016-06-04-bench_chips.sql -sudo mysql --defaults-group-suffix=host1 --force < 2016-11-23-coins.sql -sudo mysql --defaults-group-suffix=host1 --force < 2017-02-05-benchmarks.sql -sudo mysql --defaults-group-suffix=host1 --force < 2017-03-31-earnings_index.sql -sudo mysql --defaults-group-suffix=host1 --force < 2017-05-accounts_case_swaptime.sql -sudo mysql --defaults-group-suffix=host1 --force < 2017-06-payouts_coinid_memo.sql -sudo mysql --defaults-group-suffix=host1 --force < 2017-09-notifications.sql -clear -output "Generating a basic serverconfig.php" - output "" - # make config file -echo ' 0.3 define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); - // nicehash keys deposit account & amount to deposit at a time define('"'"'NICEHASH_API_KEY'"'"','"'"'521c254d-8cc7-4319-83d2-ac6c604b5b49'"'"'); define('"'"'NICEHASH_API_ID'"'"','"'"'9205'"'"'); define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3J9tapPoFCtouAZH7Th8HAPsD8aoykEHzk'"'"'); define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); - - $cold_wallet_table = array( - '"'"'16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD'"'"' => 0.10, + '"'"'1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y'"'"' => 0.10, ); - // Sample fixed pool fees $configFixedPoolFees = array( -// '"'"'zr5'"'"' => 2.0, -// '"'"'scrypt'"'"' => 20.0, -// '"'"'sha256'"'"' => 5.0, + '"'"'zr5'"'"' => 2.0, + '"'"'scrypt'"'"' => 20.0, + '"'"'sha256'"'"' => 5.0, ); - // Sample custom stratum ports $configCustomPorts = array( // '"'"'x11'"'"' => 7000, ); - // mBTC Coefs per algo (default is 1.0) $configAlgoNormCoef = array( // '"'"'x11'"'"' => 5.0, @@ -604,29 +598,30 @@ sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf sudo sed -i 's/username = root/username = stratum/g' *.conf sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf -cd /var/web +cd ~ output "Final Directory permissions" output "" whoami=`whoami` sudo usermod -aG www-data $whoami -sudo find /var/web -type d -exec chmod 755 {} + -sudo find /var/web -type f -exec chmod 644 {} + -sudo chgrp $whoami /var/yaamp/runtime -sudo chmod g+w /var/yaamp/runtime -sudo chmod -R 777 /$HOME/backup/ -sudo mv /$HOME/yiimp /$HOME/yiimp-install-folder-only-do-not-for-use +sudo chown -R www-data:www-data /var/log +sudo chown -R www-data:www-data /var/stratum +sudo chown -R www-data:www-data /var/web +sudo chmod -R 775 /var/www/$server_name/html +sudo chmod -R 775 /var/web +sudo chmod -R 775 /var/stratum +sudo chmod -R 775 /var/web/yaamp/runtime +sudo chmod -R 775 /root/backup/ +sudo chmod -R 775 /var/log +sudo chmod -R 775 /var/web/serverconfig.php sudo service nginx restart sudo service php7.0-fpm reload clear -clear output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." output "" output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." output "" output "Please make sure to add your public and private keys." output "" -output "If you found this script helpful please consider donating some BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" - - +output "If you found this script helpful please consider donating some BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y" From f7461ed8efd5430997d2f4a2df4f294d3da42b8f Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Tue, 10 Oct 2017 10:46:39 -0400 Subject: [PATCH 050/360] Update install.sh --- install.sh | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 201 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a7181044..aa7aac25 100644 --- a/install.sh +++ b/install.sh @@ -26,6 +26,7 @@ output "Make sure you double check before hitting enter! Only one shot at these! output "" read -e -p "Enter time zone (e.g. America/New_York) : " TIME read -e -p "Server name (no http:// or www. just example.com) : " server_name + read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL read -e -p "Set stratum to AutoExchange? i.e. mine any coinf with BTC address? [y/N] : " BTC read -e -p "Please enter a new location for /site/adminRights this is to customize the admin entrance url (e.g. myAdminpanel) : " admin_panel @@ -230,6 +231,204 @@ sudo chmod +x /var/stratum/config/run.sh sudo mkdir -p /var/www/$server_name/html output "Creating webserver initial config file" output "" + if [[ ("$sub_domain" == "y" || "$sub_domain" == "Y") ]]; then +echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"'; + root "/var/www/'"${server_name}"'/html/web"; + index index.html index.htm index.php; + charset utf-8; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + access_log off; + error_log /var/log/nginx/'"${server_name}"'.app-error.log error; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + location ~ /\.ht { + deny all; + } + location ~ /.well-known { + allow all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + +sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf +sudo ln -s /var/web /var/www/$server_name/html +sudo service nginx restart + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + output "Install LetsEncrypt and setting SSL" + sudo aptitude -y install letsencrypt + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" + sudo rm /etc/nginx/sites-available/$server_name.conf + sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 + # I am SSL Man! +echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"'; + # enforce https + return 301 https://$server_name$request_uri; + } + + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name '"${server_name}"'; + + root /var/www/'"${server_name}"'/html/web; + index index.php; + + access_log /var/log/nginx/'"${server_name}"'.app-accress.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log error; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + # strengthen ssl security + ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + ssl_dhparam /etc/ssl/certs/dhparam.pem; + + # Add headers to serve security related headers + add_header Strict-Transport-Security "max-age=15768000; preload;"; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header Content-Security-Policy "frame-ancestors 'self'"; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + include /etc/nginx/fastcgi_params; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + + location ~ /\.ht { + deny all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } + +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + fi +sudo service nginx restart +sudo service php7.0-fpm reload +fi echo 'include /etc/nginx/blockuseragents.rules; server { if ($blockedagent) { @@ -314,7 +513,7 @@ sudo service nginx restart if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then output "Install LetsEncrypt and setting SSL" sudo aptitude -y install letsencrypt - sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www.'"${server_name}"' sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 # I am SSL Man! @@ -426,6 +625,7 @@ echo 'include /etc/nginx/blockuseragents.rules; fi sudo service nginx restart sudo service php7.0-fpm reload + clear output "Now for the database fun!" # create database From 10eeed39eee22113364cca45ab847b3c78d59572 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Tue, 10 Oct 2017 10:49:32 -0400 Subject: [PATCH 051/360] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index aa7aac25..592e9bfa 100644 --- a/install.sh +++ b/install.sh @@ -513,7 +513,7 @@ sudo service nginx restart if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then output "Install LetsEncrypt and setting SSL" sudo aptitude -y install letsencrypt - sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www.'"${server_name}"' + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 # I am SSL Man! From a61358ca135d9f2212f097fa0928b40d57075951 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Fri, 13 Oct 2017 10:43:28 -0400 Subject: [PATCH 052/360] Update install.sh --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 592e9bfa..29a89771 100644 --- a/install.sh +++ b/install.sh @@ -428,7 +428,7 @@ echo 'include /etc/nginx/blockuseragents.rules; fi sudo service nginx restart sudo service php7.0-fpm reload -fi +else echo 'include /etc/nginx/blockuseragents.rules; server { if ($blockedagent) { @@ -625,7 +625,7 @@ echo 'include /etc/nginx/blockuseragents.rules; fi sudo service nginx restart sudo service php7.0-fpm reload - +fi clear output "Now for the database fun!" # create database From 7048cace5f5825336168267f9c40602635d05907 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Sat, 14 Oct 2017 19:16:50 -0400 Subject: [PATCH 053/360] Update install.sh --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 29a89771..9c7db0e0 100644 --- a/install.sh +++ b/install.sh @@ -815,6 +815,7 @@ sudo chmod -R 775 /var/web/yaamp/runtime sudo chmod -R 775 /root/backup/ sudo chmod -R 775 /var/log sudo chmod -R 775 /var/web/serverconfig.php +sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo service nginx restart sudo service php7.0-fpm reload clear From c7d0fe5e8a6c1f2a1dce788c58fa376898287a63 Mon Sep 17 00:00:00 2001 From: manfromafar Date: Tue, 31 Oct 2017 09:31:30 -0600 Subject: [PATCH 054/360] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 9c7db0e0..6da4a960 100644 --- a/install.sh +++ b/install.sh @@ -196,7 +196,7 @@ default 0; sudo cp -r stratum /var/stratum sudo cp -r run.sh /var/stratum cd $HOME/yiimp -sudo cp -a $HOME/yiimp/bin/. /bin/ +sudo cp -r $HOME/yiimp/bin/. /bin/ sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum sudo mkdir -p /etc/yiimp sudo mkdir -p /$HOME/backup/ From 7f40ffc5f6959d4bc68e2d9a1db2eefb4ca2b1fe Mon Sep 17 00:00:00 2001 From: manfromafar Date: Thu, 23 Nov 2017 09:10:48 -0700 Subject: [PATCH 055/360] Updated permissions and included new SQL entries Removed changing entire log dir from being owned by www-data plus removed logs from being executable. --- install.sh | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/install.sh b/install.sh index 6da4a960..839996b2 100644 --- a/install.sh +++ b/install.sh @@ -1,12 +1,12 @@ #!/bin/bash ################################################################################ -# Author: crombiecrunch -# -# Web: www.thecryptopool.com +# Original Author: crombiecrunch +# Current Author: manfromafar +# Web: yiimp.poolofd32th.club # # Program: # Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.x -# BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y +# BTC Donation: 18AwGT19befE4Z3siEiAzsF8n9MoJEifiH # ################################################################################ output() { @@ -36,7 +36,7 @@ output "" read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install clear - output "If you found this helpful, please donate to BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y" + output "If you found this helpful, please donate to BTC Donation: 18AwGT19befE4Z3siEiAzsF8n9MoJEifiH" output "" output "Updating system and installing required packages." output "" @@ -197,7 +197,7 @@ sudo cp -r stratum /var/stratum sudo cp -r run.sh /var/stratum cd $HOME/yiimp sudo cp -r $HOME/yiimp/bin/. /bin/ -sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum +sudo cp -r $HOME/yiimp/blocknotify/blocknotify /usr/local/bin/ sudo mkdir -p /etc/yiimp sudo mkdir -p /$HOME/backup/ #fixing yiimp @@ -708,6 +708,7 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); sudo mysql --defaults-group-suffix=host1 --force < 2017-05-accounts_case_swaptime.sql sudo mysql --defaults-group-suffix=host1 --force < 2017-06-payouts_coinid_memo.sql sudo mysql --defaults-group-suffix=host1 --force < 2017-09-notifications.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-10-bookmarks.sql clear output "Generating a basic serverconfig.php" @@ -737,10 +738,10 @@ define('"'"'YIIMP_PUBLIC_EXPLORER'"'"', true); define('"'"'YIIMP_PUBLIC_BENCHMARK'"'"', false); define('"'"'YIIMP_FIAT_ALTERNATIVE'"'"', '"'"'USD'"'"'); // USD is main define('"'"'YAAMP_USE_NICEHASH_API'"'"', false); -define('"'"'YAAMP_BTCADDRESS'"'"', '"'"'1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y'"'"'); +define('"'"'YAAMP_BTCADDRESS'"'"', '"'"'18AwGT19befE4Z3siEiAzsF8n9MoJEifiH'"'"'); define('"'"'YAAMP_SITE_URL'"'"', '"'"''"${server_name}"''"'"'); define('"'"'YAAMP_STRATUM_URL'"'"', YAAMP_SITE_URL); // change if your stratum server is on a different host -define('"'"'YAAMP_SITE_NAME'"'"', '"'"'TheCryptoPool'"'"'); +define('"'"'YAAMP_SITE_NAME'"'"', '"'"'PoolofD32th'"'"'); define('"'"'YAAMP_ADMIN_EMAIL'"'"', '"'"''"${EMAIL}"''"'"'); define('"'"'YAAMP_ADMIN_IP'"'"', '"'"''"${Public}"''"'"'); // samples: "80.236.118.26,90.234.221.11" or "10.0.0.1/8" define('"'"'YAAMP_ADMIN_WEBCONSOLE'"'"', true); @@ -771,7 +772,7 @@ define('"'"'NICEHASH_API_ID'"'"','"'"'9205'"'"'); define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3J9tapPoFCtouAZH7Th8HAPsD8aoykEHzk'"'"'); define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); $cold_wallet_table = array( - '"'"'1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y'"'"' => 0.10, + '"'"'18AwGT19befE4Z3siEiAzsF8n9MoJEifiH'"'"' => 0.10, ); // Sample fixed pool fees $configFixedPoolFees = array( @@ -804,16 +805,18 @@ cd ~ output "Final Directory permissions" output "" whoami=`whoami` -sudo usermod -aG www-data $whoami -sudo chown -R www-data:www-data /var/log +#sudo usermod -aG www-data $whoami +#sudo chown -R www-data:www-data /var/log sudo chown -R www-data:www-data /var/stratum sudo chown -R www-data:www-data /var/web +sudo touch /var/log/debug.log +sudo chown -R www-data:www-data /var/log/debug.log sudo chmod -R 775 /var/www/$server_name/html sudo chmod -R 775 /var/web sudo chmod -R 775 /var/stratum sudo chmod -R 775 /var/web/yaamp/runtime -sudo chmod -R 775 /root/backup/ -sudo chmod -R 775 /var/log +sudo chmod -R 664 /root/backup/ +sudo chmod -R 644 /var/log/debug.log sudo chmod -R 775 /var/web/serverconfig.php sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo service nginx restart @@ -825,4 +828,4 @@ output "Please make sure to change your wallet addresses in the /var/web/serverc output "" output "Please make sure to add your public and private keys." output "" -output "If you found this script helpful please consider donating some BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y" +output "If you found this script helpful please consider donating some BTC Donation: 18AwGT19befE4Z3siEiAzsF8n9MoJEifiH" From ae7c6afe50689f08989e4622cc34c25e48e6b5dc Mon Sep 17 00:00:00 2001 From: manfromafar Date: Thu, 30 Nov 2017 12:03:13 -0700 Subject: [PATCH 056/360] Added new SQL imports --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 839996b2..a2699144 100644 --- a/install.sh +++ b/install.sh @@ -709,6 +709,7 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); sudo mysql --defaults-group-suffix=host1 --force < 2017-06-payouts_coinid_memo.sql sudo mysql --defaults-group-suffix=host1 --force < 2017-09-notifications.sql sudo mysql --defaults-group-suffix=host1 --force < 2017-10-bookmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql clear output "Generating a basic serverconfig.php" From 14525e09dfdde6624d2c3879c46b39e74979ba0a Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Mon, 1 Jan 2018 16:16:05 +0100 Subject: [PATCH 057/360] remove clear --- install.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/install.sh b/install.sh index a2699144..0d06349d 100644 --- a/install.sh +++ b/install.sh @@ -21,7 +21,7 @@ displayErr() { echo exit 1; } -clear + output "Make sure you double check before hitting enter! Only one shot at these!" output "" read -e -p "Enter time zone (e.g. America/New_York) : " TIME @@ -35,7 +35,7 @@ output "" read -e -p "Install UFW and configure ports? [Y/n] : " UFW read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install - clear + output "If you found this helpful, please donate to BTC Donation: 18AwGT19befE4Z3siEiAzsF8n9MoJEifiH" output "" output "Updating system and installing required packages." @@ -45,7 +45,7 @@ output "" sudo apt-get -y update sudo apt-get -y upgrade sudo apt-get -y autoremove - clear + output "Switching to Aptitude" output "" sudo apt-get -y install aptitude @@ -92,7 +92,7 @@ default 0; sudo aptitude -y install sendmail sudo aptitude -y install git sudo aptitude -y install pwgen -y - clear + #Generating Random Passwords password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` @@ -157,7 +157,7 @@ default 0; sudo ufw --force enable fi - clear + output "Installing phpmyadmin" output "" echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections @@ -225,7 +225,7 @@ sudo chmod +x /var/stratum/config/run.sh sudo aptitude -y install ntpdate # write time to clock. sudo hwclock -w - clear + output "Making Web Server Magic Happen!" # adding user to group, creating dir structure, setting permissions sudo mkdir -p /var/www/$server_name/html @@ -626,7 +626,7 @@ echo 'include /etc/nginx/blockuseragents.rules; sudo service nginx restart sudo service php7.0-fpm reload fi - clear + output "Now for the database fun!" # create database Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" @@ -711,7 +711,7 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); sudo mysql --defaults-group-suffix=host1 --force < 2017-10-bookmarks.sql sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql - clear + output "Generating a basic serverconfig.php" output "" # make config file @@ -822,7 +822,7 @@ sudo chmod -R 775 /var/web/serverconfig.php sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo service nginx restart sudo service php7.0-fpm reload -clear + output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." output "" output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." From c3256807267982b972309314d8f0f2fe2ba773ac Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Mon, 1 Jan 2018 16:38:53 +0100 Subject: [PATCH 058/360] modif cp blocknotify to /usr/bin/ --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 0d06349d..7866b182 100644 --- a/install.sh +++ b/install.sh @@ -197,7 +197,7 @@ sudo cp -r stratum /var/stratum sudo cp -r run.sh /var/stratum cd $HOME/yiimp sudo cp -r $HOME/yiimp/bin/. /bin/ -sudo cp -r $HOME/yiimp/blocknotify/blocknotify /usr/local/bin/ +sudo cp -r $HOME/yiimp/blocknotify/blocknotify /usr/bin/ sudo mkdir -p /etc/yiimp sudo mkdir -p /$HOME/backup/ #fixing yiimp From 1d82f82aae33ea680bc622d01a726a264b71b2bd Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Mon, 1 Jan 2018 17:12:13 +0100 Subject: [PATCH 059/360] add 2018-01-stratums_ports.sql --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 7866b182..fad4e2e6 100644 --- a/install.sh +++ b/install.sh @@ -710,6 +710,7 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); sudo mysql --defaults-group-suffix=host1 --force < 2017-09-notifications.sql sudo mysql --defaults-group-suffix=host1 --force < 2017-10-bookmarks.sql sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql + sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql output "Generating a basic serverconfig.php" From cc1ea4749e72187f85f44fece79362815fc1e655 Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Mon, 1 Jan 2018 17:23:52 +0100 Subject: [PATCH 060/360] Add nicehash key + cold walet + BTC Adress --- install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index fad4e2e6..7b65e2a6 100644 --- a/install.sh +++ b/install.sh @@ -740,10 +740,10 @@ define('"'"'YIIMP_PUBLIC_EXPLORER'"'"', true); define('"'"'YIIMP_PUBLIC_BENCHMARK'"'"', false); define('"'"'YIIMP_FIAT_ALTERNATIVE'"'"', '"'"'USD'"'"'); // USD is main define('"'"'YAAMP_USE_NICEHASH_API'"'"', false); -define('"'"'YAAMP_BTCADDRESS'"'"', '"'"'18AwGT19befE4Z3siEiAzsF8n9MoJEifiH'"'"'); +define('"'"'YAAMP_BTCADDRESS'"'"', '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"'); define('"'"'YAAMP_SITE_URL'"'"', '"'"''"${server_name}"''"'"'); define('"'"'YAAMP_STRATUM_URL'"'"', YAAMP_SITE_URL); // change if your stratum server is on a different host -define('"'"'YAAMP_SITE_NAME'"'"', '"'"'PoolofD32th'"'"'); +define('"'"'YAAMP_SITE_NAME'"'"', '"'"'Interpool EU'"'"'); define('"'"'YAAMP_ADMIN_EMAIL'"'"', '"'"''"${EMAIL}"''"'"'); define('"'"'YAAMP_ADMIN_IP'"'"', '"'"''"${Public}"''"'"'); // samples: "80.236.118.26,90.234.221.11" or "10.0.0.1/8" define('"'"'YAAMP_ADMIN_WEBCONSOLE'"'"', true); @@ -769,12 +769,12 @@ define('"'"'EXCH_NOVA_KEY'"'"', '"'"''"'"'); // Automatic withdraw to Yaamp btc wallet if btc balance > 0.3 define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); // nicehash keys deposit account & amount to deposit at a time -define('"'"'NICEHASH_API_KEY'"'"','"'"'521c254d-8cc7-4319-83d2-ac6c604b5b49'"'"'); -define('"'"'NICEHASH_API_ID'"'"','"'"'9205'"'"'); -define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3J9tapPoFCtouAZH7Th8HAPsD8aoykEHzk'"'"'); +define('"'"'NICEHASH_API_KEY'"'"','"'"'f96c65a7-3d2f-4f3a-815c-cacf00674396'"'"'); +define('"'"'NICEHASH_API_ID'"'"','"'"'825979'"'"'); +define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3ABoqBjeorjzbyHmGMppM62YLssUgJhtuf'"'"'); define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); $cold_wallet_table = array( - '"'"'18AwGT19befE4Z3siEiAzsF8n9MoJEifiH'"'"' => 0.10, + '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"' => 0.10, ); // Sample fixed pool fees $configFixedPoolFees = array( From c46ca526f72eef4ab2c39bfcde8b239651fc7add Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Mon, 1 Jan 2018 17:49:03 +0100 Subject: [PATCH 061/360] add screen.sh --- screen.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 screen.sh diff --git a/screen.sh b/screen.sh new file mode 100644 index 00000000..304ad9b0 --- /dev/null +++ b/screen.sh @@ -0,0 +1,9 @@ +#!/bin/bash + LOG_DIR=/var/log + WEB_DIR=/var/web + STRATUM_DIR=/var/stratum + USR_BIN=/usr/bin + screen -dmS main bash $WEB_DIR/main.sh + screen -dmS loop2 bash $WEB_DIR/loop2.sh + screen -dmS blocks bash $WEB_DIR/blocks.sh + screen -dmS debug tail -f $LOG_DIR/debug.log \ No newline at end of file From 5d191207cf61f1b6e42a98c7d87cfb69c9e86466 Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Mon, 1 Jan 2018 18:02:00 +0100 Subject: [PATCH 062/360] add sudo mkdir /root/backup/ --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 7b65e2a6..f6c3a80a 100644 --- a/install.sh +++ b/install.sh @@ -807,6 +807,7 @@ cd ~ output "Final Directory permissions" output "" whoami=`whoami` +sudo mkdir /root/backup/ #sudo usermod -aG www-data $whoami #sudo chown -R www-data:www-data /var/log sudo chown -R www-data:www-data /var/stratum From 58eff4107c676e1aba2a051c53f40b142837ef7c Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Tue, 2 Jan 2018 03:20:12 +0100 Subject: [PATCH 063/360] update info --- install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index f6c3a80a..1d565bfa 100644 --- a/install.sh +++ b/install.sh @@ -1,12 +1,13 @@ #!/bin/bash ################################################################################ # Original Author: crombiecrunch -# Current Author: manfromafar -# Web: yiimp.poolofd32th.club +# Fork Author: manfromafar +# Current Author: Xavatar +# Web: # # Program: # Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.x -# BTC Donation: 18AwGT19befE4Z3siEiAzsF8n9MoJEifiH +# # ################################################################################ output() { From a43d9bd705f63e8064655d8aa51f8e1a392d9e9f Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Tue, 2 Jan 2018 03:29:24 +0100 Subject: [PATCH 064/360] add phpadmin pass --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index f6c3a80a..cb07a23d 100644 --- a/install.sh +++ b/install.sh @@ -653,6 +653,9 @@ user=stratum password='"${password2}"' database=yiimpfrontend host=localhost +[myphpadmin] +user=root +password='"${AUTOGENERATED_PASS}"' [mysql] user=root password='"${rootpasswd}"' From 20f67e8abf2f7bcf26d260dbe81e8f8c8ac25063 Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Tue, 2 Jan 2018 03:31:33 +0100 Subject: [PATCH 065/360] copy blocknotify /var/stratum/ --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 48cca23c..16ef036a 100644 --- a/install.sh +++ b/install.sh @@ -199,6 +199,7 @@ sudo cp -r run.sh /var/stratum cd $HOME/yiimp sudo cp -r $HOME/yiimp/bin/. /bin/ sudo cp -r $HOME/yiimp/blocknotify/blocknotify /usr/bin/ +sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum/ sudo mkdir -p /etc/yiimp sudo mkdir -p /$HOME/backup/ #fixing yiimp From 5b4d43a9a5d992d7a8da72990c7ab0b015a7a8d1 Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Tue, 2 Jan 2018 19:59:21 +0100 Subject: [PATCH 066/360] fix typo login phpmyadmin --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 16ef036a..3cf491a3 100644 --- a/install.sh +++ b/install.sh @@ -656,7 +656,7 @@ password='"${password2}"' database=yiimpfrontend host=localhost [myphpadmin] -user=root +user=phpmyadmin password='"${AUTOGENERATED_PASS}"' [mysql] user=root From 84256aa1aee4928a2aea7f997a60a8ff56b9a94d Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Sun, 7 Jan 2018 21:00:11 +0100 Subject: [PATCH 067/360] fix conf serverconfig.php --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 3cf491a3..657b7cca 100644 --- a/install.sh +++ b/install.sh @@ -732,7 +732,7 @@ define('"'"'YAAMP_DBNAME'"'"', '"'"'yiimpfrontend'"'"'); define('"'"'YAAMP_DBUSER'"'"', '"'"'panel'"'"'); define('"'"'YAAMP_DBPASSWORD'"'"', '"'"''"${password}"''"'"'); define('"'"'YAAMP_PRODUCTION'"'"', true); -define('"'"'YAAMP_RENTAL'"'"', true); +define('"'"'YAAMP_RENTAL'"'"', false); define('"'"'YAAMP_LIMIT_ESTIMATE'"'"', false); define('"'"'YAAMP_FEES_MINING'"'"', 0.5); define('"'"'YAAMP_FEES_EXCHANGE'"'"', 2); @@ -742,7 +742,7 @@ define('"'"'YAAMP_PAYMENTS_FREQ'"'"', 3*60*60); define('"'"'YAAMP_PAYMENTS_MINI'"'"', 0.001); define('"'"'YAAMP_ALLOW_EXCHANGE'"'"', false); define('"'"'YIIMP_PUBLIC_EXPLORER'"'"', true); -define('"'"'YIIMP_PUBLIC_BENCHMARK'"'"', false); +define('"'"'YIIMP_PUBLIC_BENCHMARK'"'"', true); define('"'"'YIIMP_FIAT_ALTERNATIVE'"'"', '"'"'USD'"'"'); // USD is main define('"'"'YAAMP_USE_NICEHASH_API'"'"', false); define('"'"'YAAMP_BTCADDRESS'"'"', '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"'); From 1b4b75e098163868f5378eebac564c4b29773598 Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Sun, 7 Jan 2018 21:16:17 +0100 Subject: [PATCH 068/360] add stratum algo --- screen.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/screen.sh b/screen.sh index 304ad9b0..586d4483 100644 --- a/screen.sh +++ b/screen.sh @@ -6,4 +6,16 @@ screen -dmS main bash $WEB_DIR/main.sh screen -dmS loop2 bash $WEB_DIR/loop2.sh screen -dmS blocks bash $WEB_DIR/blocks.sh - screen -dmS debug tail -f $LOG_DIR/debug.log \ No newline at end of file + screen -dmS debug tail -f $LOG_DIR/debug.log + + screen -dmS groestl $STRATUM_DIR/run.sh groestl + screen -dmS keccak $STRATUM_DIR/run.sh keccak + screen -dmS neoscrypt $STRATUM_DIR/run.sh neoscrypt + screen -dmS nist5 $STRATUM_DIR/run.sh nist5 + screen -dmS quark $STRATUM_DIR/run.sh quark + screen -dmS scrypt $STRATUM_DIR/run.sh scrypt + screen -dmS skein $STRATUM_DIR/run.sh skein + screen -dmS x11 $STRATUM_DIR/run.sh x11 + screen -dmS xevan $STRATUM_DIR/run.sh xevan + + \ No newline at end of file From 183da57e198b582cff4bdbab5aee7833804434b2 Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Sun, 7 Jan 2018 22:07:19 +0100 Subject: [PATCH 069/360] modif rule firewall --- install.sh | 45 ++++++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/install.sh b/install.sh index 657b7cca..b665e521 100644 --- a/install.sh +++ b/install.sh @@ -128,33 +128,24 @@ default 0; sudo ufw allow ssh sudo ufw allow http sudo ufw allow https - sudo ufw allow 2142/tcp - sudo ufw allow 3739/tcp - sudo ufw allow 3525/tcp - sudo ufw allow 4233/tcp - sudo ufw allow 3747/tcp - sudo ufw allow 5033/tcp - sudo ufw allow 4262/tcp - sudo ufw allow 3737/tcp - sudo ufw allow 3556/tcp - sudo ufw allow 3553/tcp - sudo ufw allow 4633/tcp - sudo ufw allow 8433/tcp - sudo ufw allow 3555/tcp - sudo ufw allow 3833/tcp - sudo ufw allow 4533/tcp - sudo ufw allow 4133/tcp - sudo ufw allow 5339/tcp - sudo ufw allow 8533/tcp - sudo ufw allow 3334/tcp - sudo ufw allow 4933/tcp - sudo ufw allow 3333/tcp - sudo ufw allow 6033/tcp - sudo ufw allow 5766/tcp - sudo ufw allow 3533/tcp - sudo ufw allow 4033/tcp - sudo ufw allow 3433/tcp - sudo ufw allow 3633/tcp + #groestl + sudo ufw allow 3033/tcp + #keccak + sudo ufw allow 5133/tcp + #neoscrypt + sudo ufw allow 4233/tcp + #nist5 + sudo ufw allow 3833/tcp + #quark + sudo ufw allow 1961/tcp + #scrypt + sudo ufw allow 3433/tcp + #skein + sudo ufw allow 1817/tcp + #x11 + sudo ufw allow 3533/tcp + #xevan + sudo ufw allow 1294/tcp sudo ufw --force enable fi From ec292ad36625e0fd3233e410965bf60b56e63ffa Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Mon, 8 Jan 2018 06:48:37 +0100 Subject: [PATCH 070/360] add sleep --- install.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/install.sh b/install.sh index b665e521..75ed9b1c 100644 --- a/install.sh +++ b/install.sh @@ -41,6 +41,7 @@ output "" output "" output "Updating system and installing required packages." output "" + sleep 3 # update package and upgrade Ubuntu sudo apt-get -y update @@ -49,10 +50,12 @@ output "" output "Switching to Aptitude" output "" + sleep 3 sudo apt-get -y install aptitude output "Installing Nginx server." output "" + sleep 3 sudo aptitude -y install nginx sudo rm /etc/nginx/sites-enabled/default sudo service nginx start @@ -70,6 +73,7 @@ default 0; output "Installing Mariadb Server." output "" + sleep 3 # create random password rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" @@ -77,6 +81,7 @@ default 0; output "Installing php7.x and other needed files" output "" + sleep 3 sudo aptitude -y install php7.0-fpm sudo aptitude -y install php7.0-opcache php7.0-fpm php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring sudo phpenmod mcrypt @@ -101,6 +106,7 @@ default 0; AUTOGENERATED_PASS=`pwgen -c -1 20` output "Testing to see if server emails are sent" output "" + sleep 3 if [[ "$root_email" != "" ]]; then echo $root_email > sudo tee --append ~/.email echo $root_email > sudo tee --append ~/.forward @@ -118,6 +124,7 @@ default 0; fi output "Some optional installs" + sleep 3 if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then sudo aptitude -y install fail2ban fi @@ -152,6 +159,7 @@ default 0; output "Installing phpmyadmin" output "" + sleep 3 echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/mysql/admin-user string root" | sudo debconf-set-selections @@ -164,6 +172,7 @@ default 0; output "" output "Grabbing yiimp fron Github, building files and setting file structure." output "" + sleep 3 #Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` cd ~ @@ -505,6 +514,7 @@ sudo ln -s /var/web /var/www/$server_name/html sudo service nginx restart if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then output "Install LetsEncrypt and setting SSL" + sleep 3 sudo aptitude -y install letsencrypt sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" sudo rm /etc/nginx/sites-available/$server_name.conf @@ -621,6 +631,7 @@ sudo service php7.0-fpm reload fi output "Now for the database fun!" + sleep 3 # create database Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" @@ -686,6 +697,7 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); output "Peforming the SQL import" output "" + sleep 3 cd ~ cd yiimp/sql # import sql dump @@ -711,6 +723,7 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); output "Generating a basic serverconfig.php" output "" + sleep 3 # make config file echo ' Date: Mon, 8 Jan 2018 08:33:16 +0100 Subject: [PATCH 071/360] add package compile currency + mutt --- install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install.sh b/install.sh index 75ed9b1c..02ae92e3 100644 --- a/install.sh +++ b/install.sh @@ -60,6 +60,7 @@ output "" sudo rm /etc/nginx/sites-enabled/default sudo service nginx start sudo service cron start + #Making Nginx a bit hard echo 'map $http_user_agent $blockedagent { default 0; @@ -96,8 +97,17 @@ default 0; sudo aptitude -y install librtmp-dev sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils sudo aptitude -y install sendmail + sudo aptitude -y install mutt sudo aptitude -y install git sudo aptitude -y install pwgen -y + + #Installing Package to compile currency + sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev + sudo aptitude -y install software-properties-common + sudo aptitude -y install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler + sudo add-apt-repository -y ppa:bitcoin/bitcoin + sudo aptitude -y update + sudo aptitude -y install libdb4.8-dev libdb4.8++-dev #Generating Random Passwords From 2fe3fc44f545536c77a52d109057c903b01fe907 Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Mon, 8 Jan 2018 11:17:32 +0100 Subject: [PATCH 072/360] modif serverconfig.php --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 02ae92e3..52c856e7 100644 --- a/install.sh +++ b/install.sh @@ -752,7 +752,7 @@ define('"'"'YAAMP_FEES_MINING'"'"', 0.5); define('"'"'YAAMP_FEES_EXCHANGE'"'"', 2); define('"'"'YAAMP_FEES_RENTING'"'"', 2); define('"'"'YAAMP_TXFEE_RENTING_WD'"'"', 0.002); -define('"'"'YAAMP_PAYMENTS_FREQ'"'"', 3*60*60); +define('"'"'YAAMP_PAYMENTS_FREQ'"'"', 2*60*60); define('"'"'YAAMP_PAYMENTS_MINI'"'"', 0.001); define('"'"'YAAMP_ALLOW_EXCHANGE'"'"', false); define('"'"'YIIMP_PUBLIC_EXPLORER'"'"', true); @@ -762,7 +762,7 @@ define('"'"'YAAMP_USE_NICEHASH_API'"'"', false); define('"'"'YAAMP_BTCADDRESS'"'"', '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"'); define('"'"'YAAMP_SITE_URL'"'"', '"'"''"${server_name}"''"'"'); define('"'"'YAAMP_STRATUM_URL'"'"', YAAMP_SITE_URL); // change if your stratum server is on a different host -define('"'"'YAAMP_SITE_NAME'"'"', '"'"'Interpool EU'"'"'); +define('"'"'YAAMP_SITE_NAME'"'"', '"'"'MCIP'"'"'); define('"'"'YAAMP_ADMIN_EMAIL'"'"', '"'"''"${EMAIL}"''"'"'); define('"'"'YAAMP_ADMIN_IP'"'"', '"'"''"${Public}"''"'"'); // samples: "80.236.118.26,90.234.221.11" or "10.0.0.1/8" define('"'"'YAAMP_ADMIN_WEBCONSOLE'"'"', true); From d20533660b8e3cc7077fb3c43174780fdc381895 Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Mon, 8 Jan 2018 14:15:21 +0100 Subject: [PATCH 073/360] modif quark ufw port --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 52c856e7..27a67861 100644 --- a/install.sh +++ b/install.sh @@ -154,7 +154,7 @@ default 0; #nist5 sudo ufw allow 3833/tcp #quark - sudo ufw allow 1961/tcp + sudo ufw allow 4033/tcp #scrypt sudo ufw allow 3433/tcp #skein From ac37025eb0080b3b8e1fd01936016bc6fd9050f6 Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Mon, 8 Jan 2018 14:24:41 +0100 Subject: [PATCH 074/360] error port stratum --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 27a67861..48b55d85 100644 --- a/install.sh +++ b/install.sh @@ -158,11 +158,11 @@ default 0; #scrypt sudo ufw allow 3433/tcp #skein - sudo ufw allow 1817/tcp + sudo ufw allow 4933/tcp #x11 sudo ufw allow 3533/tcp #xevan - sudo ufw allow 1294/tcp + sudo ufw allow 3739/tcp sudo ufw --force enable fi From 14555c6a40d1f77fc338167479928a87f85ad7a1 Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Mon, 8 Jan 2018 14:45:42 +0100 Subject: [PATCH 075/360] modify neo --- screen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screen.sh b/screen.sh index 586d4483..58d9bc5e 100644 --- a/screen.sh +++ b/screen.sh @@ -10,7 +10,7 @@ screen -dmS groestl $STRATUM_DIR/run.sh groestl screen -dmS keccak $STRATUM_DIR/run.sh keccak - screen -dmS neoscrypt $STRATUM_DIR/run.sh neoscrypt + screen -dmS neoscrypt $STRATUM_DIR/run.sh neo screen -dmS nist5 $STRATUM_DIR/run.sh nist5 screen -dmS quark $STRATUM_DIR/run.sh quark screen -dmS scrypt $STRATUM_DIR/run.sh scrypt From b24833f5a2c7c7b5a30dc0f2f7888d39963fee67 Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Mon, 8 Jan 2018 15:16:37 +0100 Subject: [PATCH 076/360] ajout libdb5.3 libdb5.3++ --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 48b55d85..2fa1c753 100644 --- a/install.sh +++ b/install.sh @@ -107,7 +107,7 @@ default 0; sudo aptitude -y install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler sudo add-apt-repository -y ppa:bitcoin/bitcoin sudo aptitude -y update - sudo aptitude -y install libdb4.8-dev libdb4.8++-dev + sudo aptitude -y install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ #Generating Random Passwords From e8ca659a151ebe2dce4a4f2c8448bc15bcee731a Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Mon, 8 Jan 2018 15:19:35 +0100 Subject: [PATCH 077/360] add libminiupnpc10 package --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2fa1c753..28a72178 100644 --- a/install.sh +++ b/install.sh @@ -107,7 +107,7 @@ default 0; sudo aptitude -y install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler sudo add-apt-repository -y ppa:bitcoin/bitcoin sudo aptitude -y update - sudo aptitude -y install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ + sudo aptitude -y install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ libminiupnpc10 #Generating Random Passwords From 961481d122b99463b2c6a012ff60bf1440bedc66 Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Fri, 2 Feb 2018 21:18:40 +0100 Subject: [PATCH 078/360] add sql --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 28a72178..76ccbbba 100644 --- a/install.sh +++ b/install.sh @@ -107,7 +107,7 @@ default 0; sudo aptitude -y install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler sudo add-apt-repository -y ppa:bitcoin/bitcoin sudo aptitude -y update - sudo aptitude -y install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ libminiupnpc10 + sudo aptitude -y install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ libminiupnpc10 libzmq5 #Generating Random Passwords @@ -729,6 +729,7 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); sudo mysql --defaults-group-suffix=host1 --force < 2017-10-bookmarks.sql sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql + sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql output "Generating a basic serverconfig.php" From 7c7009e2c74ed0fccef91f4f6eb5fd3a97f9ad09 Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Fri, 2 Feb 2018 21:22:44 +0100 Subject: [PATCH 079/360] modify screen --- screen-scrypt.sh | 13 +++++++++++++ screen.sh => screen-stratum.sh | 8 -------- 2 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 screen-scrypt.sh rename screen.sh => screen-stratum.sh (66%) diff --git a/screen-scrypt.sh b/screen-scrypt.sh new file mode 100644 index 00000000..154fad48 --- /dev/null +++ b/screen-scrypt.sh @@ -0,0 +1,13 @@ +#!/bin/bash + LOG_DIR=/var/log + WEB_DIR=/var/web + STRATUM_DIR=/var/stratum + USR_BIN=/usr/bin + + screen -dmS main bash $WEB_DIR/main.sh + screen -dmS loop2 bash $WEB_DIR/loop2.sh + screen -dmS blocks bash $WEB_DIR/blocks.sh + screen -dmS debug tail -f $LOG_DIR/debug.log + + + \ No newline at end of file diff --git a/screen.sh b/screen-stratum.sh similarity index 66% rename from screen.sh rename to screen-stratum.sh index 58d9bc5e..848b1ab2 100644 --- a/screen.sh +++ b/screen-stratum.sh @@ -1,12 +1,5 @@ #!/bin/bash - LOG_DIR=/var/log - WEB_DIR=/var/web STRATUM_DIR=/var/stratum - USR_BIN=/usr/bin - screen -dmS main bash $WEB_DIR/main.sh - screen -dmS loop2 bash $WEB_DIR/loop2.sh - screen -dmS blocks bash $WEB_DIR/blocks.sh - screen -dmS debug tail -f $LOG_DIR/debug.log screen -dmS groestl $STRATUM_DIR/run.sh groestl screen -dmS keccak $STRATUM_DIR/run.sh keccak @@ -17,5 +10,4 @@ screen -dmS skein $STRATUM_DIR/run.sh skein screen -dmS x11 $STRATUM_DIR/run.sh x11 screen -dmS xevan $STRATUM_DIR/run.sh xevan - \ No newline at end of file From 12416b2e3668d9ed2fe3070a8aec8c964d3dc54d Mon Sep 17 00:00:00 2001 From: xavatar94 Date: Fri, 2 Feb 2018 22:10:19 +0100 Subject: [PATCH 080/360] modify Name --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 76ccbbba..19589f22 100644 --- a/install.sh +++ b/install.sh @@ -763,7 +763,7 @@ define('"'"'YAAMP_USE_NICEHASH_API'"'"', false); define('"'"'YAAMP_BTCADDRESS'"'"', '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"'); define('"'"'YAAMP_SITE_URL'"'"', '"'"''"${server_name}"''"'"'); define('"'"'YAAMP_STRATUM_URL'"'"', YAAMP_SITE_URL); // change if your stratum server is on a different host -define('"'"'YAAMP_SITE_NAME'"'"', '"'"'MCIP'"'"'); +define('"'"'YAAMP_SITE_NAME'"'"', '"'"'YIIMP'"'"'); define('"'"'YAAMP_ADMIN_EMAIL'"'"', '"'"''"${EMAIL}"''"'"'); define('"'"'YAAMP_ADMIN_IP'"'"', '"'"''"${Public}"''"'"'); // samples: "80.236.118.26,90.234.221.11" or "10.0.0.1/8" define('"'"'YAAMP_ADMIN_WEBCONSOLE'"'"', true); From 1f6da2f4fc0c7264e4ee2e29dcddf0a30d247225 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 3 Feb 2018 20:26:36 +0100 Subject: [PATCH 081/360] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 08938862..9a90fce5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ # yiimp + +Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig + + Install script for yiimp on Ubuntu 16.04 While I did add some server security to the script, it is every server owners responsibility to fully secure their own servers. After the installation you will still need to customize your serverconfig.php file to your liking, add your API keys, and build/add your coins to the control panel. @@ -59,6 +63,4 @@ bash install.sh If this helped you or you feel giving please donate BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD -Feel free to join our Discord channel at https://discord.gg/zdBbAQ -Crombie Crunch From ded21dfdb2c6f28e6da6c77f84d824f735fe59d0 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 3 Feb 2018 20:27:05 +0100 Subject: [PATCH 082/360] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a90fce5..61366cc1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # yiimp -Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig + +TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig Install script for yiimp on Ubuntu 16.04 From dbef076a2c96bf97f634d102ecf037393f97b9b3 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 20:52:01 +0100 Subject: [PATCH 083/360] modif typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 61366cc1..c9c9df78 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,6 @@ curl -Lo install.sh https://raw.githubusercontent.com/crombiecrunch/yiimp_instal bash install.sh -If this helped you or you feel giving please donate BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD +If this helped you or you feel giving please donate BTC Donation: 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz From 92ff5b02eb5d6ada72ce9a8b11592c1d51793bae Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 20:52:30 +0100 Subject: [PATCH 084/360] modif typo --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index c9c9df78..c3ab729c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,15 @@ # yiimp +*********************************** + TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig +*********************************** + + + Install script for yiimp on Ubuntu 16.04 While I did add some server security to the script, it is every server owners responsibility to fully secure their own servers. After the installation you will still need to customize your serverconfig.php file to your liking, add your API keys, and build/add your coins to the control panel. From 48372dee96acb027120be2b19ed80fae08b8eab3 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 20:54:27 +0100 Subject: [PATCH 085/360] modif typo --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 19589f22..03a0f664 100644 --- a/install.sh +++ b/install.sh @@ -853,4 +853,4 @@ output "Please make sure to change your wallet addresses in the /var/web/serverc output "" output "Please make sure to add your public and private keys." output "" -output "If you found this script helpful please consider donating some BTC Donation: 18AwGT19befE4Z3siEiAzsF8n9MoJEifiH" +output "If you found this script helpful please consider donating some BTC Donation: 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz" From 316e708f6f8bd73fba4007ad804c32e31265cc32 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 20:55:43 +0100 Subject: [PATCH 086/360] add tuto youtube --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index 03a0f664..10bc99e1 100644 --- a/install.sh +++ b/install.sh @@ -854,3 +854,6 @@ output "" output "Please make sure to add your public and private keys." output "" output "If you found this script helpful please consider donating some BTC Donation: 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz" +output "" +output "TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig" + From 11146519261297f2ae62574e067b7f27d4554f25 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 21:35:00 +0100 Subject: [PATCH 087/360] add package to compil crypto --- install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 10bc99e1..dc5974ae 100644 --- a/install.sh +++ b/install.sh @@ -95,19 +95,20 @@ default 0; sudo aptitude -y install libidn11-dev sudo aptitude -y install gnutls-dev sudo aptitude -y install librtmp-dev - sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils sudo aptitude -y install sendmail sudo aptitude -y install mutt sudo aptitude -y install git sudo aptitude -y install pwgen -y - #Installing Package to compile currency - sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev - sudo aptitude -y install software-properties-common - sudo aptitude -y install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler + #Installing Package to compile crypto currency sudo add-apt-repository -y ppa:bitcoin/bitcoin sudo aptitude -y update sudo aptitude -y install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ libminiupnpc10 libzmq5 + sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev + sudo aptitude -y install software-properties-common + sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler + + #Generating Random Passwords From 9baf4de512d993ea205c05a8a3fcf3e1c2e8ae90 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 21:41:34 +0100 Subject: [PATCH 088/360] remove typo --- install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install.sh b/install.sh index dc5974ae..32d4833e 100644 --- a/install.sh +++ b/install.sh @@ -37,8 +37,6 @@ output "" read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install - output "If you found this helpful, please donate to BTC Donation: 18AwGT19befE4Z3siEiAzsF8n9MoJEifiH" - output "" output "Updating system and installing required packages." output "" sleep 3 From 978f71fc9cd6c2258fd4629022559c86ce7c25f7 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 21:48:09 +0100 Subject: [PATCH 089/360] fix typo --- install.sh | 79 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 34 deletions(-) diff --git a/install.sh b/install.sh index 32d4833e..f7c5c464 100644 --- a/install.sh +++ b/install.sh @@ -36,7 +36,7 @@ output "" read -e -p "Install UFW and configure ports? [Y/n] : " UFW read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install - + output "" output "Updating system and installing required packages." output "" sleep 3 @@ -46,11 +46,13 @@ output "" sudo apt-get -y upgrade sudo apt-get -y autoremove + output "" output "Switching to Aptitude" output "" sleep 3 sudo apt-get -y install aptitude + output "" output "Installing Nginx server." output "" sleep 3 @@ -69,7 +71,8 @@ default 0; ~*bandit 1; } ' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 - + + output "" output "Installing Mariadb Server." output "" sleep 3 @@ -78,6 +81,7 @@ default 0; export DEBIAN_FRONTEND="noninteractive" sudo aptitude -y install mariadb-server + output "" output "Installing php7.x and other needed files" output "" sleep 3 @@ -113,7 +117,8 @@ default 0; password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` AUTOGENERATED_PASS=`pwgen -c -1 20` - output "Testing to see if server emails are sent" + output "" + output "Testing to see if server emails are sent" output "" sleep 3 if [[ "$root_email" != "" ]]; then @@ -132,7 +137,9 @@ default 0; fi fi + output "" output "Some optional installs" + output "" sleep 3 if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then sudo aptitude -y install fail2ban @@ -165,7 +172,7 @@ default 0; sudo ufw --force enable fi - + output "" output "Installing phpmyadmin" output "" sleep 3 @@ -177,6 +184,7 @@ default 0; echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections sudo aptitude -y install phpmyadmin + output "" output " Installing yiimp" output "" output "Grabbing yiimp fron Github, building files and setting file structure." @@ -203,19 +211,19 @@ default 0; sudo mkdir -p /var/stratum cd $HOME/yiimp/stratum sudo cp -a config.sample/. /var/stratum/config -sudo cp -r stratum /var/stratum -sudo cp -r run.sh /var/stratum -cd $HOME/yiimp -sudo cp -r $HOME/yiimp/bin/. /bin/ -sudo cp -r $HOME/yiimp/blocknotify/blocknotify /usr/bin/ -sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum/ -sudo mkdir -p /etc/yiimp -sudo mkdir -p /$HOME/backup/ -#fixing yiimp + sudo cp -r stratum /var/stratum + sudo cp -r run.sh /var/stratum + cd $HOME/yiimp + sudo cp -r $HOME/yiimp/bin/. /bin/ + sudo cp -r $HOME/yiimp/blocknotify/blocknotify /usr/bin/ + sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum/ + sudo mkdir -p /etc/yiimp + sudo mkdir -p /$HOME/backup/ + #fixing yiimp sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp #fixing run.sh sudo rm -r /var/stratum/config/run.sh -echo ' + echo ' #!/bin/bash ulimit -n 10240 ulimit -u 10240 @@ -321,9 +329,9 @@ echo 'include /etc/nginx/blockuseragents.rules; } ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 -sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf -sudo ln -s /var/web /var/www/$server_name/html -sudo service nginx restart + sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf + sudo ln -s /var/web /var/www/$server_name/html + sudo service nginx restart if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then output "Install LetsEncrypt and setting SSL" sudo aptitude -y install letsencrypt @@ -331,7 +339,7 @@ sudo service nginx restart sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 # I am SSL Man! -echo 'include /etc/nginx/blockuseragents.rules; + echo 'include /etc/nginx/blockuseragents.rules; server { if ($blockedagent) { return 403; @@ -437,10 +445,10 @@ echo 'include /etc/nginx/blockuseragents.rules; ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi -sudo service nginx restart -sudo service php7.0-fpm reload -else -echo 'include /etc/nginx/blockuseragents.rules; + sudo service nginx restart + sudo service php7.0-fpm reload + else + echo 'include /etc/nginx/blockuseragents.rules; server { if ($blockedagent) { return 403; @@ -518,9 +526,9 @@ echo 'include /etc/nginx/blockuseragents.rules; } ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 -sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf -sudo ln -s /var/web /var/www/$server_name/html -sudo service nginx restart + sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf + sudo ln -s /var/web /var/www/$server_name/html + sudo service nginx restart if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then output "Install LetsEncrypt and setting SSL" sleep 3 @@ -529,7 +537,7 @@ sudo service nginx restart sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 # I am SSL Man! -echo 'include /etc/nginx/blockuseragents.rules; + echo 'include /etc/nginx/blockuseragents.rules; server { if ($blockedagent) { return 403; @@ -635,11 +643,13 @@ echo 'include /etc/nginx/blockuseragents.rules; ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi -sudo service nginx restart -sudo service php7.0-fpm reload -fi + sudo service nginx restart + sudo service php7.0-fpm reload + fi + output "" output "Now for the database fun!" + output "" sleep 3 # create database Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" @@ -698,12 +708,11 @@ define('"'"'EXCH_POLONIEX_SECRET'"'"', '"'"''"'"'); define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); ' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 - + output "" output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" output "" - output "BTC Donation: 1KuE2LMZMPXJ4gsVniWLuyyPsqqZs5Av4y" - output "" + output "" output "Peforming the SQL import" output "" sleep 3 @@ -730,7 +739,7 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql - + output "" output "Generating a basic serverconfig.php" output "" sleep 3 @@ -811,6 +820,7 @@ $configAlgoNormCoef = array( ); ' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 +output "" output "Updating stratum config files with database connection info." output "" sleep 3 @@ -823,7 +833,7 @@ sudo sed -i 's/username = root/username = stratum/g' *.conf sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf cd ~ - +output "" output "Final Directory permissions" output "" sleep 3 @@ -846,6 +856,7 @@ sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-fold sudo service nginx restart sudo service php7.0-fpm reload +output "" output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." output "" output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." From 14d02c41bd54fc367607ea08ee0652412c73b6a4 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 21:48:29 +0100 Subject: [PATCH 090/360] fix typo --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index f7c5c464..cf3b005c 100644 --- a/install.sh +++ b/install.sh @@ -866,4 +866,6 @@ output "" output "If you found this script helpful please consider donating some BTC Donation: 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz" output "" output "TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig" +output "" +output "" From e5491eb676c44b8b87b2893e65e1c4586727739b Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 21:49:49 +0100 Subject: [PATCH 091/360] fix typo --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index cf3b005c..1aa9bcbe 100644 --- a/install.sh +++ b/install.sh @@ -856,6 +856,9 @@ sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-fold sudo service nginx restart sudo service php7.0-fpm reload +output "" +output "" +output "" output "" output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." output "" From 23bdbcbdc98fda946828be4146f79ce906a3baef Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 21:55:07 +0100 Subject: [PATCH 092/360] fix typo --- install.sh | 87 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 45 insertions(+), 42 deletions(-) diff --git a/install.sh b/install.sh index 1aa9bcbe..06c472ed 100644 --- a/install.sh +++ b/install.sh @@ -23,8 +23,9 @@ displayErr() { exit 1; } -output "Make sure you double check before hitting enter! Only one shot at these!" -output "" + output "********" + output "Make sure you double check before hitting enter! Only one shot at these!" + output "********" read -e -p "Enter time zone (e.g. America/New_York) : " TIME read -e -p "Server name (no http:// or www. just example.com) : " server_name read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain @@ -36,9 +37,9 @@ output "" read -e -p "Install UFW and configure ports? [Y/n] : " UFW read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install - output "" + output "********" output "Updating system and installing required packages." - output "" + output "********" sleep 3 # update package and upgrade Ubuntu @@ -46,15 +47,15 @@ output "" sudo apt-get -y upgrade sudo apt-get -y autoremove - output "" + output "********" output "Switching to Aptitude" - output "" + output "********" sleep 3 sudo apt-get -y install aptitude - output "" + output "********" output "Installing Nginx server." - output "" + output "********" sleep 3 sudo aptitude -y install nginx sudo rm /etc/nginx/sites-enabled/default @@ -72,18 +73,18 @@ default 0; } ' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 - output "" + output "********" output "Installing Mariadb Server." - output "" + output "********" sleep 3 # create random password rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" sudo aptitude -y install mariadb-server - output "" + output "********" output "Installing php7.x and other needed files" - output "" + output "********" sleep 3 sudo aptitude -y install php7.0-fpm sudo aptitude -y install php7.0-opcache php7.0-fpm php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring @@ -117,9 +118,9 @@ default 0; password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` AUTOGENERATED_PASS=`pwgen -c -1 20` - output "" + output "********" output "Testing to see if server emails are sent" - output "" + output "********" sleep 3 if [[ "$root_email" != "" ]]; then echo $root_email > sudo tee --append ~/.email @@ -137,9 +138,9 @@ default 0; fi fi - output "" + output "********" output "Some optional installs" - output "" + output "********" sleep 3 if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then sudo aptitude -y install fail2ban @@ -172,9 +173,9 @@ default 0; sudo ufw --force enable fi - output "" + output "********" output "Installing phpmyadmin" - output "" + output "********" sleep 3 echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | sudo debconf-set-selections @@ -184,11 +185,11 @@ default 0; echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections sudo aptitude -y install phpmyadmin - output "" + output "********" output " Installing yiimp" - output "" + output "********" output "Grabbing yiimp fron Github, building files and setting file structure." - output "" + output "********" sleep 3 #Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` @@ -235,8 +236,11 @@ done exec bash ' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 sudo chmod +x /var/stratum/config/run.sh + + output "********" output "Update default timezone." - output "Thanks for using this installation script. Donations welcome" + output "********" + # check if link file sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime # update time zone @@ -247,9 +251,10 @@ sudo chmod +x /var/stratum/config/run.sh output "Making Web Server Magic Happen!" # adding user to group, creating dir structure, setting permissions - sudo mkdir -p /var/www/$server_name/html + sudo mkdir -p /var/www/$server_name/html + output "********" output "Creating webserver initial config file" - output "" + output "********" if [[ ("$sub_domain" == "y" || "$sub_domain" == "Y") ]]; then echo 'include /etc/nginx/blockuseragents.rules; server { @@ -647,9 +652,9 @@ echo 'include /etc/nginx/blockuseragents.rules; sudo service php7.0-fpm reload fi - output "" + output "********" output "Now for the database fun!" - output "" + output "********" sleep 3 # create database Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" @@ -708,13 +713,11 @@ define('"'"'EXCH_POLONIEX_SECRET'"'"', '"'"''"'"'); define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); ' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 - output "" + output "********" output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" - output "" - - output "" + output "********" output "Peforming the SQL import" - output "" + output "********" sleep 3 cd ~ cd yiimp/sql @@ -739,9 +742,9 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql - output "" + output "********" output "Generating a basic serverconfig.php" - output "" + output "********" sleep 3 # make config file echo ' @@ -820,9 +823,9 @@ $configAlgoNormCoef = array( ); ' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 -output "" +output "********" output "Updating stratum config files with database connection info." -output "" +output "********" sleep 3 cd /var/stratum/config sudo sed -i 's/password = tu8tu5/password = '$blckntifypass'/g' *.conf @@ -833,9 +836,9 @@ sudo sed -i 's/username = root/username = stratum/g' *.conf sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf cd ~ -output "" +output "********" output "Final Directory permissions" -output "" +output "********" sleep 3 whoami=`whoami` sudo mkdir /root/backup/ @@ -856,10 +859,10 @@ sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-fold sudo service nginx restart sudo service php7.0-fpm reload -output "" -output "" -output "" -output "" +output "********" +output "********" +output "********" +output "********" output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." output "" output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." @@ -870,5 +873,5 @@ output "If you found this script helpful please consider donating some BTC Donat output "" output "TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig" output "" -output "" +output "********" From b234d88962042dee7ddda3c3b9d6836b97e893ea Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 22:15:43 +0100 Subject: [PATCH 093/360] fix typo --- install.sh | 82 +++++++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/install.sh b/install.sh index 06c472ed..5e42998f 100644 --- a/install.sh +++ b/install.sh @@ -23,9 +23,9 @@ displayErr() { exit 1; } - output "********" + output " " output "Make sure you double check before hitting enter! Only one shot at these!" - output "********" + output " " read -e -p "Enter time zone (e.g. America/New_York) : " TIME read -e -p "Server name (no http:// or www. just example.com) : " server_name read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain @@ -37,9 +37,9 @@ displayErr() { read -e -p "Install UFW and configure ports? [Y/n] : " UFW read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install - output "********" + output " " output "Updating system and installing required packages." - output "********" + output " " sleep 3 # update package and upgrade Ubuntu @@ -47,15 +47,15 @@ displayErr() { sudo apt-get -y upgrade sudo apt-get -y autoremove - output "********" + output " " output "Switching to Aptitude" - output "********" + output " " sleep 3 sudo apt-get -y install aptitude - output "********" + output " " output "Installing Nginx server." - output "********" + output " " sleep 3 sudo aptitude -y install nginx sudo rm /etc/nginx/sites-enabled/default @@ -73,18 +73,18 @@ default 0; } ' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 - output "********" + output " " output "Installing Mariadb Server." - output "********" + output " " sleep 3 # create random password rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" sudo aptitude -y install mariadb-server - output "********" + output " " output "Installing php7.x and other needed files" - output "********" + output " " sleep 3 sudo aptitude -y install php7.0-fpm sudo aptitude -y install php7.0-opcache php7.0-fpm php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring @@ -118,9 +118,9 @@ default 0; password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` AUTOGENERATED_PASS=`pwgen -c -1 20` - output "********" + output " " output "Testing to see if server emails are sent" - output "********" + output " " sleep 3 if [[ "$root_email" != "" ]]; then echo $root_email > sudo tee --append ~/.email @@ -138,9 +138,9 @@ default 0; fi fi - output "********" + output " " output "Some optional installs" - output "********" + output " " sleep 3 if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then sudo aptitude -y install fail2ban @@ -173,9 +173,9 @@ default 0; sudo ufw --force enable fi - output "********" + output " " output "Installing phpmyadmin" - output "********" + output " " sleep 3 echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | sudo debconf-set-selections @@ -185,11 +185,11 @@ default 0; echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections sudo aptitude -y install phpmyadmin - output "********" + output " " output " Installing yiimp" - output "********" + output " " output "Grabbing yiimp fron Github, building files and setting file structure." - output "********" + output " " sleep 3 #Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` @@ -237,9 +237,9 @@ exec bash ' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 sudo chmod +x /var/stratum/config/run.sh - output "********" + output " " output "Update default timezone." - output "********" + output " " # check if link file sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime @@ -252,9 +252,9 @@ sudo chmod +x /var/stratum/config/run.sh output "Making Web Server Magic Happen!" # adding user to group, creating dir structure, setting permissions sudo mkdir -p /var/www/$server_name/html - output "********" + output " " output "Creating webserver initial config file" - output "********" + output " " if [[ ("$sub_domain" == "y" || "$sub_domain" == "Y") ]]; then echo 'include /etc/nginx/blockuseragents.rules; server { @@ -652,9 +652,9 @@ echo 'include /etc/nginx/blockuseragents.rules; sudo service php7.0-fpm reload fi - output "********" + output " " output "Now for the database fun!" - output "********" + output " " sleep 3 # create database Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" @@ -713,11 +713,11 @@ define('"'"'EXCH_POLONIEX_SECRET'"'"', '"'"''"'"'); define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); ' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 - output "********" + output " " output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" - output "********" + output " " output "Peforming the SQL import" - output "********" + output " " sleep 3 cd ~ cd yiimp/sql @@ -742,9 +742,9 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql - output "********" + output " " output "Generating a basic serverconfig.php" - output "********" + output " " sleep 3 # make config file echo ' @@ -823,9 +823,9 @@ $configAlgoNormCoef = array( ); ' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 -output "********" +output " " output "Updating stratum config files with database connection info." -output "********" +output " " sleep 3 cd /var/stratum/config sudo sed -i 's/password = tu8tu5/password = '$blckntifypass'/g' *.conf @@ -836,9 +836,9 @@ sudo sed -i 's/username = root/username = stratum/g' *.conf sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf cd ~ -output "********" +output " " output "Final Directory permissions" -output "********" +output " " sleep 3 whoami=`whoami` sudo mkdir /root/backup/ @@ -859,10 +859,10 @@ sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-fold sudo service nginx restart sudo service php7.0-fpm reload -output "********" -output "********" -output "********" -output "********" +output " " +output " " +output " " +output " " output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." output "" output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." @@ -873,5 +873,5 @@ output "If you found this script helpful please consider donating some BTC Donat output "" output "TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig" output "" -output "********" +output " " From a97066d97f4c97ece0e9e7892a207f600dff3337 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 22:21:54 +0100 Subject: [PATCH 094/360] fix typo --- install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install.sh b/install.sh index 5e42998f..4758d4b2 100644 --- a/install.sh +++ b/install.sh @@ -103,7 +103,11 @@ default 0; sudo aptitude -y install git sudo aptitude -y install pwgen -y + #Installing Package to compile crypto currency + output " " + output "Installing Package to compile crypto currency" + output " " sudo add-apt-repository -y ppa:bitcoin/bitcoin sudo aptitude -y update sudo aptitude -y install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ libminiupnpc10 libzmq5 From d3fe7b2934a287fa33b400ea361813e359bf888e Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 22:27:57 +0100 Subject: [PATCH 095/360] Update readme --- README.md | 76 +++++++++++++++++++++++++------------------------------ 1 file changed, 35 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index c3ab729c..90898c5f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ *********************************** +Discord : https://discord.gg/zcCXjkQ TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig @@ -9,63 +10,56 @@ TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig *********************************** - Install script for yiimp on Ubuntu 16.04 -While I did add some server security to the script, it is every server owners responsibility to fully secure their own servers. After the installation you will still need to customize your serverconfig.php file to your liking, add your API keys, and build/add your coins to the control panel. -There will be several wallets already in yiimp. These have nothing to do with the installation script and are from the database import from the yiimp github. +Connect on your VPS => -If you need further assistance we have a small but growing discord channel at https://discord.gg/uQ5wdTC +adduser pool +adduser pool sudo +su - pool +git clone https://github.com/xavatar/yiimp_install_scrypt.git +cd yiimp_install_scrypt/ +***** Do not run the script as root ***** +sudo bash install.sh +sudo bash screen-scrypt.sh -*****Do not run the script as root***** -This script has an interactive beginning and will ask for the following information: +Finish ! +Go http://xxx.xxxxxx.xxx and Enjoy ! -Your time zone -Server Name -Support Email Address -Server Admin Email Address -If you would like fail2ban installed -If you would like to have SSL (LetsEncrypt) installed - Your domain must be pointed to your server prior to running the script or SSL will fail to install. -New custom location for yiimp admin login. - -Once those questions are answered the script will then be fully automated for the rest of the install. - -1. Update and Upgrade Ubuntu Packages -2. Install Aptitude -3. Install and configure Nginx -4. Install MariaDB with random root password -5. Install php7 -6. Install various dev packages required for building blocknotify and stratum -7. Install SendMail -8. Install Fail2Ban if selected -9. Install and configur phpmyadmin with random password for phpmyadmin user -10. Clone yiimp build packages, create directory structure, set file permissions, and more -11. Update server clock -12. Install LetsEncrypt if selected -13. Create yiimp database, create 2 users with random passwords - passwords saved in ~/.my.cnf -14. Import the sql dumps from yiimp -15. Create base yiimp serverconfig.php file to get you going -16. Updates all directory permissions - -This install script will get you 95% ready to go with yiimp. There are a few things you need to do after the main install is finished. You must update the following files: 1. /var/web/serverconfig.php - update this file to include your public ip to access the admin panel. update with public keys from exchanges. update with other information specific to your server.. 2. /etc/yiimp/keys.php - update with secrect keys from the exchanges. -After you add the missing information to those files then run: -bash main.sh -bash loop2.sh -bash block.sh -To download and run +This script has an interactive beginning and will ask for the following information : + +Enter time zone +Server Name +Are you using a subdomain +Enter support email +Set stratum to AutoExchange +New location for /site/adminRights +Your Public IP for admin access +Install Fail2ban +Install UFW and configure ports +Install LetsEncrypt SSL + + +*********************************** + + +While I did add some server security to the script, it is every server owners responsibility to fully secure their own servers. After the installation you will still need to customize your serverconfig.php file to your liking, add your API keys, and build/add your coins to the control panel. -curl -Lo install.sh https://raw.githubusercontent.com/crombiecrunch/yiimp_install_scrypt/master/install.sh +There will be several wallets already in yiimp. These have nothing to do with the installation script and are from the database import from the yiimp github. + +If you need further assistance we have a small but growing discord channel at https://discord.gg/zcCXjkQ + +This install script will get you 95% ready to go with yiimp. There are a few things you need to do after the main install is finished. -bash install.sh If this helped you or you feel giving please donate BTC Donation: 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz From 3cc20d918f516282f29d5bddd269b5d5bbde6690 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 22:29:08 +0100 Subject: [PATCH 096/360] fix typo --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 90898c5f..cef3880b 100644 --- a/README.md +++ b/README.md @@ -16,15 +16,23 @@ Install script for yiimp on Ubuntu 16.04 Connect on your VPS => adduser pool + adduser pool sudo + su - pool + git clone https://github.com/xavatar/yiimp_install_scrypt.git + cd yiimp_install_scrypt/ + ***** Do not run the script as root ***** + sudo bash install.sh + sudo bash screen-scrypt.sh + Finish ! Go http://xxx.xxxxxx.xxx and Enjoy ! @@ -38,14 +46,23 @@ You must update the following files: This script has an interactive beginning and will ask for the following information : Enter time zone + Server Name + Are you using a subdomain + Enter support email + Set stratum to AutoExchange + New location for /site/adminRights + Your Public IP for admin access + Install Fail2ban + Install UFW and configure ports + Install LetsEncrypt SSL From 282e64828a8dfcc4d66ff8d952ca4ed5fd4a4d76 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 22:29:53 +0100 Subject: [PATCH 097/360] fix typo --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index cef3880b..a06ec781 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ You must update the following files: 1. /var/web/serverconfig.php - update this file to include your public ip to access the admin panel. update with public keys from exchanges. update with other information specific to your server.. 2. /etc/yiimp/keys.php - update with secrect keys from the exchanges. +*********************************** This script has an interactive beginning and will ask for the following information : From 396a9cc90b44605dd985da46deac320e9ec7fe46 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 22:31:19 +0100 Subject: [PATCH 098/360] fix readme --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index a06ec781..3e7ebd51 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # yiimp -*********************************** Discord : https://discord.gg/zcCXjkQ From 4f5316d5c30f2a550f01df9e82d1af8c067a9816 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 22:32:58 +0100 Subject: [PATCH 099/360] add info --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3e7ebd51..42eeb71f 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ You must update the following files: 1. /var/web/serverconfig.php - update this file to include your public ip to access the admin panel. update with public keys from exchanges. update with other information specific to your server.. 2. /etc/yiimp/keys.php - update with secrect keys from the exchanges. +Your mysql information is saved in ~/.my.cnf + *********************************** This script has an interactive beginning and will ask for the following information : From 51db916e9600d6078423a591c63ea60e58417071 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 22:38:00 +0100 Subject: [PATCH 100/360] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 42eeb71f..4c33e660 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# yiimp +# Yiimp Discord : https://discord.gg/zcCXjkQ From 399970fa918ecc6d196a06a56277e2cb5cee69f7 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 22:38:34 +0100 Subject: [PATCH 101/360] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c33e660..bd9bf16f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yiimp +# Yiimp_install_scrypt Discord : https://discord.gg/zcCXjkQ From 64d36f4279d1d518da221ecb96f5ad615b9d93f6 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 22:42:02 +0100 Subject: [PATCH 102/360] add information --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index bd9bf16f..9d9abd77 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ Discord : https://discord.gg/zcCXjkQ TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig +Official Yiimp (used in this scrypt for Yiimp Installation): https://github.com/tpruvot/yiimp + *********************************** From b3e2e5ec1765cce717d69edc4da85d8f6e8a8e3a Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 22:43:06 +0100 Subject: [PATCH 103/360] add info --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d9abd77..a6b82fc5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yiimp_install_scrypt +# Yiimp_install_scrypt (update Feb 3, 2018) Discord : https://discord.gg/zcCXjkQ From d8ee886aaf22ae8e1326fe499316cf09bb8ac73b Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 3 Feb 2018 23:48:53 +0100 Subject: [PATCH 104/360] add package compil crypto --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 4758d4b2..141c40c0 100644 --- a/install.sh +++ b/install.sh @@ -112,7 +112,7 @@ default 0; sudo aptitude -y update sudo aptitude -y install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ libminiupnpc10 libzmq5 sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev - sudo aptitude -y install software-properties-common + sudo aptitude -y install software-properties-common libcanberra-gtk-module libqrencode-dev sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler From 0b1336f0e31bcaacf7577349837702b0b98857fd Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 3 Feb 2018 23:59:27 +0100 Subject: [PATCH 105/360] Update install.sh --- install.sh | 201 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 116 insertions(+), 85 deletions(-) diff --git a/install.sh b/install.sh index 141c40c0..f78916b5 100644 --- a/install.sh +++ b/install.sh @@ -23,9 +23,9 @@ displayErr() { exit 1; } - output " " - output "Make sure you double check before hitting enter! Only one shot at these!" - output " " + output " " + output "Make sure you double check before hitting enter! Only one shot at these!" + output " " read -e -p "Enter time zone (e.g. America/New_York) : " TIME read -e -p "Server name (no http:// or www. just example.com) : " server_name read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain @@ -40,28 +40,32 @@ displayErr() { output " " output "Updating system and installing required packages." output " " - sleep 3 + sleep 3 + # update package and upgrade Ubuntu sudo apt-get -y update sudo apt-get -y upgrade sudo apt-get -y autoremove - output " " + output " " output "Switching to Aptitude" output " " - sleep 3 + sleep 3 + sudo apt-get -y install aptitude - output " " + output " " output "Installing Nginx server." output " " - sleep 3 + sleep 3 + sudo aptitude -y install nginx sudo rm /etc/nginx/sites-enabled/default sudo service nginx start sudo service cron start + #Making Nginx a bit hard echo 'map $http_user_agent $blockedagent { default 0; @@ -73,19 +77,22 @@ default 0; } ' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 - output " " + output " " output "Installing Mariadb Server." output " " - sleep 3 + sleep 3 + + # create random password rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" sudo aptitude -y install mariadb-server - output " " + output " " output "Installing php7.x and other needed files" output " " - sleep 3 + sleep 3 + sudo aptitude -y install php7.0-fpm sudo aptitude -y install php7.0-opcache php7.0-fpm php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring sudo phpenmod mcrypt @@ -99,23 +106,21 @@ default 0; sudo aptitude -y install gnutls-dev sudo aptitude -y install librtmp-dev sudo aptitude -y install sendmail - sudo aptitude -y install mutt + sudo aptitude -y install mutt sudo aptitude -y install git sudo aptitude -y install pwgen -y - - - #Installing Package to compile crypto currency - output " " + + + #Installing Package to compile crypto currency + output " " output "Installing Package to compile crypto currency" output " " - sudo add-apt-repository -y ppa:bitcoin/bitcoin - sudo aptitude -y update - sudo aptitude -y install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ libminiupnpc10 libzmq5 - sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev - sudo aptitude -y install software-properties-common libcanberra-gtk-module libqrencode-dev - sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler - - + sudo add-apt-repository -y ppa:bitcoin/bitcoin + sudo aptitude -y update + sudo aptitude -y install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ libminiupnpc10 libzmq5 + sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev + sudo aptitude -y install software-properties-common libcanberra-gtk-module libqrencode-dev + sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler #Generating Random Passwords @@ -123,9 +128,9 @@ default 0; password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` AUTOGENERATED_PASS=`pwgen -c -1 20` output " " - output "Testing to see if server emails are sent" + output "Testing to see if server emails are sent" output " " - sleep 3 + sleep 3 if [[ "$root_email" != "" ]]; then echo $root_email > sudo tee --append ~/.email echo $root_email > sudo tee --append ~/.forward @@ -142,10 +147,12 @@ default 0; fi fi - output " " + output " " output "Some optional installs" - output " " - sleep 3 + output " " + sleep 3 + + if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then sudo aptitude -y install fail2ban fi @@ -180,7 +187,7 @@ default 0; output " " output "Installing phpmyadmin" output " " - sleep 3 + sleep 3 echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/mysql/admin-user string root" | sudo debconf-set-selections @@ -189,12 +196,14 @@ default 0; echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections sudo aptitude -y install phpmyadmin - output " " + output " " output " Installing yiimp" output " " output "Grabbing yiimp fron Github, building files and setting file structure." output " " - sleep 3 + sleep 3 + + #Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` cd ~ @@ -216,15 +225,15 @@ default 0; sudo mkdir -p /var/stratum cd $HOME/yiimp/stratum sudo cp -a config.sample/. /var/stratum/config - sudo cp -r stratum /var/stratum - sudo cp -r run.sh /var/stratum - cd $HOME/yiimp - sudo cp -r $HOME/yiimp/bin/. /bin/ - sudo cp -r $HOME/yiimp/blocknotify/blocknotify /usr/bin/ - sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum/ - sudo mkdir -p /etc/yiimp - sudo mkdir -p /$HOME/backup/ - #fixing yiimp + sudo cp -r stratum /var/stratum + sudo cp -r run.sh /var/stratum + cd $HOME/yiimp + sudo cp -r $HOME/yiimp/bin/. /bin/ + sudo cp -r $HOME/yiimp/blocknotify/blocknotify /usr/bin/ + sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum/ + sudo mkdir -p /etc/yiimp + sudo mkdir -p /$HOME/backup/ + #fixing yiimp sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp #fixing run.sh sudo rm -r /var/stratum/config/run.sh @@ -241,26 +250,33 @@ exec bash ' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 sudo chmod +x /var/stratum/config/run.sh - output " " + + output " " output "Update default timezone." - output " " + output " " # check if link file sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime + # update time zone sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime sudo aptitude -y install ntpdate + # write time to clock. sudo hwclock -w + output " " output "Making Web Server Magic Happen!" + output " " # adding user to group, creating dir structure, setting permissions - sudo mkdir -p /var/www/$server_name/html - output " " + sudo mkdir -p /var/www/$server_name/html + + + output " " output "Creating webserver initial config file" output " " if [[ ("$sub_domain" == "y" || "$sub_domain" == "Y") ]]; then -echo 'include /etc/nginx/blockuseragents.rules; + echo 'include /etc/nginx/blockuseragents.rules; server { if ($blockedagent) { return 403; @@ -338,11 +354,15 @@ echo 'include /etc/nginx/blockuseragents.rules; } ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 - sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf - sudo ln -s /var/web /var/www/$server_name/html - sudo service nginx restart - if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf + sudo ln -s /var/web /var/www/$server_name/html + sudo service nginx restart + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + + output " " output "Install LetsEncrypt and setting SSL" + output " " + sudo aptitude -y install letsencrypt sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" sudo rm /etc/nginx/sites-available/$server_name.conf @@ -535,12 +555,15 @@ echo 'include /etc/nginx/blockuseragents.rules; } ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 - sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf - sudo ln -s /var/web /var/www/$server_name/html - sudo service nginx restart - if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf + sudo ln -s /var/web /var/www/$server_name/html + sudo service nginx restart + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + + output " " output "Install LetsEncrypt and setting SSL" - sleep 3 + output " " + sleep 3 sudo aptitude -y install letsencrypt sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" sudo rm /etc/nginx/sites-available/$server_name.conf @@ -656,16 +679,18 @@ echo 'include /etc/nginx/blockuseragents.rules; sudo service php7.0-fpm reload fi - output " " + output " " output "Now for the database fun!" - output " " - sleep 3 + output " " + sleep 3 + # create database Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" Q3="FLUSH PRIVILEGES;" SQL="${Q1}${Q2}${Q3}" sudo mysql -u root -p="" -e "$SQL" + # create stratum user Q1="GRANT ALL ON *.* TO 'stratum'@'localhost' IDENTIFIED BY '$password2';" Q2="FLUSH PRIVILEGES;" @@ -717,39 +742,44 @@ define('"'"'EXCH_POLONIEX_SECRET'"'"', '"'"''"'"'); define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); ' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 - output " " + + output " " output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" output " " output "Peforming the SQL import" output " " - sleep 3 + sleep 3 + cd ~ cd yiimp/sql + # import sql dump sudo zcat 2016-04-03-yaamp.sql.gz | sudo mysql --defaults-group-suffix=host1 + # oh the humanity! - sudo mysql --defaults-group-suffix=host1 --force < 2016-04-24-market_history.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-04-27-settings.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-05-11-coins.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-05-15-benchmarks.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-05-23-bookmarks.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-06-01-notifications.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-06-04-bench_chips.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-11-23-coins.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-02-05-benchmarks.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-03-31-earnings_index.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-05-accounts_case_swaptime.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-06-payouts_coinid_memo.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-09-notifications.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-10-bookmarks.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql - sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql - sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-04-24-market_history.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-04-27-settings.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-11-coins.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-15-benchmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-23-bookmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-06-01-notifications.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-06-04-bench_chips.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-11-23-coins.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-02-05-benchmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-03-31-earnings_index.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-05-accounts_case_swaptime.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-06-payouts_coinid_memo.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-09-notifications.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-10-bookmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql + sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql + sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql output " " output "Generating a basic serverconfig.php" output " " - sleep 3 + sleep 3 + # make config file echo ' Date: Sun, 4 Feb 2018 00:15:31 +0100 Subject: [PATCH 106/360] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a6b82fc5..34e935aa 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Discord : https://discord.gg/zcCXjkQ TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig -Official Yiimp (used in this scrypt for Yiimp Installation): https://github.com/tpruvot/yiimp +Official Yiimp (used in this script for Yiimp Installation): https://github.com/tpruvot/yiimp *********************************** From 3feebfd4120470853cca61be1ca83d7d760f2ff4 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sun, 4 Feb 2018 11:42:02 +0100 Subject: [PATCH 107/360] add info --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 34e935aa..683ebe1b 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ cd yiimp_install_scrypt/ sudo bash install.sh -sudo bash screen-scrypt.sh +sudo bash screen-scrypt.sh (in tuto youtube, i launch the scrypt with root... it does not matter. Just if you reboot your vps, restart this script or add to contrab) From 45db97ba7126d24a32c7b307a5dcb11bda97c96a Mon Sep 17 00:00:00 2001 From: xavatar Date: Sun, 4 Feb 2018 12:51:52 +0100 Subject: [PATCH 108/360] fix typo --- README.md | 84 ++++++++++++++++++------------------------------------- 1 file changed, 27 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index 683ebe1b..accd1e6f 100644 --- a/README.md +++ b/README.md @@ -10,79 +10,49 @@ Official Yiimp (used in this script for Yiimp Installation): https://github.com/ *********************************** - -Install script for yiimp on Ubuntu 16.04 - +## Install script for yiimp on Ubuntu 16.04 Connect on your VPS => - -adduser pool - -adduser pool sudo - -su - pool - -git clone https://github.com/xavatar/yiimp_install_scrypt.git - -cd yiimp_install_scrypt/ - +- adduser pool +- adduser pool sudo +- su - pool +- git clone https://github.com/xavatar/yiimp_install_scrypt.git +- cd yiimp_install_scrypt/ ***** Do not run the script as root ***** - -sudo bash install.sh - -sudo bash screen-scrypt.sh (in tuto youtube, i launch the scrypt with root... it does not matter. Just if you reboot your vps, restart this script or add to contrab) - - +- sudo bash install.sh +- sudo bash screen-scrypt.sh (in tuto youtube, i launch the scrypt with root... it does not matter. Just if you reboot your vps, restart this script or add to contrab) Finish ! Go http://xxx.xxxxxx.xxx and Enjoy ! - You must update the following files: +- /var/web/serverconfig.php - update this file to include your public ip to access the admin panel. update with public keys from exchanges. update with other information specific to your server.. +- /etc/yiimp/keys.php - update with secrect keys from the exchanges. -1. /var/web/serverconfig.php - update this file to include your public ip to access the admin panel. update with public keys from exchanges. update with other information specific to your server.. -2. /etc/yiimp/keys.php - update with secrect keys from the exchanges. - -Your mysql information is saved in ~/.my.cnf +### Your mysql information is saved in ~/.my.cnf *********************************** -This script has an interactive beginning and will ask for the following information : - -Enter time zone - -Server Name - -Are you using a subdomain - -Enter support email - -Set stratum to AutoExchange - -New location for /site/adminRights - -Your Public IP for admin access - -Install Fail2ban - -Install UFW and configure ports - -Install LetsEncrypt SSL +## This script has an interactive beginning and will ask for the following information : +- Enter time zone +- Server Name +- Are you using a subdomain +- Enter support email +- Set stratum to AutoExchange +- New location for /site/adminRights +- Your Public IP for admin access +- Install Fail2ban +- Install UFW and configure ports +- Install LetsEncrypt SSL *********************************** +- While I did add some server security to the script, it is every server owners responsibility to fully secure their own servers. After the installation you will still need to customize your serverconfig.php file to your liking, add your API keys, and build/add your coins to the control panel. +- There will be several wallets already in yiimp. These have nothing to do with the installation script and are from the database import from the yiimp github. +- If you need further assistance we have a small but growing discord channel at https://discord.gg/zcCXjkQ +- This install script will get you 95% ready to go with yiimp. There are a few things you need to do after the main install is finished. -While I did add some server security to the script, it is every server owners responsibility to fully secure their own servers. After the installation you will still need to customize your serverconfig.php file to your liking, add your API keys, and build/add your coins to the control panel. - -There will be several wallets already in yiimp. These have nothing to do with the installation script and are from the database import from the yiimp github. - -If you need further assistance we have a small but growing discord channel at https://discord.gg/zcCXjkQ - -This install script will get you 95% ready to go with yiimp. There are a few things you need to do after the main install is finished. - - - -If this helped you or you feel giving please donate BTC Donation: 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz +- If this helped you or you feel giving please donate BTC Donation: 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz From ea4db091149a514246ae61fdb2f6d34ea902ce00 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sun, 4 Feb 2018 13:02:48 +0100 Subject: [PATCH 109/360] fix typo --- README.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index accd1e6f..1c8dada7 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,9 @@ Connect on your VPS => - su - pool - git clone https://github.com/xavatar/yiimp_install_scrypt.git - cd yiimp_install_scrypt/ -***** Do not run the script as root ***** -- sudo bash install.sh -- sudo bash screen-scrypt.sh (in tuto youtube, i launch the scrypt with root... it does not matter. Just if you reboot your vps, restart this script or add to contrab) +- sudo bash install.sh (Do not run the script as root) +- sudo bash screen-scrypt.sh (in tuto youtube, i launch the scrypt with root... it does not matter) +- sudo bash screen-stratum.sh (configure before start this script... add or remove algo you use) Finish ! Go http://xxx.xxxxxx.xxx and Enjoy ! @@ -29,11 +29,13 @@ You must update the following files: - /var/web/serverconfig.php - update this file to include your public ip to access the admin panel. update with public keys from exchanges. update with other information specific to your server.. - /etc/yiimp/keys.php - update with secrect keys from the exchanges. -### Your mysql information is saved in ~/.my.cnf +###### IMPORTANT : +- **Your mysql information (login/Password) is saved in ~/.my.cnf** +- **If you reboot your VPS, you must restart screen-scrypt.sh and screen-stratum.sh (or add crontab)** *********************************** -## This script has an interactive beginning and will ask for the following information : +###### This script has an interactive beginning and will ask for the following information : - Enter time zone - Server Name @@ -48,11 +50,14 @@ You must update the following files: *********************************** -- While I did add some server security to the script, it is every server owners responsibility to fully secure their own servers. After the installation you will still need to customize your serverconfig.php file to your liking, add your API keys, and build/add your coins to the control panel. -- There will be several wallets already in yiimp. These have nothing to do with the installation script and are from the database import from the yiimp github. -- If you need further assistance we have a small but growing discord channel at https://discord.gg/zcCXjkQ -- This install script will get you 95% ready to go with yiimp. There are a few things you need to do after the main install is finished. +While I did add some server security to the script, it is every server owners responsibility to fully secure their own servers. After the installation you will still need to customize your serverconfig.php file to your liking, add your API keys, and build/add your coins to the control panel. -- If this helped you or you feel giving please donate BTC Donation: 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz +There will be several wallets already in yiimp. These have nothing to do with the installation script and are from the database import from the yiimp github. + +If you need further assistance we have a small but growing discord channel at https://discord.gg/zcCXjkQ + +This install script will get you 95% ready to go with yiimp. There are a few things you need to do after the main install is finished. + +If this helped you or you feel giving please donate BTC Donation: 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz From eae57178350e3fd4f0ba7426e559251d25aa9e6f Mon Sep 17 00:00:00 2001 From: xavatar Date: Sun, 4 Feb 2018 13:07:41 +0100 Subject: [PATCH 110/360] fix typo --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1c8dada7..0511ba63 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yiimp_install_scrypt (update Feb 3, 2018) +# Yiimp_install_scrypt (update Feb 4, 2018) Discord : https://discord.gg/zcCXjkQ @@ -25,11 +25,13 @@ Connect on your VPS => Finish ! Go http://xxx.xxxxxx.xxx and Enjoy ! -You must update the following files: -- /var/web/serverconfig.php - update this file to include your public ip to access the admin panel. update with public keys from exchanges. update with other information specific to your server.. -- /etc/yiimp/keys.php - update with secrect keys from the exchanges. +###### **You must update the following files :** +- **/var/web/serverconfig.php - update this file to include your public ip to access the admin panel. update with public keys from exchanges. update with other information specific to your server..** +- **/etc/yiimp/keys.php - update with secrect keys from the exchanges** + + +###### **IMPORTANT** : -###### IMPORTANT : - **Your mysql information (login/Password) is saved in ~/.my.cnf** - **If you reboot your VPS, you must restart screen-scrypt.sh and screen-stratum.sh (or add crontab)** @@ -50,14 +52,14 @@ You must update the following files: *********************************** +**This install script will get you 95% ready to go with yiimp. There are a few things you need to do after the main install is finished.** + While I did add some server security to the script, it is every server owners responsibility to fully secure their own servers. After the installation you will still need to customize your serverconfig.php file to your liking, add your API keys, and build/add your coins to the control panel. There will be several wallets already in yiimp. These have nothing to do with the installation script and are from the database import from the yiimp github. If you need further assistance we have a small but growing discord channel at https://discord.gg/zcCXjkQ -This install script will get you 95% ready to go with yiimp. There are a few things you need to do after the main install is finished. - If this helped you or you feel giving please donate BTC Donation: 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz From ee86d030fe46fd1d118e2887c5303b0deecbb14d Mon Sep 17 00:00:00 2001 From: xavatar Date: Sun, 4 Feb 2018 13:10:11 +0100 Subject: [PATCH 111/360] fix typo --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0511ba63..c3d78185 100644 --- a/README.md +++ b/README.md @@ -25,15 +25,15 @@ Connect on your VPS => Finish ! Go http://xxx.xxxxxx.xxx and Enjoy ! -###### **You must update the following files :** -- **/var/web/serverconfig.php - update this file to include your public ip to access the admin panel. update with public keys from exchanges. update with other information specific to your server..** -- **/etc/yiimp/keys.php - update with secrect keys from the exchanges** +###### **YOU MUST UPDATE THE FOLLOWING FILES :** +- **/var/web/serverconfig.php :** update this file to include your public ip to access the admin panel. update with public keys from exchanges. update with other information specific to your server.. +- **/etc/yiimp/keys.php :** update with secrect keys from the exchanges ###### **IMPORTANT** : -- **Your mysql information (login/Password) is saved in ~/.my.cnf** -- **If you reboot your VPS, you must restart screen-scrypt.sh and screen-stratum.sh (or add crontab)** +- Your mysql information (login/Password) is saved in **~/.my.cnf** +- **If you reboot your VPS**, you must restart screen-scrypt.sh and screen-stratum.sh (or add crontab) *********************************** @@ -61,5 +61,3 @@ There will be several wallets already in yiimp. These have nothing to do with th If you need further assistance we have a small but growing discord channel at https://discord.gg/zcCXjkQ If this helped you or you feel giving please donate BTC Donation: 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz - - From 07a44125a4941e9839779fbcf7d9e501b24ef5c8 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sun, 4 Feb 2018 13:13:20 +0100 Subject: [PATCH 112/360] fix typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c3d78185..587cb47f 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,12 @@ Connect on your VPS => Finish ! Go http://xxx.xxxxxx.xxx and Enjoy ! -###### **YOU MUST UPDATE THE FOLLOWING FILES :** +###### :bangbang: **YOU MUST UPDATE THE FOLLOWING FILES :** - **/var/web/serverconfig.php :** update this file to include your public ip to access the admin panel. update with public keys from exchanges. update with other information specific to your server.. - **/etc/yiimp/keys.php :** update with secrect keys from the exchanges -###### **IMPORTANT** : +###### :bangbang: **IMPORTANT** : - Your mysql information (login/Password) is saved in **~/.my.cnf** - **If you reboot your VPS**, you must restart screen-scrypt.sh and screen-stratum.sh (or add crontab) From e6b44049f554e98c15a3071d661d2f6a351b61f3 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sun, 4 Feb 2018 13:25:06 +0100 Subject: [PATCH 113/360] add info readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 587cb47f..45ac2fa8 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Go http://xxx.xxxxxx.xxx and Enjoy ! - Your mysql information (login/Password) is saved in **~/.my.cnf** - **If you reboot your VPS**, you must restart screen-scrypt.sh and screen-stratum.sh (or add crontab) +- Remember to restart **memcached service** after the db change (update or import new .sql) *********************************** From 5a4008c47a0ca58456170b977f558cea64f13f4f Mon Sep 17 00:00:00 2001 From: xavatar Date: Sun, 4 Feb 2018 22:17:36 +0100 Subject: [PATCH 114/360] add package compile crypto --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index f78916b5..6ef797d5 100644 --- a/install.sh +++ b/install.sh @@ -119,7 +119,7 @@ default 0; sudo aptitude -y update sudo aptitude -y install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ libminiupnpc10 libzmq5 sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev - sudo aptitude -y install software-properties-common libcanberra-gtk-module libqrencode-dev + sudo aptitude -y install software-properties-common libcanberra-gtk-module libqrencode-dev libzmq3-dev sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler From 37a00d0748d545407012283684619157140303ef Mon Sep 17 00:00:00 2001 From: xavatar Date: Mon, 5 Feb 2018 20:47:01 +0100 Subject: [PATCH 115/360] add all firewall rules algo --- install.sh | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/install.sh b/install.sh index 6ef797d5..ffb37df3 100644 --- a/install.sh +++ b/install.sh @@ -163,23 +163,33 @@ default 0; sudo ufw allow ssh sudo ufw allow http sudo ufw allow https - #groestl - sudo ufw allow 3033/tcp - #keccak - sudo ufw allow 5133/tcp - #neoscrypt - sudo ufw allow 4233/tcp - #nist5 - sudo ufw allow 3833/tcp - #quark - sudo ufw allow 4033/tcp - #scrypt - sudo ufw allow 3433/tcp - #skein - sudo ufw allow 4933/tcp - #x11 - sudo ufw allow 3533/tcp - #xevan + sudo ufw allow 2142/tcp + sudo ufw allow 3739/tcp + sudo ufw allow 3525/tcp + sudo ufw allow 4233/tcp + sudo ufw allow 3747/tcp + sudo ufw allow 5033/tcp + sudo ufw allow 4262/tcp + sudo ufw allow 3737/tcp + sudo ufw allow 3556/tcp + sudo ufw allow 3553/tcp + sudo ufw allow 4633/tcp + sudo ufw allow 8433/tcp + sudo ufw allow 3555/tcp + sudo ufw allow 3833/tcp + sudo ufw allow 4533/tcp + sudo ufw allow 4133/tcp + sudo ufw allow 5339/tcp + sudo ufw allow 8533/tcp + sudo ufw allow 3334/tcp + sudo ufw allow 4933/tcp + sudo ufw allow 3333/tcp + sudo ufw allow 6033/tcp + sudo ufw allow 5766/tcp + sudo ufw allow 3533/tcp + sudo ufw allow 4033/tcp + sudo ufw allow 3433/tcp + sudo ufw allow 3633/tcp sudo ufw allow 3739/tcp sudo ufw --force enable fi From 34d16b80a8ff4f6a199a13f5b2f92a033f8e4439 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Mon, 5 Feb 2018 20:48:00 +0100 Subject: [PATCH 116/360] fix typo --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index ffb37df3..fc21a2a5 100644 --- a/install.sh +++ b/install.sh @@ -163,7 +163,7 @@ default 0; sudo ufw allow ssh sudo ufw allow http sudo ufw allow https - sudo ufw allow 2142/tcp + sudo ufw allow 2142/tcp sudo ufw allow 3739/tcp sudo ufw allow 3525/tcp sudo ufw allow 4233/tcp @@ -190,7 +190,7 @@ default 0; sudo ufw allow 4033/tcp sudo ufw allow 3433/tcp sudo ufw allow 3633/tcp - sudo ufw allow 3739/tcp + sudo ufw allow 3739/tcp sudo ufw --force enable fi From 9ccf11198a0af7b24e7f685e0719a37b3e48c922 Mon Sep 17 00:00:00 2001 From: xavatar Date: Tue, 6 Feb 2018 20:16:07 +0100 Subject: [PATCH 117/360] add screen package --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index fc21a2a5..3c5097b0 100644 --- a/install.sh +++ b/install.sh @@ -107,7 +107,7 @@ default 0; sudo aptitude -y install librtmp-dev sudo aptitude -y install sendmail sudo aptitude -y install mutt - sudo aptitude -y install git + sudo aptitude -y install git screen sudo aptitude -y install pwgen -y From 06e75c46ed22b400183eea2613be7a0488377dc9 Mon Sep 17 00:00:00 2001 From: xavatar Date: Wed, 7 Feb 2018 19:52:11 +0100 Subject: [PATCH 118/360] add information --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 45ac2fa8..9cd8f62a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yiimp_install_scrypt (update Feb 4, 2018) +# Yiimp_install_scrypt (update Feb 8, 2018) Discord : https://discord.gg/zcCXjkQ @@ -20,10 +20,10 @@ Connect on your VPS => - cd yiimp_install_scrypt/ - sudo bash install.sh (Do not run the script as root) - sudo bash screen-scrypt.sh (in tuto youtube, i launch the scrypt with root... it does not matter) -- sudo bash screen-stratum.sh (configure before start this script... add or remove algo you use) +- sudo bash screen-stratum.sh ######(configure before start this script... add or remove algo you use)###### Finish ! -Go http://xxx.xxxxxx.xxx and Enjoy ! +Go http://xxx.xxxxxx.xxx or https://xxx.xxxxxx.xxx (if you have chosen LetsEncrypt SSL). Enjoy ! ###### :bangbang: **YOU MUST UPDATE THE FOLLOWING FILES :** - **/var/web/serverconfig.php :** update this file to include your public ip to access the admin panel. update with public keys from exchanges. update with other information specific to your server.. From e19e42335ea93913496f58c9e4a744e7701373a6 Mon Sep 17 00:00:00 2001 From: xavatar Date: Wed, 7 Feb 2018 19:54:34 +0100 Subject: [PATCH 119/360] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9cd8f62a..64e9b221 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Connect on your VPS => - cd yiimp_install_scrypt/ - sudo bash install.sh (Do not run the script as root) - sudo bash screen-scrypt.sh (in tuto youtube, i launch the scrypt with root... it does not matter) -- sudo bash screen-stratum.sh ######(configure before start this script... add or remove algo you use)###### +- NOT MANDATORY => sudo bash screen-stratum.sh (configure before start this script... add or remove algo you use). Finish ! Go http://xxx.xxxxxx.xxx or https://xxx.xxxxxx.xxx (if you have chosen LetsEncrypt SSL). Enjoy ! From 0e31583b2ad5fa9088591444b3949d256adc61f8 Mon Sep 17 00:00:00 2001 From: xavatar Date: Wed, 7 Feb 2018 20:06:28 +0100 Subject: [PATCH 120/360] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 64e9b221..200ce8cf 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Connect on your VPS => - cd yiimp_install_scrypt/ - sudo bash install.sh (Do not run the script as root) - sudo bash screen-scrypt.sh (in tuto youtube, i launch the scrypt with root... it does not matter) -- NOT MANDATORY => sudo bash screen-stratum.sh (configure before start this script... add or remove algo you use). +- NOT MANDATORY => sudo bash screen-stratum.sh (CONFIGURE BEFORE START this script... add or remove algo you use). Finish ! Go http://xxx.xxxxxx.xxx or https://xxx.xxxxxx.xxx (if you have chosen LetsEncrypt SSL). Enjoy ! From a46624bfe8279bfe1dbc2519fe8f30478869c783 Mon Sep 17 00:00:00 2001 From: xavatar Date: Wed, 7 Feb 2018 20:07:39 +0100 Subject: [PATCH 121/360] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 200ce8cf..cdd89271 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Go http://xxx.xxxxxx.xxx or https://xxx.xxxxxx.xxx (if you have chosen LetsEncry ###### :bangbang: **IMPORTANT** : - Your mysql information (login/Password) is saved in **~/.my.cnf** -- **If you reboot your VPS**, you must restart screen-scrypt.sh and screen-stratum.sh (or add crontab) +- **If you reboot your VPS**, you must restart screen-scrypt.sh (or add crontab) - Remember to restart **memcached service** after the db change (update or import new .sql) *********************************** From c216a9fb2ce128ae09640eccef20c7ec2e3100da Mon Sep 17 00:00:00 2001 From: xavatar Date: Wed, 7 Feb 2018 20:12:00 +0100 Subject: [PATCH 122/360] add information readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cdd89271..37e2d02f 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Go http://xxx.xxxxxx.xxx or https://xxx.xxxxxx.xxx (if you have chosen LetsEncry ###### :bangbang: **YOU MUST UPDATE THE FOLLOWING FILES :** - **/var/web/serverconfig.php :** update this file to include your public ip to access the admin panel. update with public keys from exchanges. update with other information specific to your server.. -- **/etc/yiimp/keys.php :** update with secrect keys from the exchanges +- **/etc/yiimp/keys.php :** update with secrect keys from the exchanges (not mandatory) ###### :bangbang: **IMPORTANT** : From 12b288c57a90548de58417352550087b7d5b7374 Mon Sep 17 00:00:00 2001 From: xavatar Date: Thu, 8 Feb 2018 08:05:43 +0100 Subject: [PATCH 123/360] add information --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 37e2d02f..79633d1f 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Go http://xxx.xxxxxx.xxx or https://xxx.xxxxxx.xxx (if you have chosen LetsEncry - Enter support email - Set stratum to AutoExchange - New location for /site/adminRights -- Your Public IP for admin access +- Your Public IP for admin access (Put your PERSONNAL IP, NOT IP of your VPS) - Install Fail2ban - Install UFW and configure ports - Install LetsEncrypt SSL From 18e1283e609d7438c8a486dbb30f330f81dce6d8 Mon Sep 17 00:00:00 2001 From: xavatar Date: Thu, 8 Feb 2018 08:07:25 +0100 Subject: [PATCH 124/360] add information readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 79633d1f..bf6be411 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Finish ! Go http://xxx.xxxxxx.xxx or https://xxx.xxxxxx.xxx (if you have chosen LetsEncrypt SSL). Enjoy ! ###### :bangbang: **YOU MUST UPDATE THE FOLLOWING FILES :** -- **/var/web/serverconfig.php :** update this file to include your public ip to access the admin panel. update with public keys from exchanges. update with other information specific to your server.. +- **/var/web/serverconfig.php :** update this file to include your public ip to access the admin panel (Put your PERSONNAL IP, NOT IP of your VPS). update with public keys from exchanges. update with other information specific to your server.. - **/etc/yiimp/keys.php :** update with secrect keys from the exchanges (not mandatory) From fb6b009fb419bacf45ba55e17272d6652d5a21bd Mon Sep 17 00:00:00 2001 From: xavatar Date: Thu, 8 Feb 2018 08:08:10 +0100 Subject: [PATCH 125/360] add information readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf6be411..ae6546d3 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Finish ! Go http://xxx.xxxxxx.xxx or https://xxx.xxxxxx.xxx (if you have chosen LetsEncrypt SSL). Enjoy ! ###### :bangbang: **YOU MUST UPDATE THE FOLLOWING FILES :** -- **/var/web/serverconfig.php :** update this file to include your public ip to access the admin panel (Put your PERSONNAL IP, NOT IP of your VPS). update with public keys from exchanges. update with other information specific to your server.. +- **/var/web/serverconfig.php :** update this file to include your public ip (line = YAAMP_ADMIN_IP) to access the admin panel (Put your PERSONNAL IP, NOT IP of your VPS). update with public keys from exchanges. update with other information specific to your server.. - **/etc/yiimp/keys.php :** update with secrect keys from the exchanges (not mandatory) From 498f46fc6205dd77975a232b5c08dfe34700f9dd Mon Sep 17 00:00:00 2001 From: xavatar Date: Thu, 8 Feb 2018 19:06:33 +0100 Subject: [PATCH 126/360] add git --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ae6546d3..23b8e276 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Connect on your VPS => - adduser pool - adduser pool sudo - su - pool +- sudo apt-get -y install git - git clone https://github.com/xavatar/yiimp_install_scrypt.git - cd yiimp_install_scrypt/ - sudo bash install.sh (Do not run the script as root) From 7d70fe08509e4d8b821945e48b19d6d51200c722 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 10 Feb 2018 10:40:13 +0100 Subject: [PATCH 127/360] update btc/bch wallet --- README.md | 4 +++- install.sh | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 23b8e276..4d72bf97 100644 --- a/README.md +++ b/README.md @@ -62,4 +62,6 @@ There will be several wallets already in yiimp. These have nothing to do with th If you need further assistance we have a small but growing discord channel at https://discord.gg/zcCXjkQ -If this helped you or you feel giving please donate BTC Donation: 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz +If this helped you or you feel giving please donate : +- BTC Donation : 1C1hnjk3WhuAvUN6Ny6LTxPD3rwSZwapW7 +- BCH Donation : 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz diff --git a/install.sh b/install.sh index 3c5097b0..d2ca41e0 100644 --- a/install.sh +++ b/install.sh @@ -815,7 +815,7 @@ define('"'"'YIIMP_PUBLIC_EXPLORER'"'"', true); define('"'"'YIIMP_PUBLIC_BENCHMARK'"'"', true); define('"'"'YIIMP_FIAT_ALTERNATIVE'"'"', '"'"'USD'"'"'); // USD is main define('"'"'YAAMP_USE_NICEHASH_API'"'"', false); -define('"'"'YAAMP_BTCADDRESS'"'"', '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"'); +define('"'"'YAAMP_BTCADDRESS'"'"', '"'"'1C1hnjk3WhuAvUN6Ny6LTxPD3rwSZwapW7'"'"'); define('"'"'YAAMP_SITE_URL'"'"', '"'"''"${server_name}"''"'"'); define('"'"'YAAMP_STRATUM_URL'"'"', YAAMP_SITE_URL); // change if your stratum server is on a different host define('"'"'YAAMP_SITE_NAME'"'"', '"'"'YIIMP'"'"'); @@ -915,8 +915,6 @@ output "Please make sure to change your wallet addresses in the /var/web/serverc output " " output "Please make sure to add your public and private keys." output " " -output "If you found this script helpful please consider donating some BTC Donation: 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz" -output " " output "TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig" output " " output " " From e233eb1c731541f25471ae19a61fb2aaf4bc02c9 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 10 Feb 2018 11:04:02 +0100 Subject: [PATCH 128/360] add ltc donattion --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4d72bf97..b471de73 100644 --- a/README.md +++ b/README.md @@ -65,3 +65,4 @@ If you need further assistance we have a small but growing discord channel at ht If this helped you or you feel giving please donate : - BTC Donation : 1C1hnjk3WhuAvUN6Ny6LTxPD3rwSZwapW7 - BCH Donation : 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz +- LTC Donation : LQmy2uhDQLiBHVBKwcHwG5nQT8GY5U2nKH From 98dae1de72ab72d090ea3e658aa345cdfaaaa566 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 10 Feb 2018 11:47:07 +0100 Subject: [PATCH 129/360] remove ltc wallet --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index b471de73..4d72bf97 100644 --- a/README.md +++ b/README.md @@ -65,4 +65,3 @@ If you need further assistance we have a small but growing discord channel at ht If this helped you or you feel giving please donate : - BTC Donation : 1C1hnjk3WhuAvUN6Ny6LTxPD3rwSZwapW7 - BCH Donation : 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz -- LTC Donation : LQmy2uhDQLiBHVBKwcHwG5nQT8GY5U2nKH From 83748934615e1a3df095a5f7da9e0e5715cc0f10 Mon Sep 17 00:00:00 2001 From: xavatar Date: Mon, 12 Feb 2018 18:19:29 +0100 Subject: [PATCH 130/360] add info readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4d72bf97..570fc1d9 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ Official Yiimp (used in this script for Yiimp Installation): https://github.com/ ## Install script for yiimp on Ubuntu 16.04 +USE THIS SCRIPT ON FRESH INSTALL UBUNTU 16.04 ! + Connect on your VPS => - adduser pool - adduser pool sudo From 9953218836a2db86bc11ee10734f72be5ac6f642 Mon Sep 17 00:00:00 2001 From: xavatar Date: Tue, 13 Feb 2018 23:53:59 +0100 Subject: [PATCH 131/360] fix package compilation crypto --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index d2ca41e0..89019c90 100644 --- a/install.sh +++ b/install.sh @@ -116,8 +116,10 @@ default 0; output "Installing Package to compile crypto currency" output " " sudo add-apt-repository -y ppa:bitcoin/bitcoin + sudo apt-get update + sudo apt-get install -y libdb4.8-dev libdb4.8++-dev sudo aptitude -y update - sudo aptitude -y install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ libminiupnpc10 libzmq5 + sudo aptitude -y install libdb5.3 libdb5.3++ libminiupnpc10 libzmq5 sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev sudo aptitude -y install software-properties-common libcanberra-gtk-module libqrencode-dev libzmq3-dev sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler From 6b749586484b898d1c2ecbf81096c039c562550c Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 14 Feb 2018 00:02:00 +0100 Subject: [PATCH 132/360] fix typo package crypto --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 89019c90..aeb065e0 100644 --- a/install.sh +++ b/install.sh @@ -116,8 +116,8 @@ default 0; output "Installing Package to compile crypto currency" output " " sudo add-apt-repository -y ppa:bitcoin/bitcoin - sudo apt-get update - sudo apt-get install -y libdb4.8-dev libdb4.8++-dev + sudo apt-get -y update + sudo apt-get install -y libdb4.8-dev libdb4.8++-dev sudo aptitude -y update sudo aptitude -y install libdb5.3 libdb5.3++ libminiupnpc10 libzmq5 sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev From b897e4c771a3912a700440314cd4f74a7a421c65 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 14 Feb 2018 00:24:39 +0100 Subject: [PATCH 133/360] fix error downloading package compil crypto --- install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index aeb065e0..8e7dd0cf 100644 --- a/install.sh +++ b/install.sh @@ -115,15 +115,15 @@ default 0; output " " output "Installing Package to compile crypto currency" output " " + sudo aptitude -y install software-properties-common build-essential + sudo aptitude -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev + sudo aptitude -y install libminiupnpc10 libzmq5 + sudo aptitude -y install libcanberra-gtk-module libqrencode-dev libzmq3-dev + sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler sudo add-apt-repository -y ppa:bitcoin/bitcoin sudo apt-get -y update - sudo apt-get install -y libdb4.8-dev libdb4.8++-dev - sudo aptitude -y update - sudo aptitude -y install libdb5.3 libdb5.3++ libminiupnpc10 libzmq5 - sudo aptitude -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev - sudo aptitude -y install software-properties-common libcanberra-gtk-module libqrencode-dev libzmq3-dev - sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler - + sudo apt-get install -y libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ + sudo aptitude -y update #Generating Random Passwords password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` From b40f29d76a81ae6f516b2cd454f7cf0b046daf83 Mon Sep 17 00:00:00 2001 From: xavatar Date: Wed, 14 Feb 2018 00:26:09 +0100 Subject: [PATCH 134/360] fix typo --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 8e7dd0cf..176a8ef0 100644 --- a/install.sh +++ b/install.sh @@ -116,7 +116,7 @@ default 0; output "Installing Package to compile crypto currency" output " " sudo aptitude -y install software-properties-common build-essential - sudo aptitude -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev + sudo aptitude -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev sudo aptitude -y install libminiupnpc10 libzmq5 sudo aptitude -y install libcanberra-gtk-module libqrencode-dev libzmq3-dev sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler From 85c1e0573a551c0b1ef9b3e05245a3584c9503f0 Mon Sep 17 00:00:00 2001 From: xavatar Date: Wed, 14 Feb 2018 00:28:17 +0100 Subject: [PATCH 135/360] fix typo --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 176a8ef0..f5a06245 100644 --- a/install.sh +++ b/install.sh @@ -123,7 +123,7 @@ default 0; sudo add-apt-repository -y ppa:bitcoin/bitcoin sudo apt-get -y update sudo apt-get install -y libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ - sudo aptitude -y update + #Generating Random Passwords password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` From cec64adffe8ab12ddc60dcecd65d0fae222a423b Mon Sep 17 00:00:00 2001 From: xavatar Date: Wed, 14 Feb 2018 00:29:45 +0100 Subject: [PATCH 136/360] add sleep after package crypto --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index f5a06245..e4b2d245 100644 --- a/install.sh +++ b/install.sh @@ -115,6 +115,7 @@ default 0; output " " output "Installing Package to compile crypto currency" output " " + sleep 3 sudo aptitude -y install software-properties-common build-essential sudo aptitude -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev sudo aptitude -y install libminiupnpc10 libzmq5 From 7c79bb4594a6013e9ccabe7440abae1e0db9c932 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 14 Feb 2018 00:32:10 +0100 Subject: [PATCH 137/360] fix typo --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index e4b2d245..50426cbe 100644 --- a/install.sh +++ b/install.sh @@ -115,7 +115,8 @@ default 0; output " " output "Installing Package to compile crypto currency" output " " - sleep 3 + sleep 3 + sudo aptitude -y install software-properties-common build-essential sudo aptitude -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev sudo aptitude -y install libminiupnpc10 libzmq5 From 0ea5d515fa9d0d5a05720a4289ead1801d557c9a Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 14 Feb 2018 00:34:22 +0100 Subject: [PATCH 138/360] fix typo --- install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install.sh b/install.sh index 50426cbe..eed5eee3 100644 --- a/install.sh +++ b/install.sh @@ -131,10 +131,12 @@ default 0; password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` AUTOGENERATED_PASS=`pwgen -c -1 20` + output " " output "Testing to see if server emails are sent" output " " sleep 3 + if [[ "$root_email" != "" ]]; then echo $root_email > sudo tee --append ~/.email echo $root_email > sudo tee --append ~/.forward @@ -202,6 +204,7 @@ default 0; output "Installing phpmyadmin" output " " sleep 3 + echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/mysql/admin-user string root" | sudo debconf-set-selections @@ -578,6 +581,7 @@ sudo chmod +x /var/stratum/config/run.sh output "Install LetsEncrypt and setting SSL" output " " sleep 3 + sudo aptitude -y install letsencrypt sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" sudo rm /etc/nginx/sites-available/$server_name.conf From 331158ab8813b50eb3b35a2ea188c0121382bb23 Mon Sep 17 00:00:00 2001 From: xavatar Date: Thu, 15 Feb 2018 22:23:12 +0100 Subject: [PATCH 139/360] add info readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 570fc1d9..1b97d61d 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ Go http://xxx.xxxxxx.xxx or https://xxx.xxxxxx.xxx (if you have chosen LetsEncry ###### :bangbang: **IMPORTANT** : +- The configuration of yiimp and coin require a minimum of knowledge in linux - Your mysql information (login/Password) is saved in **~/.my.cnf** - **If you reboot your VPS**, you must restart screen-scrypt.sh (or add crontab) - Remember to restart **memcached service** after the db change (update or import new .sql) From ba441b78897d3e2eefc914af7274f74d16991350 Mon Sep 17 00:00:00 2001 From: xavatar Date: Thu, 15 Feb 2018 23:12:22 +0100 Subject: [PATCH 140/360] add compil script --- compil.sh | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 compil.sh diff --git a/compil.sh b/compil.sh new file mode 100644 index 00000000..3f67353b --- /dev/null +++ b/compil.sh @@ -0,0 +1,61 @@ +#!/bin/bash +################################################################################ +# Original Author: crombiecrunch +# Current Author: Xavatar +# Web: +# +# Program: +# After entering coin name and github link automatically build coin +# +# +################################################################################ +output() { + printf "\E[0;33;40m" + echo $1 + printf "\E[0m" +} +displayErr() { + echo + echo $1; + echo + exit 1; +} +cd ~ +if [[ ! -e 'CoinBuilds' ]]; then + sudo mkdir CoinBuilds +elif [[ ! -d 'CoinBuilds' ]]; then + output "Coinbuilds already exists.... Skipping" 1>&2 +fi +clear +cd CoinBuilds +output "This script assumes you already have the dependicies installed on your system!" +output "" + read -e -p "Enter the name of the coin : " coin + read -e -p "Paste the github link for the coin : " git_hub +if [[ ! -e '$coin' ]]; then +sudo git clone $git_hub $coin +elif [[ ! -d ~$CoinBuilds/$coin ]]; then + output "Coinbuilds/$coin already exists.... Skipping" 1>&2 +output "Can not continue" +exit 0 +fi +cd "${coin}" +if [ -f autogen.sh ]; then +sudo ./autogen.sh +sudo ./configure +sudo make +output "$coin_name finished and can be found in CoinBuilds/$coin/src/ Make sure you sudo strip Coind and coin-cli if it exists, copy to /usr/bin" +else +cd src +if [[ ! -e 'obj' ]]; then + sudo mkdir obj +elif [[ ! -d 'obj' ]]; then + output "Hey the developer did his job" 1>&2 +fi +cd leveldb +sudo chmod +x build_detect_platform +sudo make clean +sudo make libleveldb.a libmemenv.a +cd .. +sudo make -f makefile.unix USE_UPNP=- +output "$coin finished and can be found in CoinBuilds/$coin/src/ Make sure you sudo strip Coind and coin-cli if it exists, copy to /usr/bin" From 518648ae0ed87a45b4c578aa4bad57d267fb9055 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 17 Feb 2018 16:38:54 +0100 Subject: [PATCH 141/360] fix error --- compil.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/compil.sh b/compil.sh index 3f67353b..58662f70 100644 --- a/compil.sh +++ b/compil.sh @@ -59,3 +59,4 @@ sudo make libleveldb.a libmemenv.a cd .. sudo make -f makefile.unix USE_UPNP=- output "$coin finished and can be found in CoinBuilds/$coin/src/ Make sure you sudo strip Coind and coin-cli if it exists, copy to /usr/bin" +fi From e09cb4298971788e1e43b43a47e26c2542e4bec4 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 17 Feb 2018 17:55:55 +0100 Subject: [PATCH 142/360] add condition --- compil.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compil.sh b/compil.sh index 58662f70..38cacf4f 100644 --- a/compil.sh +++ b/compil.sh @@ -52,11 +52,13 @@ if [[ ! -e 'obj' ]]; then elif [[ ! -d 'obj' ]]; then output "Hey the developer did his job" 1>&2 fi +if [[ ! -e 'leveldb' ]]; then cd leveldb sudo chmod +x build_detect_platform sudo make clean sudo make libleveldb.a libmemenv.a cd .. +else sudo make -f makefile.unix USE_UPNP=- output "$coin finished and can be found in CoinBuilds/$coin/src/ Make sure you sudo strip Coind and coin-cli if it exists, copy to /usr/bin" fi From 42ce15fa7a6678e9ed763d75dc4280d1c84948db Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 17 Feb 2018 18:12:38 +0100 Subject: [PATCH 143/360] delete compil.sh for update --- compil.sh | 64 ------------------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 compil.sh diff --git a/compil.sh b/compil.sh deleted file mode 100644 index 38cacf4f..00000000 --- a/compil.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -################################################################################ -# Original Author: crombiecrunch -# Current Author: Xavatar -# Web: -# -# Program: -# After entering coin name and github link automatically build coin -# -# -################################################################################ -output() { - printf "\E[0;33;40m" - echo $1 - printf "\E[0m" -} -displayErr() { - echo - echo $1; - echo - exit 1; -} -cd ~ -if [[ ! -e 'CoinBuilds' ]]; then - sudo mkdir CoinBuilds -elif [[ ! -d 'CoinBuilds' ]]; then - output "Coinbuilds already exists.... Skipping" 1>&2 -fi -clear -cd CoinBuilds -output "This script assumes you already have the dependicies installed on your system!" -output "" - read -e -p "Enter the name of the coin : " coin - read -e -p "Paste the github link for the coin : " git_hub -if [[ ! -e '$coin' ]]; then -sudo git clone $git_hub $coin -elif [[ ! -d ~$CoinBuilds/$coin ]]; then - output "Coinbuilds/$coin already exists.... Skipping" 1>&2 -output "Can not continue" -exit 0 -fi -cd "${coin}" -if [ -f autogen.sh ]; then -sudo ./autogen.sh -sudo ./configure -sudo make -output "$coin_name finished and can be found in CoinBuilds/$coin/src/ Make sure you sudo strip Coind and coin-cli if it exists, copy to /usr/bin" -else -cd src -if [[ ! -e 'obj' ]]; then - sudo mkdir obj -elif [[ ! -d 'obj' ]]; then - output "Hey the developer did his job" 1>&2 -fi -if [[ ! -e 'leveldb' ]]; then -cd leveldb -sudo chmod +x build_detect_platform -sudo make clean -sudo make libleveldb.a libmemenv.a -cd .. -else -sudo make -f makefile.unix USE_UPNP=- -output "$coin finished and can be found in CoinBuilds/$coin/src/ Make sure you sudo strip Coind and coin-cli if it exists, copy to /usr/bin" -fi From 6324d51c6c95a70219b839ef3c920a1834f7f964 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 17 Feb 2018 20:35:33 +0100 Subject: [PATCH 144/360] add compil script --- compil.sh | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 compil.sh diff --git a/compil.sh b/compil.sh new file mode 100644 index 00000000..8fcd0966 --- /dev/null +++ b/compil.sh @@ -0,0 +1,65 @@ +#!/bin/bash +################################################################################ +# +# Original Author: crombiecrunch +# Current Author: Xavatar +# Web: +# +# Program: +# After entering coin name and github link automatically build coin +# +################################################################################ +output() { + printf "\E[0;33;40m" + echo $1 + printf "\E[0m" +} +displayErr() { + echo + echo $1; + echo + exit 1; +} +cd ~ +if [[ ! -e 'CoinBuilds' ]]; then + sudo mkdir CoinBuilds +elif [[ ! -d 'CoinBuilds' ]]; then + output "Coinbuilds already exists.... Skipping" 1>&2 +fi +clear +cd CoinBuilds +output "This script assumes you already have the dependicies installed on your system!" +output "" + read -e -p "Enter the name of the coin : " coin + read -e -p "Paste the github link for the coin : " git_hub +if [[ ! -e '$coin' ]]; then +sudo git clone $git_hub $coin +elif [[ ! -d ~$CoinBuilds/$coin ]]; then + output "Coinbuilds/$coin already exists.... Skipping" 1>&2 +output "Can not continue" +exit 0 +fi +cd "${coin}" +if [ -f autogen.sh ]; then +sudo ./autogen.sh +sudo ./configure CPPFLAGS="-I/usr/local/include" +sudo make +output "$coin_name finished and can be found in CoinBuilds/$coin/src/ Make sure you sudo strip Coind and coin-cli if it exists, copy to /usr/bin" +output "Like my scripts? Please Donate to BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" +else +cd src +if [[ ! -e 'obj' ]]; then + sudo mkdir obj +elif [[ ! -d 'obj' ]]; then + output "Hey the developer did his job" 1>&2 +fi +cd leveldb +sudo chmod +x build_detect_platform +sudo make clean +sudo make libleveldb.a libmemenv.a +cd .. +sudo make -f makefile.unix +output "$coin finished and can be found in CoinBuilds/$coin/src/ Make sure you sudo strip Coind and coin-cli if it exists, copy to /usr/bin" + +output "Like my scripts? Please Donate to BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" +fi \ No newline at end of file From c2343da52f4401f1e10e98c3934d631ad25b867c Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 17 Feb 2018 20:41:58 +0100 Subject: [PATCH 145/360] fix typo and add condition --- compil.sh | 60 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/compil.sh b/compil.sh index 8fcd0966..8442f1e8 100644 --- a/compil.sh +++ b/compil.sh @@ -1,13 +1,13 @@ #!/bin/bash ################################################################################ -# # Original Author: crombiecrunch # Current Author: Xavatar -# Web: +# Web: # # Program: # After entering coin name and github link automatically build coin # +# ################################################################################ output() { printf "\E[0;33;40m" @@ -21,45 +21,63 @@ displayErr() { exit 1; } cd ~ + if [[ ! -e 'CoinBuilds' ]]; then - sudo mkdir CoinBuilds + sudo mkdir CoinBuilds elif [[ ! -d 'CoinBuilds' ]]; then output "Coinbuilds already exists.... Skipping" 1>&2 fi + clear cd CoinBuilds output "This script assumes you already have the dependicies installed on your system!" output "" read -e -p "Enter the name of the coin : " coin read -e -p "Paste the github link for the coin : " git_hub + if [[ ! -e '$coin' ]]; then -sudo git clone $git_hub $coin + sudo git clone $git_hub $coin elif [[ ! -d ~$CoinBuilds/$coin ]]; then output "Coinbuilds/$coin already exists.... Skipping" 1>&2 -output "Can not continue" -exit 0 + output "Can not continue" + exit 0 fi + cd "${coin}" + if [ -f autogen.sh ]; then -sudo ./autogen.sh -sudo ./configure CPPFLAGS="-I/usr/local/include" -sudo make -output "$coin_name finished and can be found in CoinBuilds/$coin/src/ Make sure you sudo strip Coind and coin-cli if it exists, copy to /usr/bin" -output "Like my scripts? Please Donate to BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" + sudo ./autogen.sh + sudo ./configure + sudo make + output " " + output "$coin_name finished and can be found in CoinBuilds/$coin/src/ Make sure you sudo strip Coind and coin-cli if it exists, copy to /usr/bin" + output " " else -cd src + cd src if [[ ! -e 'obj' ]]; then - sudo mkdir obj + output " " + output "Creation directory obj" + output " " + sudo mkdir obj elif [[ ! -d 'obj' ]]; then output "Hey the developer did his job" 1>&2 fi -cd leveldb -sudo chmod +x build_detect_platform -sudo make clean -sudo make libleveldb.a libmemenv.a -cd .. + +if [ -d 'leveldb' ]; then + output " " + output "Compilation libleveldb.a libmemenv.a" + output " " + cd leveldb + sudo chmod +x build_detect_platform + sudo make clean + sudo make libleveldb.a libmemenv.a + cd .. +fi +output " " +output "Compilation Strating" +output " " sudo make -f makefile.unix +output " " output "$coin finished and can be found in CoinBuilds/$coin/src/ Make sure you sudo strip Coind and coin-cli if it exists, copy to /usr/bin" - -output "Like my scripts? Please Donate to BTC Donation: 16xpWzWP2ZaBQWQCDAaseMZBFwnwRUL4bD" -fi \ No newline at end of file +output " " +fi From d5776cae8e6b38058ff8eebaa77d1729021400ed Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 17 Feb 2018 20:53:37 +0100 Subject: [PATCH 146/360] fix typo compil.sh --- compil.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compil.sh b/compil.sh index 8442f1e8..cefc715a 100644 --- a/compil.sh +++ b/compil.sh @@ -46,7 +46,10 @@ fi cd "${coin}" if [ -f autogen.sh ]; then - sudo ./autogen.sh + output " " + output "Auto Compilation Starting " + output " " + sudo ./autogen.sh sudo ./configure sudo make output " " @@ -74,7 +77,7 @@ if [ -d 'leveldb' ]; then cd .. fi output " " -output "Compilation Strating" +output "SRC Compilation Starting " output " " sudo make -f makefile.unix output " " From 9cbed8854adcc360e708cba74dc302a8198a14b4 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sat, 17 Feb 2018 21:03:02 +0100 Subject: [PATCH 147/360] add info compil.sh --- compil.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compil.sh b/compil.sh index cefc715a..6acc7e48 100644 --- a/compil.sh +++ b/compil.sh @@ -48,9 +48,17 @@ cd "${coin}" if [ -f autogen.sh ]; then output " " output "Auto Compilation Starting " + output " " + output "Starting ./autogen.sh" output " " sudo ./autogen.sh + output " " + output "Starting ./configure" + output " " sudo ./configure + output " " + output "Starting make" + output " " sudo make output " " output "$coin_name finished and can be found in CoinBuilds/$coin/src/ Make sure you sudo strip Coind and coin-cli if it exists, copy to /usr/bin" From 7ae5bdbf65bb9b49e024ea868db72957a0cfb963 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sun, 18 Feb 2018 10:33:47 +0100 Subject: [PATCH 148/360] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1b97d61d..d8a557d8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yiimp_install_scrypt (update Feb 8, 2018) +# Yiimp_install_scrypt (update Feb 18, 2018) Discord : https://discord.gg/zcCXjkQ From a3fb805eac2c24c00cd8fef5667ba3bcb896a037 Mon Sep 17 00:00:00 2001 From: xavatar Date: Sun, 18 Feb 2018 15:07:27 +0100 Subject: [PATCH 149/360] add all firewall rules algo --- install.sh | 82 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 28 deletions(-) diff --git a/install.sh b/install.sh index eed5eee3..2490ca76 100644 --- a/install.sh +++ b/install.sh @@ -169,34 +169,60 @@ default 0; sudo ufw allow ssh sudo ufw allow http sudo ufw allow https - sudo ufw allow 2142/tcp - sudo ufw allow 3739/tcp - sudo ufw allow 3525/tcp - sudo ufw allow 4233/tcp - sudo ufw allow 3747/tcp - sudo ufw allow 5033/tcp - sudo ufw allow 4262/tcp - sudo ufw allow 3737/tcp - sudo ufw allow 3556/tcp - sudo ufw allow 3553/tcp - sudo ufw allow 4633/tcp - sudo ufw allow 8433/tcp - sudo ufw allow 3555/tcp - sudo ufw allow 3833/tcp - sudo ufw allow 4533/tcp - sudo ufw allow 4133/tcp - sudo ufw allow 5339/tcp - sudo ufw allow 8533/tcp - sudo ufw allow 3334/tcp - sudo ufw allow 4933/tcp - sudo ufw allow 3333/tcp - sudo ufw allow 6033/tcp - sudo ufw allow 5766/tcp - sudo ufw allow 3533/tcp - sudo ufw allow 4033/tcp - sudo ufw allow 3433/tcp - sudo ufw allow 3633/tcp - sudo ufw allow 3739/tcp + sudo ufw allow 3333/tcp + sudo ufw allow 3339/tcp + sudo ufw allow 3334/tcp + sudo ufw allow 3433/tcp + sudo ufw allow 3555/tcp + sudo ufw allow 3556/tcp + sudo ufw allow 3573/tcp + sudo ufw allow 3535/tcp + sudo ufw allow 3533/tcp + sudo ufw allow 3553/tcp + sudo ufw allow 3633/tcp + sudo ufw allow 3733/tcp + sudo ufw allow 3636/tcp + sudo ufw allow 3737/tcp + sudo ufw allow 3739/tcp + sudo ufw allow 3747/tcp + sudo ufw allow 3833/tcp + sudo ufw allow 3933/tcp + sudo ufw allow 4033/tcp + sudo ufw allow 4133/tcp + sudo ufw allow 4233/tcp + sudo ufw allow 4234/tcp + sudo ufw allow 4333/tcp + sudo ufw allow 4433/tcp + sudo ufw allow 4533/tcp + sudo ufw allow 4553/tcp + sudo ufw allow 4633/tcp + sudo ufw allow 4733/tcp + sudo ufw allow 4833/tcp + sudo ufw allow 4933/tcp + sudo ufw allow 5033/tcp + sudo ufw allow 5133/tcp + sudo ufw allow 5233/tcp + sudo ufw allow 5333/tcp + sudo ufw allow 5433/tcp + sudo ufw allow 5533/tcp + sudo ufw allow 5733/tcp + sudo ufw allow 5743/tcp + sudo ufw allow 3252/tcp + sudo ufw allow 5755/tcp + sudo ufw allow 5766/tcp + sudo ufw allow 5833/tcp + sudo ufw allow 5933/tcp + sudo ufw allow 6033/tcp + sudo ufw allow 5034/tcp + sudo ufw allow 6133/tcp + sudo ufw allow 6233/tcp + sudo ufw allow 6333/tcp + sudo ufw allow 6433/tcp + sudo ufw allow 7433/tcp + sudo ufw allow 8333/tcp + sudo ufw allow 8463/tcp + sudo ufw allow 8433/tcp + sudo ufw allow 8533/tcp sudo ufw --force enable fi From 58c54a074143e2960d52a555ef251487dd98ef25 Mon Sep 17 00:00:00 2001 From: xavatar Date: Mon, 19 Feb 2018 18:19:22 +0100 Subject: [PATCH 150/360] Add eth donation --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d8a557d8..c05ca03f 100644 --- a/README.md +++ b/README.md @@ -68,3 +68,4 @@ If you need further assistance we have a small but growing discord channel at ht If this helped you or you feel giving please donate : - BTC Donation : 1C1hnjk3WhuAvUN6Ny6LTxPD3rwSZwapW7 - BCH Donation : 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz +- ETH Donation : 0xc23E6902fF8Cd8878EDADE18Dc49B3505395F0a1 From b2553558595efd0fc59fa987faeae226c86f2935 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 30 Apr 2018 22:22:59 +0200 Subject: [PATCH 151/360] Added fix for some coins --- compil.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/compil.sh b/compil.sh index 6acc7e48..40bf505e 100644 --- a/compil.sh +++ b/compil.sh @@ -51,11 +51,14 @@ if [ -f autogen.sh ]; then output " " output "Starting ./autogen.sh" output " " + sudo chmod +x ./autogen.sh sudo ./autogen.sh output " " output "Starting ./configure" output " " - sudo ./configure + sudo chmod +x ./configure + sudo ./configure CPPFLAGS="-I/usr/local/include" + sudo chmod +x share/genbuild.sh output " " output "Starting make" output " " @@ -65,6 +68,12 @@ if [ -f autogen.sh ]; then output " " else cd src + +if [ -f rpcrawtransaction.cpp ]; then + + sudo sed -i 's///g' rpcrawtransaction.cpp + if [[ ! -e 'obj' ]]; then output " " output "Creation directory obj" From ef11f746d16807bbd3030602518804913dee43aa Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 9 May 2018 13:20:42 +0200 Subject: [PATCH 152/360] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c05ca03f..a872900a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yiimp_install_scrypt (update Feb 18, 2018) +# Yiimp_install_scrypt (update May 05, 2018) Discord : https://discord.gg/zcCXjkQ From 48d1e97f519fe755faf988a78f17504efa0935dd Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Mon, 4 Jun 2018 18:37:34 +0200 Subject: [PATCH 153/360] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a872900a..e47b40ee 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yiimp_install_scrypt (update May 05, 2018) +# Yiimp_install_scrypt (update June 04, 2018) Discord : https://discord.gg/zcCXjkQ From 42b223241550c1036b3581cc2ab8bed288338b53 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Tue, 12 Jun 2018 18:26:50 +0200 Subject: [PATCH 154/360] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2490ca76..aae43503 100644 --- a/install.sh +++ b/install.sh @@ -6,7 +6,7 @@ # Web: # # Program: -# Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.x +# Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.0.x # # ################################################################################ From 8abcfc0a4e829ebedcbc7d331560d890f73c030e Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Tue, 12 Jun 2018 20:54:51 +0200 Subject: [PATCH 155/360] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e47b40ee..e3fe3861 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig Official Yiimp (used in this script for Yiimp Installation): https://github.com/tpruvot/yiimp +Install script for yiimp on Ubuntu 17.10 : https://github.com/xavatar/yiimp_install_scrypt_ubuntu17.10 + *********************************** From 3fc35f408c757f0f1dee84354c5df02f9778e322 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Tue, 12 Jun 2018 20:56:32 +0200 Subject: [PATCH 156/360] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e3fe3861..b9bb6ed9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yiimp_install_scrypt (update June 04, 2018) +# Yiimp_install_scrypt (update June 12, 2018) Discord : https://discord.gg/zcCXjkQ From 42d405f28be08d3cba5a5adac183497685363a91 Mon Sep 17 00:00:00 2001 From: Xavatar Date: Tue, 12 Jun 2018 20:58:38 +0200 Subject: [PATCH 157/360] change to systemd --- install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 2490ca76..0023d0d6 100644 --- a/install.sh +++ b/install.sh @@ -62,8 +62,10 @@ displayErr() { sudo aptitude -y install nginx sudo rm /etc/nginx/sites-enabled/default - sudo service nginx start - sudo service cron start + sudo systemctl start nginx.service + sudo systemctl enable nginx.service + sudo systemctl start cron.service + sudo systemctl enable cron.service #Making Nginx a bit hard From 58058f9ffc25c3c021258071b478206216d4c031 Mon Sep 17 00:00:00 2001 From: Xavatar Date: Tue, 12 Jun 2018 21:05:12 +0200 Subject: [PATCH 158/360] update to systemd --- install.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 0023d0d6..7cdba2a1 100644 --- a/install.sh +++ b/install.sh @@ -89,6 +89,8 @@ default 0; rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" sudo aptitude -y install mariadb-server + sudo systemctl start mariadb.service + sudo systemctl enable mariadb.service output " " output "Installing php7.x and other needed files" @@ -401,7 +403,7 @@ sudo chmod +x /var/stratum/config/run.sh sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - sudo service nginx restart + sudo systemctl restart nginx.service if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then output " " @@ -519,8 +521,8 @@ sudo chmod +x /var/stratum/config/run.sh ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - sudo service nginx restart - sudo service php7.0-fpm reload + sudo systemctl restart nginx.service + sudo systemctl reload php7.0-fpm.service else echo 'include /etc/nginx/blockuseragents.rules; server { @@ -602,7 +604,8 @@ sudo chmod +x /var/stratum/config/run.sh sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - sudo service nginx restart + sudo systemctl restart nginx.service + sudo systemctl reload php7.0-fpm.service if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then output " " @@ -721,8 +724,8 @@ sudo chmod +x /var/stratum/config/run.sh ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - sudo service nginx restart - sudo service php7.0-fpm reload + sudo systemctl restart nginx.service + sudo systemctl reload php7.0-fpm.service fi output " " @@ -938,8 +941,8 @@ sudo chmod -R 664 /root/backup/ sudo chmod -R 644 /var/log/debug.log sudo chmod -R 775 /var/web/serverconfig.php sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder -sudo service nginx restart -sudo service php7.0-fpm reload +sudo systemctl restart nginx.service +sudo systemctl reload php7.0-fpm.service output " " output " " From 45c526e67addf9bb55dc678e8600a2314a0d77f0 Mon Sep 17 00:00:00 2001 From: Xavatar Date: Tue, 12 Jun 2018 21:51:18 +0200 Subject: [PATCH 159/360] fix typo --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 7cdba2a1..458b6293 100644 --- a/install.sh +++ b/install.sh @@ -89,8 +89,8 @@ default 0; rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" sudo aptitude -y install mariadb-server - sudo systemctl start mariadb.service - sudo systemctl enable mariadb.service + sudo systemctl start mysql + sudo systemctl enable mysql output " " output "Installing php7.x and other needed files" From a12855ee11349dbc02844bf34f7ec82f93cfca5f Mon Sep 17 00:00:00 2001 From: Xavatar Date: Thu, 14 Jun 2018 21:17:32 +0200 Subject: [PATCH 160/360] add nginx log + fix typo --- install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 7d31810c..8df751f5 100644 --- a/install.sh +++ b/install.sh @@ -348,8 +348,8 @@ sudo chmod +x /var/stratum/config/run.sh location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } - access_log off; - error_log /var/log/nginx/'"${server_name}"'.app-error.log error; + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; # allow larger file uploads and longer script runtimes client_body_buffer_size 50k; @@ -444,8 +444,8 @@ sudo chmod +x /var/stratum/config/run.sh root /var/www/'"${server_name}"'/html/web; index index.php; - access_log /var/log/nginx/'"${server_name}"'.app-accress.log; - error_log /var/log/nginx/'"${server_name}"'.app-error.log error; + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; # allow larger file uploads and longer script runtimes client_body_buffer_size 50k; @@ -549,8 +549,8 @@ sudo chmod +x /var/stratum/config/run.sh location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } - access_log off; - error_log /var/log/nginx/'"${server_name}"'.app-error.log error; + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; # allow larger file uploads and longer script runtimes client_body_buffer_size 50k; @@ -647,8 +647,8 @@ sudo chmod +x /var/stratum/config/run.sh root /var/www/'"${server_name}"'/html/web; index index.php; - access_log /var/log/nginx/'"${server_name}"'.app-accress.log; - error_log /var/log/nginx/'"${server_name}"'.app-error.log error; + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; # allow larger file uploads and longer script runtimes client_body_buffer_size 50k; From 08e87538fd91301dcf6b7d85932644fc53925058 Mon Sep 17 00:00:00 2001 From: Xavatar Date: Thu, 14 Jun 2018 22:44:31 +0200 Subject: [PATCH 161/360] add info 18.04 github --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b9bb6ed9..f5c38338 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ Official Yiimp (used in this script for Yiimp Installation): https://github.com/ Install script for yiimp on Ubuntu 17.10 : https://github.com/xavatar/yiimp_install_scrypt_ubuntu17.10 +Install script for yiimp on Ubuntu 18.04 : https://github.com/xavatar/yiimp_install_scrypt_ubuntu18.04 + *********************************** From 632cc893c977819ce20b3a15ab8b1673ff794af2 Mon Sep 17 00:00:00 2001 From: Xavatar Date: Thu, 14 Jun 2018 22:58:24 +0200 Subject: [PATCH 162/360] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f5c38338..da3a95c5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yiimp_install_scrypt (update June 12, 2018) +# Yiimp_install_scrypt (update June 14, 2018) Discord : https://discord.gg/zcCXjkQ From 82ae2bfb7e3ed3c91c95464ec5db1c96862b15c2 Mon Sep 17 00:00:00 2001 From: Xavatar Date: Mon, 25 Jun 2018 23:38:59 +0200 Subject: [PATCH 163/360] fix typo --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 8df751f5..f01b9939 100644 --- a/install.sh +++ b/install.sh @@ -941,8 +941,10 @@ sudo chmod -R 664 /root/backup/ sudo chmod -R 644 /var/log/debug.log sudo chmod -R 775 /var/web/serverconfig.php sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder -sudo systemctl restart nginx.service +sudo rm -rf /var/log/nginx/* sudo systemctl reload php7.0-fpm.service +sudo systemctl restart nginx.service + output " " output " " From 338bbea89e33e880fd0f7d5dcb2ffa0562705716 Mon Sep 17 00:00:00 2001 From: Xavatar Date: Mon, 25 Jun 2018 23:39:58 +0200 Subject: [PATCH 164/360] fix typo log nginx --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index f01b9939..4afc4db8 100644 --- a/install.sh +++ b/install.sh @@ -348,8 +348,8 @@ sudo chmod +x /var/stratum/config/run.sh location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } - access_log /var/log/nginx/access.log; - error_log /var/log/nginx/error.log; + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; # allow larger file uploads and longer script runtimes client_body_buffer_size 50k; @@ -549,8 +549,8 @@ sudo chmod +x /var/stratum/config/run.sh location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } - access_log /var/log/nginx/access.log; - error_log /var/log/nginx/error.log; + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; # allow larger file uploads and longer script runtimes client_body_buffer_size 50k; From a93558ec7a8cefbbfca987a5ea9e90fd3aedc4e0 Mon Sep 17 00:00:00 2001 From: Xavatar Date: Mon, 25 Jun 2018 23:42:08 +0200 Subject: [PATCH 165/360] fix typo reload php-fpm --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 4afc4db8..839f6146 100644 --- a/install.sh +++ b/install.sh @@ -404,6 +404,7 @@ sudo chmod +x /var/stratum/config/run.sh sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html sudo systemctl restart nginx.service + sudo systemctl reload php7.0-fpm.service if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then output " " From f6936c1f01b63c7ca9ba38eefca722e6e523e348 Mon Sep 17 00:00:00 2001 From: Xavatar Date: Mon, 25 Jun 2018 23:48:39 +0200 Subject: [PATCH 166/360] fix typo --- install.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 839f6146..6fbdd0c3 100644 --- a/install.sh +++ b/install.sh @@ -113,8 +113,8 @@ default 0; sudo aptitude -y install mutt sudo aptitude -y install git screen sudo aptitude -y install pwgen -y - - + + #Installing Package to compile crypto currency output " " output "Installing Package to compile crypto currency" @@ -403,8 +403,9 @@ sudo chmod +x /var/stratum/config/run.sh sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - sudo systemctl restart nginx.service sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then output " " @@ -522,8 +523,10 @@ sudo chmod +x /var/stratum/config/run.sh ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - sudo systemctl restart nginx.service + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + else echo 'include /etc/nginx/blockuseragents.rules; server { @@ -605,8 +608,10 @@ sudo chmod +x /var/stratum/config/run.sh sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - sudo systemctl restart nginx.service + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then output " " @@ -725,8 +730,8 @@ sudo chmod +x /var/stratum/config/run.sh ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - sudo systemctl restart nginx.service sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service fi output " " From 56f7a9ae1415f435c3e62bcff05fe571a1c91b1a Mon Sep 17 00:00:00 2001 From: Xavatar Date: Mon, 25 Jun 2018 23:50:42 +0200 Subject: [PATCH 167/360] fix typo start service php-fpm --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 6fbdd0c3..ff4dcc3e 100644 --- a/install.sh +++ b/install.sh @@ -114,6 +114,7 @@ default 0; sudo aptitude -y install git screen sudo aptitude -y install pwgen -y + sudo systemctl start php7.0-fpm.service #Installing Package to compile crypto currency output " " From be8aec217fc32525b8ac08c564a96bbc34fcbfbf Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Tue, 26 Jun 2018 11:35:20 +0200 Subject: [PATCH 168/360] fix typo --- install.sh | 114 ++++++++++++++++++++++++++--------------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/install.sh b/install.sh index ff4dcc3e..d110a9f2 100644 --- a/install.sh +++ b/install.sh @@ -114,7 +114,7 @@ default 0; sudo aptitude -y install git screen sudo aptitude -y install pwgen -y - sudo systemctl start php7.0-fpm.service + sudo systemctl start php7.0-fpm.service #Installing Package to compile crypto currency output " " @@ -143,8 +143,8 @@ default 0; sleep 3 if [[ "$root_email" != "" ]]; then - echo $root_email > sudo tee --append ~/.email - echo $root_email > sudo tee --append ~/.forward + echo $root_email > sudo tee --append ~/.email + echo $root_email > sudo tee --append ~/.forward if [[ ("$send_email" == "y" || "$send_email" == "Y" || "$send_email" == "") ]]; then echo "This is a mail test for the SMTP Service." > sudo tee --append /tmp/email.message @@ -174,60 +174,60 @@ default 0; sudo ufw allow ssh sudo ufw allow http sudo ufw allow https - sudo ufw allow 3333/tcp - sudo ufw allow 3339/tcp - sudo ufw allow 3334/tcp - sudo ufw allow 3433/tcp - sudo ufw allow 3555/tcp - sudo ufw allow 3556/tcp - sudo ufw allow 3573/tcp - sudo ufw allow 3535/tcp - sudo ufw allow 3533/tcp - sudo ufw allow 3553/tcp - sudo ufw allow 3633/tcp - sudo ufw allow 3733/tcp - sudo ufw allow 3636/tcp - sudo ufw allow 3737/tcp - sudo ufw allow 3739/tcp - sudo ufw allow 3747/tcp - sudo ufw allow 3833/tcp - sudo ufw allow 3933/tcp - sudo ufw allow 4033/tcp - sudo ufw allow 4133/tcp - sudo ufw allow 4233/tcp - sudo ufw allow 4234/tcp - sudo ufw allow 4333/tcp - sudo ufw allow 4433/tcp - sudo ufw allow 4533/tcp - sudo ufw allow 4553/tcp - sudo ufw allow 4633/tcp - sudo ufw allow 4733/tcp - sudo ufw allow 4833/tcp - sudo ufw allow 4933/tcp - sudo ufw allow 5033/tcp - sudo ufw allow 5133/tcp - sudo ufw allow 5233/tcp - sudo ufw allow 5333/tcp - sudo ufw allow 5433/tcp - sudo ufw allow 5533/tcp - sudo ufw allow 5733/tcp - sudo ufw allow 5743/tcp - sudo ufw allow 3252/tcp - sudo ufw allow 5755/tcp - sudo ufw allow 5766/tcp - sudo ufw allow 5833/tcp - sudo ufw allow 5933/tcp - sudo ufw allow 6033/tcp - sudo ufw allow 5034/tcp - sudo ufw allow 6133/tcp - sudo ufw allow 6233/tcp - sudo ufw allow 6333/tcp - sudo ufw allow 6433/tcp - sudo ufw allow 7433/tcp - sudo ufw allow 8333/tcp - sudo ufw allow 8463/tcp - sudo ufw allow 8433/tcp - sudo ufw allow 8533/tcp + sudo ufw allow 3333/tcp + sudo ufw allow 3339/tcp + sudo ufw allow 3334/tcp + sudo ufw allow 3433/tcp + sudo ufw allow 3555/tcp + sudo ufw allow 3556/tcp + sudo ufw allow 3573/tcp + sudo ufw allow 3535/tcp + sudo ufw allow 3533/tcp + sudo ufw allow 3553/tcp + sudo ufw allow 3633/tcp + sudo ufw allow 3733/tcp + sudo ufw allow 3636/tcp + sudo ufw allow 3737/tcp + sudo ufw allow 3739/tcp + sudo ufw allow 3747/tcp + sudo ufw allow 3833/tcp + sudo ufw allow 3933/tcp + sudo ufw allow 4033/tcp + sudo ufw allow 4133/tcp + sudo ufw allow 4233/tcp + sudo ufw allow 4234/tcp + sudo ufw allow 4333/tcp + sudo ufw allow 4433/tcp + sudo ufw allow 4533/tcp + sudo ufw allow 4553/tcp + sudo ufw allow 4633/tcp + sudo ufw allow 4733/tcp + sudo ufw allow 4833/tcp + sudo ufw allow 4933/tcp + sudo ufw allow 5033/tcp + sudo ufw allow 5133/tcp + sudo ufw allow 5233/tcp + sudo ufw allow 5333/tcp + sudo ufw allow 5433/tcp + sudo ufw allow 5533/tcp + sudo ufw allow 5733/tcp + sudo ufw allow 5743/tcp + sudo ufw allow 3252/tcp + sudo ufw allow 5755/tcp + sudo ufw allow 5766/tcp + sudo ufw allow 5833/tcp + sudo ufw allow 5933/tcp + sudo ufw allow 6033/tcp + sudo ufw allow 5034/tcp + sudo ufw allow 6133/tcp + sudo ufw allow 6233/tcp + sudo ufw allow 6333/tcp + sudo ufw allow 6433/tcp + sudo ufw allow 7433/tcp + sudo ufw allow 8333/tcp + sudo ufw allow 8463/tcp + sudo ufw allow 8433/tcp + sudo ufw allow 8533/tcp sudo ufw --force enable fi From e812ffad23d8cf44a21ee53b81bab19d60d5d75c Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Tue, 26 Jun 2018 11:47:06 +0200 Subject: [PATCH 169/360] fix typo --- install.sh | 56 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index d110a9f2..96d92cc4 100644 --- a/install.sh +++ b/install.sh @@ -37,17 +37,19 @@ displayErr() { read -e -p "Install UFW and configure ports? [Y/n] : " UFW read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install + + #Update package and Upgrade Ubuntu output " " output "Updating system and installing required packages." output " " sleep 3 - - - # update package and upgrade Ubuntu + sudo apt-get -y update sudo apt-get -y upgrade sudo apt-get -y autoremove + + #Switch Aptitude output " " output "Switching to Aptitude" output " " @@ -55,6 +57,8 @@ displayErr() { sudo apt-get -y install aptitude + + #Installing Nginx output " " output "Installing Nginx server." output " " @@ -79,21 +83,24 @@ default 0; } ' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 + + #Installing Mariadb output " " output "Installing Mariadb Server." output " " sleep 3 - - - # create random password + + #Create random password rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" sudo aptitude -y install mariadb-server - sudo systemctl start mysql + sudo systemctl start mysql sudo systemctl enable mysql + + #Installing Installing php7.x output " " - output "Installing php7.x and other needed files" + output "Installing php7.x" output " " sleep 3 @@ -101,6 +108,15 @@ default 0; sudo aptitude -y install php7.0-opcache php7.0-fpm php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring sudo phpenmod mcrypt sudo phpenmod mbstring + sudo systemctl start php7.0-fpm.service + + + #Installing other needed files + output " " + output "Installing other needed files" + output " " + sleep 3 + sudo aptitude -y install libgmp3-dev sudo aptitude -y install libmysqlclient-dev sudo aptitude -y install libcurl4-gnutls-dev @@ -114,8 +130,7 @@ default 0; sudo aptitude -y install git screen sudo aptitude -y install pwgen -y - sudo systemctl start php7.0-fpm.service - + #Installing Package to compile crypto currency output " " output "Installing Package to compile crypto currency" @@ -137,6 +152,8 @@ default 0; password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` AUTOGENERATED_PASS=`pwgen -c -1 20` + + #Test Email output " " output "Testing to see if server emails are sent" output " " @@ -158,8 +175,10 @@ default 0; fi fi + + #Installing Fail2Ban & UFW output " " - output "Some optional installs" + output "Some optional installs (Fail2Ban & UFW)" output " " sleep 3 @@ -231,6 +250,8 @@ default 0; sudo ufw --force enable fi + + #Installing PhpMyAdmin output " " output "Installing phpmyadmin" output " " @@ -244,8 +265,10 @@ default 0; echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections sudo aptitude -y install phpmyadmin + + #Installing Yiimp output " " - output " Installing yiimp" + output " Installing Yiimp" output " " output "Grabbing yiimp fron Github, building files and setting file structure." output " " @@ -285,20 +308,21 @@ default 0; sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp #fixing run.sh sudo rm -r /var/stratum/config/run.sh - echo ' + echo ' #!/bin/bash ulimit -n 10240 ulimit -u 10240 cd /var/stratum while true; do - ./stratum /var/stratum/config/$1 - sleep 2 +./stratum /var/stratum/config/$1 +sleep 2 done exec bash ' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 -sudo chmod +x /var/stratum/config/run.sh + sudo chmod +x /var/stratum/config/run.sh + #Update Timezone output " " output "Update default timezone." output " " From f1c9aab349b839c3c758ecee6956a80fc7c76d2e Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Tue, 26 Jun 2018 12:12:10 +0200 Subject: [PATCH 170/360] fix typo --- install.sh | 190 +++++++++++++++++++++++++++++------------------------ 1 file changed, 103 insertions(+), 87 deletions(-) diff --git a/install.sh b/install.sh index 96d92cc4..db692ab0 100644 --- a/install.sh +++ b/install.sh @@ -38,7 +38,7 @@ displayErr() { read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install - #Update package and Upgrade Ubuntu + # Update package and Upgrade Ubuntu output " " output "Updating system and installing required packages." output " " @@ -49,7 +49,7 @@ displayErr() { sudo apt-get -y autoremove - #Switch Aptitude + # Switch Aptitude output " " output "Switching to Aptitude" output " " @@ -58,7 +58,7 @@ displayErr() { sudo apt-get -y install aptitude - #Installing Nginx + # Installing Nginx output " " output "Installing Nginx server." output " " @@ -72,7 +72,7 @@ displayErr() { sudo systemctl enable cron.service - #Making Nginx a bit hard + # Making Nginx a bit hard echo 'map $http_user_agent $blockedagent { default 0; ~*malicious 1; @@ -84,13 +84,13 @@ default 0; ' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 - #Installing Mariadb + # Installing Mariadb output " " output "Installing Mariadb Server." output " " sleep 3 - #Create random password + # Create random password rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" sudo aptitude -y install mariadb-server @@ -98,7 +98,7 @@ default 0; sudo systemctl enable mysql - #Installing Installing php7.x + # Installing Installing php7.x output " " output "Installing php7.x" output " " @@ -111,7 +111,7 @@ default 0; sudo systemctl start php7.0-fpm.service - #Installing other needed files + # Installing other needed files output " " output "Installing other needed files" output " " @@ -131,7 +131,7 @@ default 0; sudo aptitude -y install pwgen -y - #Installing Package to compile crypto currency + # Installing Package to compile crypto currency output " " output "Installing Package to compile crypto currency" output " " @@ -147,13 +147,13 @@ default 0; sudo apt-get install -y libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ - #Generating Random Passwords + # Generating Random Passwords password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` AUTOGENERATED_PASS=`pwgen -c -1 20` - #Test Email + # Test Email output " " output "Testing to see if server emails are sent" output " " @@ -176,7 +176,7 @@ default 0; fi - #Installing Fail2Ban & UFW + # Installing Fail2Ban & UFW output " " output "Some optional installs (Fail2Ban & UFW)" output " " @@ -251,7 +251,7 @@ default 0; fi - #Installing PhpMyAdmin + # Installing PhpMyAdmin output " " output "Installing phpmyadmin" output " " @@ -266,7 +266,7 @@ default 0; sudo aptitude -y install phpmyadmin - #Installing Yiimp + # Installing Yiimp output " " output " Installing Yiimp" output " " @@ -275,7 +275,7 @@ default 0; sleep 3 - #Generating Random Password for stratum + # Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` cd ~ git clone https://github.com/tpruvot/yiimp.git @@ -322,31 +322,36 @@ exec bash sudo chmod +x /var/stratum/config/run.sh - #Update Timezone + # Update Timezone output " " output "Update default timezone." output " " - # check if link file + # Check if link file sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime - # update time zone + # Update time zone sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime sudo aptitude -y install ntpdate - # write time to clock. + # Write time to clock. sudo hwclock -w + + # Making Web Server Magic Happen output " " output "Making Web Server Magic Happen!" output " " - # adding user to group, creating dir structure, setting permissions + + # Adding user to group, creating dir structure, setting permissions sudo mkdir -p /var/www/$server_name/html + # Creating webserver initial config file output " " output "Creating webserver initial config file" output " " + if [[ ("$sub_domain" == "y" || "$sub_domain" == "Y") ]]; then echo 'include /etc/nginx/blockuseragents.rules; server { @@ -428,13 +433,14 @@ exec bash sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - sudo systemctl reload php7.0-fpm.service + sudo systemctl reload php7.0-fpm.service sudo systemctl restart nginx.service if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + # Install SSL (with SubDomain) output " " - output "Install LetsEncrypt and setting SSL" + output "Install LetsEncrypt and setting SSL (with SubDomain)" output " " sudo aptitude -y install letsencrypt @@ -633,14 +639,14 @@ exec bash sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - - sudo systemctl reload php7.0-fpm.service - sudo systemctl restart nginx.service + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + # Install SSL (without SubDomain) output " " - output "Install LetsEncrypt and setting SSL" + output "Install LetsEncrypt and setting SSL (without SubDomain)" output " " sleep 3 @@ -754,24 +760,27 @@ exec bash } ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 - fi - sudo systemctl reload php7.0-fpm.service - sudo systemctl restart nginx.service - fi + + fi + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + fi + + # Config Database output " " output "Now for the database fun!" output " " sleep 3 - # create database + # Create database Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" Q3="FLUSH PRIVILEGES;" SQL="${Q1}${Q2}${Q3}" sudo mysql -u root -p="" -e "$SQL" - # create stratum user + # Create stratum user Q1="GRANT ALL ON *.* TO 'stratum'@'localhost' IDENTIFIED BY '$password2';" Q2="FLUSH PRIVILEGES;" SQL="${Q1}${Q2}" @@ -799,8 +808,8 @@ password='"${rootpasswd}"' ' | sudo -E tee ~/.my.cnf >/dev/null 2>&1 sudo chmod 0600 ~/.my.cnf -#Create keys file - echo ' + # Create keys file + echo ' /dev/null 2>&1 + # Peforming the SQL import output " " output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" output " " @@ -833,10 +843,10 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); cd ~ cd yiimp/sql - # import sql dump + # Import sql dump sudo zcat 2016-04-03-yaamp.sql.gz | sudo mysql --defaults-group-suffix=host1 - # oh the humanity! + # Oh the humanity! sudo mysql --defaults-group-suffix=host1 --force < 2016-04-24-market_history.sql sudo mysql --defaults-group-suffix=host1 --force < 2016-04-27-settings.sql sudo mysql --defaults-group-suffix=host1 --force < 2016-05-11-coins.sql @@ -854,13 +864,15 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql - + + + # Generating a basic Yiimp serverconfig.php output " " - output "Generating a basic serverconfig.php" + output "Generating a basic Yiimp serverconfig.php" output " " sleep 3 - # make config file + # Make config file echo ' /dev/null 2>&1 -output " " -output "Updating stratum config files with database connection info." -output " " -sleep 3 -cd /var/stratum/config -sudo sed -i 's/password = tu8tu5/password = '$blckntifypass'/g' *.conf -sudo sed -i 's/server = yaamp.com/server = '$server_name'/g' *.conf -sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf -sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf -sudo sed -i 's/username = root/username = stratum/g' *.conf -sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf -cd ~ + # Updating stratum config files with database connection info + output " " + output "Updating stratum config files with database connection info." + output " " + sleep 3 + + cd /var/stratum/config + sudo sed -i 's/password = tu8tu5/password = '$blckntifypass'/g' *.conf + sudo sed -i 's/server = yaamp.com/server = '$server_name'/g' *.conf + sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf + sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf + sudo sed -i 's/username = root/username = stratum/g' *.conf + sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf + cd ~ -output " " -output "Final Directory permissions" -output " " -sleep 3 -whoami=`whoami` -sudo mkdir /root/backup/ -#sudo usermod -aG www-data $whoami -#sudo chown -R www-data:www-data /var/log -sudo chown -R www-data:www-data /var/stratum -sudo chown -R www-data:www-data /var/web -sudo touch /var/log/debug.log -sudo chown -R www-data:www-data /var/log/debug.log -sudo chmod -R 775 /var/www/$server_name/html -sudo chmod -R 775 /var/web -sudo chmod -R 775 /var/stratum -sudo chmod -R 775 /var/web/yaamp/runtime -sudo chmod -R 664 /root/backup/ -sudo chmod -R 644 /var/log/debug.log -sudo chmod -R 775 /var/web/serverconfig.php -sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder -sudo rm -rf /var/log/nginx/* -sudo systemctl reload php7.0-fpm.service -sudo systemctl restart nginx.service + # Final Directory permissions + output " " + output "Final Directory permissions" + output " " + sleep 3 + + whoami=`whoami` + sudo mkdir /root/backup/ + #sudo usermod -aG www-data $whoami + #sudo chown -R www-data:www-data /var/log + sudo chown -R www-data:www-data /var/stratum + sudo chown -R www-data:www-data /var/web + sudo touch /var/log/debug.log + sudo chown -R www-data:www-data /var/log/debug.log + sudo chmod -R 775 /var/www/$server_name/html + sudo chmod -R 775 /var/web + sudo chmod -R 775 /var/stratum + sudo chmod -R 775 /var/web/yaamp/runtime + sudo chmod -R 664 /root/backup/ + sudo chmod -R 644 /var/log/debug.log + sudo chmod -R 775 /var/web/serverconfig.php + sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder + sudo rm -rf /var/log/nginx/* + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service -output " " -output " " -output " " -output " " -output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." -output " " -output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." -output " " -output "Please make sure to add your public and private keys." -output " " -output "TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig" -output " " -output " " + output " " + output " " + output " " + output " " + output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." + output " " + output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." + output " " + output "Please make sure to add your public and private keys." + output " " + output "TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig" + output " " + output " " From 8912028213cf72d2487010007b875db5964a3553 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Tue, 26 Jun 2018 15:27:39 +0200 Subject: [PATCH 171/360] Fix Typo --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index db692ab0..2677e73a 100644 --- a/install.sh +++ b/install.sh @@ -30,7 +30,7 @@ displayErr() { read -e -p "Server name (no http:// or www. just example.com) : " server_name read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL - read -e -p "Set stratum to AutoExchange? i.e. mine any coinf with BTC address? [y/N] : " BTC + read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC read -e -p "Please enter a new location for /site/adminRights this is to customize the admin entrance url (e.g. myAdminpanel) : " admin_panel read -e -p "Enter your Public IP for admin access (http://www.whatsmyip.org/) : " Public read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban From 1b73a52bc26eb5d4ddc6a64905e12591f2835814 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Tue, 26 Jun 2018 15:29:25 +0200 Subject: [PATCH 172/360] Add information IP (admin panel) --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2677e73a..b9c275eb 100644 --- a/install.sh +++ b/install.sh @@ -32,7 +32,7 @@ displayErr() { read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC read -e -p "Please enter a new location for /site/adminRights this is to customize the admin entrance url (e.g. myAdminpanel) : " admin_panel - read -e -p "Enter your Public IP for admin access (http://www.whatsmyip.org/) : " Public + read -e -p "Enter the Public IP of the system you will use to access the admin panel (http://www.whatsmyip.org/) : " Public read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban read -e -p "Install UFW and configure ports? [Y/n] : " UFW read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install From 66ec6d71c9fbffd58ab8abfdd18e79f92855e5b5 Mon Sep 17 00:00:00 2001 From: Xavatar Date: Tue, 26 Jun 2018 20:26:54 +0200 Subject: [PATCH 173/360] add info server name --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index b9c275eb..e5270142 100644 --- a/install.sh +++ b/install.sh @@ -27,7 +27,7 @@ displayErr() { output "Make sure you double check before hitting enter! Only one shot at these!" output " " read -e -p "Enter time zone (e.g. America/New_York) : " TIME - read -e -p "Server name (no http:// or www. just example.com) : " server_name + read -e -p "Server name (no http:// or www. just : example.com or pool.example.com) : " server_name read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC From 47c0c29eb552b9406caa6e44cef8ba19127f3085 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 30 Jun 2018 12:15:01 +0200 Subject: [PATCH 174/360] add info admin panel --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index e5270142..d98bf0bc 100644 --- a/install.sh +++ b/install.sh @@ -31,7 +31,7 @@ displayErr() { read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC - read -e -p "Please enter a new location for /site/adminRights this is to customize the admin entrance url (e.g. myAdminpanel) : " admin_panel + read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel read -e -p "Enter the Public IP of the system you will use to access the admin panel (http://www.whatsmyip.org/) : " Public read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban read -e -p "Install UFW and configure ports? [Y/n] : " UFW From 42038bb2f0aeb81d2c987574762429dc61deeea7 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 30 Jun 2018 12:16:01 +0200 Subject: [PATCH 175/360] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index da3a95c5..efd4ceee 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yiimp_install_scrypt (update June 14, 2018) +# Yiimp_install_scrypt (update June 30, 2018) Discord : https://discord.gg/zcCXjkQ From 72e07d2014b4a215f0ee1e34b2e33bcfc279d753 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 30 Jun 2018 12:16:39 +0200 Subject: [PATCH 176/360] Update compil.sh --- compil.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compil.sh b/compil.sh index 40bf505e..7e38c439 100644 --- a/compil.sh +++ b/compil.sh @@ -2,7 +2,7 @@ ################################################################################ # Original Author: crombiecrunch # Current Author: Xavatar -# Web: +# Web: # # Program: # After entering coin name and github link automatically build coin From 56a735af0e0234f67aae4d91effa6912bbdc4f81 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 7 Jul 2018 21:34:37 +0200 Subject: [PATCH 177/360] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index efd4ceee..09d0572b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Discord : https://discord.gg/zcCXjkQ -TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig +TUTO Youtube (16.04) : https://www.youtube.com/watch?v=vdBCw6_cyig Official Yiimp (used in this script for Yiimp Installation): https://github.com/tpruvot/yiimp From e69300b138bce3d344f70875557928c87bbc9311 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 7 Jul 2018 21:35:25 +0200 Subject: [PATCH 178/360] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09d0572b..d3e69a12 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yiimp_install_scrypt (update June 30, 2018) +# Yiimp_install_scrypt (update July 07, 2018) Discord : https://discord.gg/zcCXjkQ From 5be598f42b832efc0844276034d66f1bf6e10044 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 7 Jul 2018 21:39:01 +0200 Subject: [PATCH 179/360] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d3e69a12..8da20ef2 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ Install script for yiimp on Ubuntu 18.04 : https://github.com/xavatar/yiimp_inst *********************************** -## Install script for yiimp on Ubuntu 16.04 +## Install script for yiimp on Ubuntu Server 16.04 -USE THIS SCRIPT ON FRESH INSTALL UBUNTU 16.04 ! +USE THIS SCRIPT ON FRESH INSTALL UBUNTU Server 16.04 ! Connect on your VPS => - adduser pool From 4b91d1f41fea4919471ee5173c60837bc9d653cc Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 8 Jul 2018 13:59:21 +0200 Subject: [PATCH 180/360] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8da20ef2..2416c708 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,9 @@ Discord : https://discord.gg/zcCXjkQ -TUTO Youtube (16.04) : https://www.youtube.com/watch?v=vdBCw6_cyig +TUTO Youtube (16.04 - Without SSL) : https://www.youtube.com/watch?v=vdBCw6_cyig + +TUTO Youtube (16.04 - With SSL) : https://www.youtube.com/watch?v=fWwGow_i-Vw Official Yiimp (used in this script for Yiimp Installation): https://github.com/tpruvot/yiimp From ec6f15f6dc47fc871181a88e84f027bed89f06fa Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 14 Oct 2018 13:39:03 +0200 Subject: [PATCH 181/360] update typo --- install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install.sh b/install.sh index d98bf0bc..7ab301c9 100644 --- a/install.sh +++ b/install.sh @@ -277,19 +277,27 @@ default 0; # Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + + # Compil Blocknotify cd ~ git clone https://github.com/tpruvot/yiimp.git cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp sudo make + + # Compil iniparser cd $HOME/yiimp/stratum/iniparser sudo make + + # Compil Stratum cd $HOME/yiimp/stratum if [[ ("$BTC" == "y" || "$BTC" == "Y") ]]; then sudo sed -i 's/CFLAGS += -DNO_EXCHANGE/#CFLAGS += -DNO_EXCHANGE/' $HOME/yiimp/stratum/Makefile sudo make fi sudo make + + # Copy Files (Blocknotify,iniparser,Stratum) cd $HOME/yiimp sudo sed -i 's/AdminRights/'$admin_panel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php sudo cp -r $HOME/yiimp/web /var/ From cddc62e5b95e5435269f649dd0acf7d276f73723 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 14 Oct 2018 13:39:52 +0200 Subject: [PATCH 182/360] update date --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2416c708..b2b1f456 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yiimp_install_scrypt (update July 07, 2018) +# Yiimp_install_scrypt (update October, 2018) Discord : https://discord.gg/zcCXjkQ From 32fee1a82b027e71245be85dc9bf31d11a918be9 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 14 Oct 2018 13:41:19 +0200 Subject: [PATCH 183/360] update typo --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 7ab301c9..60a9f403 100644 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ ################################################################################ # Original Author: crombiecrunch # Fork Author: manfromafar -# Current Author: Xavatar +# Current Author: Xavatar (https://github.com/xavatar/yiimp_install_scrypt) # Web: # # Program: From d92d8450ec33a0055c85d97554903b90ef53c1b6 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 1 Mar 2020 09:52:55 +0100 Subject: [PATCH 184/360] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b2b1f456..edff6eba 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Yiimp_install_scrypt (update October, 2018) +Site : https://www.xavatar.com Discord : https://discord.gg/zcCXjkQ From aeb612cd2b2a84f1e018381ac0c9dddf3655a56f Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 4 Apr 2020 12:16:30 +0200 Subject: [PATCH 185/360] add gettext package to compil --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 60a9f403..2d9196a9 100644 --- a/install.sh +++ b/install.sh @@ -138,7 +138,7 @@ default 0; sleep 3 sudo aptitude -y install software-properties-common build-essential - sudo aptitude -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev + sudo aptitude -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext sudo aptitude -y install libminiupnpc10 libzmq5 sudo aptitude -y install libcanberra-gtk-module libqrencode-dev libzmq3-dev sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler From 7fdf4eeb2867cbe303cc9b96b9a82dd64e49f880 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 4 Apr 2020 12:23:17 +0200 Subject: [PATCH 186/360] Create packagecompil.sh --- packagecompil.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 packagecompil.sh diff --git a/packagecompil.sh b/packagecompil.sh new file mode 100644 index 00000000..fc259c2f --- /dev/null +++ b/packagecompil.sh @@ -0,0 +1,27 @@ + +#!/bin/bash +################################################################################ +# Original Author: Xavatar (https://github.com/xavatar/yiimp_install_scrypt) +# Web: https://www.xavatar.com +# +# Program: +# Install Package to compile crypto currency +# +# +################################################################################ + + # Installing Package to compile crypto currency + output " " + output "Installing Package to compile crypto currency" + output " " + sleep 3 + + sudo apt-get -y install aptitude + sudo aptitude -y install software-properties-common build-essential + sudo aptitude -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext + sudo aptitude -y install libminiupnpc10 libzmq5 + sudo aptitude -y install libcanberra-gtk-module libqrencode-dev libzmq3-dev + sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler + sudo add-apt-repository -y ppa:bitcoin/bitcoin + sudo apt-get -y update + sudo apt-get install -y libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ From 12225ba64532c1f8b62c43acd030928483ca2329 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 4 Apr 2020 12:23:44 +0200 Subject: [PATCH 187/360] Update compil.sh --- compil.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compil.sh b/compil.sh index 7e38c439..b4e146bf 100644 --- a/compil.sh +++ b/compil.sh @@ -2,7 +2,7 @@ ################################################################################ # Original Author: crombiecrunch # Current Author: Xavatar -# Web: +# Web: https://www.xavatar.com # # Program: # After entering coin name and github link automatically build coin From ed427e0ca02de8d205371e0989bec86cdc34e104 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 4 Apr 2020 12:24:51 +0200 Subject: [PATCH 188/360] typo --- packagecompil.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packagecompil.sh b/packagecompil.sh index fc259c2f..ec350127 100644 --- a/packagecompil.sh +++ b/packagecompil.sh @@ -5,14 +5,14 @@ # Web: https://www.xavatar.com # # Program: -# Install Package to compile crypto currency +# Install needed Package to compile crypto currency # # ################################################################################ # Installing Package to compile crypto currency output " " - output "Installing Package to compile crypto currency" + output "Installing needed Package to compile crypto currency" output " " sleep 3 From 06fa0df424f1b19e7f5f73b22fa903c7ae43c750 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 01:31:16 +0200 Subject: [PATCH 189/360] Create install-test --- install-test | 1016 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1016 insertions(+) create mode 100644 install-test diff --git a/install-test b/install-test new file mode 100644 index 00000000..2d9196a9 --- /dev/null +++ b/install-test @@ -0,0 +1,1016 @@ +#!/bin/bash +################################################################################ +# Original Author: crombiecrunch +# Fork Author: manfromafar +# Current Author: Xavatar (https://github.com/xavatar/yiimp_install_scrypt) +# Web: +# +# Program: +# Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.0.x +# +# +################################################################################ +output() { + printf "\E[0;33;40m" + echo $1 + printf "\E[0m" +} + +displayErr() { + echo + echo $1; + echo + exit 1; +} + + output " " + output "Make sure you double check before hitting enter! Only one shot at these!" + output " " + read -e -p "Enter time zone (e.g. America/New_York) : " TIME + read -e -p "Server name (no http:// or www. just : example.com or pool.example.com) : " server_name + read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain + read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL + read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC + read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel + read -e -p "Enter the Public IP of the system you will use to access the admin panel (http://www.whatsmyip.org/) : " Public + read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban + read -e -p "Install UFW and configure ports? [Y/n] : " UFW + read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install + + + # Update package and Upgrade Ubuntu + output " " + output "Updating system and installing required packages." + output " " + sleep 3 + + sudo apt-get -y update + sudo apt-get -y upgrade + sudo apt-get -y autoremove + + + # Switch Aptitude + output " " + output "Switching to Aptitude" + output " " + sleep 3 + + sudo apt-get -y install aptitude + + + # Installing Nginx + output " " + output "Installing Nginx server." + output " " + sleep 3 + + sudo aptitude -y install nginx + sudo rm /etc/nginx/sites-enabled/default + sudo systemctl start nginx.service + sudo systemctl enable nginx.service + sudo systemctl start cron.service + sudo systemctl enable cron.service + + + # Making Nginx a bit hard + echo 'map $http_user_agent $blockedagent { +default 0; +~*malicious 1; +~*bot 1; +~*backdoor 1; +~*crawler 1; +~*bandit 1; +} +' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 + + + # Installing Mariadb + output " " + output "Installing Mariadb Server." + output " " + sleep 3 + + # Create random password + rootpasswd=$(openssl rand -base64 12) + export DEBIAN_FRONTEND="noninteractive" + sudo aptitude -y install mariadb-server + sudo systemctl start mysql + sudo systemctl enable mysql + + + # Installing Installing php7.x + output " " + output "Installing php7.x" + output " " + sleep 3 + + sudo aptitude -y install php7.0-fpm + sudo aptitude -y install php7.0-opcache php7.0-fpm php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring + sudo phpenmod mcrypt + sudo phpenmod mbstring + sudo systemctl start php7.0-fpm.service + + + # Installing other needed files + output " " + output "Installing other needed files" + output " " + sleep 3 + + sudo aptitude -y install libgmp3-dev + sudo aptitude -y install libmysqlclient-dev + sudo aptitude -y install libcurl4-gnutls-dev + sudo aptitude -y install libkrb5-dev + sudo aptitude -y install libldap2-dev + sudo aptitude -y install libidn11-dev + sudo aptitude -y install gnutls-dev + sudo aptitude -y install librtmp-dev + sudo aptitude -y install sendmail + sudo aptitude -y install mutt + sudo aptitude -y install git screen + sudo aptitude -y install pwgen -y + + + # Installing Package to compile crypto currency + output " " + output "Installing Package to compile crypto currency" + output " " + sleep 3 + + sudo aptitude -y install software-properties-common build-essential + sudo aptitude -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext + sudo aptitude -y install libminiupnpc10 libzmq5 + sudo aptitude -y install libcanberra-gtk-module libqrencode-dev libzmq3-dev + sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler + sudo add-apt-repository -y ppa:bitcoin/bitcoin + sudo apt-get -y update + sudo apt-get install -y libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ + + + # Generating Random Passwords + password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + AUTOGENERATED_PASS=`pwgen -c -1 20` + + + # Test Email + output " " + output "Testing to see if server emails are sent" + output " " + sleep 3 + + if [[ "$root_email" != "" ]]; then + echo $root_email > sudo tee --append ~/.email + echo $root_email > sudo tee --append ~/.forward + + if [[ ("$send_email" == "y" || "$send_email" == "Y" || "$send_email" == "") ]]; then + echo "This is a mail test for the SMTP Service." > sudo tee --append /tmp/email.message + echo "You should receive this !" >> sudo tee --append /tmp/email.message + echo "" >> sudo tee --append /tmp/email.message + echo "Cheers" >> sudo tee --append /tmp/email.message + sudo sendmail -s "SMTP Testing" $root_email < sudo tee --append /tmp/email.message + + sudo rm -f /tmp/email.message + echo "Mail sent" + fi + fi + + + # Installing Fail2Ban & UFW + output " " + output "Some optional installs (Fail2Ban & UFW)" + output " " + sleep 3 + + + if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then + sudo aptitude -y install fail2ban + fi + if [[ ("$UFW" == "y" || "$UFW" == "Y" || "$UFW" == "") ]]; then + sudo apt-get install ufw + sudo ufw default deny incoming + sudo ufw default allow outgoing + sudo ufw allow ssh + sudo ufw allow http + sudo ufw allow https + sudo ufw allow 3333/tcp + sudo ufw allow 3339/tcp + sudo ufw allow 3334/tcp + sudo ufw allow 3433/tcp + sudo ufw allow 3555/tcp + sudo ufw allow 3556/tcp + sudo ufw allow 3573/tcp + sudo ufw allow 3535/tcp + sudo ufw allow 3533/tcp + sudo ufw allow 3553/tcp + sudo ufw allow 3633/tcp + sudo ufw allow 3733/tcp + sudo ufw allow 3636/tcp + sudo ufw allow 3737/tcp + sudo ufw allow 3739/tcp + sudo ufw allow 3747/tcp + sudo ufw allow 3833/tcp + sudo ufw allow 3933/tcp + sudo ufw allow 4033/tcp + sudo ufw allow 4133/tcp + sudo ufw allow 4233/tcp + sudo ufw allow 4234/tcp + sudo ufw allow 4333/tcp + sudo ufw allow 4433/tcp + sudo ufw allow 4533/tcp + sudo ufw allow 4553/tcp + sudo ufw allow 4633/tcp + sudo ufw allow 4733/tcp + sudo ufw allow 4833/tcp + sudo ufw allow 4933/tcp + sudo ufw allow 5033/tcp + sudo ufw allow 5133/tcp + sudo ufw allow 5233/tcp + sudo ufw allow 5333/tcp + sudo ufw allow 5433/tcp + sudo ufw allow 5533/tcp + sudo ufw allow 5733/tcp + sudo ufw allow 5743/tcp + sudo ufw allow 3252/tcp + sudo ufw allow 5755/tcp + sudo ufw allow 5766/tcp + sudo ufw allow 5833/tcp + sudo ufw allow 5933/tcp + sudo ufw allow 6033/tcp + sudo ufw allow 5034/tcp + sudo ufw allow 6133/tcp + sudo ufw allow 6233/tcp + sudo ufw allow 6333/tcp + sudo ufw allow 6433/tcp + sudo ufw allow 7433/tcp + sudo ufw allow 8333/tcp + sudo ufw allow 8463/tcp + sudo ufw allow 8433/tcp + sudo ufw allow 8533/tcp + sudo ufw --force enable + fi + + + # Installing PhpMyAdmin + output " " + output "Installing phpmyadmin" + output " " + sleep 3 + + echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/admin-user string root" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/admin-pass password $rootpasswd" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/app-pass password $AUTOGENERATED_PASS" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections + sudo aptitude -y install phpmyadmin + + + # Installing Yiimp + output " " + output " Installing Yiimp" + output " " + output "Grabbing yiimp fron Github, building files and setting file structure." + output " " + sleep 3 + + + # Generating Random Password for stratum + blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + + # Compil Blocknotify + cd ~ + git clone https://github.com/tpruvot/yiimp.git + cd $HOME/yiimp/blocknotify + sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp + sudo make + + # Compil iniparser + cd $HOME/yiimp/stratum/iniparser + sudo make + + # Compil Stratum + cd $HOME/yiimp/stratum + if [[ ("$BTC" == "y" || "$BTC" == "Y") ]]; then + sudo sed -i 's/CFLAGS += -DNO_EXCHANGE/#CFLAGS += -DNO_EXCHANGE/' $HOME/yiimp/stratum/Makefile + sudo make + fi + sudo make + + # Copy Files (Blocknotify,iniparser,Stratum) + cd $HOME/yiimp + sudo sed -i 's/AdminRights/'$admin_panel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php + sudo cp -r $HOME/yiimp/web /var/ + sudo mkdir -p /var/stratum + cd $HOME/yiimp/stratum + sudo cp -a config.sample/. /var/stratum/config + sudo cp -r stratum /var/stratum + sudo cp -r run.sh /var/stratum + cd $HOME/yiimp + sudo cp -r $HOME/yiimp/bin/. /bin/ + sudo cp -r $HOME/yiimp/blocknotify/blocknotify /usr/bin/ + sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum/ + sudo mkdir -p /etc/yiimp + sudo mkdir -p /$HOME/backup/ + #fixing yiimp + sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp + #fixing run.sh + sudo rm -r /var/stratum/config/run.sh + echo ' +#!/bin/bash +ulimit -n 10240 +ulimit -u 10240 +cd /var/stratum +while true; do +./stratum /var/stratum/config/$1 +sleep 2 +done +exec bash +' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 + sudo chmod +x /var/stratum/config/run.sh + + + # Update Timezone + output " " + output "Update default timezone." + output " " + + # Check if link file + sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime + + # Update time zone + sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime + sudo aptitude -y install ntpdate + + # Write time to clock. + sudo hwclock -w + + + # Making Web Server Magic Happen + output " " + output "Making Web Server Magic Happen!" + output " " + + # Adding user to group, creating dir structure, setting permissions + sudo mkdir -p /var/www/$server_name/html + + + # Creating webserver initial config file + output " " + output "Creating webserver initial config file" + output " " + + if [[ ("$sub_domain" == "y" || "$sub_domain" == "Y") ]]; then + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"'; + root "/var/www/'"${server_name}"'/html/web"; + index index.html index.htm index.php; + charset utf-8; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + location ~ /\.ht { + deny all; + } + location ~ /.well-known { + allow all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + + sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf + sudo ln -s /var/web /var/www/$server_name/html + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + + # Install SSL (with SubDomain) + output " " + output "Install LetsEncrypt and setting SSL (with SubDomain)" + output " " + + sudo aptitude -y install letsencrypt + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" + sudo rm /etc/nginx/sites-available/$server_name.conf + sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 + # I am SSL Man! + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"'; + # enforce https + return 301 https://$server_name$request_uri; + } + + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name '"${server_name}"'; + + root /var/www/'"${server_name}"'/html/web; + index index.php; + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + # strengthen ssl security + ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + ssl_dhparam /etc/ssl/certs/dhparam.pem; + + # Add headers to serve security related headers + add_header Strict-Transport-Security "max-age=15768000; preload;"; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header Content-Security-Policy "frame-ancestors 'self'"; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + include /etc/nginx/fastcgi_params; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + + location ~ /\.ht { + deny all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } + +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + fi + + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + + else + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"' www.'"${server_name}"'; + root "/var/www/'"${server_name}"'/html/web"; + index index.html index.htm index.php; + charset utf-8; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + location ~ /\.ht { + deny all; + } + location ~ /.well-known { + allow all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + + sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf + sudo ln -s /var/web /var/www/$server_name/html + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + + # Install SSL (without SubDomain) + output " " + output "Install LetsEncrypt and setting SSL (without SubDomain)" + output " " + sleep 3 + + sudo aptitude -y install letsencrypt + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" + sudo rm /etc/nginx/sites-available/$server_name.conf + sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 + # I am SSL Man! + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"'; + # enforce https + return 301 https://$server_name$request_uri; + } + + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name '"${server_name}"' www.'"${server_name}"'; + + root /var/www/'"${server_name}"'/html/web; + index index.php; + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + # strengthen ssl security + ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + ssl_dhparam /etc/ssl/certs/dhparam.pem; + + # Add headers to serve security related headers + add_header Strict-Transport-Security "max-age=15768000; preload;"; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header Content-Security-Policy "frame-ancestors 'self'"; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + include /etc/nginx/fastcgi_params; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + + location ~ /\.ht { + deny all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } + +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + + fi + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + fi + + + # Config Database + output " " + output "Now for the database fun!" + output " " + sleep 3 + + # Create database + Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" + Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" + Q3="FLUSH PRIVILEGES;" + SQL="${Q1}${Q2}${Q3}" + sudo mysql -u root -p="" -e "$SQL" + + # Create stratum user + Q1="GRANT ALL ON *.* TO 'stratum'@'localhost' IDENTIFIED BY '$password2';" + Q2="FLUSH PRIVILEGES;" + SQL="${Q1}${Q2}" + sudo mysql -u root -p="" -e "$SQL" + + #Create my.cnf + + echo ' +[clienthost1] +user=panel +password='"${password}"' +database=yiimpfrontend +host=localhost +[clienthost2] +user=stratum +password='"${password2}"' +database=yiimpfrontend +host=localhost +[myphpadmin] +user=phpmyadmin +password='"${AUTOGENERATED_PASS}"' +[mysql] +user=root +password='"${rootpasswd}"' +' | sudo -E tee ~/.my.cnf >/dev/null 2>&1 + sudo chmod 0600 ~/.my.cnf + + # Create keys file + echo ' + '"'"'); +define('"'"'EXCH_BITSTAMP_SECRET'"'"','"'"''"'"'); +define('"'"'EXCH_BLEUTRADE_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_BTER_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_CCEX_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_COINMARKETS_PASS'"'"', '"'"''"'"'); +define('"'"'EXCH_CRYPTOPIA_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_EMPOEX_SECKEY'"'"', '"'"''"'"'); +define('"'"'EXCH_HITBTC_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_KRAKEN_SECRET'"'"','"'"''"'"'); +define('"'"'EXCH_LIVECOIN_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_NOVA_SECRET'"'"','"'"''"'"'); +define('"'"'EXCH_POLONIEX_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); +' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 + + + # Peforming the SQL import + output " " + output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" + output " " + output "Peforming the SQL import" + output " " + sleep 3 + + cd ~ + cd yiimp/sql + + # Import sql dump + sudo zcat 2016-04-03-yaamp.sql.gz | sudo mysql --defaults-group-suffix=host1 + + # Oh the humanity! + sudo mysql --defaults-group-suffix=host1 --force < 2016-04-24-market_history.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-04-27-settings.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-11-coins.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-15-benchmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-23-bookmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-06-01-notifications.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-06-04-bench_chips.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-11-23-coins.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-02-05-benchmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-03-31-earnings_index.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-05-accounts_case_swaptime.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-06-payouts_coinid_memo.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-09-notifications.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-10-bookmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql + sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql + sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql + + + # Generating a basic Yiimp serverconfig.php + output " " + output "Generating a basic Yiimp serverconfig.php" + output " " + sleep 3 + + # Make config file +echo ' + 0.3 +define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); +// nicehash keys deposit account & amount to deposit at a time +define('"'"'NICEHASH_API_KEY'"'"','"'"'f96c65a7-3d2f-4f3a-815c-cacf00674396'"'"'); +define('"'"'NICEHASH_API_ID'"'"','"'"'825979'"'"'); +define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3ABoqBjeorjzbyHmGMppM62YLssUgJhtuf'"'"'); +define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); +$cold_wallet_table = array( + '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"' => 0.10, +); +// Sample fixed pool fees +$configFixedPoolFees = array( + '"'"'zr5'"'"' => 2.0, + '"'"'scrypt'"'"' => 20.0, + '"'"'sha256'"'"' => 5.0, +); +// Sample custom stratum ports +$configCustomPorts = array( +// '"'"'x11'"'"' => 7000, +); +// mBTC Coefs per algo (default is 1.0) +$configAlgoNormCoef = array( +// '"'"'x11'"'"' => 5.0, +); +' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 + + + # Updating stratum config files with database connection info + output " " + output "Updating stratum config files with database connection info." + output " " + sleep 3 + + cd /var/stratum/config + sudo sed -i 's/password = tu8tu5/password = '$blckntifypass'/g' *.conf + sudo sed -i 's/server = yaamp.com/server = '$server_name'/g' *.conf + sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf + sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf + sudo sed -i 's/username = root/username = stratum/g' *.conf + sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf + cd ~ + + + # Final Directory permissions + output " " + output "Final Directory permissions" + output " " + sleep 3 + + whoami=`whoami` + sudo mkdir /root/backup/ + #sudo usermod -aG www-data $whoami + #sudo chown -R www-data:www-data /var/log + sudo chown -R www-data:www-data /var/stratum + sudo chown -R www-data:www-data /var/web + sudo touch /var/log/debug.log + sudo chown -R www-data:www-data /var/log/debug.log + sudo chmod -R 775 /var/www/$server_name/html + sudo chmod -R 775 /var/web + sudo chmod -R 775 /var/stratum + sudo chmod -R 775 /var/web/yaamp/runtime + sudo chmod -R 664 /root/backup/ + sudo chmod -R 644 /var/log/debug.log + sudo chmod -R 775 /var/web/serverconfig.php + sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder + sudo rm -rf /var/log/nginx/* + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + + + output " " + output " " + output " " + output " " + output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." + output " " + output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." + output " " + output "Please make sure to add your public and private keys." + output " " + output "TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig" + output " " + output " " From ecaf49bb1b87d8f18af585656fe78a137e5f13f3 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 01:46:06 +0200 Subject: [PATCH 190/360] create test --- install-test => test/install-test | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename install-test => test/install-test (100%) diff --git a/install-test b/test/install-test similarity index 100% rename from install-test rename to test/install-test From c30a290e06d92293c59c88b86cbb9d67a8904d77 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 02:34:48 +0200 Subject: [PATCH 191/360] fix typo --- test/install-test | 296 +++++++++++++++++++++++----------------------- 1 file changed, 149 insertions(+), 147 deletions(-) diff --git a/test/install-test b/test/install-test index 2d9196a9..5a25122f 100644 --- a/test/install-test +++ b/test/install-test @@ -10,18 +10,20 @@ # # ################################################################################ -output() { + + + output() { printf "\E[0;33;40m" echo $1 printf "\E[0m" -} + } -displayErr() { + displayErr() { echo echo $1; echo exit 1; -} + } output " " output "Make sure you double check before hitting enter! Only one shot at these!" @@ -74,14 +76,14 @@ displayErr() { # Making Nginx a bit hard echo 'map $http_user_agent $blockedagent { -default 0; -~*malicious 1; -~*bot 1; -~*backdoor 1; -~*crawler 1; -~*bandit 1; -} -' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 + default 0; + ~*malicious 1; + ~*bot 1; + ~*backdoor 1; + ~*crawler 1; + ~*bandit 1; + } + ' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 # Installing Mariadb @@ -317,16 +319,16 @@ default 0; #fixing run.sh sudo rm -r /var/stratum/config/run.sh echo ' -#!/bin/bash -ulimit -n 10240 -ulimit -u 10240 -cd /var/stratum -while true; do -./stratum /var/stratum/config/$1 -sleep 2 -done -exec bash -' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 + #!/bin/bash + ulimit -n 10240 + ulimit -u 10240 + cd /var/stratum + while true; do + ./stratum /var/stratum/config/$1 + sleep 2 + done + exec bash + ' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 sudo chmod +x /var/stratum/config/run.sh @@ -428,16 +430,16 @@ exec bash try_files $uri $uri/ =404; location ~ ^/phpmyadmin/(doc|sql|setup)/ { deny all; - } + } location ~ /phpmyadmin/(.+\.php)$ { fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; - } - } - } -' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + } + } + } + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html @@ -556,11 +558,11 @@ exec bash fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; - } - } - } + } + } + } -' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi sudo systemctl reload php7.0-fpm.service @@ -640,10 +642,10 @@ exec bash fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; - } - } - } -' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + } + } + } + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html @@ -763,11 +765,11 @@ exec bash fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; - } - } - } + } + } + } -' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi sudo systemctl reload php7.0-fpm.service @@ -796,48 +798,48 @@ exec bash #Create my.cnf - echo ' -[clienthost1] -user=panel -password='"${password}"' -database=yiimpfrontend -host=localhost -[clienthost2] -user=stratum -password='"${password2}"' -database=yiimpfrontend -host=localhost -[myphpadmin] -user=phpmyadmin -password='"${AUTOGENERATED_PASS}"' -[mysql] -user=root -password='"${rootpasswd}"' -' | sudo -E tee ~/.my.cnf >/dev/null 2>&1 + echo ' + [clienthost1] + user=panel + password='"${password}"' + database=yiimpfrontend + host=localhost + [clienthost2] + user=stratum + password='"${password2}"' + database=yiimpfrontend + host=localhost + [myphpadmin] + user=phpmyadmin + password='"${AUTOGENERATED_PASS}"' + [mysql] + user=root + password='"${rootpasswd}"' + ' | sudo -E tee ~/.my.cnf >/dev/null 2>&1 sudo chmod 0600 ~/.my.cnf # Create keys file echo ' '"'"'); -define('"'"'EXCH_BITSTAMP_SECRET'"'"','"'"''"'"'); -define('"'"'EXCH_BLEUTRADE_SECRET'"'"', '"'"''"'"'); -define('"'"'EXCH_BTER_SECRET'"'"', '"'"''"'"'); -define('"'"'EXCH_CCEX_SECRET'"'"', '"'"''"'"'); -define('"'"'EXCH_COINMARKETS_PASS'"'"', '"'"''"'"'); -define('"'"'EXCH_CRYPTOPIA_SECRET'"'"', '"'"''"'"'); -define('"'"'EXCH_EMPOEX_SECKEY'"'"', '"'"''"'"'); -define('"'"'EXCH_HITBTC_SECRET'"'"', '"'"''"'"'); -define('"'"'EXCH_KRAKEN_SECRET'"'"','"'"''"'"'); -define('"'"'EXCH_LIVECOIN_SECRET'"'"', '"'"''"'"'); -define('"'"'EXCH_NOVA_SECRET'"'"','"'"''"'"'); -define('"'"'EXCH_POLONIEX_SECRET'"'"', '"'"''"'"'); -define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); -' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 + /* Sample config file to put in /etc/yiimp/keys.php */ + define('"'"'YIIMP_MYSQLDUMP_USER'"'"', '"'"'panel'"'"'); + define('"'"'YIIMP_MYSQLDUMP_PASS'"'"', '"'"''"${password}"''"'"'); + /* Keys required to create/cancel orders and access your balances/deposit addresses */ + define('"'"'EXCH_BITTREX_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_BITSTAMP_SECRET'"'"','"'"''"'"'); + define('"'"'EXCH_BLEUTRADE_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_BTER_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_CCEX_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_COINMARKETS_PASS'"'"', '"'"''"'"'); + define('"'"'EXCH_CRYPTOPIA_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_EMPOEX_SECKEY'"'"', '"'"''"'"'); + define('"'"'EXCH_HITBTC_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_KRAKEN_SECRET'"'"','"'"''"'"'); + define('"'"'EXCH_LIVECOIN_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_NOVA_SECRET'"'"','"'"''"'"'); + define('"'"'EXCH_POLONIEX_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); + ' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 # Peforming the SQL import @@ -881,81 +883,81 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); sleep 3 # Make config file -echo ' - 0.3 -define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); -// nicehash keys deposit account & amount to deposit at a time -define('"'"'NICEHASH_API_KEY'"'"','"'"'f96c65a7-3d2f-4f3a-815c-cacf00674396'"'"'); -define('"'"'NICEHASH_API_ID'"'"','"'"'825979'"'"'); -define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3ABoqBjeorjzbyHmGMppM62YLssUgJhtuf'"'"'); -define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); -$cold_wallet_table = array( + echo ' + 0.3 + define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); + // nicehash keys deposit account & amount to deposit at a time + define('"'"'NICEHASH_API_KEY'"'"','"'"'f96c65a7-3d2f-4f3a-815c-cacf00674396'"'"'); + define('"'"'NICEHASH_API_ID'"'"','"'"'825979'"'"'); + define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3ABoqBjeorjzbyHmGMppM62YLssUgJhtuf'"'"'); + define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); + $cold_wallet_table = array( '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"' => 0.10, -); -// Sample fixed pool fees -$configFixedPoolFees = array( + ); + // Sample fixed pool fees + $configFixedPoolFees = array( '"'"'zr5'"'"' => 2.0, '"'"'scrypt'"'"' => 20.0, '"'"'sha256'"'"' => 5.0, -); -// Sample custom stratum ports -$configCustomPorts = array( -// '"'"'x11'"'"' => 7000, -); -// mBTC Coefs per algo (default is 1.0) -$configAlgoNormCoef = array( -// '"'"'x11'"'"' => 5.0, -); -' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 + ); + // Sample custom stratum ports + $configCustomPorts = array( + // '"'"'x11'"'"' => 7000, + ); + // mBTC Coefs per algo (default is 1.0) + $configAlgoNormCoef = array( + // '"'"'x11'"'"' => 5.0, + ); + ' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 # Updating stratum config files with database connection info From d3170d59665c77cd6526be139949326037c89515 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 03:13:44 +0200 Subject: [PATCH 192/360] change name --- test/{install-test => install-test.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/{install-test => install-test.sh} (100%) diff --git a/test/install-test b/test/install-test.sh similarity index 100% rename from test/install-test rename to test/install-test.sh From fbe7cbd1c634d13ea273f20cba62fae4444a6510 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 03:16:57 +0200 Subject: [PATCH 193/360] Executable! --- test/install-test.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 test/install-test.sh diff --git a/test/install-test.sh b/test/install-test.sh old mode 100644 new mode 100755 From 2cddcfbfda6526322031f265444e9339bf7d9b9a Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 03:17:17 +0200 Subject: [PATCH 194/360] make exec --- test/install-test.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 test/install-test.sh diff --git a/test/install-test.sh b/test/install-test.sh old mode 100755 new mode 100644 From 47a54f648368f845b96ec97a94a955e661bfa7cd Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 03:19:00 +0200 Subject: [PATCH 195/360] Executable! --- test/install-test.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 test/install-test.sh diff --git a/test/install-test.sh b/test/install-test.sh old mode 100644 new mode 100755 From 2ddf9042c60b6f3c3b9c70522e735ac4332926ee Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 03:19:15 +0200 Subject: [PATCH 196/360] re exec --- test/install-test.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 test/install-test.sh diff --git a/test/install-test.sh b/test/install-test.sh old mode 100755 new mode 100644 From 425c8933645d9354f90792963948e773fb56c9fd Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 03:23:38 +0200 Subject: [PATCH 197/360] made a file executable --- test/install-test.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 test/install-test.sh diff --git a/test/install-test.sh b/test/install-test.sh old mode 100644 new mode 100755 From 2c1cadca31d1243035f0092b5632dd6abd80904f Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 03:47:05 +0200 Subject: [PATCH 198/360] add function.sh --- test/conf/function.sh | 0 test/install-test.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 test/conf/function.sh mode change 100755 => 100644 test/install-test.sh diff --git a/test/conf/function.sh b/test/conf/function.sh new file mode 100644 index 00000000..e69de29b diff --git a/test/install-test.sh b/test/install-test.sh old mode 100755 new mode 100644 From cf4e09a7bb99702e61e426f7b20f84c910ca6dd7 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 03:47:37 +0200 Subject: [PATCH 199/360] made function.sh executable --- test/conf/function.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 test/conf/function.sh diff --git a/test/conf/function.sh b/test/conf/function.sh old mode 100644 new mode 100755 From da0ddefa1678c8f7181fda6e35a90613be9f583c Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 03:59:34 +0200 Subject: [PATCH 200/360] test change --- test/conf/function.sh | 40 ++++++++++++++++++++++++++++++++++++++++ test/install-test.sh | 29 ++++++++++++++++------------- 2 files changed, 56 insertions(+), 13 deletions(-) mode change 100755 => 100644 test/conf/function.sh diff --git a/test/conf/function.sh b/test/conf/function.sh old mode 100755 new mode 100644 index e69de29b..88f29c53 --- a/test/conf/function.sh +++ b/test/conf/function.sh @@ -0,0 +1,40 @@ +#!/bin/bash +##################################################### +# Source https://mailinabox.email/ https://github.com/mail-in-a-box/mailinabox +# Updated by cryptopool.builders for crypto use... +# Modified by Xavatar +##################################################### + +ESC_SEQ="\x1b[" +COL_RESET=$ESC_SEQ"39;49;00m" +RED=$ESC_SEQ"31;01m" +GREEN=$ESC_SEQ"32;01m" +YELLOW=$ESC_SEQ"33;01m" +BLUE=$ESC_SEQ"34;01m" +MAGENTA=$ESC_SEQ"35;01m" +CYAN=$ESC_SEQ"36;01m" + +function hide_output { + OUTPUT=$(tempfile) + $@ &> $OUTPUT & spinner + E=$? + if [ $E != 0 ]; then + echo + echo FAILED: $@ + echo ----------------------------------------- + cat $OUTPUT + echo ----------------------------------------- + exit $E + fi + + rm -f $OUTPUT +} + +function apt_get_quiet { + DEBIAN_FRONTEND=noninteractive hide_output sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" "$@" +} + +function apt_install { + PACKAGES=$@ + apt_get_quiet install $PACKAGES +} \ No newline at end of file diff --git a/test/install-test.sh b/test/install-test.sh index 5a25122f..ed30fd31 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -10,7 +10,8 @@ # # ################################################################################ - + + source conf/function.sh output() { printf "\E[0;33;40m" @@ -46,9 +47,10 @@ output " " sleep 3 - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get -y autoremove + hide_output sudo apt-get -y update + hide_output sudo apt-get -y upgrade + hide_output sudo apt-get -y autoremove + echo -e "$GREEN Done...$COL_RESET" # Switch Aptitude @@ -57,21 +59,22 @@ output " " sleep 3 - sudo apt-get -y install aptitude - - + apt_install aptitude + echo -e "$GREEN Done...$COL_RESET" + # Installing Nginx output " " output "Installing Nginx server." output " " sleep 3 - sudo aptitude -y install nginx - sudo rm /etc/nginx/sites-enabled/default - sudo systemctl start nginx.service - sudo systemctl enable nginx.service - sudo systemctl start cron.service - sudo systemctl enable cron.service + apt_install nginx + hide_output sudo rm /etc/nginx/sites-enabled/default + hide_output sudo systemctl start nginx.service + hide_output sudo systemctl enable nginx.service + hide_output sudo systemctl start cron.service + hide_output sudo systemctl enable cron.service + echo -e "$GREEN Done...$COL_RESET" # Making Nginx a bit hard From 5c6e4bde8f81001ab22c03e3fe4eb263f1559164 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 04:12:42 +0200 Subject: [PATCH 201/360] fck executable --- test/conf/function.sh | 0 test/install-test.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 test/conf/function.sh mode change 100644 => 100755 test/install-test.sh diff --git a/test/conf/function.sh b/test/conf/function.sh old mode 100644 new mode 100755 diff --git a/test/install-test.sh b/test/install-test.sh old mode 100644 new mode 100755 From 60a413d0bb25f841e0a6342d4b6cb4e3e5855bbe Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 04:16:31 +0200 Subject: [PATCH 202/360] add function --- test/conf/function.sh | 0 test/install-test.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 test/conf/function.sh mode change 100755 => 100644 test/install-test.sh diff --git a/test/conf/function.sh b/test/conf/function.sh old mode 100755 new mode 100644 diff --git a/test/install-test.sh b/test/install-test.sh old mode 100755 new mode 100644 From dbb143a8204b0c93086ef79bdf20c98278be5434 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 04:18:48 +0200 Subject: [PATCH 203/360] add function.sh --- test/conf/function.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/conf/function.sh b/test/conf/function.sh index 88f29c53..314f68fc 100644 --- a/test/conf/function.sh +++ b/test/conf/function.sh @@ -14,6 +14,22 @@ BLUE=$ESC_SEQ"34;01m" MAGENTA=$ESC_SEQ"35;01m" CYAN=$ESC_SEQ"36;01m" +function spinner + { + local pid=$! + local delay=0.75 + local spinstr='|/-\' + while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do + local temp=${spinstr#?} + printf " [%c] " "$spinstr" + local spinstr=$temp${spinstr%"$temp"} + sleep $delay + printf "\b\b\b\b\b\b" + done + printf " \b\b\b\b" + } + + function hide_output { OUTPUT=$(tempfile) $@ &> $OUTPUT & spinner From 6e7b46c230eb74984622f20bc23677c685d4c632 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 04:23:02 +0200 Subject: [PATCH 204/360] Update install-test.sh --- test/install-test.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index ed30fd31..436d86f0 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -98,9 +98,10 @@ # Create random password rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" - sudo aptitude -y install mariadb-server - sudo systemctl start mysql - sudo systemctl enable mysql + apt_install mariadb-server + hide_output sudo systemctl start mysql + hide_output sudo systemctl enable mysql + echo -e "$GREEN Done...$COL_RESET" # Installing Installing php7.x From 97d76f0c90bb0a33951b4462946f0db3b9c84dde Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 04:24:06 +0200 Subject: [PATCH 205/360] fix typo --- test/conf/function.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/conf/function.sh b/test/conf/function.sh index 314f68fc..70d73bc1 100644 --- a/test/conf/function.sh +++ b/test/conf/function.sh @@ -14,8 +14,8 @@ BLUE=$ESC_SEQ"34;01m" MAGENTA=$ESC_SEQ"35;01m" CYAN=$ESC_SEQ"36;01m" -function spinner - { + +function spinner { local pid=$! local delay=0.75 local spinstr='|/-\' @@ -46,10 +46,12 @@ function hide_output { rm -f $OUTPUT } + function apt_get_quiet { DEBIAN_FRONTEND=noninteractive hide_output sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" "$@" } + function apt_install { PACKAGES=$@ apt_get_quiet install $PACKAGES From 17e7e80db45b9d30405dec83fc3724a43c3260d0 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 04:48:27 +0200 Subject: [PATCH 206/360] change php version to 7.3 --- test/install-test.sh | 45 ++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 436d86f0..981d6b49 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -6,7 +6,7 @@ # Web: # # Program: -# Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.0.x +# Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.3 # # ################################################################################ @@ -102,19 +102,20 @@ hide_output sudo systemctl start mysql hide_output sudo systemctl enable mysql echo -e "$GREEN Done...$COL_RESET" + - - # Installing Installing php7.x + # Installing Installing php7.3 output " " - output "Installing php7.x" + output "Installing php7.3" output " " sleep 3 - sudo aptitude -y install php7.0-fpm - sudo aptitude -y install php7.0-opcache php7.0-fpm php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring - sudo phpenmod mcrypt - sudo phpenmod mbstring - sudo systemctl start php7.0-fpm.service + apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ + php7.3-cgi php-pear php-auth mcrypt imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell \ + php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring + hide_output sudo phpenmod mcrypt + hide_output sudo phpenmod mbstring + hide_output sudo systemctl start php7.3-fpm.service # Installing other needed files @@ -404,7 +405,7 @@ location ~ ^/index\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; @@ -436,7 +437,7 @@ deny all; } location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; @@ -447,7 +448,7 @@ sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - sudo systemctl reload php7.0-fpm.service + sudo systemctl reload php7.3-fpm.service sudo systemctl restart nginx.service if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then @@ -527,7 +528,7 @@ location ~ ^/index\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; @@ -558,7 +559,7 @@ deny all; } location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; @@ -569,7 +570,7 @@ ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - sudo systemctl reload php7.0-fpm.service + sudo systemctl reload php7.3-fpm.service sudo systemctl restart nginx.service else @@ -610,7 +611,7 @@ location ~ ^/index\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; @@ -642,7 +643,7 @@ deny all; } location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; @@ -653,7 +654,7 @@ sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - sudo systemctl reload php7.0-fpm.service + sudo systemctl reload php7.3-fpm.service sudo systemctl restart nginx.service if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then @@ -734,7 +735,7 @@ location ~ ^/index\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; @@ -765,7 +766,7 @@ deny all; } location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; @@ -776,7 +777,7 @@ ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - sudo systemctl reload php7.0-fpm.service + sudo systemctl reload php7.3-fpm.service sudo systemctl restart nginx.service fi @@ -1003,7 +1004,7 @@ sudo chmod -R 775 /var/web/serverconfig.php sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* - sudo systemctl reload php7.0-fpm.service + sudo systemctl reload php7.3-fpm.service sudo systemctl restart nginx.service From 147866a1d4e63a4d63ac2ccdf3e05ca05f525a6f Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 04:50:57 +0200 Subject: [PATCH 207/360] add done php7.3 --- test/install-test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/install-test.sh b/test/install-test.sh index 981d6b49..670a08cb 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -116,6 +116,7 @@ hide_output sudo phpenmod mcrypt hide_output sudo phpenmod mbstring hide_output sudo systemctl start php7.3-fpm.service + echo -e "$GREEN Done...$COL_RESET" # Installing other needed files From 50fdff66ba7b825bb5554cad91cf4aae25ce56eb Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 05:01:30 +0200 Subject: [PATCH 208/360] fix typo --- test/install-test.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 670a08cb..915f6e6f 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -25,10 +25,14 @@ echo exit 1; } - - output " " - output "Make sure you double check before hitting enter! Only one shot at these!" - output " " + + echo + echo -e "$CYAN Yiimp Install Script v0.2 $COL_RESET" + echo + + echo + echo -e "$RED Make sure you double check before hitting enter! Only one shot at these!$COL_RESET" + echo read -e -p "Enter time zone (e.g. America/New_York) : " TIME read -e -p "Server name (no http:// or www. just : example.com or pool.example.com) : " server_name read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain @@ -117,7 +121,7 @@ hide_output sudo phpenmod mbstring hide_output sudo systemctl start php7.3-fpm.service echo -e "$GREEN Done...$COL_RESET" - + # Installing other needed files output " " From 4b540463c366c513add3e061a3905dc2054e605d Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 12:09:55 +0200 Subject: [PATCH 209/360] Create prerequisite.sh --- test/conf/prerequisite.sh | 73 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 test/conf/prerequisite.sh diff --git a/test/conf/prerequisite.sh b/test/conf/prerequisite.sh new file mode 100644 index 00000000..8707062c --- /dev/null +++ b/test/conf/prerequisite.sh @@ -0,0 +1,73 @@ +#!/bin/bash +##################################################### +# Source https://mailinabox.email/ https://github.com/mail-in-a-box/mailinabox +# Updated by cryptopool.builders for crypto use... +# Modified by Xavatar +##################################################### + +if [ "`lsb_release -d | sed 's/.*:\s*//' | sed 's/18\.04\.[0-9]/18.04/' `" == "Ubuntu 18.04 LTS" ]; then + DISTRO=18 + sudo chmod g-w /etc /etc/default /usr +else [ "`lsb_release -d | sed 's/.*:\s*//' | sed 's/16\.04\.[0-9]/16.04/' `" != "Ubuntu 16.04 LTS" ]; + DISTRO=16 +fi + +TOTAL_PHYSICAL_MEM=$(head -n 1 /proc/meminfo | awk '{print $2}') +if [ $TOTAL_PHYSICAL_MEM -lt 1436000 ]; then + if [ ! -d /vagrant ]; then + TOTAL_PHYSICAL_MEM=$(expr \( \( $TOTAL_PHYSICAL_MEM \* 1024 \) / 1000 \) / 1000) + echo "Your Mining Pool Server needs more memory (RAM) to function properly." + echo "Please provision a machine with at least 1536 GB, 6 GB recommended." + echo "This machine has $TOTAL_PHYSICAL_MEM MB memory." + exit + fi +fi + +if [ $TOTAL_PHYSICAL_MEM -lt 1436000 ]; then + echo "WARNING: Your Mining Pool Server has less than 1.5 GB of memory." + echo " It might run unreliably when under heavy load." +fi + +# Check swap +echo Checking if swap space is needed and if so creating... + +SWAP_MOUNTED=$(cat /proc/swaps | tail -n+2) +SWAP_IN_FSTAB=$(grep "swap" /etc/fstab) +ROOT_IS_BTRFS=$(grep "\/ .*btrfs" /proc/mounts) +TOTAL_PHYSICAL_MEM=$(head -n 1 /proc/meminfo | awk '{print $2}') +AVAILABLE_DISK_SPACE=$(df / --output=avail | tail -n 1) +if + [ -z "$SWAP_MOUNTED" ] && + [ -z "$SWAP_IN_FSTAB" ] && + [ ! -e /swapfile ] && + [ -z "$ROOT_IS_BTRFS" ] && + [ $TOTAL_PHYSICAL_MEM -lt 1536000 ] && + [ $AVAILABLE_DISK_SPACE -gt 5242880 ] +then + echo "Adding a swap file to the system..." + + # Allocate and activate the swap file. Allocate in 1KB chuncks + # doing it in one go, could fail on low memory systems + sudo fallocate -l 3G /swapfile + if [ -e /swapfile ]; then + sudo chmod 600 /swapfile + hide_output sudo mkswap /swapfile + sudo swapon /swapfile + echo "vm.swappiness=10" >> sudo /etc/sysctl.conf + fi +# Check if swap is mounted then activate on boot + if swapon -s | grep -q "\/swapfile"; then + echo "/swapfile none swap sw 0 0" >> sudo /etc/fstab + else + echo "ERROR: Swap allocation failed" + fi +fi + +ARCHITECTURE=$(uname -m) +if [ "$ARCHITECTURE" != "x86_64" ]; then + if [ -z "$ARM" ]; then + echo "YiimP Install Script Setup Installer only supports x86_64 and will not work on any other architecture, like ARM or 32 bit OS." + echo "Your architecture is $ARCHITECTURE" + exit + fi +fi From 2b8fd7315f176ada3dd499b7c41464d0827d1a05 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 12:24:09 +0200 Subject: [PATCH 210/360] update --- test/conf/function.sh | 104 ++++++++++++++++++++++++++++++++++++++++++ test/install-test.sh | 8 ++++ 2 files changed, 112 insertions(+) diff --git a/test/conf/function.sh b/test/conf/function.sh index 70d73bc1..bff09011 100644 --- a/test/conf/function.sh +++ b/test/conf/function.sh @@ -55,4 +55,108 @@ function apt_get_quiet { function apt_install { PACKAGES=$@ apt_get_quiet install $PACKAGES +} + + +function ufw_allow { + if [ -z "$DISABLE_FIREWALL" ]; then + sudo ufw allow $1 > /dev/null; + fi +} + +function restart_service { + hide_output sudo service $1 restart +} + +## Dialog Functions ## +function message_box { + dialog --title "$1" --msgbox "$2" 0 0 +} + +function input_box { + # input_box "title" "prompt" "defaultvalue" VARIABLE + # The user's input will be stored in the variable VARIABLE. + # The exit code from dialog will be stored in VARIABLE_EXITCODE. + declare -n result=$4 + declare -n result_code=$4_EXITCODE + result=$(dialog --stdout --title "$1" --inputbox "$2" 0 0 "$3") + result_code=$? +} + +function input_menu { + # input_menu "title" "prompt" "tag item tag item" VARIABLE + # The user's input will be stored in the variable VARIABLE. + # The exit code from dialog will be stored in VARIABLE_EXITCODE. + declare -n result=$4 + declare -n result_code=$4_EXITCODE + local IFS=^$'\n' + result=$(dialog --stdout --title "$1" --menu "$2" 0 0 0 $3) + result_code=$? +} + +function get_publicip_from_web_service { + # This seems to be the most reliable way to determine the + # machine's public IP address: asking a very nice web API + # for how they see us. Thanks go out to icanhazip.com. + # See: https://major.io/icanhazip-com-faq/ + # + # Pass '4' or '6' as an argument to this function to specify + # what type of address to get (IPv4, IPv6). + curl -$1 --fail --silent --max-time 15 icanhazip.com 2>/dev/null +} + +function get_default_privateip { + # Return the IP address of the network interface connected + # to the Internet. + # + # Pass '4' or '6' as an argument to this function to specify + # what type of address to get (IPv4, IPv6). + # + # We used to use `hostname -I` and then filter for either + # IPv4 or IPv6 addresses. However if there are multiple + # network interfaces on the machine, not all may be for + # reaching the Internet. + # + # Instead use `ip route get` which asks the kernel to use + # the system's routes to select which interface would be + # used to reach a public address. We'll use 8.8.8.8 as + # the destination. It happens to be Google Public DNS, but + # no connection is made. We're just seeing how the box + # would connect to it. There many be multiple IP addresses + # assigned to an interface. `ip route get` reports the + # preferred. That's good enough for us. See issue #121. + # + # With IPv6, the best route may be via an interface that + # only has a link-local address (fe80::*). These addresses + # are only unique to an interface and so need an explicit + # interface specification in order to use them with bind(). + # In these cases, we append "%interface" to the address. + # See the Notes section in the man page for getaddrinfo and + # https://discourse.mailinabox.email/t/update-broke-mailinabox/34/9. + # + # Also see ae67409603c49b7fa73c227449264ddd10aae6a9 and + # issue #3 for why/how we originally added IPv6. + + target=8.8.8.8 + + # For the IPv6 route, use the corresponding IPv6 address + # of Google Public DNS. Again, it doesn't matter so long + # as it's an address on the public Internet. + if [ "$1" == "6" ]; then target=2001:4860:4860::8888; fi + + # Get the route information. + route=$(ip -$1 -o route get $target | grep -v unreachable) + + # Parse the address out of the route information. + address=$(echo $route | sed "s/.* src \([^ ]*\).*/\1/") + + if [[ "$1" == "6" && $address == fe80:* ]]; then + # For IPv6 link-local addresses, parse the interface out + # of the route information and append it with a '%'. + interface=$(echo $route | sed "s/.* dev \([^ ]*\).*/\1/") + address=$address%$interface + fi + + echo $address + } \ No newline at end of file diff --git a/test/install-test.sh b/test/install-test.sh index 915f6e6f..bd77555b 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -30,6 +30,14 @@ echo -e "$CYAN Yiimp Install Script v0.2 $COL_RESET" echo + source conf/prerequisite.sh + + echo 'PUBLIC_IP='"${PUBLIC_IP}"' + PUBLIC_IPV6='"${PUBLIC_IPV6}"' + DISTRO='"${DISTRO}"' + PRIVATE_IP='"${PRIVATE_IP}"'' | sudo -E tee conf/pool.conf >/dev/null 2>&1 + + echo echo -e "$RED Make sure you double check before hitting enter! Only one shot at these!$COL_RESET" echo From da44ba1d9e5d791741c308b654c6ce5e9f0a9c53 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 12:24:42 +0200 Subject: [PATCH 211/360] Create getip.sh --- test/conf/getip.sh | 100 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 test/conf/getip.sh diff --git a/test/conf/getip.sh b/test/conf/getip.sh new file mode 100644 index 00000000..c4848225 --- /dev/null +++ b/test/conf/getip.sh @@ -0,0 +1,100 @@ +##################################################### +# Source https://mailinabox.email/ https://github.com/mail-in-a-box/mailinabox +# Updated by cryptopool.builders for crypto use... +##################################################### + +source conf/functions.sh +clear +echo -e " Setting our global variables..." + +# If the machine is behind a NAT, inside a VM, etc., it may not know +# its IP address on the public network / the Internet. Ask the Internet +# and possibly confirm with user. +if [ -z "${PUBLIC_IP:-}" ]; then +# Ask the Internet. +GUESSED_IP=$(get_publicip_from_web_service 4) + +# On the first run, if we got an answer from the Internet then don't +# ask the user. +if [[ -z "${DEFAULT_PUBLIC_IP:-}" && ! -z "$GUESSED_IP" ]]; then +PUBLIC_IP=$GUESSED_IP + +# On later runs, if the previous value matches the guessed value then +# don't ask the user either. +elif [ "${DEFAULT_PUBLIC_IP:-}" == "$GUESSED_IP" ]; then +PUBLIC_IP=$GUESSED_IP +fi + +if [ -z "${PUBLIC_IP:-}" ]; then +input_box "Public IP Address" \ +"Enter the public IP address of this machine, as given to you by your ISP. +\n\nPublic IP address:" \ +"$DEFAULT_PUBLIC_IP" \ +PUBLIC_IP + +if [ -z "$PUBLIC_IP" ]; then +# user hit ESC/cancel +exit +fi +fi +fi + +# Same for IPv6. But it's optional. Also, if it looks like the system +# doesn't have an IPv6, don't ask for one. +if [ -z "${PUBLIC_IPV6:-}" ]; then + # Ask the Internet. + GUESSED_IP=$(get_publicip_from_web_service 6) + MATCHED=0 + if [[ -z "${DEFAULT_PUBLIC_IPV6:-}" && ! -z "$GUESSED_IP" ]]; then + PUBLIC_IPV6=$GUESSED_IP + elif [[ "${DEFAULT_PUBLIC_IPV6:-}" == "$GUESSED_IP" ]]; then + # No IPv6 entered and machine seems to have none, or what + # the user entered matches what the Internet tells us. + PUBLIC_IPV6=$GUESSED_IP + MATCHED=1 + elif [[ -z "${DEFAULT_PUBLIC_IPV6:-}" ]]; then + DEFAULT_PUBLIC_IP=$(get_default_privateip 6) + fi + + if [[ -z "${PUBLIC_IPV6:-}" && $MATCHED == 0 ]]; then + input_box "IPv6 Address (Optional)" \ + "Enter the public IPv6 address of this machine, as given to you by your ISP. + \n\nLeave blank if the machine does not have an IPv6 address. + \n\nPublic IPv6 address:" \ + ${DEFAULT_PUBLIC_IPV6:-} \ + PUBLIC_IPV6 + + if [ ! $PUBLIC_IPV6_EXITCODE ]; then + # user hit ESC/cancel + exit + fi + fi +fi + +# Get the IP addresses of the local network interface(s) that are connected +# to the Internet. We need these when we want to have services bind only to +# the public network interfaces (not loopback, not tunnel interfaces). +# if [ -z "$PRIVATE_IP" ]; then +# DEFAULT_PRIVATE_IP=$(get_default_privateip 4) +# input_box "Private IP Address (Optional)" \ +# "Enter the private IP address of this machine, as given to you by your ISP. +# \n\nLeave as your public IP if the machine does not have a private IP address. +# \n\nPrivate IP address:" \ +# $DEFAULT_PRIVATE_IP \ +# PRIVATE_IP +# +# if [ -z "$PRIVATE_IP" ]; then +# user hit ESC/cancel +# exit +# fi +# fi + +# Automatic configuration, e.g. as used in our Vagrant configuration. +if [ "$PUBLIC_IP" = "auto" ]; then +# Use a public API to get our public IP address, or fall back to local network configuration. +PUBLIC_IP=$(get_publicip_from_web_service 4 || get_default_privateip 4) +fi +if [ "$PUBLIC_IPV6" = "auto" ]; then +# Use a public API to get our public IPv6 address, or fall back to local network configuration. +PUBLIC_IPV6=$(get_publicip_from_web_service 6 || get_default_privateip 6) +fi From 7a97a5418903e8f2f1f21641a0d418d7d749e89e Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 12:26:44 +0200 Subject: [PATCH 212/360] add repo php7.3 --- test/install-test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/install-test.sh b/test/install-test.sh index bd77555b..126786bd 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -29,8 +29,10 @@ echo echo -e "$CYAN Yiimp Install Script v0.2 $COL_RESET" echo + sleep 3 source conf/prerequisite.sh + source conf/getip.sh echo 'PUBLIC_IP='"${PUBLIC_IP}"' PUBLIC_IPV6='"${PUBLIC_IPV6}"' @@ -122,6 +124,9 @@ output " " sleep 3 + if [ ! -f /etc/apt/sources.list.d/ondrej-php-bionic.list ]; then + hide_output sudo add-apt-repository -y ppa:ondrej/php + fi apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ php7.3-cgi php-pear php-auth mcrypt imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell \ php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring From ee517df51c13a32e57ee658a9613bfcc18bba22b Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 12:42:27 +0200 Subject: [PATCH 213/360] add apt update before php7.3 --- test/install-test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/install-test.sh b/test/install-test.sh index 126786bd..5fb1b811 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -127,6 +127,7 @@ if [ ! -f /etc/apt/sources.list.d/ondrej-php-bionic.list ]; then hide_output sudo add-apt-repository -y ppa:ondrej/php fi + hide_output sudo apt-get -y update apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ php7.3-cgi php-pear php-auth mcrypt imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell \ php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring From 43e851b0205c028307ab99e2da6c167a96f55310 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 12:51:02 +0200 Subject: [PATCH 214/360] typo --- test/install-test.sh | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 5fb1b811..3e9d966b 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -30,6 +30,20 @@ echo -e "$CYAN Yiimp Install Script v0.2 $COL_RESET" echo sleep 3 + + # Update package and Upgrade Ubuntu + echo + echo "Updating system and installing required packages." + echo + sleep 3 + + hide_output sudo apt-get -y update + hide_output sudo apt-get -y upgrade + hide_output sudo apt-get -y autoremove + apt_install dialog python3 python3-pip acl nano apt-transport-https + echo -e "$GREEN Done...$COL_RESET" + + apt_install dialog python3 python3-pip acl nano apt-transport-https source conf/prerequisite.sh source conf/getip.sh @@ -55,18 +69,6 @@ read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install - # Update package and Upgrade Ubuntu - output " " - output "Updating system and installing required packages." - output " " - sleep 3 - - hide_output sudo apt-get -y update - hide_output sudo apt-get -y upgrade - hide_output sudo apt-get -y autoremove - echo -e "$GREEN Done...$COL_RESET" - - # Switch Aptitude output " " output "Switching to Aptitude" From 72eefee90635fabd41bf852a4b8b826e16de23ca Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 13:37:18 +0200 Subject: [PATCH 215/360] chg for test --- test/conf/{function.sh => functions.sh} | 2 +- test/install-test.sh | 118 ++++++++++++++---------- 2 files changed, 68 insertions(+), 52 deletions(-) rename test/conf/{function.sh => functions.sh} (97%) diff --git a/test/conf/function.sh b/test/conf/functions.sh similarity index 97% rename from test/conf/function.sh rename to test/conf/functions.sh index bff09011..c763c617 100644 --- a/test/conf/function.sh +++ b/test/conf/functions.sh @@ -48,7 +48,7 @@ function hide_output { function apt_get_quiet { - DEBIAN_FRONTEND=noninteractive hide_output sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" "$@" + DEBIAN_FRONTEND=noninteractive hide_output sudo apt -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" "$@" } diff --git a/test/install-test.sh b/test/install-test.sh index 3e9d966b..ce8c113a 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -11,7 +11,7 @@ # ################################################################################ - source conf/function.sh + source conf/functions.sh output() { printf "\E[0;33;40m" @@ -26,6 +26,7 @@ exit 1; } + clear echo echo -e "$CYAN Yiimp Install Script v0.2 $COL_RESET" echo @@ -37,23 +38,27 @@ echo sleep 3 - hide_output sudo apt-get -y update - hide_output sudo apt-get -y upgrade - hide_output sudo apt-get -y autoremove - apt_install dialog python3 python3-pip acl nano apt-transport-https + #hide_output + sudo apt -y update + #hide_output + sudo apt -y upgrade + #hide_output + sudo apt -y autoremove + #apt_install + sudo apt -y install dialog python3 python3-pip acl nano apt-transport-https echo -e "$GREEN Done...$COL_RESET" - apt_install dialog python3 python3-pip acl nano apt-transport-https - + source conf/prerequisite.sh source conf/getip.sh - echo 'PUBLIC_IP='"${PUBLIC_IP}"' + echo ' + PUBLIC_IP='"${PUBLIC_IP}"' PUBLIC_IPV6='"${PUBLIC_IPV6}"' DISTRO='"${DISTRO}"' PRIVATE_IP='"${PRIVATE_IP}"'' | sudo -E tee conf/pool.conf >/dev/null 2>&1 - + clear echo echo -e "$RED Make sure you double check before hitting enter! Only one shot at these!$COL_RESET" echo @@ -70,26 +75,34 @@ # Switch Aptitude - output " " - output "Switching to Aptitude" - output " " + echo + echo "Switching to Aptitude" + echo sleep 3 - apt_install aptitude + #apt_install + sudo apt -y install aptitude echo -e "$GREEN Done...$COL_RESET" + # Installing Nginx - output " " - output "Installing Nginx server." - output " " + echo + echo "Installing Nginx server." + echo sleep 3 - apt_install nginx - hide_output sudo rm /etc/nginx/sites-enabled/default - hide_output sudo systemctl start nginx.service - hide_output sudo systemctl enable nginx.service - hide_output sudo systemctl start cron.service - hide_output sudo systemctl enable cron.service + #apt_install + sudo apt -y install nginx + #hide_output + sudo rm /etc/nginx/sites-enabled/default + #hide_output + sudo systemctl start nginx.service + #hide_output + sudo systemctl enable nginx.service + #hide_output + sudo systemctl start cron.service + #hide_output + sudo systemctl enable cron.service echo -e "$GREEN Done...$COL_RESET" @@ -106,57 +119,60 @@ # Installing Mariadb - output " " - output "Installing Mariadb Server." - output " " + echo + echo "Installing Mariadb Server." + echo sleep 3 # Create random password rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" - apt_install mariadb-server - hide_output sudo systemctl start mysql - hide_output sudo systemctl enable mysql + #apt_install + sudo apt -y install mariadb-server + #hide_output + sudo systemctl start mysql + #hide_output + sudo systemctl enable mysql echo -e "$GREEN Done...$COL_RESET" # Installing Installing php7.3 - output " " - output "Installing php7.3" - output " " + echo + echo "Installing php7.3" + echo sleep 3 if [ ! -f /etc/apt/sources.list.d/ondrej-php-bionic.list ]; then hide_output sudo add-apt-repository -y ppa:ondrej/php fi hide_output sudo apt-get -y update - apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ - php7.3-cgi php-pear php-auth mcrypt imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell \ + #apt_install + sudo apt -y install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ + php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell \ php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring - hide_output sudo phpenmod mcrypt - hide_output sudo phpenmod mbstring - hide_output sudo systemctl start php7.3-fpm.service + #apt_install + sudo apt -y install php7.1-mcrypt + #hide_output + sudo ln -s /etc/php/7.1/mods-available/mcrypt.ini /etc/php/7.3/mods-available/ + #hide_output + sudo phpenmod mcrypt + #hide_output sudo + phpenmod mbstring + #hide_output + sudo systemctl start php7.3-fpm.service echo -e "$GREEN Done...$COL_RESET" # Installing other needed files - output " " - output "Installing other needed files" - output " " + echo + echo "Installing other needed files" + echo sleep 3 - sudo aptitude -y install libgmp3-dev - sudo aptitude -y install libmysqlclient-dev - sudo aptitude -y install libcurl4-gnutls-dev - sudo aptitude -y install libkrb5-dev - sudo aptitude -y install libldap2-dev - sudo aptitude -y install libidn11-dev - sudo aptitude -y install gnutls-dev - sudo aptitude -y install librtmp-dev - sudo aptitude -y install sendmail - sudo aptitude -y install mutt - sudo aptitude -y install git screen - sudo aptitude -y install pwgen -y + #apt_install + sudo apt -y install libgmp3-dev libmysqlclient-dev libcurl4-gnutls-dev libkrb5-dev libldap2-dev libidn11-dev gnutls-dev \ + librtmp-dev sendmail mutt screen git + sudo apt -y install pwgen -y # Installing Package to compile crypto currency From 995e5ac5874681d06cf7cede8933f122d2399464 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 13:45:17 +0200 Subject: [PATCH 216/360] chg rep fct --- test/conf/getip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/conf/getip.sh b/test/conf/getip.sh index c4848225..75048ed3 100644 --- a/test/conf/getip.sh +++ b/test/conf/getip.sh @@ -3,7 +3,7 @@ # Updated by cryptopool.builders for crypto use... ##################################################### -source conf/functions.sh +source functions.sh clear echo -e " Setting our global variables..." From 393f4902829103224815c9feb24857822f7ed35e Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 14:03:46 +0200 Subject: [PATCH 217/360] Create editconf.py --- test/conf/editconf.py | 137 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 test/conf/editconf.py diff --git a/test/conf/editconf.py b/test/conf/editconf.py new file mode 100644 index 00000000..93eabb32 --- /dev/null +++ b/test/conf/editconf.py @@ -0,0 +1,137 @@ +#!/usr/bin/python3 +# +# This is a helper tool for editing configuration files during the setup +# process. The tool is given new values for settings as command-line +# arguments. It comments-out existing setting values in the configuration +# file and adds new values either after their former location or at the +# end. +# +# The configuration file has settings that look like: +# +# NAME=VALUE +# +# If the -s option is given, then space becomes the delimiter, i.e.: +# +# NAME VALUE +# +# If the -c option is given, then the supplied character becomes the comment character +# +# If the -w option is given, then setting lines continue onto following +# lines while the lines start with whitespace, e.g.: +# +# NAME VAL +# UE + +import sys, re + +# sanity check +if len(sys.argv) < 3: + print("usage: python3 editconf.py /etc/file.conf [-s] [-w] [-c ] [-t] NAME=VAL [NAME=VAL ...]") + sys.exit(1) + +# parse command line arguments +filename = sys.argv[1] +settings = sys.argv[2:] + +delimiter = "=" +delimiter_re = r"\s*=\s*" +comment_char = "#" +folded_lines = False +testing = False +while settings[0][0] == "-" and settings[0] != "--": + opt = settings.pop(0) + if opt == "-s": + # Space is the delimiter + delimiter = " " + delimiter_re = r"\s+" + elif opt == "-w": + # Line folding is possible in this file. + folded_lines = True + elif opt == "-c": + # Specifies a different comment character. + comment_char = settings.pop(0) + elif opt == "-t": + testing = True + else: + print("Invalid option.") + sys.exit(1) + +# sanity check command line +for setting in settings: + try: + name, value = setting.split("=", 1) + except: + import subprocess + print("Invalid command line: ", subprocess.list2cmdline(sys.argv)) + +# create the new config file in memory + +found = set() +buf = "" +input_lines = list(open(filename)) + +while len(input_lines) > 0: + line = input_lines.pop(0) + + # If this configuration file uses folded lines, append any folded lines + # into our input buffer. + if folded_lines and line[0] not in (comment_char, " ", ""): + while len(input_lines) > 0 and input_lines[0][0] in " \t": + line += input_lines.pop(0) + + # See if this line is for any settings passed on the command line. + for i in range(len(settings)): + # Check that this line contain this setting from the command-line arguments. + name, val = settings[i].split("=", 1) + m = re.match( + "(\s*)" + + "(" + re.escape(comment_char) + "\s*)?" + + re.escape(name) + delimiter_re + "(.*?)\s*$", + line, re.S) + if not m: continue + indent, is_comment, existing_val = m.groups() + + # If this is already the setting, do nothing. + if is_comment is None and existing_val == val: + # It may be that we've already inserted this setting higher + # in the file so check for that first. + if i in found: break + buf += line + found.add(i) + break + + # comment-out the existing line (also comment any folded lines) + if is_comment is None: + buf += comment_char + line.rstrip().replace("\n", "\n" + comment_char) + "\n" + else: + # the line is already commented, pass it through + buf += line + + # if this option oddly appears more than once, don't add the setting again + if i in found: + break + + # add the new setting + buf += indent + name + delimiter + val + "\n" + + # note that we've applied this option + found.add(i) + + break + else: + # If did not match any setting names, pass this line through. + buf += line + +# Put any settings we didn't see at the end of the file. +for i in range(len(settings)): + if i not in found: + name, val = settings[i].split("=", 1) + buf += name + delimiter + val + "\n" + +if not testing: + # Write out the new file. + with open(filename, "w") as f: + f.write(buf) +else: + # Just print the new file to stdout. + print(buf) From a44343dba695cbfa2c56c4f429f46fe741e744ef Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 14:12:28 +0200 Subject: [PATCH 218/360] chg fct --- test/conf/getip.sh | 2 +- test/install-test.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/conf/getip.sh b/test/conf/getip.sh index 75048ed3..8f51e495 100644 --- a/test/conf/getip.sh +++ b/test/conf/getip.sh @@ -3,7 +3,7 @@ # Updated by cryptopool.builders for crypto use... ##################################################### -source functions.sh +source etc/functions.sh clear echo -e " Setting our global variables..." diff --git a/test/install-test.sh b/test/install-test.sh index ce8c113a..f6e72cc9 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -26,6 +26,12 @@ exit 1; } + sudo cp -r conf/functions.sh /etc/ + sudo cp -r conf/editconf.py /usr/bin + sudo chmod +x /usr/bin/editconf.py + + source etc/functions.sh + clear echo echo -e "$CYAN Yiimp Install Script v0.2 $COL_RESET" From cb18efa7a9c25527cb08e16954f21b4beef38122 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 14:14:26 +0200 Subject: [PATCH 219/360] fix typo --- test/install-test.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index f6e72cc9..a6174a7c 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -11,9 +11,7 @@ # ################################################################################ - source conf/functions.sh - - output() { + output() { printf "\E[0;33;40m" echo $1 printf "\E[0m" From 7a32a41d4494d454fee52d0276ccee998cef0acf Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 14:20:18 +0200 Subject: [PATCH 220/360] fix rep fct --- test/conf/getip.sh | 2 +- test/install-test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/conf/getip.sh b/test/conf/getip.sh index 8f51e495..d00f34df 100644 --- a/test/conf/getip.sh +++ b/test/conf/getip.sh @@ -3,7 +3,7 @@ # Updated by cryptopool.builders for crypto use... ##################################################### -source etc/functions.sh +source /etc/functions.sh clear echo -e " Setting our global variables..." diff --git a/test/install-test.sh b/test/install-test.sh index a6174a7c..e1663f9d 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -28,7 +28,7 @@ sudo cp -r conf/editconf.py /usr/bin sudo chmod +x /usr/bin/editconf.py - source etc/functions.sh + source /etc/functions.sh clear echo From 89c467c69fa6d7424ba20b4286d3b227c989f5d3 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 14:42:34 +0200 Subject: [PATCH 221/360] update systemcrl start/restart/reload --- test/install-test.sh | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index e1663f9d..c63365ef 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -100,11 +100,11 @@ #hide_output sudo rm /etc/nginx/sites-enabled/default #hide_output - sudo systemctl start nginx.service + #sudo systemctl start nginx.service #hide_output sudo systemctl enable nginx.service #hide_output - sudo systemctl start cron.service + #sudo systemctl start cron.service #hide_output sudo systemctl enable cron.service echo -e "$GREEN Done...$COL_RESET" @@ -161,9 +161,9 @@ #hide_output sudo phpenmod mcrypt #hide_output sudo - phpenmod mbstring + sudo phpenmod mbstring #hide_output - sudo systemctl start php7.3-fpm.service + #sudo systemctl start php7.3-fpm.service echo -e "$GREEN Done...$COL_RESET" @@ -489,8 +489,8 @@ sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - sudo systemctl reload php7.3-fpm.service - sudo systemctl restart nginx.service + #sudo systemctl reload php7.3-fpm.service + #sudo systemctl restart nginx.service if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then @@ -611,8 +611,8 @@ ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - sudo systemctl reload php7.3-fpm.service - sudo systemctl restart nginx.service + #sudo systemctl reload php7.3-fpm.service + #sudo systemctl restart nginx.service else echo 'include /etc/nginx/blockuseragents.rules; @@ -695,8 +695,8 @@ sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - sudo systemctl reload php7.3-fpm.service - sudo systemctl restart nginx.service + #sudo systemctl reload php7.3-fpm.service + #sudo systemctl restart nginx.service if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then @@ -818,8 +818,8 @@ ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - sudo systemctl reload php7.3-fpm.service - sudo systemctl restart nginx.service + #sudo systemctl reload php7.3-fpm.service + #sudo systemctl restart nginx.service fi @@ -1045,8 +1045,11 @@ sudo chmod -R 775 /var/web/serverconfig.php sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* - sudo systemctl reload php7.3-fpm.service - sudo systemctl restart nginx.service + sudo systemctl start cron.service + sudo systemctl restart mysql + sudo systemctl start nginx.service + sudo systemctl start php7.3-fpm.service + output " " From 4a80b8e3c1861f06c8daa41e41f0053559de017f Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 15:02:18 +0200 Subject: [PATCH 222/360] fix systemctl --- test/install-test.sh | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index c63365ef..35c85d28 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -11,6 +11,8 @@ # ################################################################################ + yiimpgithub= + output() { printf "\E[0;33;40m" echo $1 @@ -100,11 +102,11 @@ #hide_output sudo rm /etc/nginx/sites-enabled/default #hide_output - #sudo systemctl start nginx.service + sudo systemctl start nginx.service #hide_output sudo systemctl enable nginx.service #hide_output - #sudo systemctl start cron.service + sudo systemctl start cron.service #hide_output sudo systemctl enable cron.service echo -e "$GREEN Done...$COL_RESET" @@ -163,7 +165,8 @@ #hide_output sudo sudo phpenmod mbstring #hide_output - #sudo systemctl start php7.3-fpm.service + sleep 3 + sudo systemctl start php7.3-fpm echo -e "$GREEN Done...$COL_RESET" @@ -489,8 +492,8 @@ sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - #sudo systemctl reload php7.3-fpm.service - #sudo systemctl restart nginx.service + sudo systemctl reload php7.3-fpm.service + sudo systemctl restart nginx.service if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then @@ -611,8 +614,8 @@ ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - #sudo systemctl reload php7.3-fpm.service - #sudo systemctl restart nginx.service + sudo systemctl reload php7.3-fpm.service + sudo systemctl restart nginx.service else echo 'include /etc/nginx/blockuseragents.rules; @@ -695,8 +698,8 @@ sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - #sudo systemctl reload php7.3-fpm.service - #sudo systemctl restart nginx.service + sudo systemctl reload php7.3-fpm.service + sudo systemctl restart nginx.service if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then @@ -818,8 +821,8 @@ ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - #sudo systemctl reload php7.3-fpm.service - #sudo systemctl restart nginx.service + sudo systemctl reload php7.3-fpm.service + sudo systemctl restart nginx.service fi @@ -1045,10 +1048,10 @@ sudo chmod -R 775 /var/web/serverconfig.php sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* - sudo systemctl start cron.service + sudo systemctl restart cron.service sudo systemctl restart mysql - sudo systemctl start nginx.service - sudo systemctl start php7.3-fpm.service + sudo systemctl restart nginx.service + sudo systemctl restart php7.3-fpm.service From 33a383d596d5be8aa058259a108712d0ba8cf1fc Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 15:07:26 +0200 Subject: [PATCH 223/360] chg sleep php-fpm --- test/install-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/install-test.sh b/test/install-test.sh index 35c85d28..e6f62e33 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -165,7 +165,7 @@ #hide_output sudo sudo phpenmod mbstring #hide_output - sleep 3 + sleep 5 sudo systemctl start php7.3-fpm echo -e "$GREEN Done...$COL_RESET" From 633a8aa60f6271284c8661ad3bf821864f1a0eb4 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 15:18:05 +0200 Subject: [PATCH 224/360] variable repo yiimp --- test/install-test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index e6f62e33..06ca8465 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -11,7 +11,9 @@ # ################################################################################ - yiimpgithub= + #### Variables + githubrepo=https://github.com/Kudaraidee/yiimp.git + #### output() { printf "\E[0;33;40m" @@ -331,7 +333,7 @@ # Compil Blocknotify cd ~ - git clone https://github.com/tpruvot/yiimp.git + git clone $githubrepo cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp sudo make @@ -923,6 +925,7 @@ sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql + sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql # Generating a basic Yiimp serverconfig.php From 6b3f9a30b0f624ee0980c6e0d2598f33ce771355 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 15:43:30 +0200 Subject: [PATCH 225/360] some chg --- test/install-test.sh | 253 ++++++++++++++++++++----------------------- 1 file changed, 119 insertions(+), 134 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 06ca8465..45e9d1a2 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -11,9 +11,10 @@ # ################################################################################ - #### Variables + # Variables githubrepo=https://github.com/Kudaraidee/yiimp.git - #### + + output() { printf "\E[0;33;40m" @@ -36,30 +37,29 @@ clear echo - echo -e "$CYAN Yiimp Install Script v0.2 $COL_RESET" + echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" echo sleep 3 - # Update package and Upgrade Ubuntu + + # Update package and Upgrade Ubuntu echo - echo "Updating system and installing required packages." + echo -e "$CYAN Updating system and installing required packages.$COL_RESET" echo sleep 3 - #hide_output - sudo apt -y update - #hide_output - sudo apt -y upgrade - #hide_output - sudo apt -y autoremove - #apt_install - sudo apt -y install dialog python3 python3-pip acl nano apt-transport-https + hide_output sudo apt -y update + hide_output sudo apt -y upgrade + hide_output sudo apt -y autoremove + apt_install dialog python3 python3-pip acl nano apt-transport-https echo -e "$GREEN Done...$COL_RESET" source conf/prerequisite.sh + sleep 3 source conf/getip.sh + echo ' PUBLIC_IP='"${PUBLIC_IP}"' PUBLIC_IPV6='"${PUBLIC_IPV6}"' @@ -84,33 +84,25 @@ # Switch Aptitude echo - echo "Switching to Aptitude" + echo -e "$CYAN Switching to Aptitude $COL_RESET" echo sleep 3 - - #apt_install - sudo apt -y install aptitude - echo -e "$GREEN Done...$COL_RESET" + apt_install aptitude + echo -e "$GREEN Done...$COL_RESET $COL_RESET" # Installing Nginx echo - echo "Installing Nginx server." + echo -e "$CYAN Installing Nginx server. $COL_RESET" echo sleep 3 - #apt_install - sudo apt -y install nginx - #hide_output - sudo rm /etc/nginx/sites-enabled/default - #hide_output - sudo systemctl start nginx.service - #hide_output - sudo systemctl enable nginx.service - #hide_output - sudo systemctl start cron.service - #hide_output - sudo systemctl enable cron.service + apt_install nginx + hide_output sudo rm /etc/nginx/sites-enabled/default + hide_output sudo systemctl start nginx.service + hide_output sudo systemctl enable nginx.service + hide_output sudo systemctl start cron.service + hide_output sudo systemctl enable cron.service echo -e "$GREEN Done...$COL_RESET" @@ -128,25 +120,22 @@ # Installing Mariadb echo - echo "Installing Mariadb Server." + echo -e "$CYAN Installing Mariadb Server. $COL_RESET" echo sleep 3 # Create random password rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" - #apt_install - sudo apt -y install mariadb-server - #hide_output - sudo systemctl start mysql - #hide_output - sudo systemctl enable mysql + apt_install mariadb-server + hide_output sudo systemctl start mysql + hide_output sudo systemctl enable mysql echo -e "$GREEN Done...$COL_RESET" # Installing Installing php7.3 echo - echo "Installing php7.3" + echo -e "$CYAN Installing php7.3 $COL_RESET" echo sleep 3 @@ -154,50 +143,45 @@ hide_output sudo add-apt-repository -y ppa:ondrej/php fi hide_output sudo apt-get -y update - #apt_install - sudo apt -y install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ + apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell \ php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring - #apt_install - sudo apt -y install php7.1-mcrypt - #hide_output - sudo ln -s /etc/php/7.1/mods-available/mcrypt.ini /etc/php/7.3/mods-available/ - #hide_output - sudo phpenmod mcrypt - #hide_output sudo - sudo phpenmod mbstring - #hide_output + apt_install php7.1-mcrypt + hide_output sudo ln -s /etc/php/7.1/mods-available/mcrypt.ini /etc/php/7.3/mods-available/ + hide_output sudo phpenmod mcrypt + hide_output sudo sudo phpenmod mbstring sleep 5 - sudo systemctl start php7.3-fpm + hide_output sudo systemctl start php7.3-fpm echo -e "$GREEN Done...$COL_RESET" # Installing other needed files echo - echo "Installing other needed files" + echo -e "$CYAN Installing other needed files $COL_RESET" echo sleep 3 - #apt_install - sudo apt -y install libgmp3-dev libmysqlclient-dev libcurl4-gnutls-dev libkrb5-dev libldap2-dev libidn11-dev gnutls-dev \ + apt_install libgmp3-dev libmysqlclient-dev libcurl4-gnutls-dev libkrb5-dev libldap2-dev libidn11-dev gnutls-dev \ librtmp-dev sendmail mutt screen git - sudo apt -y install pwgen -y + apt_install pwgen -y + echo -e "$GREEN Done...$COL_RESET" # Installing Package to compile crypto currency - output " " - output "Installing Package to compile crypto currency" - output " " + echo + echo -e "$CYAN Installing Package to compile crypto currency $COL_RESET" + echo sleep 3 - sudo aptitude -y install software-properties-common build-essential - sudo aptitude -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext - sudo aptitude -y install libminiupnpc10 libzmq5 - sudo aptitude -y install libcanberra-gtk-module libqrencode-dev libzmq3-dev - sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler - sudo add-apt-repository -y ppa:bitcoin/bitcoin - sudo apt-get -y update - sudo apt-get install -y libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ + apt_install software-properties-common build-essential + apt_install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext + apt_install libminiupnpc10 libzmq5 + apt_install libcanberra-gtk-module libqrencode-dev libzmq3-dev + apt_install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler + hide_output sudo add-apt-repository -y ppa:bitcoin/bitcoin + hide_output sudo apt-get -y update + apt_install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ + echo -e "$GREEN Done...$COL_RESET" # Generating Random Passwords @@ -207,9 +191,9 @@ # Test Email - output " " - output "Testing to see if server emails are sent" - output " " + echo + echo -e "$CYAN Testing to see if server emails are sent $COL_RESET" + echo sleep 3 if [[ "$root_email" != "" ]]; then @@ -227,12 +211,12 @@ echo "Mail sent" fi fi - + echo -e "$GREEN Done...$COL_RESET" # Installing Fail2Ban & UFW - output " " - output "Some optional installs (Fail2Ban & UFW)" - output " " + echo + echo -e "$CYAN Some optional installs (Fail2Ban & UFW) $COL_RESET" + echo sleep 3 @@ -240,68 +224,69 @@ sudo aptitude -y install fail2ban fi if [[ ("$UFW" == "y" || "$UFW" == "Y" || "$UFW" == "") ]]; then - sudo apt-get install ufw - sudo ufw default deny incoming - sudo ufw default allow outgoing - sudo ufw allow ssh - sudo ufw allow http - sudo ufw allow https - sudo ufw allow 3333/tcp - sudo ufw allow 3339/tcp - sudo ufw allow 3334/tcp - sudo ufw allow 3433/tcp - sudo ufw allow 3555/tcp - sudo ufw allow 3556/tcp - sudo ufw allow 3573/tcp - sudo ufw allow 3535/tcp - sudo ufw allow 3533/tcp - sudo ufw allow 3553/tcp - sudo ufw allow 3633/tcp - sudo ufw allow 3733/tcp - sudo ufw allow 3636/tcp - sudo ufw allow 3737/tcp - sudo ufw allow 3739/tcp - sudo ufw allow 3747/tcp - sudo ufw allow 3833/tcp - sudo ufw allow 3933/tcp - sudo ufw allow 4033/tcp - sudo ufw allow 4133/tcp - sudo ufw allow 4233/tcp - sudo ufw allow 4234/tcp - sudo ufw allow 4333/tcp - sudo ufw allow 4433/tcp - sudo ufw allow 4533/tcp - sudo ufw allow 4553/tcp - sudo ufw allow 4633/tcp - sudo ufw allow 4733/tcp - sudo ufw allow 4833/tcp - sudo ufw allow 4933/tcp - sudo ufw allow 5033/tcp - sudo ufw allow 5133/tcp - sudo ufw allow 5233/tcp - sudo ufw allow 5333/tcp - sudo ufw allow 5433/tcp - sudo ufw allow 5533/tcp - sudo ufw allow 5733/tcp - sudo ufw allow 5743/tcp - sudo ufw allow 3252/tcp - sudo ufw allow 5755/tcp - sudo ufw allow 5766/tcp - sudo ufw allow 5833/tcp - sudo ufw allow 5933/tcp - sudo ufw allow 6033/tcp - sudo ufw allow 5034/tcp - sudo ufw allow 6133/tcp - sudo ufw allow 6233/tcp - sudo ufw allow 6333/tcp - sudo ufw allow 6433/tcp - sudo ufw allow 7433/tcp - sudo ufw allow 8333/tcp - sudo ufw allow 8463/tcp - sudo ufw allow 8433/tcp - sudo ufw allow 8533/tcp - sudo ufw --force enable + hide_output sudo apt-get install ufw + hide_output sudo ufw default deny incoming + hide_output sudo ufw default allow outgoing + hide_output sudo ufw allow ssh + hide_output sudo ufw allow http + hide_output sudo ufw allow https + hide_output sudo ufw allow 3333/tcp + hide_output sudo ufw allow 3339/tcp + hide_output sudo ufw allow 3334/tcp + hide_output sudo ufw allow 3433/tcp + hide_output sudo ufw allow 3555/tcp + hide_output sudo ufw allow 3556/tcp + hide_output sudo ufw allow 3573/tcp + hide_output sudo ufw allow 3535/tcp + hide_output sudo ufw allow 3533/tcp + hide_output sudo ufw allow 3553/tcp + hide_output sudo ufw allow 3633/tcp + hide_output sudo ufw allow 3733/tcp + hide_output sudo ufw allow 3636/tcp + hide_output sudo ufw allow 3737/tcp + hide_output sudo ufw allow 3739/tcp + hide_output sudo ufw allow 3747/tcp + hide_output sudo ufw allow 3833/tcp + hide_output sudo ufw allow 3933/tcp + hide_output sudo ufw allow 4033/tcp + hide_output sudo ufw allow 4133/tcp + hide_output sudo ufw allow 4233/tcp + hide_output sudo ufw allow 4234/tcp + hide_output sudo ufw allow 4333/tcp + hide_output sudo ufw allow 4433/tcp + hide_output sudo ufw allow 4533/tcp + hide_output sudo ufw allow 4553/tcp + hide_output sudo ufw allow 4633/tcp + hide_output sudo ufw allow 4733/tcp + hide_output sudo ufw allow 4833/tcp + hide_output sudo ufw allow 4933/tcp + hide_output sudo ufw allow 5033/tcp + hide_output sudo ufw allow 5133/tcp + hide_output sudo ufw allow 5233/tcp + hide_output sudo ufw allow 5333/tcp + hide_output sudo ufw allow 5433/tcp + hide_output sudo ufw allow 5533/tcp + hide_output sudo ufw allow 5733/tcp + hide_output sudo ufw allow 5743/tcp + hide_output sudo ufw allow 3252/tcp + hide_output sudo ufw allow 5755/tcp + hide_output sudo ufw allow 5766/tcp + hide_output sudo ufw allow 5833/tcp + hide_output sudo ufw allow 5933/tcp + hide_output sudo ufw allow 6033/tcp + hide_output sudo ufw allow 5034/tcp + hide_output sudo ufw allow 6133/tcp + hide_output sudo ufw allow 6233/tcp + hide_output sudo ufw allow 6333/tcp + hide_output sudo ufw allow 6433/tcp + hide_output sudo ufw allow 7433/tcp + hide_output sudo ufw allow 8333/tcp + hide_output sudo ufw allow 8463/tcp + hide_output sudo ufw allow 8433/tcp + hide_output sudo ufw allow 8533/tcp + hide_output sudo ufw --force enable fi + echo -e "$GREEN Done...$COL_RESET" # Installing PhpMyAdmin From cc867bf68402518b1c0d563994a4e5b18878f5b2 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 16:16:12 +0200 Subject: [PATCH 226/360] chg typo --- test/conf/getip.sh | 5 +- test/install-test.sh | 165 ++++++++++++++++++++++++------------------- 2 files changed, 94 insertions(+), 76 deletions(-) diff --git a/test/conf/getip.sh b/test/conf/getip.sh index d00f34df..03b50011 100644 --- a/test/conf/getip.sh +++ b/test/conf/getip.sh @@ -4,8 +4,9 @@ ##################################################### source /etc/functions.sh -clear -echo -e " Setting our global variables..." +echo +echo -e "$CYAN Setting our global variables... $COL_RESET" +echo # If the machine is behind a NAT, inside a VM, etc., it may not know # its IP address on the public network / the Internet. Ask the Internet diff --git a/test/install-test.sh b/test/install-test.sh index 45e9d1a2..50b8b59f 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -11,8 +11,9 @@ # ################################################################################ - # Variables - githubrepo=https://github.com/Kudaraidee/yiimp.git + ### Variable ### + #githubrepo=https://github.com/Kudaraidee/yiimp.git + githubrepo=https://github.com/tpruvot/yiimp.git @@ -66,9 +67,8 @@ DISTRO='"${DISTRO}"' PRIVATE_IP='"${PRIVATE_IP}"'' | sudo -E tee conf/pool.conf >/dev/null 2>&1 - clear echo - echo -e "$RED Make sure you double check before hitting enter! Only one shot at these!$COL_RESET" + echo -e "$RED Make sure you double check before hitting enter! Only one shot at these! $COL_RESET" echo read -e -p "Enter time zone (e.g. America/New_York) : " TIME read -e -p "Server name (no http:// or www. just : example.com or pool.example.com) : " server_name @@ -221,10 +221,12 @@ if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then - sudo aptitude -y install fail2ban + apt_install fail2ban fi + + if [[ ("$UFW" == "y" || "$UFW" == "Y" || "$UFW" == "") ]]; then - hide_output sudo apt-get install ufw + apt_install ufw hide_output sudo ufw default deny incoming hide_output sudo ufw default allow outgoing hide_output sudo ufw allow ssh @@ -287,12 +289,12 @@ hide_output sudo ufw --force enable fi echo -e "$GREEN Done...$COL_RESET" - + # Installing PhpMyAdmin - output " " - output "Installing phpmyadmin" - output " " + echo " " + echo -e "$CYAN Installing phpmyadmin $COL_RESET" + echo " " sleep 3 echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections @@ -301,15 +303,16 @@ echo "phpmyadmin phpmyadmin/mysql/admin-pass password $rootpasswd" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/mysql/app-pass password $AUTOGENERATED_PASS" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections - sudo aptitude -y install phpmyadmin + apt_install phpmyadmin + echo -e "$GREEN Done...$COL_RESET" # Installing Yiimp - output " " - output " Installing Yiimp" - output " " - output "Grabbing yiimp fron Github, building files and setting file structure." - output " " + echo " " + echo -e "$CYAN Installing Yiimp $COL_RESET" + echo " " + echo -e "Grabbing yiimp fron Github, building files and setting file structure." + echo " " sleep 3 @@ -367,36 +370,39 @@ ' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 sudo chmod +x /var/stratum/config/run.sh + echo -e "$GREEN Done...$COL_RESET" + # Update Timezone - output " " - output "Update default timezone." - output " " + echo + echo -e "$CYAN Update default timezone. $COL_RESET" + echo # Check if link file sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime # Update time zone sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime - sudo aptitude -y install ntpdate + apt_install -y install ntpdate # Write time to clock. sudo hwclock -w + echo -e "$GREEN Done...$COL_RESET" # Making Web Server Magic Happen - output " " - output "Making Web Server Magic Happen!" - output " " + echo + echo "$CYAN Making Web Server Magic Happen! $COL_RESET" + echo # Adding user to group, creating dir structure, setting permissions sudo mkdir -p /var/www/$server_name/html # Creating webserver initial config file - output " " - output "Creating webserver initial config file" - output " " + echo + echo -e "$CYAN Creating webserver initial config file $COL_RESET" + echo if [[ ("$sub_domain" == "y" || "$sub_domain" == "Y") ]]; then echo 'include /etc/nginx/blockuseragents.rules; @@ -479,17 +485,19 @@ sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - sudo systemctl reload php7.3-fpm.service - sudo systemctl restart nginx.service + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + # Install SSL (with SubDomain) - output " " - output "Install LetsEncrypt and setting SSL (with SubDomain)" - output " " + echo + echo -e "$CYAN Install LetsEncrypt and setting SSL (with SubDomain) $COL_RESET" + echo - sudo aptitude -y install letsencrypt + apt_install letsencrypt sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 @@ -601,8 +609,9 @@ ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - sudo systemctl reload php7.3-fpm.service - sudo systemctl restart nginx.service + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" else echo 'include /etc/nginx/blockuseragents.rules; @@ -685,18 +694,19 @@ sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - sudo systemctl reload php7.3-fpm.service - sudo systemctl restart nginx.service + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then # Install SSL (without SubDomain) - output " " - output "Install LetsEncrypt and setting SSL (without SubDomain)" - output " " + echo + echo -e "$CYAN Install LetsEncrypt and setting SSL (without SubDomain) $COL_RESET" + echo sleep 3 - sudo aptitude -y install letsencrypt + apt_install letsencrypt sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 @@ -808,15 +818,15 @@ ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - sudo systemctl reload php7.3-fpm.service - sudo systemctl restart nginx.service + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service fi - + echo -e "$GREEN Done...$COL_RESET" # Config Database - output " " - output "Now for the database fun!" - output " " + echo + echo -e "$CYAN Now for the database fun! $COL_RESET" + echo sleep 3 # Create database @@ -876,14 +886,16 @@ define('"'"'EXCH_POLONIEX_SECRET'"'"', '"'"''"'"'); define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); ' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 - + + echo -e "$GREEN Done...$COL_RESET" + # Peforming the SQL import - output " " - output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" - output " " - output "Peforming the SQL import" - output " " + echo + echo -e "$CYAN Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you $COL_RESET" + echo + echo -e "Performing the SQL import" + echo sleep 3 cd ~ @@ -912,11 +924,13 @@ sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql + echo -e "$GREEN Done...$COL_RESET" + # Generating a basic Yiimp serverconfig.php - output " " - output "Generating a basic Yiimp serverconfig.php" - output " " + echo + echo "$GREEN Generating a basic Yiimp serverconfig.php $COL_RESET" + echo sleep 3 # Make config file @@ -996,11 +1010,13 @@ ); ' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 + echo -e "$GREEN Done...$COL_RESET" + # Updating stratum config files with database connection info - output " " - output "Updating stratum config files with database connection info." - output " " + echo + echo -e "$CYAN Updating stratum config files with database connection info. $COL_RESET" + echo sleep 3 cd /var/stratum/config @@ -1011,12 +1027,13 @@ sudo sed -i 's/username = root/username = stratum/g' *.conf sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf cd ~ + echo -e "$GREEN Done...$COL_RESET" # Final Directory permissions - output " " - output "Final Directory permissions" - output " " + echo + echo -e "$CYAN Final Directory permissions $COL_RESET" + echo sleep 3 whoami=`whoami` @@ -1043,16 +1060,16 @@ - output " " - output " " - output " " - output " " - output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." - output " " - output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." - output " " - output "Please make sure to add your public and private keys." - output " " - output "TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig" - output " " - output " " + echo " " + echo " " + echo " " + echo " " + echo -e "$GREEN Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins. $COL_RESET" + echo " " + echo -e "$GREEN Please make sure to change your wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" + echo " " + echo -e "$GREEN Please make sure to add your public and private keys. $COL_RESET" + echo " " + echo -e "$GREEN TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig $COL_RESET" + echo " " + echo " " From a1e357a586b6a548ccf357a98c7e818449a8fec4 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 16:20:25 +0200 Subject: [PATCH 227/360] fix typo --- test/conf/getip.sh | 2 ++ test/conf/prerequisite.sh | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/test/conf/getip.sh b/test/conf/getip.sh index 03b50011..519de3be 100644 --- a/test/conf/getip.sh +++ b/test/conf/getip.sh @@ -99,3 +99,5 @@ if [ "$PUBLIC_IPV6" = "auto" ]; then # Use a public API to get our public IPv6 address, or fall back to local network configuration. PUBLIC_IPV6=$(get_publicip_from_web_service 6 || get_default_privateip 6) fi + +echo -e "$GREEN Done...$COL_RESET" \ No newline at end of file diff --git a/test/conf/prerequisite.sh b/test/conf/prerequisite.sh index 8707062c..707fccba 100644 --- a/test/conf/prerequisite.sh +++ b/test/conf/prerequisite.sh @@ -5,6 +5,10 @@ # Modified by Xavatar ##################################################### +echo +echo -e "$CYAN Check prerequisite... $COL_RESET" +echo + if [ "`lsb_release -d | sed 's/.*:\s*//' | sed 's/18\.04\.[0-9]/18.04/' `" == "Ubuntu 18.04 LTS" ]; then DISTRO=18 sudo chmod g-w /etc /etc/default /usr @@ -71,3 +75,5 @@ if [ "$ARCHITECTURE" != "x86_64" ]; then exit fi fi + +echo -e "$GREEN Done...$COL_RESET" \ No newline at end of file From 95bb9b6301f43d7f76ed423b1cd7df93cff91c67 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 16:23:46 +0200 Subject: [PATCH 228/360] remove aptitude --- test/install-test.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 50b8b59f..0b2ef31a 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -83,12 +83,12 @@ # Switch Aptitude - echo - echo -e "$CYAN Switching to Aptitude $COL_RESET" - echo - sleep 3 - apt_install aptitude - echo -e "$GREEN Done...$COL_RESET $COL_RESET" + #echo + #echo -e "$CYAN Switching to Aptitude $COL_RESET" + #echo + #sleep 3 + #apt_install aptitude + #echo -e "$GREEN Done...$COL_RESET $COL_RESET" # Installing Nginx From 7ced4700ac9cdface816b507bae28ebdc5b9067f Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 16:24:28 +0200 Subject: [PATCH 229/360] fix typo --- test/conf/prerequisite.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/conf/prerequisite.sh b/test/conf/prerequisite.sh index 707fccba..14c73a0f 100644 --- a/test/conf/prerequisite.sh +++ b/test/conf/prerequisite.sh @@ -76,4 +76,5 @@ if [ "$ARCHITECTURE" != "x86_64" ]; then fi fi +echo echo -e "$GREEN Done...$COL_RESET" \ No newline at end of file From 2b3a0a57a3ed8690d6f85fa2f5e15fbc3acb2ea8 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 16:28:58 +0200 Subject: [PATCH 230/360] remove apt-get --- test/install-test.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 0b2ef31a..ee3a5451 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -142,7 +142,7 @@ if [ ! -f /etc/apt/sources.list.d/ondrej-php-bionic.list ]; then hide_output sudo add-apt-repository -y ppa:ondrej/php fi - hide_output sudo apt-get -y update + hide_output sudo apt -y update apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell \ php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring @@ -165,7 +165,14 @@ librtmp-dev sendmail mutt screen git apt_install pwgen -y echo -e "$GREEN Done...$COL_RESET" - + sleep 3 + + + clear + echo + echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" + echo + # Installing Package to compile crypto currency echo @@ -179,7 +186,7 @@ apt_install libcanberra-gtk-module libqrencode-dev libzmq3-dev apt_install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler hide_output sudo add-apt-repository -y ppa:bitcoin/bitcoin - hide_output sudo apt-get -y update + hide_output sudo apt -y update apt_install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ echo -e "$GREEN Done...$COL_RESET" From e007acb4894bff1d1c64960aae4605c5deba1f0b Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 16:41:04 +0200 Subject: [PATCH 231/360] chg typo --- test/install-test.sh | 57 ++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index ee3a5451..274e9b87 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -168,12 +168,6 @@ sleep 3 - clear - echo - echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" - echo - - # Installing Package to compile crypto currency echo echo -e "$CYAN Installing Package to compile crypto currency $COL_RESET" @@ -328,22 +322,22 @@ # Compil Blocknotify cd ~ - git clone $githubrepo + hide_output git clone $githubrepo cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp - sudo make + hide_output sudo make # Compil iniparser cd $HOME/yiimp/stratum/iniparser - sudo make + hide_output sudo make # Compil Stratum cd $HOME/yiimp/stratum if [[ ("$BTC" == "y" || "$BTC" == "Y") ]]; then sudo sed -i 's/CFLAGS += -DNO_EXCHANGE/#CFLAGS += -DNO_EXCHANGE/' $HOME/yiimp/stratum/Makefile - sudo make + hide_output sudo make fi - sudo make + hide_output sudo make # Copy Files (Blocknotify,iniparser,Stratum) cd $HOME/yiimp @@ -377,7 +371,7 @@ ' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 sudo chmod +x /var/stratum/config/run.sh - echo -e "$GREEN Done...$COL_RESET" + echo -e "$GREEN Done...$COL_RESET" # Update Timezone @@ -399,7 +393,7 @@ # Making Web Server Magic Happen echo - echo "$CYAN Making Web Server Magic Happen! $COL_RESET" + echo -e "$CYAN Making Web Server Magic Happen! $COL_RESET" echo # Adding user to group, creating dir structure, setting permissions @@ -929,14 +923,14 @@ sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql - sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql + #sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql echo -e "$GREEN Done...$COL_RESET" # Generating a basic Yiimp serverconfig.php echo - echo "$GREEN Generating a basic Yiimp serverconfig.php $COL_RESET" + echo -e "$GREEN Generating a basic Yiimp serverconfig.php $COL_RESET" echo sleep 3 @@ -1064,19 +1058,24 @@ sudo systemctl restart mysql sudo systemctl restart nginx.service sudo systemctl restart php7.3-fpm.service + echo -e "$GREEN Done...$COL_RESET" + sleep 3 - - echo " " - echo " " - echo " " - echo " " - echo -e "$GREEN Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins. $COL_RESET" - echo " " - echo -e "$GREEN Please make sure to change your wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" - echo " " - echo -e "$GREEN Please make sure to add your public and private keys. $COL_RESET" - echo " " - echo -e "$GREEN TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig $COL_RESET" - echo " " - echo " " + clear + echo + echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" + echo + echo + echo + echo + echo + echo -e "$CYAN Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins. $COL_RESET" + echo + echo -e "$CYAN Please make sure to change your wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" + echo + echo -e "$CYAN Please make sure to add your public and private keys. $COL_RESET" + echo + echo -e "$CYAN TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig $COL_RESET" + echo + echo From 99c17b66b4839629cefe51796f7b739532ac3a6d Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 17:56:01 +0200 Subject: [PATCH 232/360] update question --- test/install-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 274e9b87..92be7eaf 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -71,7 +71,7 @@ echo -e "$RED Make sure you double check before hitting enter! Only one shot at these! $COL_RESET" echo read -e -p "Enter time zone (e.g. America/New_York) : " TIME - read -e -p "Server name (no http:// or www. just : example.com or pool.example.com) : " server_name + read -e -p "Domain Name (no http:// or www. just : example.com or pool.example.com or 185.22.24.26) : " server_name read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC @@ -384,7 +384,7 @@ # Update time zone sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime - apt_install -y install ntpdate + apt_install ntpdate # Write time to clock. sudo hwclock -w From e83619f1c2ccedd5ec37248f94a678d071200962 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 18:14:37 +0200 Subject: [PATCH 233/360] fix double make stratum --- test/install-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/install-test.sh b/test/install-test.sh index 92be7eaf..420e7920 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -335,7 +335,6 @@ cd $HOME/yiimp/stratum if [[ ("$BTC" == "y" || "$BTC" == "Y") ]]; then sudo sed -i 's/CFLAGS += -DNO_EXCHANGE/#CFLAGS += -DNO_EXCHANGE/' $HOME/yiimp/stratum/Makefile - hide_output sudo make fi hide_output sudo make @@ -865,6 +864,7 @@ ' | sudo -E tee ~/.my.cnf >/dev/null 2>&1 sudo chmod 0600 ~/.my.cnf + # Create keys file echo ' Date: Wed, 8 Apr 2020 18:48:40 +0200 Subject: [PATCH 234/360] update date --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index edff6eba..be1c619f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yiimp_install_scrypt (update October, 2018) +# Yiimp_install_scrypt (update Avril, 2020) Site : https://www.xavatar.com From 0ce269a9c4edc9f2737460eac19222d2071a8782 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 18:49:29 +0200 Subject: [PATCH 235/360] Update install-test.sh --- test/install-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/install-test.sh b/test/install-test.sh index 420e7920..8e04d4ce 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -3,7 +3,7 @@ # Original Author: crombiecrunch # Fork Author: manfromafar # Current Author: Xavatar (https://github.com/xavatar/yiimp_install_scrypt) -# Web: +# Web: https://www.xavatar.com # # Program: # Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.3 From 8df3b05dbabeedfd40723b9fe24b1d522c81e5d2 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 20:22:22 +0200 Subject: [PATCH 236/360] add version yiimp --- test/install-test.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 420e7920..ff502fd8 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -13,8 +13,8 @@ ### Variable ### #githubrepo=https://github.com/Kudaraidee/yiimp.git - githubrepo=https://github.com/tpruvot/yiimp.git - + githubrepotpruvot=https://github.com/tpruvot/yiimp.git + githubrepoKudaraidee=https://github.com/Kudaraidee/yiimp.git output() { @@ -316,13 +316,23 @@ echo " " sleep 3 - + echo " " + echo -e "Choose your Yiimp Version : " + echo -e "1 : xiaolin1579 (last update: April 2020)" + echo -e "2 : tpruvot (last update: Sept 2019)" + read -e -p "Enter desired version (1 or 2) : " yimmpver + + # Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` # Compil Blocknotify cd ~ - hide_output git clone $githubrepo + if [$yimmpver == "2"];then + hide_output git clone $githubrepotpruvot + fi + else + hide_output git clone $githubrepoKudaraidee cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp hide_output sudo make From ce09d2e402ebc4b9f2fcfe6097acdb397d2924a3 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 20:23:38 +0200 Subject: [PATCH 237/360] fix typo --- test/install-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index af09e12e..249ce0fa 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -320,7 +320,7 @@ echo -e "Choose your Yiimp Version : " echo -e "1 : xiaolin1579 (last update: April 2020)" echo -e "2 : tpruvot (last update: Sept 2019)" - read -e -p "Enter desired version (1 or 2) : " yimmpver + read -e -p "Enter desired version : 1 or 2 [1 by default] : " yiimpver # Generating Random Password for stratum @@ -328,7 +328,7 @@ # Compil Blocknotify cd ~ - if [$yimmpver == "2"];then + if [$yiimpver == "2"];then hide_output git clone $githubrepotpruvot fi else From 3ef8a1c7831f817a08009322d9c94c3d462e2af0 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 20:30:05 +0200 Subject: [PATCH 238/360] fix yiimp version --- test/install-test.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 249ce0fa..b8a92bf9 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -330,9 +330,9 @@ cd ~ if [$yiimpver == "2"];then hide_output git clone $githubrepotpruvot - fi else hide_output git clone $githubrepoKudaraidee + fi cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp hide_output sudo make @@ -933,10 +933,13 @@ sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql - #sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql - + if [$yiimpver == "2"];then echo -e "$GREEN Done...$COL_RESET" - + else + sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql + echo -e "$GREEN Done...$COL_RESET" + fi + # Generating a basic Yiimp serverconfig.php echo From 525cd18f38addc6dd2af594461458810b255bb21 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 20:36:26 +0200 Subject: [PATCH 239/360] add version --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index 2d9196a9..17faa974 100644 --- a/install.sh +++ b/install.sh @@ -23,6 +23,12 @@ displayErr() { exit 1; } + output " " + output "Yiimp Install Script v0.1" + output " " + sleep 3 + + output " " output " " output "Make sure you double check before hitting enter! Only one shot at these!" output " " From d93db0a343656bb631ea59223867d803238f25db Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 20:37:43 +0200 Subject: [PATCH 240/360] add info --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 17faa974..5079d536 100644 --- a/install.sh +++ b/install.sh @@ -6,7 +6,7 @@ # Web: # # Program: -# Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.0.x +# Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.0 # # ################################################################################ @@ -25,6 +25,7 @@ displayErr() { output " " output "Yiimp Install Script v0.1" + output "Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.0" output " " sleep 3 From a68c86ea324c0d89cafd324bd4f77f9219747c48 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 20:38:59 +0200 Subject: [PATCH 241/360] add clear --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 5079d536..03c839be 100644 --- a/install.sh +++ b/install.sh @@ -22,7 +22,7 @@ displayErr() { echo exit 1; } - + clear output " " output "Yiimp Install Script v0.1" output "Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.0" From df7f0c2a644a3556ae80ee2e6f322bb62fc8e127 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 20:40:21 +0200 Subject: [PATCH 242/360] add inform --- test/install-test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/install-test.sh b/test/install-test.sh index b8a92bf9..aba8d81f 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -39,6 +39,7 @@ clear echo echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" + echo -e "$GREEN Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.3" echo sleep 3 From 5a6667d59700d02d30462560cf0d19879cae5194 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 20:57:14 +0200 Subject: [PATCH 243/360] fix yiimpver --- test/install-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index aba8d81f..167eadf1 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -329,7 +329,7 @@ # Compil Blocknotify cd ~ - if [$yiimpver == "2"];then + if [ $yiimpver == "2"];then hide_output git clone $githubrepotpruvot else hide_output git clone $githubrepoKudaraidee @@ -934,7 +934,7 @@ sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql - if [$yiimpver == "2"];then + if [ $yiimpver == "2"];then echo -e "$GREEN Done...$COL_RESET" else sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql From 02e77c2a1ce0fb46e0360af96d3d5de4f9e9252d Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 21:00:36 +0200 Subject: [PATCH 244/360] fix done creating server --- test/install-test.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 167eadf1..1d4c5047 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -498,14 +498,13 @@ sudo ln -s /var/web /var/www/$server_name/html hide_output sudo systemctl reload php7.3-fpm.service hide_output sudo systemctl restart nginx.service - echo -e "$GREEN Done...$COL_RESET" - + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then # Install SSL (with SubDomain) echo - echo -e "$CYAN Install LetsEncrypt and setting SSL (with SubDomain) $COL_RESET" + echo -e "Install LetsEncrypt and setting SSL (with SubDomain)" echo apt_install letsencrypt @@ -622,7 +621,7 @@ hide_output sudo systemctl reload php7.3-fpm.service hide_output sudo systemctl restart nginx.service - echo -e "$GREEN Done...$COL_RESET" + else echo 'include /etc/nginx/blockuseragents.rules; @@ -707,13 +706,13 @@ sudo ln -s /var/web /var/www/$server_name/html hide_output sudo systemctl reload php7.3-fpm.service hide_output sudo systemctl restart nginx.service - echo -e "$GREEN Done...$COL_RESET" + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then # Install SSL (without SubDomain) echo - echo -e "$CYAN Install LetsEncrypt and setting SSL (without SubDomain) $COL_RESET" + echo -e "Install LetsEncrypt and setting SSL (without SubDomain)" echo sleep 3 From d6573e2c19b1644f8b61239a9b7d44c77f2f5644 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 21:21:05 +0200 Subject: [PATCH 245/360] fix yiimp ver --- test/install-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 1d4c5047..9e9fc31d 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -329,7 +329,7 @@ # Compil Blocknotify cd ~ - if [ $yiimpver == "2"];then + if [[ ($yiimpver == "2") ]];then hide_output git clone $githubrepotpruvot else hide_output git clone $githubrepoKudaraidee @@ -933,7 +933,7 @@ sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql - if [ $yiimpver == "2"];then + if [[ ($yiimpver == "2") ]];then echo -e "$GREEN Done...$COL_RESET" else sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql From 1916cfa0c595604fe43f7682f2436deed61a16df Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 22:43:11 +0200 Subject: [PATCH 246/360] fix typo + add end information --- test/install-test.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 9e9fc31d..0c040775 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -319,8 +319,8 @@ echo " " echo -e "Choose your Yiimp Version : " - echo -e "1 : xiaolin1579 (last update: April 2020)" - echo -e "2 : tpruvot (last update: Sept 2019)" + echo -e "1 : xiaolin1579 (last update : April 2020)" + echo -e "2 : tpruvot (Official YiimP, last update : Sept 2019)" read -e -p "Enter desired version : 1 or 2 [1 by default] : " yiimpver @@ -498,6 +498,7 @@ sudo ln -s /var/web /var/www/$server_name/html hide_output sudo systemctl reload php7.3-fpm.service hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then @@ -621,6 +622,7 @@ hide_output sudo systemctl reload php7.3-fpm.service hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" else @@ -706,6 +708,7 @@ sudo ln -s /var/web /var/www/$server_name/html hide_output sudo systemctl reload php7.3-fpm.service hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then @@ -826,12 +829,14 @@ } ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 - + + echo -e "$GREEN Done...$COL_RESET" + fi hide_output sudo systemctl reload php7.3-fpm.service hide_output sudo systemctl restart nginx.service fi - echo -e "$GREEN Done...$COL_RESET" + # Config Database echo @@ -943,7 +948,7 @@ # Generating a basic Yiimp serverconfig.php echo - echo -e "$GREEN Generating a basic Yiimp serverconfig.php $COL_RESET" + echo -e "$CYAN Generating a basic Yiimp serverconfig.php $COL_RESET" echo sleep 3 @@ -1083,12 +1088,16 @@ echo echo echo - echo -e "$CYAN Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins. $COL_RESET" + echo -e "$CYAN Whew that was fun, just some reminders. $COL_RESET" + echo -e "$RED Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins. $COL_RESET" echo + echo -e "$RED Yiimp at : http://"$server_name "(https if you select SSL)" + echo -e "$RED Yiimp Panel Admin at : http://"$server_name"/site/"$admin_panel "(https if you select SSL)" + echo -e echo -e "$CYAN Please make sure to change your wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" - echo echo -e "$CYAN Please make sure to add your public and private keys. $COL_RESET" echo echo -e "$CYAN TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig $COL_RESET" + echo -e "$CYAN Xavatar WebSite : https://www.xavatar.com $COL_RESET" echo echo From 3ec41c11be646e6302631f9ae4cabea904baa916 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 8 Apr 2020 22:43:58 +0200 Subject: [PATCH 247/360] fix typo --- test/install-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 0c040775..d3ebd7bb 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -1091,8 +1091,8 @@ echo -e "$CYAN Whew that was fun, just some reminders. $COL_RESET" echo -e "$RED Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins. $COL_RESET" echo - echo -e "$RED Yiimp at : http://"$server_name "(https if you select SSL)" - echo -e "$RED Yiimp Panel Admin at : http://"$server_name"/site/"$admin_panel "(https if you select SSL)" + echo -e "$RED Yiimp at : http://"$server_name "(https... if you select SSL)" + echo -e "$RED Yiimp Panel Admin at : http://"$server_name"/site/"$admin_panel "(https... if you select SSL)" echo -e echo -e "$CYAN Please make sure to change your wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" echo -e "$CYAN Please make sure to add your public and private keys. $COL_RESET" From 29362fe01d0268dc3e53e95901543cb106daa599 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 01:07:32 +0200 Subject: [PATCH 248/360] remove select gityiimp + remove choice admin panel --- test/conf/prerequisite.sh | 84 +++++++++++++++++++-------------------- test/install-test.sh | 45 +++++++++++---------- 2 files changed, 66 insertions(+), 63 deletions(-) diff --git a/test/conf/prerequisite.sh b/test/conf/prerequisite.sh index 14c73a0f..07953607 100644 --- a/test/conf/prerequisite.sh +++ b/test/conf/prerequisite.sh @@ -16,56 +16,56 @@ else [ "`lsb_release -d | sed 's/.*:\s*//' | sed 's/16\.04\.[0-9]/16.04/' `" != DISTRO=16 fi -TOTAL_PHYSICAL_MEM=$(head -n 1 /proc/meminfo | awk '{print $2}') -if [ $TOTAL_PHYSICAL_MEM -lt 1436000 ]; then - if [ ! -d /vagrant ]; then - TOTAL_PHYSICAL_MEM=$(expr \( \( $TOTAL_PHYSICAL_MEM \* 1024 \) / 1000 \) / 1000) - echo "Your Mining Pool Server needs more memory (RAM) to function properly." - echo "Please provision a machine with at least 1536 GB, 6 GB recommended." - echo "This machine has $TOTAL_PHYSICAL_MEM MB memory." - exit - fi -fi +#TOTAL_PHYSICAL_MEM=$(head -n 1 /proc/meminfo | awk '{print $2}') +#if [ $TOTAL_PHYSICAL_MEM -lt 1436000 ]; then +# if [ ! -d /vagrant ]; then +# TOTAL_PHYSICAL_MEM=$(expr \( \( $TOTAL_PHYSICAL_MEM \* 1024 \) / 1000 \) / 1000) +# echo "Your Mining Pool Server needs more memory (RAM) to function properly." +# echo "Please provision a machine with at least 1536 GB, 6 GB recommended." +# echo "This machine has $TOTAL_PHYSICAL_MEM MB memory." +# exit +# fi +#fi -if [ $TOTAL_PHYSICAL_MEM -lt 1436000 ]; then - echo "WARNING: Your Mining Pool Server has less than 1.5 GB of memory." - echo " It might run unreliably when under heavy load." -fi +#if [ $TOTAL_PHYSICAL_MEM -lt 1436000 ]; then +# echo "WARNING: Your Mining Pool Server has less than 1.5 GB of memory." +# echo " It might run unreliably when under heavy load." +#fi # Check swap -echo Checking if swap space is needed and if so creating... +#echo Checking if swap space is needed and if so creating... -SWAP_MOUNTED=$(cat /proc/swaps | tail -n+2) -SWAP_IN_FSTAB=$(grep "swap" /etc/fstab) -ROOT_IS_BTRFS=$(grep "\/ .*btrfs" /proc/mounts) -TOTAL_PHYSICAL_MEM=$(head -n 1 /proc/meminfo | awk '{print $2}') -AVAILABLE_DISK_SPACE=$(df / --output=avail | tail -n 1) -if - [ -z "$SWAP_MOUNTED" ] && - [ -z "$SWAP_IN_FSTAB" ] && - [ ! -e /swapfile ] && - [ -z "$ROOT_IS_BTRFS" ] && - [ $TOTAL_PHYSICAL_MEM -lt 1536000 ] && - [ $AVAILABLE_DISK_SPACE -gt 5242880 ] -then - echo "Adding a swap file to the system..." +#SWAP_MOUNTED=$(cat /proc/swaps | tail -n+2) +#SWAP_IN_FSTAB=$(grep "swap" /etc/fstab) +#ROOT_IS_BTRFS=$(grep "\/ .*btrfs" /proc/mounts) +#TOTAL_PHYSICAL_MEM=$(head -n 1 /proc/meminfo | awk '{print $2}') +#AVAILABLE_DISK_SPACE=$(df / --output=avail | tail -n 1) +#if +# [ -z "$SWAP_MOUNTED" ] && +# [ -z "$SWAP_IN_FSTAB" ] && +# [ ! -e /swapfile ] && +# [ -z "$ROOT_IS_BTRFS" ] && +# [ $TOTAL_PHYSICAL_MEM -lt 1536000 ] && +# [ $AVAILABLE_DISK_SPACE -gt 5242880 ] +#then +# echo "Adding a swap file to the system..." # Allocate and activate the swap file. Allocate in 1KB chuncks # doing it in one go, could fail on low memory systems - sudo fallocate -l 3G /swapfile - if [ -e /swapfile ]; then - sudo chmod 600 /swapfile - hide_output sudo mkswap /swapfile - sudo swapon /swapfile - echo "vm.swappiness=10" >> sudo /etc/sysctl.conf - fi +# sudo fallocate -l 3G /swapfile +# if [ -e /swapfile ]; then +# sudo chmod 600 /swapfile +# hide_output sudo mkswap /swapfile +# sudo swapon /swapfile +# echo "vm.swappiness=10" >> sudo /etc/sysctl.conf +# fi # Check if swap is mounted then activate on boot - if swapon -s | grep -q "\/swapfile"; then - echo "/swapfile none swap sw 0 0" >> sudo /etc/fstab - else - echo "ERROR: Swap allocation failed" - fi -fi +# if swapon -s | grep -q "\/swapfile"; then +# echo "/swapfile none swap sw 0 0" >> sudo /etc/fstab +# else +# echo "ERROR: Swap allocation failed" +# fi +#fi ARCHITECTURE=$(uname -m) if [ "$ARCHITECTURE" != "x86_64" ]; then diff --git a/test/install-test.sh b/test/install-test.sh index d3ebd7bb..c16f8b93 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -76,7 +76,7 @@ read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC - read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel + #read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel read -e -p "Enter the Public IP of the system you will use to access the admin panel (http://www.whatsmyip.org/) : " Public read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban read -e -p "Install UFW and configure ports? [Y/n] : " UFW @@ -317,11 +317,11 @@ echo " " sleep 3 - echo " " - echo -e "Choose your Yiimp Version : " - echo -e "1 : xiaolin1579 (last update : April 2020)" - echo -e "2 : tpruvot (Official YiimP, last update : Sept 2019)" - read -e -p "Enter desired version : 1 or 2 [1 by default] : " yiimpver + #echo " " + #echo -e "Choose your Yiimp Version : " + #echo -e "1 : xiaolin1579 (last update : April 2020)" + #echo -e "2 : tpruvot (Official YiimP, last update : Sept 2019)" + #read -e -p "Enter desired version : 1 or 2 [1 by default] : " yiimpver # Generating Random Password for stratum @@ -329,11 +329,11 @@ # Compil Blocknotify cd ~ - if [[ ($yiimpver == "2") ]];then + #if [[ ($yiimpver == "2") ]];then hide_output git clone $githubrepotpruvot - else - hide_output git clone $githubrepoKudaraidee - fi + #else + #hide_output git clone $githubrepoKudaraidee + #fi cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp hide_output sudo make @@ -351,7 +351,7 @@ # Copy Files (Blocknotify,iniparser,Stratum) cd $HOME/yiimp - sudo sed -i 's/AdminRights/'$admin_panel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php + sudo sed -i 's/AdminRights/'AdminPanel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php sudo cp -r $HOME/yiimp/web /var/ sudo mkdir -p /var/stratum cd $HOME/yiimp/stratum @@ -402,12 +402,12 @@ # Making Web Server Magic Happen - echo - echo -e "$CYAN Making Web Server Magic Happen! $COL_RESET" - echo + #echo + #echo -e "$CYAN Making Web Server Magic Happen! $COL_RESET" + #echo # Adding user to group, creating dir structure, setting permissions - sudo mkdir -p /var/www/$server_name/html + #sudo mkdir -p /var/www/$server_name/html # Creating webserver initial config file @@ -415,6 +415,9 @@ echo -e "$CYAN Creating webserver initial config file $COL_RESET" echo + # Adding user to group, creating dir structure, setting permissions + sudo mkdir -p /var/www/$server_name/html + if [[ ("$sub_domain" == "y" || "$sub_domain" == "Y") ]]; then echo 'include /etc/nginx/blockuseragents.rules; server { @@ -938,11 +941,11 @@ sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql - if [[ ($yiimpver == "2") ]];then - echo -e "$GREEN Done...$COL_RESET" - else - sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql + #if [[ ($yiimpver == "2") ]];then echo -e "$GREEN Done...$COL_RESET" + #else + #sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql + #echo -e "$GREEN Done...$COL_RESET" fi @@ -1083,7 +1086,7 @@ clear echo echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" - echo + echo -e "$GREEN Finish !!!" echo echo echo @@ -1092,7 +1095,7 @@ echo -e "$RED Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins. $COL_RESET" echo echo -e "$RED Yiimp at : http://"$server_name "(https... if you select SSL)" - echo -e "$RED Yiimp Panel Admin at : http://"$server_name"/site/"$admin_panel "(https... if you select SSL)" + echo -e "$RED Yiimp Panel Admin at : http://"$server_name"/site/"AdminPanel "(https... if you select SSL)" echo -e echo -e "$CYAN Please make sure to change your wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" echo -e "$CYAN Please make sure to add your public and private keys. $COL_RESET" From 9db9b72577ce753e1a5765301a5230eaa005ad85 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 01:11:06 +0200 Subject: [PATCH 249/360] fix typo prerequisite --- test/conf/prerequisite.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/conf/prerequisite.sh b/test/conf/prerequisite.sh index 07953607..d32b9041 100644 --- a/test/conf/prerequisite.sh +++ b/test/conf/prerequisite.sh @@ -70,8 +70,8 @@ fi ARCHITECTURE=$(uname -m) if [ "$ARCHITECTURE" != "x86_64" ]; then if [ -z "$ARM" ]; then - echo "YiimP Install Script Setup Installer only supports x86_64 and will not work on any other architecture, like ARM or 32 bit OS." - echo "Your architecture is $ARCHITECTURE" + echo -e "$REDYiimP Install Script only supports x86_64 and will not work on any other architecture, like ARM or 32 bit OS. $COL_RESET" + echo -e "$REDYour architecture is $ARCHITECTURE $COL_RESET" exit fi fi From 51237ecb1ab23c8b413643796c9d24617554bdd2 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 01:15:13 +0200 Subject: [PATCH 250/360] remove time zone --- test/install-test.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index c16f8b93..fb12cb77 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -71,7 +71,7 @@ echo echo -e "$RED Make sure you double check before hitting enter! Only one shot at these! $COL_RESET" echo - read -e -p "Enter time zone (e.g. America/New_York) : " TIME + #read -e -p "Enter time zone (e.g. America/New_York) : " TIME read -e -p "Domain Name (no http:// or www. just : example.com or pool.example.com or 185.22.24.26) : " server_name read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL @@ -390,14 +390,21 @@ echo # Check if link file - sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime - + #sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime # Update time zone - sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime - apt_install ntpdate - + #sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime + #apt_install ntpdate # Write time to clock. - sudo hwclock -w + #sudo hwclock -w + #echo -e "$GREEN Done...$COL_RESET" + + echo -e " Setting TimeZone to UTC...$COL_RESET" + if [ ! -f /etc/timezone ]; then + echo "Setting timezone to UTC." + echo "Etc/UTC" > sudo /etc/timezone + restart_service rsyslog + fi + echo -e "$GREEN Done...$COL_RESET" From d4f50b307e4799594979e60c8506122d7db82940 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 01:17:54 +0200 Subject: [PATCH 251/360] prevent apache remove --- test/install-test.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/install-test.sh b/test/install-test.sh index fb12cb77..c2bff779 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -98,6 +98,12 @@ echo sleep 3 + if [ -f /usr/sbin/apache2 ]; then + echo -e "Removing apache..." + hide_output apt-get -y purge apache2 apache2-* + hide_output apt-get -y --purge autoremove + fi + apt_install nginx hide_output sudo rm /etc/nginx/sites-enabled/default hide_output sudo systemctl start nginx.service From 625fc0511d78d646026ba8cd0843e664968cac42 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 02:03:03 +0200 Subject: [PATCH 252/360] fix typo + add echo to find error sed --- test/install-test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/install-test.sh b/test/install-test.sh index c2bff779..d761a1c4 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -341,7 +341,9 @@ #hide_output git clone $githubrepoKudaraidee #fi cd $HOME/yiimp/blocknotify + echo -e "blocknotify" sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp + echo -e "blocknotify" hide_output sudo make # Compil iniparser @@ -357,7 +359,9 @@ # Copy Files (Blocknotify,iniparser,Stratum) cd $HOME/yiimp + echo -e "SiteController" sudo sed -i 's/AdminRights/'AdminPanel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php + echo -e "SiteController" sudo cp -r $HOME/yiimp/web /var/ sudo mkdir -p /var/stratum cd $HOME/yiimp/stratum @@ -959,7 +963,7 @@ #else #sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql #echo -e "$GREEN Done...$COL_RESET" - fi + #fi # Generating a basic Yiimp serverconfig.php From 5250a5c2918ebf9901a10e1ea87ae48d4af444d4 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 02:22:01 +0200 Subject: [PATCH 253/360] add sudo sed for fix yiimp rootdir --- test/install-test.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index d761a1c4..dd317405 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -341,9 +341,7 @@ #hide_output git clone $githubrepoKudaraidee #fi cd $HOME/yiimp/blocknotify - echo -e "blocknotify" sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp - echo -e "blocknotify" hide_output sudo make # Compil iniparser @@ -359,9 +357,7 @@ # Copy Files (Blocknotify,iniparser,Stratum) cd $HOME/yiimp - echo -e "SiteController" sudo sed -i 's/AdminRights/'AdminPanel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php - echo -e "SiteController" sudo cp -r $HOME/yiimp/web /var/ sudo mkdir -p /var/stratum cd $HOME/yiimp/stratum @@ -375,7 +371,7 @@ sudo mkdir -p /etc/yiimp sudo mkdir -p /$HOME/backup/ #fixing yiimp - sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp + sudo sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp #fixing run.sh sudo rm -r /var/stratum/config/run.sh echo ' @@ -412,7 +408,7 @@ if [ ! -f /etc/timezone ]; then echo "Setting timezone to UTC." echo "Etc/UTC" > sudo /etc/timezone - restart_service rsyslog + sudo systemctl restart rsyslog fi echo -e "$GREEN Done...$COL_RESET" From ed214f5d43507580ae512a6d34d24679a81620ea Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 02:51:26 +0200 Subject: [PATCH 254/360] add verif process --- test/install-test.sh | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index dd317405..14c52bb9 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -110,6 +110,8 @@ hide_output sudo systemctl enable nginx.service hide_output sudo systemctl start cron.service hide_output sudo systemctl enable cron.service + sudo systemctl status nginx | sed -n "1,3p" + echo echo -e "$GREEN Done...$COL_RESET" @@ -137,6 +139,8 @@ apt_install mariadb-server hide_output sudo systemctl start mysql hide_output sudo systemctl enable mysql + sudo systemctl status mysql | sed -n "1,3p" + echo echo -e "$GREEN Done...$COL_RESET" @@ -159,6 +163,8 @@ hide_output sudo sudo phpenmod mbstring sleep 5 hide_output sudo systemctl start php7.3-fpm + sudo systemctl status php7.3-fpm | sed -n "1,3p" + echo echo -e "$GREEN Done...$COL_RESET" @@ -230,7 +236,7 @@ if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then apt_install fail2ban - fi + fi if [[ ("$UFW" == "y" || "$UFW" == "Y" || "$UFW" == "") ]]; then @@ -296,13 +302,17 @@ hide_output sudo ufw allow 8533/tcp hide_output sudo ufw --force enable fi + + sudo systemctl status ufw | sed -n "1,3p" + sudo systemctl status fail2ban | sed -n "1,3p" + echo echo -e "$GREEN Done...$COL_RESET" # Installing PhpMyAdmin - echo " " + echo echo -e "$CYAN Installing phpmyadmin $COL_RESET" - echo " " + echo sleep 3 echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections @@ -316,11 +326,11 @@ # Installing Yiimp - echo " " + echo echo -e "$CYAN Installing Yiimp $COL_RESET" - echo " " + echo echo -e "Grabbing yiimp fron Github, building files and setting file structure." - echo " " + echo sleep 3 #echo " " @@ -410,7 +420,8 @@ echo "Etc/UTC" > sudo /etc/timezone sudo systemctl restart rsyslog fi - + sudo systemctl status rsyslog | sed -n "1,3p" + echo echo -e "$GREEN Done...$COL_RESET" @@ -1090,8 +1101,12 @@ sudo rm -rf /var/log/nginx/* sudo systemctl restart cron.service sudo systemctl restart mysql + sudo systemctl status mysql | sed -n "1,3p" sudo systemctl restart nginx.service + sudo systemctl status nginx | sed -n "1,3p" sudo systemctl restart php7.3-fpm.service + sudo systemctl status php7.3-fpm | sed -n "1,3p" + echo echo -e "$GREEN Done...$COL_RESET" sleep 3 From 83ab8520ad6e8f3bbba060a5df2666aaeaa17735 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 03:03:48 +0200 Subject: [PATCH 255/360] typo --- test/conf/getip.sh | 2 +- test/conf/prerequisite.sh | 3 +-- test/install-test.sh | 37 +++++++++++++++++++------------------ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/test/conf/getip.sh b/test/conf/getip.sh index 519de3be..58ca33a3 100644 --- a/test/conf/getip.sh +++ b/test/conf/getip.sh @@ -5,7 +5,7 @@ source /etc/functions.sh echo -echo -e "$CYAN Setting our global variables... $COL_RESET" +echo -e "$CYAN => Setting our global variables : $COL_RESET" echo # If the machine is behind a NAT, inside a VM, etc., it may not know diff --git a/test/conf/prerequisite.sh b/test/conf/prerequisite.sh index d32b9041..f193d816 100644 --- a/test/conf/prerequisite.sh +++ b/test/conf/prerequisite.sh @@ -6,7 +6,7 @@ ##################################################### echo -echo -e "$CYAN Check prerequisite... $COL_RESET" +echo -e "$CYAN => Check prerequisite : $COL_RESET" echo if [ "`lsb_release -d | sed 's/.*:\s*//' | sed 's/18\.04\.[0-9]/18.04/' `" == "Ubuntu 18.04 LTS" ]; then @@ -76,5 +76,4 @@ if [ "$ARCHITECTURE" != "x86_64" ]; then fi fi -echo echo -e "$GREEN Done...$COL_RESET" \ No newline at end of file diff --git a/test/install-test.sh b/test/install-test.sh index 14c52bb9..9b7d537a 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -46,7 +46,7 @@ # Update package and Upgrade Ubuntu echo - echo -e "$CYAN Updating system and installing required packages.$COL_RESET" + echo -e "$CYAN => Updating system and installing required packages :$COL_RESET" echo sleep 3 @@ -68,6 +68,7 @@ DISTRO='"${DISTRO}"' PRIVATE_IP='"${PRIVATE_IP}"'' | sudo -E tee conf/pool.conf >/dev/null 2>&1 + echo echo echo -e "$RED Make sure you double check before hitting enter! Only one shot at these! $COL_RESET" echo @@ -94,7 +95,8 @@ # Installing Nginx echo - echo -e "$CYAN Installing Nginx server. $COL_RESET" + echo + echo -e "$CYAN => Installing Nginx server : $COL_RESET" echo sleep 3 @@ -129,7 +131,7 @@ # Installing Mariadb echo - echo -e "$CYAN Installing Mariadb Server. $COL_RESET" + echo -e "$CYAN => Installing Mariadb Server : $COL_RESET" echo sleep 3 @@ -146,7 +148,7 @@ # Installing Installing php7.3 echo - echo -e "$CYAN Installing php7.3 $COL_RESET" + echo -e "$CYAN => Installing php7.3 : $COL_RESET" echo sleep 3 @@ -170,7 +172,7 @@ # Installing other needed files echo - echo -e "$CYAN Installing other needed files $COL_RESET" + echo -e "$CYAN => Installing other needed files : $COL_RESET" echo sleep 3 @@ -183,7 +185,7 @@ # Installing Package to compile crypto currency echo - echo -e "$CYAN Installing Package to compile crypto currency $COL_RESET" + echo -e "$CYAN => Installing Package to compile crypto currency $COL_RESET" echo sleep 3 @@ -206,7 +208,7 @@ # Test Email echo - echo -e "$CYAN Testing to see if server emails are sent $COL_RESET" + echo -e "$CYAN => Testing to see if server emails are sent $COL_RESET" echo sleep 3 @@ -229,7 +231,7 @@ # Installing Fail2Ban & UFW echo - echo -e "$CYAN Some optional installs (Fail2Ban & UFW) $COL_RESET" + echo -e "$CYAN => Some optional installs (Fail2Ban & UFW) $COL_RESET" echo sleep 3 @@ -311,7 +313,7 @@ # Installing PhpMyAdmin echo - echo -e "$CYAN Installing phpmyadmin $COL_RESET" + echo -e "$CYAN => Installing phpMyAdmin $COL_RESET" echo sleep 3 @@ -327,7 +329,7 @@ # Installing Yiimp echo - echo -e "$CYAN Installing Yiimp $COL_RESET" + echo -e "$CYAN => Installing Yiimp $COL_RESET" echo echo -e "Grabbing yiimp fron Github, building files and setting file structure." echo @@ -402,7 +404,7 @@ # Update Timezone echo - echo -e "$CYAN Update default timezone. $COL_RESET" + echo -e "$CYAN => Update default timezone. $COL_RESET" echo # Check if link file @@ -436,7 +438,7 @@ # Creating webserver initial config file echo - echo -e "$CYAN Creating webserver initial config file $COL_RESET" + echo -e "$CYAN => Creating webserver initial config file $COL_RESET" echo # Adding user to group, creating dir structure, setting permissions @@ -867,7 +869,7 @@ # Config Database echo - echo -e "$CYAN Now for the database fun! $COL_RESET" + echo -e "$CYAN => Now for the database fun! $COL_RESET" echo sleep 3 @@ -935,7 +937,7 @@ # Peforming the SQL import echo - echo -e "$CYAN Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you $COL_RESET" + echo -e "$CYAN => Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you $COL_RESET" echo echo -e "Performing the SQL import" echo @@ -975,7 +977,7 @@ # Generating a basic Yiimp serverconfig.php echo - echo -e "$CYAN Generating a basic Yiimp serverconfig.php $COL_RESET" + echo -e "$CYAN => Generating a basic Yiimp serverconfig.php $COL_RESET" echo sleep 3 @@ -1061,7 +1063,7 @@ # Updating stratum config files with database connection info echo - echo -e "$CYAN Updating stratum config files with database connection info. $COL_RESET" + echo -e "$CYAN => Updating stratum config files with database connection info. $COL_RESET" echo sleep 3 @@ -1078,7 +1080,7 @@ # Final Directory permissions echo - echo -e "$CYAN Final Directory permissions $COL_RESET" + echo -e "$CYAN => Final Directory permissions $COL_RESET" echo sleep 3 @@ -1111,7 +1113,6 @@ sleep 3 - clear echo echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" echo -e "$GREEN Finish !!!" From b918b2f136eed3cea1331d165603fb28ed535474 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 03:18:19 +0200 Subject: [PATCH 256/360] typo --- test/conf/getip.sh | 1 + test/conf/prerequisite.sh | 1 + test/install-test.sh | 21 +++++++++++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/test/conf/getip.sh b/test/conf/getip.sh index 58ca33a3..d8a0a9f1 100644 --- a/test/conf/getip.sh +++ b/test/conf/getip.sh @@ -5,6 +5,7 @@ source /etc/functions.sh echo +echo echo -e "$CYAN => Setting our global variables : $COL_RESET" echo diff --git a/test/conf/prerequisite.sh b/test/conf/prerequisite.sh index f193d816..8cb5b1a1 100644 --- a/test/conf/prerequisite.sh +++ b/test/conf/prerequisite.sh @@ -5,6 +5,7 @@ # Modified by Xavatar ##################################################### +echo echo echo -e "$CYAN => Check prerequisite : $COL_RESET" echo diff --git a/test/install-test.sh b/test/install-test.sh index 9b7d537a..ac587888 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -46,6 +46,7 @@ # Update package and Upgrade Ubuntu echo + echo echo -e "$CYAN => Updating system and installing required packages :$COL_RESET" echo sleep 3 @@ -131,6 +132,7 @@ # Installing Mariadb echo + echo echo -e "$CYAN => Installing Mariadb Server : $COL_RESET" echo sleep 3 @@ -148,6 +150,7 @@ # Installing Installing php7.3 echo + echo echo -e "$CYAN => Installing php7.3 : $COL_RESET" echo sleep 3 @@ -172,6 +175,7 @@ # Installing other needed files echo + echo echo -e "$CYAN => Installing other needed files : $COL_RESET" echo sleep 3 @@ -185,6 +189,7 @@ # Installing Package to compile crypto currency echo + echo echo -e "$CYAN => Installing Package to compile crypto currency $COL_RESET" echo sleep 3 @@ -208,6 +213,7 @@ # Test Email echo + echo echo -e "$CYAN => Testing to see if server emails are sent $COL_RESET" echo sleep 3 @@ -231,6 +237,7 @@ # Installing Fail2Ban & UFW echo + echo echo -e "$CYAN => Some optional installs (Fail2Ban & UFW) $COL_RESET" echo sleep 3 @@ -313,6 +320,7 @@ # Installing PhpMyAdmin echo + echo echo -e "$CYAN => Installing phpMyAdmin $COL_RESET" echo sleep 3 @@ -329,6 +337,7 @@ # Installing Yiimp echo + echo echo -e "$CYAN => Installing Yiimp $COL_RESET" echo echo -e "Grabbing yiimp fron Github, building files and setting file structure." @@ -404,6 +413,7 @@ # Update Timezone echo + echo echo -e "$CYAN => Update default timezone. $COL_RESET" echo @@ -438,6 +448,7 @@ # Creating webserver initial config file echo + echo echo -e "$CYAN => Creating webserver initial config file $COL_RESET" echo @@ -869,6 +880,7 @@ # Config Database echo + echo echo -e "$CYAN => Now for the database fun! $COL_RESET" echo sleep 3 @@ -937,6 +949,7 @@ # Peforming the SQL import echo + echo echo -e "$CYAN => Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you $COL_RESET" echo echo -e "Performing the SQL import" @@ -977,6 +990,7 @@ # Generating a basic Yiimp serverconfig.php echo + echo echo -e "$CYAN => Generating a basic Yiimp serverconfig.php $COL_RESET" echo sleep 3 @@ -1063,6 +1077,7 @@ # Updating stratum config files with database connection info echo + echo echo -e "$CYAN => Updating stratum config files with database connection info. $COL_RESET" echo sleep 3 @@ -1080,6 +1095,7 @@ # Final Directory permissions echo + echo echo -e "$CYAN => Final Directory permissions $COL_RESET" echo sleep 3 @@ -1123,8 +1139,9 @@ echo -e "$CYAN Whew that was fun, just some reminders. $COL_RESET" echo -e "$RED Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins. $COL_RESET" echo - echo -e "$RED Yiimp at : http://"$server_name "(https... if you select SSL)" - echo -e "$RED Yiimp Panel Admin at : http://"$server_name"/site/"AdminPanel "(https... if you select SSL)" + echo -e "$RED Yiimp at : http://"$server_name "(https... if SSL enabled)" + echo -e "$RED Yiimp Panel Admin at : http://"$server_name"/site/"AdminPanel "(https... if SSL enabled)" + echo -e "$RED Yiimp phpMyAdmin at : http://"$server_name"/phpmyadmin (https... if SSL enabled)" echo -e echo -e "$CYAN Please make sure to change your wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" echo -e "$CYAN Please make sure to add your public and private keys. $COL_RESET" From 259c9b5ff779f82de9a6c6d29e732477d8840c8c Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 03:23:58 +0200 Subject: [PATCH 257/360] typo --- test/install-test.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index ac587888..9cba9351 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -38,8 +38,10 @@ clear echo + echo -e "*************************" echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" echo -e "$GREEN Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.3" + echo -e "*************************" echo sleep 3 @@ -1128,14 +1130,16 @@ echo -e "$GREEN Done...$COL_RESET" sleep 3 - echo + echo + echo + echo -e "*************************" echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" echo -e "$GREEN Finish !!!" + echo -e "*************************" echo echo echo - echo echo -e "$CYAN Whew that was fun, just some reminders. $COL_RESET" echo -e "$RED Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins. $COL_RESET" echo From 80f3d812153abccfc15e3a5ffa2ca9f40f1b0185 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 03:33:52 +0200 Subject: [PATCH 258/360] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index be1c619f..127ac234 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Connect on your VPS => - git clone https://github.com/xavatar/yiimp_install_scrypt.git - cd yiimp_install_scrypt/ - sudo bash install.sh (Do not run the script as root) -- sudo bash screen-scrypt.sh (in tuto youtube, i launch the scrypt with root... it does not matter) +- sudo bash screen-scrypt.sh (in tuto youtube, i launch the script with root... it does not matter) - NOT MANDATORY => sudo bash screen-stratum.sh (CONFIGURE BEFORE START this script... add or remove algo you use). Finish ! From cb98bf83bf0b6de555dedba676cd523bf2767d0d Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 10:23:01 +0200 Subject: [PATCH 259/360] fix pool.conf --- test/install-test.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 9cba9351..20a18a9d 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -65,8 +65,7 @@ source conf/getip.sh - echo ' - PUBLIC_IP='"${PUBLIC_IP}"' + echo 'PUBLIC_IP='"${PUBLIC_IP}"' PUBLIC_IPV6='"${PUBLIC_IPV6}"' DISTRO='"${DISTRO}"' PRIVATE_IP='"${PRIVATE_IP}"'' | sudo -E tee conf/pool.conf >/dev/null 2>&1 From 4e7553a92af53ec256f419cfd074671dfe9e24e0 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 10:23:46 +0200 Subject: [PATCH 260/360] remove php7.1-mcrypt --- test/install-test.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 20a18a9d..c63ecc39 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -161,10 +161,8 @@ fi hide_output sudo apt -y update apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ - php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell \ + php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring - apt_install php7.1-mcrypt - hide_output sudo ln -s /etc/php/7.1/mods-available/mcrypt.ini /etc/php/7.3/mods-available/ hide_output sudo phpenmod mcrypt hide_output sudo sudo phpenmod mbstring sleep 5 From 74d9281b506ba777e90ba0470e8bd032a3a98703 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 10:33:18 +0200 Subject: [PATCH 261/360] fix typo phpenmod mbstring --- test/install-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/install-test.sh b/test/install-test.sh index c63ecc39..52d5ccd9 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -164,7 +164,7 @@ php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring hide_output sudo phpenmod mcrypt - hide_output sudo sudo phpenmod mbstring + hide_output sudo phpenmod mbstring sleep 5 hide_output sudo systemctl start php7.3-fpm sudo systemctl status php7.3-fpm | sed -n "1,3p" From 67b92e40686f4e1d885e7bc150d361a0084e7676 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 10:44:35 +0200 Subject: [PATCH 262/360] fix typo --- test/install-test.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 52d5ccd9..9ab2761b 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -38,10 +38,10 @@ clear echo - echo -e "*************************" + echo -e "$GREEN*****************************************************************$COL_RESET" echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" - echo -e "$GREEN Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.3" - echo -e "*************************" + echo -e "$GREEN Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.3 $COL_RESET" + echo -e "$GREEN*****************************************************************$COL_RESET" echo sleep 3 @@ -1130,10 +1130,10 @@ echo echo echo - echo -e "*************************" + echo -e "$GREEN**************************$COL_RESET" echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" - echo -e "$GREEN Finish !!!" - echo -e "*************************" + echo -e "$GREEN Finish !!! $COL_RESET" + echo -e "$GREEN**************************$COL_RESET" echo echo echo From 1b974555cf7c2bdb674cab0716cd1fb78c4eb747 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 10:45:51 +0200 Subject: [PATCH 263/360] test extension php --- test/install-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 9ab2761b..2ac48c6c 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -163,8 +163,8 @@ apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring - hide_output sudo phpenmod mcrypt - hide_output sudo phpenmod mbstring + #hide_output sudo phpenmod mcrypt + #hide_output sudo phpenmod mbstring sleep 5 hide_output sudo systemctl start php7.3-fpm sudo systemctl status php7.3-fpm | sed -n "1,3p" From ac8e30ba4ae983b30014bdecd592a18f02a1de00 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 10:47:09 +0200 Subject: [PATCH 264/360] Update install-test.sh fix typo --- test/install-test.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 2ac48c6c..7a588b18 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -38,10 +38,10 @@ clear echo - echo -e "$GREEN*****************************************************************$COL_RESET" + echo -e "$GREEN******************************************************************$COL_RESET" echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" echo -e "$GREEN Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.3 $COL_RESET" - echo -e "$GREEN*****************************************************************$COL_RESET" + echo -e "$GREEN******************************************************************$COL_RESET" echo sleep 3 @@ -1130,10 +1130,10 @@ echo echo echo - echo -e "$GREEN**************************$COL_RESET" + echo -e "$GREEN***************************$COL_RESET" echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" echo -e "$GREEN Finish !!! $COL_RESET" - echo -e "$GREEN**************************$COL_RESET" + echo -e "$GREEN***************************$COL_RESET" echo echo echo From 674e123e4160f2e368a3fa1327d8de1ecedd7273 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 11:47:45 +0200 Subject: [PATCH 265/360] fix permission --- test/install-test.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/install-test.sh b/test/install-test.sh index 7a588b18..4af11d5f 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -1101,7 +1101,6 @@ whoami=`whoami` sudo mkdir /root/backup/ - #sudo usermod -aG www-data $whoami #sudo chown -R www-data:www-data /var/log sudo chown -R www-data:www-data /var/stratum sudo chown -R www-data:www-data /var/web @@ -1116,6 +1115,15 @@ sudo chmod -R 775 /var/web/serverconfig.php sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* + + sudo usermod -aG www-data $whoami + sudo usermod -a -G www-data $whoami + sudo find /var/web -type d -exec chmod 755 {} + + sudo find /var/web -type f -exec chmod 644 {} + + sudo chgrp -R www-data /var/web/ + sudo chmod g+w -R /var/web/ + + sudo systemctl restart cron.service sudo systemctl restart mysql sudo systemctl status mysql | sed -n "1,3p" From 671dbb5f3e047e2586c2f2dc281e199559779209 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 12:08:05 +0200 Subject: [PATCH 266/360] fix permission --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 03c839be..a1883ca9 100644 --- a/install.sh +++ b/install.sh @@ -320,7 +320,7 @@ default 0; sudo mkdir -p /etc/yiimp sudo mkdir -p /$HOME/backup/ #fixing yiimp - sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp + sudo sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp #fixing run.sh sudo rm -r /var/stratum/config/run.sh echo ' From 42b1c226384c7940b619f7904699754fa53ac6a2 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 12:16:42 +0200 Subject: [PATCH 267/360] add reboot final install --- test/install-test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/install-test.sh b/test/install-test.sh index 4af11d5f..a61b1983 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -1159,3 +1159,7 @@ echo -e "$CYAN Xavatar WebSite : https://www.xavatar.com $COL_RESET" echo echo + echo -e "$RED**************************************************$COL_RESET" + echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION!!! $COL_RESET" + echo -e "$RED**************************************************$COL_RESET" + \ No newline at end of file From 98ee31843a80b43fe1b05a85d63342461612450b Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 12:53:10 +0200 Subject: [PATCH 268/360] fix permission --- test/install-test.sh | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index a61b1983..42239df8 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -998,37 +998,51 @@ echo ' 0.3 define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); + // nicehash keys deposit account & amount to deposit at a time define('"'"'NICEHASH_API_KEY'"'"','"'"'f96c65a7-3d2f-4f3a-815c-cacf00674396'"'"'); define('"'"'NICEHASH_API_ID'"'"','"'"'825979'"'"'); @@ -1055,16 +1071,19 @@ $cold_wallet_table = array( '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"' => 0.10, ); + // Sample fixed pool fees $configFixedPoolFees = array( '"'"'zr5'"'"' => 2.0, '"'"'scrypt'"'"' => 20.0, '"'"'sha256'"'"' => 5.0, ); + // Sample custom stratum ports $configCustomPorts = array( // '"'"'x11'"'"' => 7000, ); + // mBTC Coefs per algo (default is 1.0) $configAlgoNormCoef = array( // '"'"'x11'"'"' => 5.0, @@ -1101,18 +1120,22 @@ whoami=`whoami` sudo mkdir /root/backup/ - #sudo chown -R www-data:www-data /var/log sudo chown -R www-data:www-data /var/stratum sudo chown -R www-data:www-data /var/web - sudo touch /var/log/debug.log - sudo chown -R www-data:www-data /var/log/debug.log - sudo chmod -R 775 /var/www/$server_name/html - sudo chmod -R 775 /var/web + + sudo mkdir /var/log/yiimp + sudo touch /var/log/yiimp/debug.log + sudo chown -R www-data:www-data /var/log/yiimp + sudo chmod -R 644 /var/log/yiimp/debug.log + + #sudo chmod -R 775 /var/www/$server_name/html sudo chmod -R 775 /var/stratum - sudo chmod -R 775 /var/web/yaamp/runtime + sudo chmod -R 775 /var/web + #sudo chmod -R 775 /var/web/yaamp/runtime + #sudo chmod -R 775 /var/web/serverconfig.php sudo chmod -R 664 /root/backup/ - sudo chmod -R 644 /var/log/debug.log - sudo chmod -R 775 /var/web/serverconfig.php + + sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* @@ -1161,5 +1184,4 @@ echo echo -e "$RED**************************************************$COL_RESET" echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION!!! $COL_RESET" - echo -e "$RED**************************************************$COL_RESET" - \ No newline at end of file + echo -e "$RED**************************************************$COL_RESET" \ No newline at end of file From f442846da09660810b4da76abbd7485e77648880 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 13:43:26 +0200 Subject: [PATCH 269/360] fix permission --- test/install-test.sh | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 42239df8..0df346eb 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -1119,18 +1119,28 @@ sleep 3 whoami=`whoami` + sudo usermod -aG www-data $whoami + sudo usermod -a -G www-data $whoami + sudo mkdir /root/backup/ - sudo chown -R www-data:www-data /var/stratum - sudo chown -R www-data:www-data /var/web sudo mkdir /var/log/yiimp sudo touch /var/log/yiimp/debug.log sudo chown -R www-data:www-data /var/log/yiimp - sudo chmod -R 644 /var/log/yiimp/debug.log - - #sudo chmod -R 775 /var/www/$server_name/html + sudo chmod -R 775 /var/log/yiimp + + sudo chown -R www-data:www-data /var/stratum sudo chmod -R 775 /var/stratum + + sudo chown -R www-data:www-data /var/web sudo chmod -R 775 /var/web + sudo find /var/web -type d -exec chmod 755 {} + + sudo find /var/web -type f -exec chmod 644 {} + + sudo chgrp -R www-data /var/web/ + sudo chmod g+w -R /var/web/ + + + #sudo chmod -R 775 /var/www/$server_name/html #sudo chmod -R 775 /var/web/yaamp/runtime #sudo chmod -R 775 /var/web/serverconfig.php sudo chmod -R 664 /root/backup/ @@ -1139,14 +1149,6 @@ sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* - sudo usermod -aG www-data $whoami - sudo usermod -a -G www-data $whoami - sudo find /var/web -type d -exec chmod 755 {} + - sudo find /var/web -type f -exec chmod 644 {} + - sudo chgrp -R www-data /var/web/ - sudo chmod g+w -R /var/web/ - - sudo systemctl restart cron.service sudo systemctl restart mysql sudo systemctl status mysql | sed -n "1,3p" From 833a8eacc2775344e8e4404fc5c01cc7b31017c6 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 13:56:30 +0200 Subject: [PATCH 270/360] fix permission --- install.sh | 44 ++++++++++++++++++++++++++++++++++---------- screen-scrypt.sh | 2 +- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index a1883ca9..7569e893 100644 --- a/install.sh +++ b/install.sh @@ -987,23 +987,47 @@ $configAlgoNormCoef = array( output " " sleep 3 - whoami=`whoami` - sudo mkdir /root/backup/ + #whoami=`whoami` + #sudo mkdir /root/backup/ #sudo usermod -aG www-data $whoami #sudo chown -R www-data:www-data /var/log + #sudo chown -R www-data:www-data /var/stratum + #sudo chown -R www-data:www-data /var/web + #sudo touch /var/log/debug.log + #sudo chown -R www-data:www-data /var/log/debug.log + #sudo chmod -R 775 /var/www/$server_name/html + #sudo chmod -R 775 /var/web + #sudo chmod -R 775 /var/stratum + #sudo chmod -R 775 /var/web/yaamp/runtime + #sudo chmod -R 664 /root/backup/ + #sudo chmod -R 644 /var/log/debug.log + #sudo chmod -R 775 /var/web/serverconfig.php + + whoami=`whoami` + sudo usermod -aG www-data $whoami + sudo usermod -a -G www-data $whoami + + sudo mkdir /root/backup/ + + sudo mkdir /var/log/yiimp + sudo touch /var/log/yiimp/debug.log + sudo chown -R www-data:www-data /var/log/yiimp + sudo chmod -R 775 /var/log/yiimp + sudo chown -R www-data:www-data /var/stratum + sudo chmod -R 775 /var/stratum + sudo chown -R www-data:www-data /var/web - sudo touch /var/log/debug.log - sudo chown -R www-data:www-data /var/log/debug.log - sudo chmod -R 775 /var/www/$server_name/html sudo chmod -R 775 /var/web - sudo chmod -R 775 /var/stratum - sudo chmod -R 775 /var/web/yaamp/runtime - sudo chmod -R 664 /root/backup/ - sudo chmod -R 644 /var/log/debug.log - sudo chmod -R 775 /var/web/serverconfig.php + sudo find /var/web -type d -exec chmod 755 {} + + sudo find /var/web -type f -exec chmod 644 {} + + sudo chgrp -R www-data /var/web/ + sudo chmod g+w -R /var/web/ + + sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* + sudo systemctl reload php7.0-fpm.service sudo systemctl restart nginx.service diff --git a/screen-scrypt.sh b/screen-scrypt.sh index 154fad48..e97c01c7 100644 --- a/screen-scrypt.sh +++ b/screen-scrypt.sh @@ -1,5 +1,5 @@ #!/bin/bash - LOG_DIR=/var/log + LOG_DIR=/var/log/yiimp WEB_DIR=/var/web STRATUM_DIR=/var/stratum USR_BIN=/usr/bin From f93627a142df6e0ce87b36a3f03ccd5ce0714503 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 14:04:03 +0200 Subject: [PATCH 271/360] fix permission --- install.sh | 2 +- test/install-test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 7569e893..554223bf 100644 --- a/install.sh +++ b/install.sh @@ -1020,7 +1020,7 @@ $configAlgoNormCoef = array( sudo chown -R www-data:www-data /var/web sudo chmod -R 775 /var/web sudo find /var/web -type d -exec chmod 755 {} + - sudo find /var/web -type f -exec chmod 644 {} + + sudo find /var/web -type f -exec chmod 664 {} + sudo chgrp -R www-data /var/web/ sudo chmod g+w -R /var/web/ diff --git a/test/install-test.sh b/test/install-test.sh index 0df346eb..28aa91d1 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -1135,7 +1135,7 @@ sudo chown -R www-data:www-data /var/web sudo chmod -R 775 /var/web sudo find /var/web -type d -exec chmod 755 {} + - sudo find /var/web -type f -exec chmod 644 {} + + sudo find /var/web -type f -exec chmod 664 {} + sudo chgrp -R www-data /var/web/ sudo chmod g+w -R /var/web/ From 1b6696c4d2b3f92ea16baaa2e5aab1a0bbf51e5c Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 14:11:32 +0200 Subject: [PATCH 272/360] fix typo --- install.sh | 4 ++-- test/install-test.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 554223bf..64598f9d 100644 --- a/install.sh +++ b/install.sh @@ -1021,8 +1021,8 @@ $configAlgoNormCoef = array( sudo chmod -R 775 /var/web sudo find /var/web -type d -exec chmod 755 {} + sudo find /var/web -type f -exec chmod 664 {} + - sudo chgrp -R www-data /var/web/ - sudo chmod g+w -R /var/web/ + sudo chgrp www-data /var/web -R + sudo chmod g+w /var/web -R sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder diff --git a/test/install-test.sh b/test/install-test.sh index 28aa91d1..ef5bbcfa 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -1136,8 +1136,8 @@ sudo chmod -R 775 /var/web sudo find /var/web -type d -exec chmod 755 {} + sudo find /var/web -type f -exec chmod 664 {} + - sudo chgrp -R www-data /var/web/ - sudo chmod g+w -R /var/web/ + sudo chgrp www-data /var/web -R + sudo chmod g+w /var/web -R #sudo chmod -R 775 /var/www/$server_name/html From 1b0e79e6770fd740f17f281611e611524f75da6e Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 14:18:54 +0200 Subject: [PATCH 273/360] fix typo --- install.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 64598f9d..e1e1b0a1 100644 --- a/install.sh +++ b/install.sh @@ -891,37 +891,51 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); echo ' 0.3 define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); + // nicehash keys deposit account & amount to deposit at a time define('"'"'NICEHASH_API_KEY'"'"','"'"'f96c65a7-3d2f-4f3a-815c-cacf00674396'"'"'); define('"'"'NICEHASH_API_ID'"'"','"'"'825979'"'"'); define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3ABoqBjeorjzbyHmGMppM62YLssUgJhtuf'"'"'); define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); + $cold_wallet_table = array( '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"' => 0.10, ); + // Sample fixed pool fees $configFixedPoolFees = array( '"'"'zr5'"'"' => 2.0, '"'"'scrypt'"'"' => 20.0, '"'"'sha256'"'"' => 5.0, ); + // Sample custom stratum ports $configCustomPorts = array( // '"'"'x11'"'"' => 7000, ); + // mBTC Coefs per algo (default is 1.0) $configAlgoNormCoef = array( // '"'"'x11'"'"' => 5.0, From ab070a4d808303b1ee2723362b677bdd393ccb7e Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 16:31:38 +0200 Subject: [PATCH 274/360] update serverconfig.php --- install.sh | 5 ++++- test/install-test.sh | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index e1e1b0a1..487cf6cb 100644 --- a/install.sh +++ b/install.sh @@ -890,7 +890,9 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); # Make config file echo ' 0.10, ); From 355e97b09faf850e760e6efa7cb27f6f66c6d104 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 16:35:39 +0200 Subject: [PATCH 275/360] chg serverconfig.php --- install.sh | 2 +- test/install-test.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 487cf6cb..1d8ce16d 100644 --- a/install.sh +++ b/install.sh @@ -918,7 +918,7 @@ define('"'"'YAAMP_PAYMENTS_MINI'"'"', 0.001); define('"'"'YAAMP_ALLOW_EXCHANGE'"'"', false); define('"'"'YIIMP_PUBLIC_EXPLORER'"'"', true); -define('"'"'YIIMP_PUBLIC_BENCHMARK'"'"', true); +define('"'"'YIIMP_PUBLIC_BENCHMARK'"'"', false); define('"'"'YIIMP_FIAT_ALTERNATIVE'"'"', '"'"'USD'"'"'); // USD is main define('"'"'YAAMP_USE_NICEHASH_API'"'"', false); diff --git a/test/install-test.sh b/test/install-test.sh index 108ab80d..a7955981 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -999,7 +999,7 @@ Date: Thu, 9 Apr 2020 21:03:49 +0200 Subject: [PATCH 276/360] add web rdme --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 1d8ce16d..9d145fa6 100644 --- a/install.sh +++ b/install.sh @@ -3,7 +3,7 @@ # Original Author: crombiecrunch # Fork Author: manfromafar # Current Author: Xavatar (https://github.com/xavatar/yiimp_install_scrypt) -# Web: +# Web: https://www.xavatar.com # # Program: # Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.0 From df0f2a5ac4429f1433ff2bc0303edd608cabdcf3 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 21:25:49 +0200 Subject: [PATCH 277/360] fix permission + typo --- test/install-test.sh | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index a7955981..a121be31 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -1126,28 +1126,27 @@ sudo usermod -aG www-data $whoami sudo usermod -a -G www-data $whoami - sudo mkdir /root/backup/ + sudo find /var/web -type d -exec chmod 755 {} + + sudo find /var/web -type f -exec chmod 664 {} + + sudo chgrp www-data /var/web -R + sudo chmod g+w /var/web -R sudo mkdir /var/log/yiimp sudo touch /var/log/yiimp/debug.log - sudo chown -R www-data:www-data /var/log/yiimp + sudo chgrp www-data /var/log/yiimp -R sudo chmod -R 775 /var/log/yiimp - sudo chown -R www-data:www-data /var/stratum + sudo chgrp www-data /var/stratum -R sudo chmod -R 775 /var/stratum - sudo chown -R www-data:www-data /var/web - sudo chmod -R 775 /var/web - sudo find /var/web -type d -exec chmod 755 {} + - sudo find /var/web -type f -exec chmod 664 {} + - sudo chgrp www-data /var/web -R - sudo chmod g+w /var/web -R - - + #sudo chown -R www-data:www-data /var/web + #sudo chmod -R 775 /var/web #sudo chmod -R 775 /var/www/$server_name/html #sudo chmod -R 775 /var/web/yaamp/runtime #sudo chmod -R 775 /var/web/serverconfig.php - sudo chmod -R 664 /root/backup/ + + #sudo chmod -R 664 /root/backup/ + #sudo mkdir /root/backup/ sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder @@ -1190,4 +1189,6 @@ echo echo -e "$RED**************************************************$COL_RESET" echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION!!! $COL_RESET" - echo -e "$RED**************************************************$COL_RESET" \ No newline at end of file + echo -e "$RED**************************************************$COL_RESET" + echo + echo \ No newline at end of file From d6ed3538065a1e6edfa1a528f598d2cb222c71f8 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 21:51:11 +0200 Subject: [PATCH 278/360] test add support ubun 18x --- test/install-test.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/install-test.sh b/test/install-test.sh index a121be31..4b1d5f78 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -156,15 +156,23 @@ echo sleep 3 + source conf/pool.conf if [ ! -f /etc/apt/sources.list.d/ondrej-php-bionic.list ]; then hide_output sudo add-apt-repository -y ppa:ondrej/php fi hide_output sudo apt -y update + + if [[ ("$DISTRO" == "16") ]]; then apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring #hide_output sudo phpenmod mcrypt #hide_output sudo phpenmod mbstring + else + apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ + php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ + php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring \ + libpsl-dev libnghttp2-dev sleep 5 hide_output sudo systemctl start php7.3-fpm sudo systemctl status php7.3-fpm | sed -n "1,3p" From 0845bb013c6948705bf01be6fcafb82cd9b3a9cc Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 22:00:44 +0200 Subject: [PATCH 279/360] move result process ufw fail2 --- test/install-test.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 4b1d5f78..c66a2ca1 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -252,6 +252,7 @@ if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then apt_install fail2ban + sudo systemctl status fail2ban | sed -n "1,3p" fi @@ -316,11 +317,11 @@ hide_output sudo ufw allow 8463/tcp hide_output sudo ufw allow 8433/tcp hide_output sudo ufw allow 8533/tcp - hide_output sudo ufw --force enable + hide_output sudo ufw --force enable + sudo systemctl status ufw | sed -n "1,3p" fi - sudo systemctl status ufw | sed -n "1,3p" - sudo systemctl status fail2ban | sed -n "1,3p" + echo echo -e "$GREEN Done...$COL_RESET" From 15454fb2954ca1f785f9bdcb239043af56d6ca5f Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 22:07:44 +0200 Subject: [PATCH 280/360] advert to chg Panel Admin address --- test/install-test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/install-test.sh b/test/install-test.sh index c66a2ca1..86b5274f 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -1188,7 +1188,10 @@ echo -e "$RED Yiimp at : http://"$server_name "(https... if SSL enabled)" echo -e "$RED Yiimp Panel Admin at : http://"$server_name"/site/"AdminPanel "(https... if SSL enabled)" echo -e "$RED Yiimp phpMyAdmin at : http://"$server_name"/phpmyadmin (https... if SSL enabled)" - echo -e + echo + echo -e "$RED If you want change 'AdminPanel' to access Panel Admin : Edit this file : /var/web/yaamp/modules/site/SiteController.php" + echo -e "$RED Line 11 => change 'AdminPanel' and use the new address" + echo echo -e "$CYAN Please make sure to change your wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" echo -e "$CYAN Please make sure to add your public and private keys. $COL_RESET" echo From 25f83f2ca6d05b55b19263fc15ca7700b2ca687b Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 22:22:25 +0200 Subject: [PATCH 281/360] update fck perm --- test/install-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 86b5274f..f433b8e4 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -1135,7 +1135,7 @@ sudo usermod -aG www-data $whoami sudo usermod -a -G www-data $whoami - sudo find /var/web -type d -exec chmod 755 {} + + sudo find /var/web -type d -exec chmod 775 {} + sudo find /var/web -type f -exec chmod 664 {} + sudo chgrp www-data /var/web -R sudo chmod g+w /var/web -R @@ -1143,10 +1143,10 @@ sudo mkdir /var/log/yiimp sudo touch /var/log/yiimp/debug.log sudo chgrp www-data /var/log/yiimp -R - sudo chmod -R 775 /var/log/yiimp + sudo chmod 775 /var/log/yiimp sudo chgrp www-data /var/stratum -R - sudo chmod -R 775 /var/stratum + sudo chmod 775 /var/stratum #sudo chown -R www-data:www-data /var/web #sudo chmod -R 775 /var/web From 02d140b1cecc26d6a11c22f779c11f67ff3d9813 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 22:28:16 +0200 Subject: [PATCH 282/360] fix typo --- test/install-test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/install-test.sh b/test/install-test.sh index f433b8e4..e822f156 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -173,6 +173,7 @@ php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring \ libpsl-dev libnghttp2-dev + fi sleep 5 hide_output sudo systemctl start php7.3-fpm sudo systemctl status php7.3-fpm | sed -n "1,3p" From 46e56e510e1987ffe5ccc5ddc02c05f11465e215 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Thu, 9 Apr 2020 22:48:19 +0200 Subject: [PATCH 283/360] another chg perm --- test/install-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/install-test.sh b/test/install-test.sh index e822f156..f672c876 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -1144,7 +1144,7 @@ sudo mkdir /var/log/yiimp sudo touch /var/log/yiimp/debug.log sudo chgrp www-data /var/log/yiimp -R - sudo chmod 775 /var/log/yiimp + sudo chmod 775 /var/log/yiimp -R sudo chgrp www-data /var/stratum -R sudo chmod 775 /var/stratum From 9452fdfb8ee42d04661ae7b4f4077aba125b98de Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 01:23:13 +0200 Subject: [PATCH 284/360] remove php-auth ubun18 --- test/install-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/install-test.sh b/test/install-test.sh index f672c876..dc8fe141 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -170,7 +170,7 @@ #hide_output sudo phpenmod mbstring else apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ - php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ + php7.3-cgi php-pear imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring \ libpsl-dev libnghttp2-dev fi From 0a79ada864af425d106a8c5aee4ce551c53d6688 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 01:30:19 +0200 Subject: [PATCH 285/360] some fix (githubrepo + banner) --- test/install-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index dc8fe141..e84c942a 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -6,13 +6,13 @@ # Web: https://www.xavatar.com # # Program: -# Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.3 +# Install yiimp on Ubuntu 16.04/18.04 running Nginx, MariaDB, and php7.3 # # ################################################################################ ### Variable ### - #githubrepo=https://github.com/Kudaraidee/yiimp.git + githubrepo=https://github.com/tpruvot/yiimp.git githubrepotpruvot=https://github.com/tpruvot/yiimp.git githubrepoKudaraidee=https://github.com/Kudaraidee/yiimp.git @@ -366,7 +366,7 @@ # Compil Blocknotify cd ~ #if [[ ($yiimpver == "2") ]];then - hide_output git clone $githubrepotpruvot + hide_output git clone $githubrepo #else #hide_output git clone $githubrepoKudaraidee #fi From 71e6e058bf06439f7721c53f1442530adb19ba31 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 02:05:51 +0200 Subject: [PATCH 286/360] some fix (/root/backup + crontab screen + copy screen-scrypt.sh --- test/conf/screen-scrypt.sh | 13 +++++++++++++ test/install-test.sh | 14 +++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 test/conf/screen-scrypt.sh diff --git a/test/conf/screen-scrypt.sh b/test/conf/screen-scrypt.sh new file mode 100644 index 00000000..e97c01c7 --- /dev/null +++ b/test/conf/screen-scrypt.sh @@ -0,0 +1,13 @@ +#!/bin/bash + LOG_DIR=/var/log/yiimp + WEB_DIR=/var/web + STRATUM_DIR=/var/stratum + USR_BIN=/usr/bin + + screen -dmS main bash $WEB_DIR/main.sh + screen -dmS loop2 bash $WEB_DIR/loop2.sh + screen -dmS blocks bash $WEB_DIR/blocks.sh + screen -dmS debug tail -f $LOG_DIR/debug.log + + + \ No newline at end of file diff --git a/test/install-test.sh b/test/install-test.sh index e84c942a..a2373795 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -31,9 +31,13 @@ } sudo cp -r conf/functions.sh /etc/ - sudo cp -r conf/editconf.py /usr/bin + sudo cp -r conf/editconf.py /usr/bin/ sudo chmod +x /usr/bin/editconf.py + sudo cp -r conf/screen-scrypt.sh /etc/ + sudo chmod +x /etc/screen-scrypt.sh + + source /etc/functions.sh clear @@ -1149,15 +1153,15 @@ sudo chgrp www-data /var/stratum -R sudo chmod 775 /var/stratum + sudo mkdir /root/backup/ + + + #sudo chmod 775 /root/backup #sudo chown -R www-data:www-data /var/web #sudo chmod -R 775 /var/web #sudo chmod -R 775 /var/www/$server_name/html #sudo chmod -R 775 /var/web/yaamp/runtime #sudo chmod -R 775 /var/web/serverconfig.php - - #sudo chmod -R 664 /root/backup/ - #sudo mkdir /root/backup/ - sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* From db66fffa5a099fe956d64cf5faeec0cc35e4945f Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 02:33:39 +0200 Subject: [PATCH 287/360] Create delcoin.sh --- test/conf/delcoin.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/conf/delcoin.sh diff --git a/test/conf/delcoin.sh b/test/conf/delcoin.sh new file mode 100644 index 00000000..98cde777 --- /dev/null +++ b/test/conf/delcoin.sh @@ -0,0 +1,14 @@ +#!/bin/bash +################################################################################ +# Author: Xavatar (https://github.com/xavatar/yiimp_install_scrypt) +# Web: https://www.xavatar.com +# +# Program: +# Remove all coin in Yiimp +# +# +################################################################################ + +for line in $(cat coin.list); do +yiimp coin "$line" delete; +done From 26cb60766dd05d71876c375975e8b0f48c91994e Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 02:34:19 +0200 Subject: [PATCH 288/360] fix perm rep /root/backup --- test/install-test.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index a2373795..1fa7d5e2 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -42,10 +42,10 @@ clear echo - echo -e "$GREEN******************************************************************$COL_RESET" + echo -e "$GREEN************************************************************************$COL_RESET" echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" - echo -e "$GREEN Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.3 $COL_RESET" - echo -e "$GREEN******************************************************************$COL_RESET" + echo -e "$GREEN Install yiimp on Ubuntu 16.04/18.04 running Nginx, MariaDB, and php7.3 $COL_RESET" + echo -e "$GREEN************************************************************************$COL_RESET" echo sleep 3 @@ -1154,9 +1154,9 @@ sudo chmod 775 /var/stratum sudo mkdir /root/backup/ + sudo chmod 775 /root/backup - #sudo chmod 775 /root/backup #sudo chown -R www-data:www-data /var/web #sudo chmod -R 775 /var/web #sudo chmod -R 775 /var/www/$server_name/html @@ -1173,6 +1173,10 @@ sudo systemctl status nginx | sed -n "1,3p" sudo systemctl restart php7.3-fpm.service sudo systemctl status php7.3-fpm | sed -n "1,3p" + + (crontab -l 2>/dev/null; echo "@reboot sleep 20 && /etc/screen-scrypt.sh") | crontab - + + echo echo -e "$GREEN Done...$COL_RESET" sleep 3 From b663c3afe71865a5068abbbca3ddb233aedfb440 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 02:35:01 +0200 Subject: [PATCH 289/360] Create coin.list --- test/conf/coin.list | 979 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 979 insertions(+) create mode 100644 test/conf/coin.list diff --git a/test/conf/coin.list b/test/conf/coin.list new file mode 100644 index 00000000..31a980a9 --- /dev/null +++ b/test/conf/coin.list @@ -0,0 +1,979 @@ +URO +CANN +POT +TAG +DOGE +RBY +NOTE +LTC +NVC +START +42 +JBS +LSD +J +SLG +VIK +RPC +XG +DP +MARYJ +XMG +RUBLE +XCLD +SWIFT +ARCH +GAIA +WWC +XRP +LMR +MNE +CRW +VDO +NOPE +XWT +MUE +DTC +SRC +QRK +SMBR +PXC +FTC +HYP +LOG +QBK +CENT +BLOCK +CATC +SCSY +GUN +ABY +BALLS +QSLV +U +BYC +BUN +UFO +ZER +ZNY +VTC +MRY +HLC +CRYPT +ACHK +BRXv2 +GSX +PFC +EXE +MN +VPN +VIOR +BAY +HIC +DEAF +BTS +CKC +VIA +ERM +FUD +AM +FIND +CBR +SPR +PTC +METAL +CXC +ULTC +SYS +BCF +DGC +MONA +MEC +ANC +RMS +BTM +WDC +CAT +HUC +EVENT +FAIR +DS +DGB +BCENT +SMLY +XPY +NOO +SUPER +VTR +CLAM +TTC +XAI +NKT +FLO +RDD +NXT +BC +MYR-qubit +UTC +888 +EFL +DIME +SLR +WATER +NLG +GIVE +WC +NOBL +BITS +BLU +OC +THC +ENRG +SHIBE +SFR +NAUT +VRC +CURE +SYNC +BLC +XSI +XC +XDQ +MMXIV +CAIX +BBR +HYPER +CCN +KTK +MUGA +VOOT +BN +XMR +CLOAK +CHCC +BURN +KORE +RZR +XDN +MIN +TECH +GML +TRK +WKC +QTL +XXX +AERO +TRUST +BRIT +JUDGE +NAV +XST +APEX +ZET +BTCD +KEY +NUD +TRI +PES +ICG +UNO +ESC +PINK +IOC +SDC +RAW +MAX +LXC +BOOM +BOB +UNAT +MWC +VAULT +FC2 +SSD +HAL +BIG +NEOS +GB +ROOT +AXR +RIPO +FIBRE +SHADE +FLEX +XBOT +XCASH +BURST +LTCD +CRAIG +TIT +BSTY +GNS +DCN +PXI +MLS +ROS +STV +OPAL +EXCL +PYRA +NET +SEED +PND +GHC +DOPE +ONE +BLEU +BVC +CAGE +CDN +CESC +CLR +CZC +XVG +DON +FJC +GCN +GRN +GUA +HAM +HEX +HTML5 +IFC +IRL +KARM +MINT +MOON +MTLMC +NMC +NYC +ORB +PAC +PCC +PHC +PPC +RC +SXC +TRL +USD +VTA +XPM +BTQ +EMC2 +GIMP +GRC +KRYP +MIC +MOTO +MSC +NIC +NWO +PLCN +PROZ +SONG +SPUDS +SQC +VOXP +VTX +XRC +XSX +AC +ACOIN +AGS +ALF +ALN +AMC +ARG +AUR +BCX +BEN +BET +BNCR +BOST +BQC +BTB +BTE +BTG +BUK +CACH +CAP +CASH +CGB +CINNI +CMC +CNC +CNL +COMM +COOL +CRACK +CRC +CSC +DEM +DMD +DRKC +DT +DVC +EAC +ELC +EMD +EZC +FFC +FLT +FRAC +FRK +FST +GDC +GLC +GLD +GLX +GLYPH +GUE +HBN +HVC +ICB +IXC +JKC +KDC +KGC +LAB +LGD +LK7 +LKY +LTB +LTCX +LYC +MED +MNC +MZC +NAN +NBL +NEC +NRB +NRS +NYAN +OSC +PHS +Points +PSEUD +PTS +PYC +RT2 +RYC +SAT2 +SBC +SHLD +SILK +SMC +SOLE +SPA +SPT +SSV +STR +TAK +TEK +TES +TGC +TOR +TRC +UNB +USDe +XCR +XJO +XLB +YAC +YBC +ZCC +ZED +ADT +ASC +BAT +COL +CPR +CTM +DBL +DMC +ELP +FLAP +GME +LEAF +LOT +MEM +MEOW +MST +RBBT +RED +TIPS +TIX +XNC +ZEIT +EQX +UCI +ggggg +VMC +GMC +2015 +HGC +UIS +SBIT +BLK +BCR +XSP +INCA +NKA +CON +EAGS +GP +USDT +XBS +ARI +DGD +XPC +XDE +CSD +RBR +FSC2 +XWC +1CR +ACH +ADN +BCN +BELA +C2 +CGA +CHA +CNMT +CYC +DIEM +DSH +FLDC +GAP +GDN +GEMZ +GOLD +GRS +HIRO +HZ +JLH +LTBC +MAID +MCN +MIL +MMC +MMNXT +MNTA +MRS +NBT +NOXT +NXTI +PIGGY +PRC +RIC +SJCX +SQL +SRCC +SWARM +UNITY +WOLF +XAP +XBC +XCH +XCN +XCP +XDP +XUSD +YACC +GIG +SOON +OBS +XFB +CCC +OMA +CETI +XPB +BTCS +MYST +10K +XTR +AMBER +LQD +GEO +KOBO +CELL +CBX +XPD +NVCD +PEN +BEAN +BITB +DGORE +XTC +LTS +SLM +GRID +SMAC +DD +CIN +SUP +LYB +PTY +GSM +NSR +MTR +ECASH +WBB +XVC +VOYA +XCO +ZRC +UNC +XFC +XAU +MINE +ASN +RBT +LDOGE +PAY +OMC +BITZ +CRAVE +ZIRK +XDB +DASH +BTCRY +ICASH +256 +SLFI +XEM +CC +CAD +EUR +OCTO +ICN +URC +CRY +PXL +QORA +CYP +MRP +EKN +EGG +STP +NXE +AECC +PLANET +FIRE +ANAL +MTLMC3 +TWIST +CRIME +BTCR +TEC +KARMA +TCX +TAB +NDOGE +GIFT +BBCC +TRICK +DGMS +CCB +OZC +STK +SIC +DECR +RICE +XPRO +TRON +GIZ +ETRUST +LEA +HZT +P7C +IEC +8BIT +OK +ACP +CGN +CF +CTK +NTRN +COV +SLING +MYR +UIS-skein +UIS-qubit +LUX +DRZ +7 +HUGE +BLITZ +NIRO +GRAM +SIGU +AIB +UNAT-skein +QTZ +DOX +XTP +XNX +XSEED +XMS +GUM +SPHR +TDFB +BTX +UNIT +BUB +GPH +GRAV +SPC +CTO +EPY +GOAT +PNC +UTLE +VIRAL +ISL +GAM +PKB +EPC +VTN +FCS +TKT +FSN +BTI +LIMX +SHELL +CLV +TB +BIT16 +16BIT +M1 +KRAK +BA +AST +GRT +BTA +MRB +PTA +DCC +ARB +CORG +DB +EQM +FADE +SED +SKB +TNG +TWERK +CS +GENIUS +PRE +NICE +XNA +32BIT +VCN +CREVA +ADC +SNRG +ECC +RDN +PSY +TWLV +VCOIN +MOIN +GREED +EXB +GLUCK +DRA +OPTION +SEEDS +NANAS +BNB +ARPA +VAPOR +DUB +FIST +XPH +XCE +DRKT +ILM +GEN +TRANSF +EOC +SAK +SEN +HEDG +ERC +NODX +WOC2 +CIRC +SMSR +GLOBE +XVI +FUTC +BOD +GTFO +DIBS +GRM +GENE +SPKTR +BUCKS +GENI +INDEX +POLY +TAM +HAZE +TAGR +EA +SPEC +XRA +BLUS +KC +TENNET +EXT +SPX +GMCX +SJW +BAM +CRPS +HXX +FLAX +CHC +YOVI +DRP +XDC +DOT +WSX +POP +DARK +SVC +MDC +66 +$$$ +XGR +XPL +KIWI +NTC +TTY +TOP +CIV +GXG +FTCC +$MINE +ADD +$MINEW +$MINEZ +IPC +SPN +BSY +DUCK +UNIC +FUNK +CNO +CHAO +BLZ +EMC +OFF +BDSM +EXC +FETISH +SHA +SKC +MARS +CX +CDC +ANI +DUO +GRW +PLC +V +QUIT +BNX +ALCUREX +BTRHA +CV2 +DRM +FAIL +FIMK +FRSH +FX01 +HANSA +ISO +MRC +NODE +P0001 +PHO +PPCD +RUM +TALK +VAPE +ZUR +CARB +IDC +MCAR +VERSA +LFO +FIC +2BACCO +NUKE +SPROUT +MDT +SPRTS +CPN +BSC +BSD +DIGS +IBITS +CPC +AXIOM +AEON +ETH +GCR +MACRO +TX +SHF +BCY +PRIME +EXP +NEU +SWING +MAPC +INFX +SOIL +OMNI +AMP +AGRS +XLM +BITCNY +CUBE +BST +AMS +SCRT +SCOT +CLUB +BNT +VOX +MND +FCT +EGC +SLS +HIRE +STEPS +RADS +DCR +SEC +DNET +WARP +CRBIT +FUEL +NOC +TROLL +BITUSD +SC +1337 +ADCN +AND +ANTI +APC +AR2 +BAC +BIC +BIOS +BTCHC +CBIT +CHIP +CIONZ +CRE +CYG +DEUR +DROP +EC +EDRC +FNX +FLOZ +FTP +GCC +GMX +GSY +HMP +HNC +HODL +HTC +KLC +KNC +MBL +MI +MMXVI +NKC +OP +OPES +PULSE +RBIES +REV +TRBO +SIB +STS +TBC +VAL +WLC +WOP +XCT +XHI +XID +YOC +PRT +ZOOM +LGBTQ +BOLI +DGCS +ADZ +RICHX +REP +RUBIT +SANDG +BRONZ +X2 +LTCR +EVO +BTP +CPNC +EVIL +JIF +BTCU +SPL +BUZZ +TRUMP +DBIC +FONZ +GAME +CFC +VGC +PR +GRE-OLD +EUC +PAK +CAPT +I0C +EBG +BUMBA +FLY +WHIPPED +SHND +G3N +UMO +FOOT +CHAI +CZECO +DRK +HZDOGE +STATS +BANX +MCZ +MEME +KUMA +CHILD +XQN +DES +UNF + From 1d98948a7e8bf86e7bc2f1a9f3e31f87396ee469 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 03:12:32 +0200 Subject: [PATCH 290/360] add coin 007 --- test/conf/coin.list | 1 + 1 file changed, 1 insertion(+) diff --git a/test/conf/coin.list b/test/conf/coin.list index 31a980a9..93b0f6e5 100644 --- a/test/conf/coin.list +++ b/test/conf/coin.list @@ -1,3 +1,4 @@ +007 URO CANN POT From 194662fb766fdcaf80e52e94c432cfa2faa657d2 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 03:29:42 +0200 Subject: [PATCH 291/360] conf backup sql --- test/install-test.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/install-test.sh b/test/install-test.sh index 1fa7d5e2..8ee7085d 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -1016,6 +1016,7 @@ define('"'"'YAAMP_LOGS'"'"', '"'"'/var/log/yiimp'"'"'); define('"'"'YAAMP_HTDOCS'"'"', '"'"'/var/web'"'"'); + define('"'"'YIIMP_MYSQLDUMP_PATH'"'"', '"'"'/var/yiimp/sauv'"'"'); define('"'"'YAAMP_BIN'"'"', '"'"'/var/bin'"'"'); @@ -1156,6 +1157,8 @@ sudo mkdir /root/backup/ sudo chmod 775 /root/backup + sudo mkdir -p /var/yiimp/sauv + sudo chmod 775 /var/yiimp/sauv #sudo chown -R www-data:www-data /var/web #sudo chmod -R 775 /var/web From ff990bf96b8e14ceccf1ac95e00919aa9143ef23 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 04:09:27 +0200 Subject: [PATCH 292/360] chg conf sauv sql --- test/install-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 8ee7085d..d230f18a 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -940,8 +940,9 @@ /* Sample config file to put in /etc/yiimp/keys.php */ define('"'"'YIIMP_MYSQLDUMP_USER'"'"', '"'"'panel'"'"'); define('"'"'YIIMP_MYSQLDUMP_PASS'"'"', '"'"''"${password}"''"'"'); + define('"'"'YIIMP_MYSQLDUMP_PATH'"'"', '"'"''"/var/yiimp/sauv"''"'"'); /* Keys required to create/cancel orders and access your balances/deposit addresses */ - define('"'"'EXCH_BITTREX_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_BITTREX_SECRET'"'"', '"'"''"'"'); define('"'"'EXCH_BITSTAMP_SECRET'"'"','"'"''"'"'); define('"'"'EXCH_BLEUTRADE_SECRET'"'"', '"'"''"'"'); define('"'"'EXCH_BTER_SECRET'"'"', '"'"''"'"'); @@ -1016,8 +1017,7 @@ define('"'"'YAAMP_LOGS'"'"', '"'"'/var/log/yiimp'"'"'); define('"'"'YAAMP_HTDOCS'"'"', '"'"'/var/web'"'"'); - define('"'"'YIIMP_MYSQLDUMP_PATH'"'"', '"'"'/var/yiimp/sauv'"'"'); - + define('"'"'YAAMP_BIN'"'"', '"'"'/var/bin'"'"'); define('"'"'YAAMP_DBHOST'"'"', '"'"'localhost'"'"'); From 29f80d9df232e4b987cdac3baea141c38df21fb7 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 05:00:33 +0200 Subject: [PATCH 293/360] try fix error backup frontend --- test/install-test.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index d230f18a..23c4ea4a 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -940,7 +940,6 @@ /* Sample config file to put in /etc/yiimp/keys.php */ define('"'"'YIIMP_MYSQLDUMP_USER'"'"', '"'"'panel'"'"'); define('"'"'YIIMP_MYSQLDUMP_PASS'"'"', '"'"''"${password}"''"'"'); - define('"'"'YIIMP_MYSQLDUMP_PATH'"'"', '"'"''"/var/yiimp/sauv"''"'"'); /* Keys required to create/cancel orders and access your balances/deposit addresses */ define('"'"'EXCH_BITTREX_SECRET'"'"', '"'"''"'"'); define('"'"'EXCH_BITSTAMP_SECRET'"'"','"'"''"'"'); @@ -1017,6 +1016,7 @@ define('"'"'YAAMP_LOGS'"'"', '"'"'/var/log/yiimp'"'"'); define('"'"'YAAMP_HTDOCS'"'"', '"'"'/var/web'"'"'); + define('"'"'YIIMP_MYSQLDUMP_PATH'"'"', '"'"''"/var/yiimp/sauv"''"'"'); define('"'"'YAAMP_BIN'"'"', '"'"'/var/bin'"'"'); @@ -1154,12 +1154,13 @@ sudo chgrp www-data /var/stratum -R sudo chmod 775 /var/stratum - sudo mkdir /root/backup/ - sudo chmod 775 /root/backup - sudo mkdir -p /var/yiimp/sauv - sudo chmod 775 /var/yiimp/sauv + sudo chgrp www-data /var/yiimp -R + sudo chmod 775 /var/yiimp -R + + #sudo mkdir /root/backup/ + #sudo chmod 775 /root/backup #sudo chown -R www-data:www-data /var/web #sudo chmod -R 775 /var/web #sudo chmod -R 775 /var/www/$server_name/html From ce8cdac7ffbb4dac9512f071b7291b1a862b4867 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 10:56:09 +0200 Subject: [PATCH 294/360] Create install-test2 --- test/install-test2 | 1217 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1217 insertions(+) create mode 100644 test/install-test2 diff --git a/test/install-test2 b/test/install-test2 new file mode 100644 index 00000000..6cf42547 --- /dev/null +++ b/test/install-test2 @@ -0,0 +1,1217 @@ +#!/bin/bash +################################################################################ +# Original Author: crombiecrunch +# Fork Author: manfromafar +# Current Author: Xavatar (https://github.com/xavatar/yiimp_install_scrypt) +# Web: https://www.xavatar.com +# +# Program: +# Install yiimp on Ubuntu 16.04/18.04 running Nginx, MariaDB, and php7.3 +# +# +################################################################################ + + ### Variable ### + githubrepo=https://github.com/tpruvot/yiimp.git + githubrepotpruvot=https://github.com/tpruvot/yiimp.git + githubrepoKudaraidee=https://github.com/Kudaraidee/yiimp.git + + + output() { + printf "\E[0;33;40m" + echo $1 + printf "\E[0m" + } + + displayErr() { + echo + echo $1; + echo + exit 1; + } + + sudo cp -r conf/functions.sh /etc/ + sudo cp -r conf/editconf.py /usr/bin/ + sudo chmod +x /usr/bin/editconf.py + + sudo cp -r conf/screen-scrypt.sh /etc/ + sudo chmod +x /etc/screen-scrypt.sh + + + source /etc/functions.sh + + clear + echo + echo -e "$GREEN************************************************************************$COL_RESET" + echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" + echo -e "$GREEN Install yiimp on Ubuntu 16.04/18.04 running Nginx, MariaDB, and php7.3 $COL_RESET" + echo -e "$GREEN************************************************************************$COL_RESET" + echo + sleep 3 + + + # Update package and Upgrade Ubuntu + echo + echo + echo -e "$CYAN => Updating system and installing required packages :$COL_RESET" + echo + sleep 3 + + hide_output sudo apt -y update + hide_output sudo apt -y upgrade + hide_output sudo apt -y autoremove + apt_install dialog python3 python3-pip acl nano apt-transport-https + echo -e "$GREEN Done...$COL_RESET" + + + source conf/prerequisite.sh + sleep 3 + source conf/getip.sh + + + echo 'PUBLIC_IP='"${PUBLIC_IP}"' + PUBLIC_IPV6='"${PUBLIC_IPV6}"' + DISTRO='"${DISTRO}"' + PRIVATE_IP='"${PRIVATE_IP}"'' | sudo -E tee conf/pool.conf >/dev/null 2>&1 + + echo + echo + echo -e "$RED Make sure you double check before hitting enter! Only one shot at these! $COL_RESET" + echo + #read -e -p "Enter time zone (e.g. America/New_York) : " TIME + read -e -p "Domain Name (no http:// or www. just : example.com or pool.example.com or 185.22.24.26) : " server_name + read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain + read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL + read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC + #read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel + read -e -p "Enter the Public IP of the system you will use to access the admin panel (http://www.whatsmyip.org/) : " Public + read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban + read -e -p "Install UFW and configure ports? [Y/n] : " UFW + read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install + + + # Switch Aptitude + #echo + #echo -e "$CYAN Switching to Aptitude $COL_RESET" + #echo + #sleep 3 + #apt_install aptitude + #echo -e "$GREEN Done...$COL_RESET $COL_RESET" + + + # Installing Nginx + echo + echo + echo -e "$CYAN => Installing Nginx server : $COL_RESET" + echo + sleep 3 + + if [ -f /usr/sbin/apache2 ]; then + echo -e "Removing apache..." + hide_output apt-get -y purge apache2 apache2-* + hide_output apt-get -y --purge autoremove + fi + + apt_install nginx + hide_output sudo rm /etc/nginx/sites-enabled/default + hide_output sudo systemctl start nginx.service + hide_output sudo systemctl enable nginx.service + hide_output sudo systemctl start cron.service + hide_output sudo systemctl enable cron.service + sudo systemctl status nginx | sed -n "1,3p" + echo + echo -e "$GREEN Done...$COL_RESET" + + + # Making Nginx a bit hard + echo 'map $http_user_agent $blockedagent { + default 0; + ~*malicious 1; + ~*bot 1; + ~*backdoor 1; + ~*crawler 1; + ~*bandit 1; + } + ' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 + + + # Installing Mariadb + echo + echo + echo -e "$CYAN => Installing Mariadb Server : $COL_RESET" + echo + sleep 3 + + # Create random password + rootpasswd=$(openssl rand -base64 12) + export DEBIAN_FRONTEND="noninteractive" + apt_install mariadb-server + hide_output sudo systemctl start mysql + hide_output sudo systemctl enable mysql + sudo systemctl status mysql | sed -n "1,3p" + echo + echo -e "$GREEN Done...$COL_RESET" + + + # Installing Installing php7.3 + echo + echo + echo -e "$CYAN => Installing php7.3 : $COL_RESET" + echo + sleep 3 + + source conf/pool.conf + if [ ! -f /etc/apt/sources.list.d/ondrej-php-bionic.list ]; then + hide_output sudo add-apt-repository -y ppa:ondrej/php + fi + hide_output sudo apt -y update + + if [[ ("$DISTRO" == "16") ]]; then + apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ + php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ + php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring + #hide_output sudo phpenmod mcrypt + #hide_output sudo phpenmod mbstring + else + apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ + php7.3-cgi php-pear imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ + php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring \ + libpsl-dev libnghttp2-dev + fi + sleep 5 + hide_output sudo systemctl start php7.3-fpm + sudo systemctl status php7.3-fpm | sed -n "1,3p" + echo + echo -e "$GREEN Done...$COL_RESET" + + + # Installing other needed files + echo + echo + echo -e "$CYAN => Installing other needed files : $COL_RESET" + echo + sleep 3 + + apt_install libgmp3-dev libmysqlclient-dev libcurl4-gnutls-dev libkrb5-dev libldap2-dev libidn11-dev gnutls-dev \ + librtmp-dev sendmail mutt screen git + apt_install pwgen -y + echo -e "$GREEN Done...$COL_RESET" + sleep 3 + + + # Installing Package to compile crypto currency + echo + echo + echo -e "$CYAN => Installing Package to compile crypto currency $COL_RESET" + echo + sleep 3 + + apt_install software-properties-common build-essential + apt_install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext + apt_install libminiupnpc10 libzmq5 + apt_install libcanberra-gtk-module libqrencode-dev libzmq3-dev + apt_install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler + hide_output sudo add-apt-repository -y ppa:bitcoin/bitcoin + hide_output sudo apt -y update + apt_install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ + echo -e "$GREEN Done...$COL_RESET" + + + # Generating Random Passwords + password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + AUTOGENERATED_PASS=`pwgen -c -1 20` + + + # Test Email + echo + echo + echo -e "$CYAN => Testing to see if server emails are sent $COL_RESET" + echo + sleep 3 + + if [[ "$root_email" != "" ]]; then + echo $root_email > sudo tee --append ~/.email + echo $root_email > sudo tee --append ~/.forward + + if [[ ("$send_email" == "y" || "$send_email" == "Y" || "$send_email" == "") ]]; then + echo "This is a mail test for the SMTP Service." > sudo tee --append /tmp/email.message + echo "You should receive this !" >> sudo tee --append /tmp/email.message + echo "" >> sudo tee --append /tmp/email.message + echo "Cheers" >> sudo tee --append /tmp/email.message + sudo sendmail -s "SMTP Testing" $root_email < sudo tee --append /tmp/email.message + + sudo rm -f /tmp/email.message + echo "Mail sent" + fi + fi + echo -e "$GREEN Done...$COL_RESET" + + # Installing Fail2Ban & UFW + echo + echo + echo -e "$CYAN => Some optional installs (Fail2Ban & UFW) $COL_RESET" + echo + sleep 3 + + + if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then + apt_install fail2ban + sudo systemctl status fail2ban | sed -n "1,3p" + fi + + + if [[ ("$UFW" == "y" || "$UFW" == "Y" || "$UFW" == "") ]]; then + apt_install ufw + hide_output sudo ufw default deny incoming + hide_output sudo ufw default allow outgoing + hide_output sudo ufw allow ssh + hide_output sudo ufw allow http + hide_output sudo ufw allow https + hide_output sudo ufw allow 3333/tcp + hide_output sudo ufw allow 3339/tcp + hide_output sudo ufw allow 3334/tcp + hide_output sudo ufw allow 3433/tcp + hide_output sudo ufw allow 3555/tcp + hide_output sudo ufw allow 3556/tcp + hide_output sudo ufw allow 3573/tcp + hide_output sudo ufw allow 3535/tcp + hide_output sudo ufw allow 3533/tcp + hide_output sudo ufw allow 3553/tcp + hide_output sudo ufw allow 3633/tcp + hide_output sudo ufw allow 3733/tcp + hide_output sudo ufw allow 3636/tcp + hide_output sudo ufw allow 3737/tcp + hide_output sudo ufw allow 3739/tcp + hide_output sudo ufw allow 3747/tcp + hide_output sudo ufw allow 3833/tcp + hide_output sudo ufw allow 3933/tcp + hide_output sudo ufw allow 4033/tcp + hide_output sudo ufw allow 4133/tcp + hide_output sudo ufw allow 4233/tcp + hide_output sudo ufw allow 4234/tcp + hide_output sudo ufw allow 4333/tcp + hide_output sudo ufw allow 4433/tcp + hide_output sudo ufw allow 4533/tcp + hide_output sudo ufw allow 4553/tcp + hide_output sudo ufw allow 4633/tcp + hide_output sudo ufw allow 4733/tcp + hide_output sudo ufw allow 4833/tcp + hide_output sudo ufw allow 4933/tcp + hide_output sudo ufw allow 5033/tcp + hide_output sudo ufw allow 5133/tcp + hide_output sudo ufw allow 5233/tcp + hide_output sudo ufw allow 5333/tcp + hide_output sudo ufw allow 5433/tcp + hide_output sudo ufw allow 5533/tcp + hide_output sudo ufw allow 5733/tcp + hide_output sudo ufw allow 5743/tcp + hide_output sudo ufw allow 3252/tcp + hide_output sudo ufw allow 5755/tcp + hide_output sudo ufw allow 5766/tcp + hide_output sudo ufw allow 5833/tcp + hide_output sudo ufw allow 5933/tcp + hide_output sudo ufw allow 6033/tcp + hide_output sudo ufw allow 5034/tcp + hide_output sudo ufw allow 6133/tcp + hide_output sudo ufw allow 6233/tcp + hide_output sudo ufw allow 6333/tcp + hide_output sudo ufw allow 6433/tcp + hide_output sudo ufw allow 7433/tcp + hide_output sudo ufw allow 8333/tcp + hide_output sudo ufw allow 8463/tcp + hide_output sudo ufw allow 8433/tcp + hide_output sudo ufw allow 8533/tcp + hide_output sudo ufw --force enable + sudo systemctl status ufw | sed -n "1,3p" + fi + + + echo + echo -e "$GREEN Done...$COL_RESET" + + + # Installing PhpMyAdmin + echo + echo + echo -e "$CYAN => Installing phpMyAdmin $COL_RESET" + echo + sleep 3 + + echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/admin-user string root" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/admin-pass password $rootpasswd" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/app-pass password $AUTOGENERATED_PASS" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections + apt_install phpmyadmin + echo -e "$GREEN Done...$COL_RESET" + + + # Installing Yiimp + echo + echo + echo -e "$CYAN => Installing Yiimp $COL_RESET" + echo + echo -e "Grabbing yiimp fron Github, building files and setting file structure." + echo + sleep 3 + + #echo " " + #echo -e "Choose your Yiimp Version : " + #echo -e "1 : xiaolin1579 (last update : April 2020)" + #echo -e "2 : tpruvot (Official YiimP, last update : Sept 2019)" + #read -e -p "Enter desired version : 1 or 2 [1 by default] : " yiimpver + + + # Generating Random Password for stratum + blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + + # Compil Blocknotify + cd ~ + #if [[ ($yiimpver == "2") ]];then + hide_output git clone $githubrepo + #else + #hide_output git clone $githubrepoKudaraidee + #fi + cd $HOME/yiimp/blocknotify + sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp + hide_output sudo make + + # Compil iniparser + cd $HOME/yiimp/stratum/iniparser + hide_output sudo make + + # Compil Stratum + cd $HOME/yiimp/stratum + if [[ ("$BTC" == "y" || "$BTC" == "Y") ]]; then + sudo sed -i 's/CFLAGS += -DNO_EXCHANGE/#CFLAGS += -DNO_EXCHANGE/' $HOME/yiimp/stratum/Makefile + fi + hide_output sudo make + + # Copy Files (Blocknotify,iniparser,Stratum) + cd $HOME/yiimp + sudo sed -i 's/AdminRights/'AdminPanel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php + sudo cp -r $HOME/yiimp/web /var/ + sudo mkdir -p /var/stratum + cd $HOME/yiimp/stratum + sudo cp -a config.sample/. /var/stratum/config + sudo cp -r stratum /var/stratum + sudo cp -r run.sh /var/stratum + cd $HOME/yiimp + sudo cp -r $HOME/yiimp/bin/. /bin/ + sudo cp -r $HOME/yiimp/blocknotify/blocknotify /usr/bin/ + sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum/ + sudo mkdir -p /etc/yiimp + sudo mkdir -p /$HOME/backup/ + #fixing yiimp + sudo sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp + #fixing run.sh + sudo rm -r /var/stratum/config/run.sh + echo ' + #!/bin/bash + ulimit -n 10240 + ulimit -u 10240 + cd /var/stratum + while true; do + ./stratum /var/stratum/config/$1 + sleep 2 + done + exec bash + ' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 + sudo chmod +x /var/stratum/config/run.sh + + echo -e "$GREEN Done...$COL_RESET" + + + # Update Timezone + echo + echo + echo -e "$CYAN => Update default timezone. $COL_RESET" + echo + + # Check if link file + #sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime + # Update time zone + #sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime + #apt_install ntpdate + # Write time to clock. + #sudo hwclock -w + #echo -e "$GREEN Done...$COL_RESET" + + echo -e " Setting TimeZone to UTC...$COL_RESET" + if [ ! -f /etc/timezone ]; then + echo "Setting timezone to UTC." + echo "Etc/UTC" > sudo /etc/timezone + sudo systemctl restart rsyslog + fi + sudo systemctl status rsyslog | sed -n "1,3p" + echo + echo -e "$GREEN Done...$COL_RESET" + + + # Making Web Server Magic Happen + #echo + #echo -e "$CYAN Making Web Server Magic Happen! $COL_RESET" + #echo + + # Adding user to group, creating dir structure, setting permissions + #sudo mkdir -p /var/www/$server_name/html + + + # Creating webserver initial config file + echo + echo + echo -e "$CYAN => Creating webserver initial config file $COL_RESET" + echo + + # Adding user to group, creating dir structure, setting permissions + sudo mkdir -p /var/www/$server_name/html + + if [[ ("$sub_domain" == "y" || "$sub_domain" == "Y") ]]; then + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"'; + root "/var/www/'"${server_name}"'/html/web"; + index index.html index.htm index.php; + charset utf-8; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + location ~ /\.ht { + deny all; + } + location ~ /.well-known { + allow all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.3-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + + sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf + sudo ln -s /var/web /var/www/$server_name/html + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" + + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + + + # Install SSL (with SubDomain) + echo + echo -e "Install LetsEncrypt and setting SSL (with SubDomain)" + echo + + apt_install letsencrypt + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" + sudo rm /etc/nginx/sites-available/$server_name.conf + sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 + # I am SSL Man! + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"'; + # enforce https + return 301 https://$server_name$request_uri; + } + + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name '"${server_name}"'; + + root /var/www/'"${server_name}"'/html/web; + index index.php; + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + # strengthen ssl security + ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + ssl_dhparam /etc/ssl/certs/dhparam.pem; + + # Add headers to serve security related headers + add_header Strict-Transport-Security "max-age=15768000; preload;"; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header Content-Security-Policy "frame-ancestors 'self'"; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + include /etc/nginx/fastcgi_params; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + + location ~ /\.ht { + deny all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.3-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } + + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + fi + + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" + + + else + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"' www.'"${server_name}"'; + root "/var/www/'"${server_name}"'/html/web"; + index index.html index.htm index.php; + charset utf-8; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + location ~ /\.ht { + deny all; + } + location ~ /.well-known { + allow all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.3-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + + sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf + sudo ln -s /var/web /var/www/$server_name/html + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" + + + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + + # Install SSL (without SubDomain) + echo + echo -e "Install LetsEncrypt and setting SSL (without SubDomain)" + echo + sleep 3 + + apt_install letsencrypt + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" + sudo rm /etc/nginx/sites-available/$server_name.conf + sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 + # I am SSL Man! + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"'; + # enforce https + return 301 https://$server_name$request_uri; + } + + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name '"${server_name}"' www.'"${server_name}"'; + + root /var/www/'"${server_name}"'/html/web; + index index.php; + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + # strengthen ssl security + ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + ssl_dhparam /etc/ssl/certs/dhparam.pem; + + # Add headers to serve security related headers + add_header Strict-Transport-Security "max-age=15768000; preload;"; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header Content-Security-Policy "frame-ancestors 'self'"; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + include /etc/nginx/fastcgi_params; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + + location ~ /\.ht { + deny all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.3-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } + + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + + echo -e "$GREEN Done...$COL_RESET" + + fi + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service + fi + + + # Config Database + echo + echo + echo -e "$CYAN => Now for the database fun! $COL_RESET" + echo + sleep 3 + + # Create database + Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" + Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" + Q3="FLUSH PRIVILEGES;" + SQL="${Q1}${Q2}${Q3}" + sudo mysql -u root -p="" -e "$SQL" + + # Create stratum user + Q1="GRANT ALL ON *.* TO 'stratum'@'localhost' IDENTIFIED BY '$password2';" + Q2="FLUSH PRIVILEGES;" + SQL="${Q1}${Q2}" + sudo mysql -u root -p="" -e "$SQL" + + #Create my.cnf + + echo ' + [clienthost1] + user=panel + password='"${password}"' + database=yiimpfrontend + host=localhost + [clienthost2] + user=stratum + password='"${password2}"' + database=yiimpfrontend + host=localhost + [myphpadmin] + user=phpmyadmin + password='"${AUTOGENERATED_PASS}"' + [mysql] + user=root + password='"${rootpasswd}"' + ' | sudo -E tee ~/.my.cnf >/dev/null 2>&1 + sudo chmod 0600 ~/.my.cnf + + + # Create keys file + echo ' + /dev/null 2>&1 + + echo -e "$GREEN Done...$COL_RESET" + + + # Peforming the SQL import + echo + echo + echo -e "$CYAN => Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you $COL_RESET" + echo + echo -e "Performing the SQL import" + echo + sleep 3 + + cd ~ + cd yiimp/sql + + # Import sql dump + sudo zcat 2016-04-03-yaamp.sql.gz | sudo mysql --defaults-group-suffix=host1 + + # Oh the humanity! + sudo mysql --defaults-group-suffix=host1 --force < 2016-04-24-market_history.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-04-27-settings.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-11-coins.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-15-benchmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-23-bookmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-06-01-notifications.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-06-04-bench_chips.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-11-23-coins.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-02-05-benchmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-03-31-earnings_index.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-05-accounts_case_swaptime.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-06-payouts_coinid_memo.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-09-notifications.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-10-bookmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql + sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql + sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql + #if [[ ($yiimpver == "2") ]];then + echo -e "$GREEN Done...$COL_RESET" + #else + #sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql + #echo -e "$GREEN Done...$COL_RESET" + #fi + + + # Generating a basic Yiimp serverconfig.php + echo + echo + echo -e "$CYAN => Generating a basic Yiimp serverconfig.php $COL_RESET" + echo + sleep 3 + + # Make config file + echo ' + 0.3 + define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); + + // nicehash keys deposit account & amount to deposit at a time + define('"'"'NICEHASH_API_KEY'"'"','"'"'f96c65a7-3d2f-4f3a-815c-cacf00674396'"'"'); + define('"'"'NICEHASH_API_ID'"'"','"'"'825979'"'"'); + define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3ABoqBjeorjzbyHmGMppM62YLssUgJhtuf'"'"'); + define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); + + $cold_wallet_table = array( + '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"' => 0.10, + ); + + // Sample fixed pool fees + $configFixedPoolFees = array( + '"'"'zr5'"'"' => 2.0, + '"'"'scrypt'"'"' => 20.0, + '"'"'sha256'"'"' => 5.0, + ); + + // Sample custom stratum ports + $configCustomPorts = array( + // '"'"'x11'"'"' => 7000, + ); + + // mBTC Coefs per algo (default is 1.0) + $configAlgoNormCoef = array( + // '"'"'x11'"'"' => 5.0, + ); + ' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 + + echo -e "$GREEN Done...$COL_RESET" + + + # Updating stratum config files with database connection info + echo + echo + echo -e "$CYAN => Updating stratum config files with database connection info. $COL_RESET" + echo + sleep 3 + + cd /var/stratum/config + sudo sed -i 's/password = tu8tu5/password = '$blckntifypass'/g' *.conf + sudo sed -i 's/server = yaamp.com/server = '$server_name'/g' *.conf + sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf + sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf + sudo sed -i 's/username = root/username = stratum/g' *.conf + sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf + cd ~ + echo -e "$GREEN Done...$COL_RESET" + + + # Final Directory permissions + echo + echo + echo -e "$CYAN => Final Directory permissions $COL_RESET" + echo + sleep 3 + + whoami=`whoami` + sudo usermod -aG www-data $whoami + sudo usermod -a -G www-data $whoami + + sudo find /var/web -type d -exec chmod 775 {} + + sudo find /var/web -type f -exec chmod 664 {} + + sudo chgrp www-data /var/web -R + sudo chmod g+w /var/web -R + + sudo mkdir /var/log/yiimp + sudo touch /var/log/yiimp/debug.log + sudo chgrp www-data /var/log/yiimp -R + sudo chmod 775 /var/log/yiimp -R + + sudo chgrp www-data /var/stratum -R + sudo chmod 775 /var/stratum + + sudo mkdir -p /var/yiimp/sauv + sudo chgrp www-data /var/yiimp -R + sudo chmod 775 /var/yiimp -R + + + #sudo mkdir /root/backup/ + #sudo chmod 775 /root/backup + #sudo chown -R www-data:www-data /var/web + #sudo chmod -R 775 /var/web + #sudo chmod -R 775 /var/www/$server_name/html + #sudo chmod -R 775 /var/web/yaamp/runtime + #sudo chmod -R 775 /var/web/serverconfig.php + + sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder + sudo rm -rf /var/log/nginx/* + + sudo systemctl restart cron.service + sudo systemctl restart mysql + sudo systemctl status mysql | sed -n "1,3p" + sudo systemctl restart nginx.service + sudo systemctl status nginx | sed -n "1,3p" + sudo systemctl restart php7.3-fpm.service + sudo systemctl status php7.3-fpm | sed -n "1,3p" + + (crontab -l 2>/dev/null; echo "@reboot sleep 20 && /etc/screen-scrypt.sh") | crontab - + + + echo + echo -e "$GREEN Done...$COL_RESET" + sleep 3 + + echo + echo + echo + echo -e "$GREEN***************************$COL_RESET" + echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" + echo -e "$GREEN Finish !!! $COL_RESET" + echo -e "$GREEN***************************$COL_RESET" + echo + echo + echo + echo -e "$CYAN Whew that was fun, just some reminders. $COL_RESET" + echo -e "$RED Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins. $COL_RESET" + echo + echo -e "$RED Yiimp at : http://"$server_name "(https... if SSL enabled)" + echo -e "$RED Yiimp Panel Admin at : http://"$server_name"/site/"AdminPanel "(https... if SSL enabled)" + echo -e "$RED Yiimp phpMyAdmin at : http://"$server_name"/phpmyadmin (https... if SSL enabled)" + echo + echo -e "$RED If you want change 'AdminPanel' to access Panel Admin : Edit this file : /var/web/yaamp/modules/site/SiteController.php" + echo -e "$RED Line 11 => change 'AdminPanel' and use the new address" + echo + echo -e "$CYAN Please make sure to change your wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" + echo -e "$CYAN Please make sure to add your public and private keys. $COL_RESET" + echo + echo -e "$CYAN TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig $COL_RESET" + echo -e "$CYAN Xavatar WebSite : https://www.xavatar.com $COL_RESET" + echo + echo + echo -e "$RED**************************************************$COL_RESET" + echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION!!! $COL_RESET" + echo -e "$RED**************************************************$COL_RESET" + echo + echo From a9060f7f915e070bffc12f077b26cf46744c6cec Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 10:57:15 +0200 Subject: [PATCH 295/360] test --- test/{install-test2 => install-test2.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/{install-test2 => install-test2.sh} (100%) diff --git a/test/install-test2 b/test/install-test2.sh similarity index 100% rename from test/install-test2 rename to test/install-test2.sh From cc000ced35f8abbdffb6bfb17fc218e4788d71b3 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 11:00:10 +0200 Subject: [PATCH 296/360] test install 2 --- test/install-test2.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/test/install-test2.sh b/test/install-test2.sh index 6cf42547..58e51136 100644 --- a/test/install-test2.sh +++ b/test/install-test2.sh @@ -200,21 +200,21 @@ # Installing Package to compile crypto currency - echo - echo - echo -e "$CYAN => Installing Package to compile crypto currency $COL_RESET" - echo - sleep 3 + #echo + #echo + #echo -e "$CYAN => Installing Package to compile crypto currency $COL_RESET" + #echo + #sleep 3 - apt_install software-properties-common build-essential - apt_install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext - apt_install libminiupnpc10 libzmq5 - apt_install libcanberra-gtk-module libqrencode-dev libzmq3-dev - apt_install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler - hide_output sudo add-apt-repository -y ppa:bitcoin/bitcoin - hide_output sudo apt -y update - apt_install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ - echo -e "$GREEN Done...$COL_RESET" + #apt_install software-properties-common build-essential + #apt_install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext + #apt_install libminiupnpc10 libzmq5 + #apt_install libcanberra-gtk-module libqrencode-dev libzmq3-dev + #apt_install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler + #hide_output sudo add-apt-repository -y ppa:bitcoin/bitcoin + #hide_output sudo apt -y update + #apt_install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ + #echo -e "$GREEN Done...$COL_RESET" # Generating Random Passwords @@ -1176,7 +1176,7 @@ sudo systemctl restart php7.3-fpm.service sudo systemctl status php7.3-fpm | sed -n "1,3p" - (crontab -l 2>/dev/null; echo "@reboot sleep 20 && /etc/screen-scrypt.sh") | crontab - + #(crontab -l 2>/dev/null; echo "@reboot sleep 20 && /etc/screen-scrypt.sh") | crontab - echo From 8d23fd83a55cdf0a629b4caf31b02c15b510b606 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 12:21:45 +0200 Subject: [PATCH 297/360] fix error screen main --- test/install-test2.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/install-test2.sh b/test/install-test2.sh index 58e51136..fd6a4433 100644 --- a/test/install-test2.sh +++ b/test/install-test2.sh @@ -1168,6 +1168,9 @@ sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* + sudo sed -i 's/service $webserver start/sudo service $webserver start/g' /var/web/yaamp/modules/thread/CronjobController.php + sudo sed -i 's/service nginx stop/sudo service nginx stop/g' /var/web/yaamp/modules/thread/CronjobController.php + sudo systemctl restart cron.service sudo systemctl restart mysql sudo systemctl status mysql | sed -n "1,3p" From ab0990ecb90a9b14bcf86f8242ccf15cadd64dd9 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 12:25:28 +0200 Subject: [PATCH 298/360] add information --- test/install-test2.sh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/test/install-test2.sh b/test/install-test2.sh index fd6a4433..a98b3fd2 100644 --- a/test/install-test2.sh +++ b/test/install-test2.sh @@ -1157,20 +1157,17 @@ sudo chmod 775 /var/yiimp -R - #sudo mkdir /root/backup/ - #sudo chmod 775 /root/backup - #sudo chown -R www-data:www-data /var/web - #sudo chmod -R 775 /var/web - #sudo chmod -R 775 /var/www/$server_name/html - #sudo chmod -R 775 /var/web/yaamp/runtime - #sudo chmod -R 775 /var/web/serverconfig.php - sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* - + + #fix error screen main sudo sed -i 's/service $webserver start/sudo service $webserver start/g' /var/web/yaamp/modules/thread/CronjobController.php sudo sed -i 's/service nginx stop/sudo service nginx stop/g' /var/web/yaamp/modules/thread/CronjobController.php + #add screen script to crontab + (crontab -l 2>/dev/null; echo "@reboot sleep 20 && /etc/screen-scrypt.sh") | crontab - + + #Restart main service sudo systemctl restart cron.service sudo systemctl restart mysql sudo systemctl status mysql | sed -n "1,3p" @@ -1179,7 +1176,7 @@ sudo systemctl restart php7.3-fpm.service sudo systemctl status php7.3-fpm | sed -n "1,3p" - #(crontab -l 2>/dev/null; echo "@reboot sleep 20 && /etc/screen-scrypt.sh") | crontab - + echo From 9e5614b9432481fbaacb878e9664c93cb7eb4f75 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 13:04:38 +0200 Subject: [PATCH 299/360] add no passwd sudo --- test/install-test2.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/install-test2.sh b/test/install-test2.sh index a98b3fd2..4a239985 100644 --- a/test/install-test2.sh +++ b/test/install-test2.sh @@ -29,7 +29,16 @@ echo exit 1; } + + #Add user group sudo + no password + whoami=`whoami` + sudo usermod -aG sudo ${whoami} + echo '# yiimp + # It needs passwordless sudo functionality. + '""''"${whoami}"''""' ALL=(ALL) NOPASSWD:ALL + ' | sudo -E tee /etc/sudoers.d/${whoami} >/dev/null 2>&1 + sudo cp -r conf/functions.sh /etc/ sudo cp -r conf/editconf.py /usr/bin/ sudo chmod +x /usr/bin/editconf.py From 1a96ef9aa1505f66982e0a4511ab690fc81c1303 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 15:12:05 +0200 Subject: [PATCH 300/360] some fix (add crontab screen-scrypt,error save sql frontend...) --- test/install-test.sh | 69 ++++++++++++++++++++++--------------------- test/install-test2.sh | 3 +- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 23c4ea4a..17d1930e 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -7,12 +7,11 @@ # # Program: # Install yiimp on Ubuntu 16.04/18.04 running Nginx, MariaDB, and php7.3 -# +# v0.2 # ################################################################################ ### Variable ### - githubrepo=https://github.com/tpruvot/yiimp.git githubrepotpruvot=https://github.com/tpruvot/yiimp.git githubrepoKudaraidee=https://github.com/Kudaraidee/yiimp.git @@ -29,17 +28,25 @@ echo exit 1; } + + #Add user group sudo + no password + whoami=`whoami` + sudo usermod -aG sudo ${whoami} + echo '# yiimp + # It needs passwordless sudo functionality. + '""''"${whoami}"''""' ALL=(ALL) NOPASSWD:ALL + ' | sudo -E tee /etc/sudoers.d/${whoami} >/dev/null 2>&1 + #Copy needed files sudo cp -r conf/functions.sh /etc/ + sudo cp -r conf/screen-scrypt.sh /etc/ sudo cp -r conf/editconf.py /usr/bin/ sudo chmod +x /usr/bin/editconf.py - - sudo cp -r conf/screen-scrypt.sh /etc/ sudo chmod +x /etc/screen-scrypt.sh - source /etc/functions.sh + clear echo echo -e "$GREEN************************************************************************$COL_RESET" @@ -85,6 +92,7 @@ read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC #read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel read -e -p "Enter the Public IP of the system you will use to access the admin panel (http://www.whatsmyip.org/) : " Public + read -e -p "Enter desired Yiimp GitHub (1=tpruvot or 2 Kudaraidee) [1 by default] : " yiimpver read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban read -e -p "Install UFW and configure ports? [Y/n] : " UFW read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install @@ -357,23 +365,17 @@ echo sleep 3 - #echo " " - #echo -e "Choose your Yiimp Version : " - #echo -e "1 : xiaolin1579 (last update : April 2020)" - #echo -e "2 : tpruvot (Official YiimP, last update : Sept 2019)" - #read -e -p "Enter desired version : 1 or 2 [1 by default] : " yiimpver - # Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` # Compil Blocknotify cd ~ - #if [[ ($yiimpver == "2") ]];then - hide_output git clone $githubrepo - #else - #hide_output git clone $githubrepoKudaraidee - #fi + if [[ ("$yiimpver" == "1" || "$yiimpver" == "") ]];then + hide_output git clone $githubrepotpruvot + else + hide_output git clone $githubrepoKudaraidee + fi cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp hide_output sudo make @@ -993,12 +995,12 @@ sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql - #if [[ ($yiimpver == "2") ]];then + if [[ ("$yiimpver" == "2") ]];then echo -e "$GREEN Done...$COL_RESET" - #else - #sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql - #echo -e "$GREEN Done...$COL_RESET" - #fi + else + sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql + echo -e "$GREEN Done...$COL_RESET" + fi # Generating a basic Yiimp serverconfig.php @@ -1154,22 +1156,23 @@ sudo chgrp www-data /var/stratum -R sudo chmod 775 /var/stratum - sudo mkdir -p /var/yiimp/sauv + sudo mkdir -p /var/yiimp/script sudo chgrp www-data /var/yiimp -R sudo chmod 775 /var/yiimp -R - - - #sudo mkdir /root/backup/ - #sudo chmod 775 /root/backup - #sudo chown -R www-data:www-data /var/web - #sudo chmod -R 775 /var/web - #sudo chmod -R 775 /var/www/$server_name/html - #sudo chmod -R 775 /var/web/yaamp/runtime - #sudo chmod -R 775 /var/web/serverconfig.php - + + + #Add to contrab screen-scrypt + (crontab -l 2>/dev/null; echo "@reboot sleep 20 && /etc/screen-scrypt.sh") | crontab - + + #fix error screen main + sudo sed -i 's/service $webserver start/sudo service $webserver start/g' /var/web/yaamp/modules/thread/CronjobController.php + sudo sed -i 's/service nginx stop/sudo service nginx stop/g' /var/web/yaamp/modules/thread/CronjobController.php + + #Misc sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* + #Restart service sudo systemctl restart cron.service sudo systemctl restart mysql sudo systemctl status mysql | sed -n "1,3p" @@ -1178,8 +1181,6 @@ sudo systemctl restart php7.3-fpm.service sudo systemctl status php7.3-fpm | sed -n "1,3p" - (crontab -l 2>/dev/null; echo "@reboot sleep 20 && /etc/screen-scrypt.sh") | crontab - - echo echo -e "$GREEN Done...$COL_RESET" diff --git a/test/install-test2.sh b/test/install-test2.sh index 4a239985..98866ff0 100644 --- a/test/install-test2.sh +++ b/test/install-test2.sh @@ -12,7 +12,6 @@ ################################################################################ ### Variable ### - githubrepo=https://github.com/tpruvot/yiimp.git githubrepotpruvot=https://github.com/tpruvot/yiimp.git githubrepoKudaraidee=https://github.com/Kudaraidee/yiimp.git @@ -379,7 +378,7 @@ # Compil Blocknotify cd ~ #if [[ ($yiimpver == "2") ]];then - hide_output git clone $githubrepo + hide_output git clone $githubrepotpruvot #else #hide_output git clone $githubrepoKudaraidee #fi From ab80d1dc57d6a6c15c58d5898f1dc0c88596f674 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 15:19:46 +0200 Subject: [PATCH 301/360] fix typo --- test/install-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/install-test.sh b/test/install-test.sh index 17d1930e..55d9574d 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -92,7 +92,7 @@ read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC #read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel read -e -p "Enter the Public IP of the system you will use to access the admin panel (http://www.whatsmyip.org/) : " Public - read -e -p "Enter desired Yiimp GitHub (1=tpruvot or 2 Kudaraidee) [1 by default] : " yiimpver + read -e -p "Enter desired Yiimp GitHub (1=tpruvot or 2=Kudaraidee) [1 by default] : " yiimpver read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban read -e -p "Install UFW and configure ports? [Y/n] : " UFW read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install From 17c0a263f1ceaf002ff2d1dec4f572ccab0b72b6 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 15:31:18 +0200 Subject: [PATCH 302/360] fix error rep sauv sql --- test/install-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/install-test.sh b/test/install-test.sh index 55d9574d..8de2eb41 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -1156,7 +1156,7 @@ sudo chgrp www-data /var/stratum -R sudo chmod 775 /var/stratum - sudo mkdir -p /var/yiimp/script + sudo mkdir -p /var/yiimp/sauv sudo chgrp www-data /var/yiimp -R sudo chmod 775 /var/yiimp -R From 6ac55858dabae6f610f8026f7f9054d9c3476783 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 16:49:05 +0200 Subject: [PATCH 303/360] remove choice yiimp --- test/install-test.sh | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index 8de2eb41..aac9a99f 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -12,8 +12,9 @@ ################################################################################ ### Variable ### - githubrepotpruvot=https://github.com/tpruvot/yiimp.git - githubrepoKudaraidee=https://github.com/Kudaraidee/yiimp.git + githubrepo=https://github.com/tpruvot/yiimp.git + githubyiimptpruvot=https://github.com/tpruvot/yiimp.git + githubyiimpKudaraidee=https://github.com/Kudaraidee/yiimp.git output() { @@ -92,7 +93,7 @@ read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC #read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel read -e -p "Enter the Public IP of the system you will use to access the admin panel (http://www.whatsmyip.org/) : " Public - read -e -p "Enter desired Yiimp GitHub (1=tpruvot or 2=Kudaraidee) [1 by default] : " yiimpver + #read -e -p "Enter desired Yiimp GitHub (1=tpruvot or 2=Kudaraidee) [1 by default] : " yiimpver read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban read -e -p "Install UFW and configure ports? [Y/n] : " UFW read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install @@ -371,11 +372,11 @@ # Compil Blocknotify cd ~ - if [[ ("$yiimpver" == "1" || "$yiimpver" == "") ]];then - hide_output git clone $githubrepotpruvot - else - hide_output git clone $githubrepoKudaraidee - fi + #if [[ ("$yiimpver" == "1" || "$yiimpver" == "") ]];then + hide_output git clone $githubrepo + #else + #hide_output git clone $githubrepoKudaraidee + #fi cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp hide_output sudo make @@ -995,12 +996,12 @@ sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql - if [[ ("$yiimpver" == "2") ]];then - echo -e "$GREEN Done...$COL_RESET" - else - sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql + #if [[ ("$yiimpver" == "2") ]];then echo -e "$GREEN Done...$COL_RESET" - fi + #else + #sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql + #echo -e "$GREEN Done...$COL_RESET" + #fi # Generating a basic Yiimp serverconfig.php From fdfbc0240efcaf267c0e2313b0ac74d34fe79307 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 17:18:57 +0200 Subject: [PATCH 304/360] fix typo --- test/install-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/install-test.sh b/test/install-test.sh index aac9a99f..77266a2b 100644 --- a/test/install-test.sh +++ b/test/install-test.sh @@ -1198,10 +1198,10 @@ echo echo echo -e "$CYAN Whew that was fun, just some reminders. $COL_RESET" - echo -e "$RED Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins. $COL_RESET" + echo -e "$RED Your mysql information is saved in ~/.my.cnf. $COL_RESET" echo - echo -e "$RED Yiimp at : http://"$server_name "(https... if SSL enabled)" - echo -e "$RED Yiimp Panel Admin at : http://"$server_name"/site/"AdminPanel "(https... if SSL enabled)" + echo -e "$RED Yiimp at : http://"$server_name" (https... if SSL enabled)" + echo -e "$RED Yiimp Admin at : http://"$server_name"/site/AdminPanel (https... if SSL enabled)" echo -e "$RED Yiimp phpMyAdmin at : http://"$server_name"/phpmyadmin (https... if SSL enabled)" echo echo -e "$RED If you want change 'AdminPanel' to access Panel Admin : Edit this file : /var/web/yaamp/modules/site/SiteController.php" From 6bf5fb8e78f530a68bc8ce6451e68eb94dea9545 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 17:34:27 +0200 Subject: [PATCH 305/360] misc --- README.md | 2 +- test/install-test2.sh | 1225 ----------------------------------------- 2 files changed, 1 insertion(+), 1226 deletions(-) delete mode 100644 test/install-test2.sh diff --git a/README.md b/README.md index 127ac234..04b3e9fc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yiimp_install_scrypt (update Avril, 2020) +# Yiimp_install_scrypt v0.1 (update Avril, 2020) Site : https://www.xavatar.com diff --git a/test/install-test2.sh b/test/install-test2.sh deleted file mode 100644 index 98866ff0..00000000 --- a/test/install-test2.sh +++ /dev/null @@ -1,1225 +0,0 @@ -#!/bin/bash -################################################################################ -# Original Author: crombiecrunch -# Fork Author: manfromafar -# Current Author: Xavatar (https://github.com/xavatar/yiimp_install_scrypt) -# Web: https://www.xavatar.com -# -# Program: -# Install yiimp on Ubuntu 16.04/18.04 running Nginx, MariaDB, and php7.3 -# -# -################################################################################ - - ### Variable ### - githubrepotpruvot=https://github.com/tpruvot/yiimp.git - githubrepoKudaraidee=https://github.com/Kudaraidee/yiimp.git - - - output() { - printf "\E[0;33;40m" - echo $1 - printf "\E[0m" - } - - displayErr() { - echo - echo $1; - echo - exit 1; - } - - #Add user group sudo + no password - whoami=`whoami` - sudo usermod -aG sudo ${whoami} - echo '# yiimp - # It needs passwordless sudo functionality. - '""''"${whoami}"''""' ALL=(ALL) NOPASSWD:ALL - ' | sudo -E tee /etc/sudoers.d/${whoami} >/dev/null 2>&1 - - - sudo cp -r conf/functions.sh /etc/ - sudo cp -r conf/editconf.py /usr/bin/ - sudo chmod +x /usr/bin/editconf.py - - sudo cp -r conf/screen-scrypt.sh /etc/ - sudo chmod +x /etc/screen-scrypt.sh - - - source /etc/functions.sh - - clear - echo - echo -e "$GREEN************************************************************************$COL_RESET" - echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" - echo -e "$GREEN Install yiimp on Ubuntu 16.04/18.04 running Nginx, MariaDB, and php7.3 $COL_RESET" - echo -e "$GREEN************************************************************************$COL_RESET" - echo - sleep 3 - - - # Update package and Upgrade Ubuntu - echo - echo - echo -e "$CYAN => Updating system and installing required packages :$COL_RESET" - echo - sleep 3 - - hide_output sudo apt -y update - hide_output sudo apt -y upgrade - hide_output sudo apt -y autoremove - apt_install dialog python3 python3-pip acl nano apt-transport-https - echo -e "$GREEN Done...$COL_RESET" - - - source conf/prerequisite.sh - sleep 3 - source conf/getip.sh - - - echo 'PUBLIC_IP='"${PUBLIC_IP}"' - PUBLIC_IPV6='"${PUBLIC_IPV6}"' - DISTRO='"${DISTRO}"' - PRIVATE_IP='"${PRIVATE_IP}"'' | sudo -E tee conf/pool.conf >/dev/null 2>&1 - - echo - echo - echo -e "$RED Make sure you double check before hitting enter! Only one shot at these! $COL_RESET" - echo - #read -e -p "Enter time zone (e.g. America/New_York) : " TIME - read -e -p "Domain Name (no http:// or www. just : example.com or pool.example.com or 185.22.24.26) : " server_name - read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain - read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL - read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC - #read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel - read -e -p "Enter the Public IP of the system you will use to access the admin panel (http://www.whatsmyip.org/) : " Public - read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban - read -e -p "Install UFW and configure ports? [Y/n] : " UFW - read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install - - - # Switch Aptitude - #echo - #echo -e "$CYAN Switching to Aptitude $COL_RESET" - #echo - #sleep 3 - #apt_install aptitude - #echo -e "$GREEN Done...$COL_RESET $COL_RESET" - - - # Installing Nginx - echo - echo - echo -e "$CYAN => Installing Nginx server : $COL_RESET" - echo - sleep 3 - - if [ -f /usr/sbin/apache2 ]; then - echo -e "Removing apache..." - hide_output apt-get -y purge apache2 apache2-* - hide_output apt-get -y --purge autoremove - fi - - apt_install nginx - hide_output sudo rm /etc/nginx/sites-enabled/default - hide_output sudo systemctl start nginx.service - hide_output sudo systemctl enable nginx.service - hide_output sudo systemctl start cron.service - hide_output sudo systemctl enable cron.service - sudo systemctl status nginx | sed -n "1,3p" - echo - echo -e "$GREEN Done...$COL_RESET" - - - # Making Nginx a bit hard - echo 'map $http_user_agent $blockedagent { - default 0; - ~*malicious 1; - ~*bot 1; - ~*backdoor 1; - ~*crawler 1; - ~*bandit 1; - } - ' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 - - - # Installing Mariadb - echo - echo - echo -e "$CYAN => Installing Mariadb Server : $COL_RESET" - echo - sleep 3 - - # Create random password - rootpasswd=$(openssl rand -base64 12) - export DEBIAN_FRONTEND="noninteractive" - apt_install mariadb-server - hide_output sudo systemctl start mysql - hide_output sudo systemctl enable mysql - sudo systemctl status mysql | sed -n "1,3p" - echo - echo -e "$GREEN Done...$COL_RESET" - - - # Installing Installing php7.3 - echo - echo - echo -e "$CYAN => Installing php7.3 : $COL_RESET" - echo - sleep 3 - - source conf/pool.conf - if [ ! -f /etc/apt/sources.list.d/ondrej-php-bionic.list ]; then - hide_output sudo add-apt-repository -y ppa:ondrej/php - fi - hide_output sudo apt -y update - - if [[ ("$DISTRO" == "16") ]]; then - apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ - php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ - php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring - #hide_output sudo phpenmod mcrypt - #hide_output sudo phpenmod mbstring - else - apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ - php7.3-cgi php-pear imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ - php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring \ - libpsl-dev libnghttp2-dev - fi - sleep 5 - hide_output sudo systemctl start php7.3-fpm - sudo systemctl status php7.3-fpm | sed -n "1,3p" - echo - echo -e "$GREEN Done...$COL_RESET" - - - # Installing other needed files - echo - echo - echo -e "$CYAN => Installing other needed files : $COL_RESET" - echo - sleep 3 - - apt_install libgmp3-dev libmysqlclient-dev libcurl4-gnutls-dev libkrb5-dev libldap2-dev libidn11-dev gnutls-dev \ - librtmp-dev sendmail mutt screen git - apt_install pwgen -y - echo -e "$GREEN Done...$COL_RESET" - sleep 3 - - - # Installing Package to compile crypto currency - #echo - #echo - #echo -e "$CYAN => Installing Package to compile crypto currency $COL_RESET" - #echo - #sleep 3 - - #apt_install software-properties-common build-essential - #apt_install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext - #apt_install libminiupnpc10 libzmq5 - #apt_install libcanberra-gtk-module libqrencode-dev libzmq3-dev - #apt_install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler - #hide_output sudo add-apt-repository -y ppa:bitcoin/bitcoin - #hide_output sudo apt -y update - #apt_install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ - #echo -e "$GREEN Done...$COL_RESET" - - - # Generating Random Passwords - password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` - password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` - AUTOGENERATED_PASS=`pwgen -c -1 20` - - - # Test Email - echo - echo - echo -e "$CYAN => Testing to see if server emails are sent $COL_RESET" - echo - sleep 3 - - if [[ "$root_email" != "" ]]; then - echo $root_email > sudo tee --append ~/.email - echo $root_email > sudo tee --append ~/.forward - - if [[ ("$send_email" == "y" || "$send_email" == "Y" || "$send_email" == "") ]]; then - echo "This is a mail test for the SMTP Service." > sudo tee --append /tmp/email.message - echo "You should receive this !" >> sudo tee --append /tmp/email.message - echo "" >> sudo tee --append /tmp/email.message - echo "Cheers" >> sudo tee --append /tmp/email.message - sudo sendmail -s "SMTP Testing" $root_email < sudo tee --append /tmp/email.message - - sudo rm -f /tmp/email.message - echo "Mail sent" - fi - fi - echo -e "$GREEN Done...$COL_RESET" - - # Installing Fail2Ban & UFW - echo - echo - echo -e "$CYAN => Some optional installs (Fail2Ban & UFW) $COL_RESET" - echo - sleep 3 - - - if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then - apt_install fail2ban - sudo systemctl status fail2ban | sed -n "1,3p" - fi - - - if [[ ("$UFW" == "y" || "$UFW" == "Y" || "$UFW" == "") ]]; then - apt_install ufw - hide_output sudo ufw default deny incoming - hide_output sudo ufw default allow outgoing - hide_output sudo ufw allow ssh - hide_output sudo ufw allow http - hide_output sudo ufw allow https - hide_output sudo ufw allow 3333/tcp - hide_output sudo ufw allow 3339/tcp - hide_output sudo ufw allow 3334/tcp - hide_output sudo ufw allow 3433/tcp - hide_output sudo ufw allow 3555/tcp - hide_output sudo ufw allow 3556/tcp - hide_output sudo ufw allow 3573/tcp - hide_output sudo ufw allow 3535/tcp - hide_output sudo ufw allow 3533/tcp - hide_output sudo ufw allow 3553/tcp - hide_output sudo ufw allow 3633/tcp - hide_output sudo ufw allow 3733/tcp - hide_output sudo ufw allow 3636/tcp - hide_output sudo ufw allow 3737/tcp - hide_output sudo ufw allow 3739/tcp - hide_output sudo ufw allow 3747/tcp - hide_output sudo ufw allow 3833/tcp - hide_output sudo ufw allow 3933/tcp - hide_output sudo ufw allow 4033/tcp - hide_output sudo ufw allow 4133/tcp - hide_output sudo ufw allow 4233/tcp - hide_output sudo ufw allow 4234/tcp - hide_output sudo ufw allow 4333/tcp - hide_output sudo ufw allow 4433/tcp - hide_output sudo ufw allow 4533/tcp - hide_output sudo ufw allow 4553/tcp - hide_output sudo ufw allow 4633/tcp - hide_output sudo ufw allow 4733/tcp - hide_output sudo ufw allow 4833/tcp - hide_output sudo ufw allow 4933/tcp - hide_output sudo ufw allow 5033/tcp - hide_output sudo ufw allow 5133/tcp - hide_output sudo ufw allow 5233/tcp - hide_output sudo ufw allow 5333/tcp - hide_output sudo ufw allow 5433/tcp - hide_output sudo ufw allow 5533/tcp - hide_output sudo ufw allow 5733/tcp - hide_output sudo ufw allow 5743/tcp - hide_output sudo ufw allow 3252/tcp - hide_output sudo ufw allow 5755/tcp - hide_output sudo ufw allow 5766/tcp - hide_output sudo ufw allow 5833/tcp - hide_output sudo ufw allow 5933/tcp - hide_output sudo ufw allow 6033/tcp - hide_output sudo ufw allow 5034/tcp - hide_output sudo ufw allow 6133/tcp - hide_output sudo ufw allow 6233/tcp - hide_output sudo ufw allow 6333/tcp - hide_output sudo ufw allow 6433/tcp - hide_output sudo ufw allow 7433/tcp - hide_output sudo ufw allow 8333/tcp - hide_output sudo ufw allow 8463/tcp - hide_output sudo ufw allow 8433/tcp - hide_output sudo ufw allow 8533/tcp - hide_output sudo ufw --force enable - sudo systemctl status ufw | sed -n "1,3p" - fi - - - echo - echo -e "$GREEN Done...$COL_RESET" - - - # Installing PhpMyAdmin - echo - echo - echo -e "$CYAN => Installing phpMyAdmin $COL_RESET" - echo - sleep 3 - - echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections - echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | sudo debconf-set-selections - echo "phpmyadmin phpmyadmin/mysql/admin-user string root" | sudo debconf-set-selections - echo "phpmyadmin phpmyadmin/mysql/admin-pass password $rootpasswd" | sudo debconf-set-selections - echo "phpmyadmin phpmyadmin/mysql/app-pass password $AUTOGENERATED_PASS" | sudo debconf-set-selections - echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections - apt_install phpmyadmin - echo -e "$GREEN Done...$COL_RESET" - - - # Installing Yiimp - echo - echo - echo -e "$CYAN => Installing Yiimp $COL_RESET" - echo - echo -e "Grabbing yiimp fron Github, building files and setting file structure." - echo - sleep 3 - - #echo " " - #echo -e "Choose your Yiimp Version : " - #echo -e "1 : xiaolin1579 (last update : April 2020)" - #echo -e "2 : tpruvot (Official YiimP, last update : Sept 2019)" - #read -e -p "Enter desired version : 1 or 2 [1 by default] : " yiimpver - - - # Generating Random Password for stratum - blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` - - # Compil Blocknotify - cd ~ - #if [[ ($yiimpver == "2") ]];then - hide_output git clone $githubrepotpruvot - #else - #hide_output git clone $githubrepoKudaraidee - #fi - cd $HOME/yiimp/blocknotify - sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp - hide_output sudo make - - # Compil iniparser - cd $HOME/yiimp/stratum/iniparser - hide_output sudo make - - # Compil Stratum - cd $HOME/yiimp/stratum - if [[ ("$BTC" == "y" || "$BTC" == "Y") ]]; then - sudo sed -i 's/CFLAGS += -DNO_EXCHANGE/#CFLAGS += -DNO_EXCHANGE/' $HOME/yiimp/stratum/Makefile - fi - hide_output sudo make - - # Copy Files (Blocknotify,iniparser,Stratum) - cd $HOME/yiimp - sudo sed -i 's/AdminRights/'AdminPanel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php - sudo cp -r $HOME/yiimp/web /var/ - sudo mkdir -p /var/stratum - cd $HOME/yiimp/stratum - sudo cp -a config.sample/. /var/stratum/config - sudo cp -r stratum /var/stratum - sudo cp -r run.sh /var/stratum - cd $HOME/yiimp - sudo cp -r $HOME/yiimp/bin/. /bin/ - sudo cp -r $HOME/yiimp/blocknotify/blocknotify /usr/bin/ - sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum/ - sudo mkdir -p /etc/yiimp - sudo mkdir -p /$HOME/backup/ - #fixing yiimp - sudo sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp - #fixing run.sh - sudo rm -r /var/stratum/config/run.sh - echo ' - #!/bin/bash - ulimit -n 10240 - ulimit -u 10240 - cd /var/stratum - while true; do - ./stratum /var/stratum/config/$1 - sleep 2 - done - exec bash - ' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 - sudo chmod +x /var/stratum/config/run.sh - - echo -e "$GREEN Done...$COL_RESET" - - - # Update Timezone - echo - echo - echo -e "$CYAN => Update default timezone. $COL_RESET" - echo - - # Check if link file - #sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime - # Update time zone - #sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime - #apt_install ntpdate - # Write time to clock. - #sudo hwclock -w - #echo -e "$GREEN Done...$COL_RESET" - - echo -e " Setting TimeZone to UTC...$COL_RESET" - if [ ! -f /etc/timezone ]; then - echo "Setting timezone to UTC." - echo "Etc/UTC" > sudo /etc/timezone - sudo systemctl restart rsyslog - fi - sudo systemctl status rsyslog | sed -n "1,3p" - echo - echo -e "$GREEN Done...$COL_RESET" - - - # Making Web Server Magic Happen - #echo - #echo -e "$CYAN Making Web Server Magic Happen! $COL_RESET" - #echo - - # Adding user to group, creating dir structure, setting permissions - #sudo mkdir -p /var/www/$server_name/html - - - # Creating webserver initial config file - echo - echo - echo -e "$CYAN => Creating webserver initial config file $COL_RESET" - echo - - # Adding user to group, creating dir structure, setting permissions - sudo mkdir -p /var/www/$server_name/html - - if [[ ("$sub_domain" == "y" || "$sub_domain" == "Y") ]]; then - echo 'include /etc/nginx/blockuseragents.rules; - server { - if ($blockedagent) { - return 403; - } - if ($request_method !~ ^(GET|HEAD|POST)$) { - return 444; - } - listen 80; - listen [::]:80; - server_name '"${server_name}"'; - root "/var/www/'"${server_name}"'/html/web"; - index index.html index.htm index.php; - charset utf-8; - - location / { - try_files $uri $uri/ /index.php?$args; - } - location @rewrite { - rewrite ^/(.*)$ /index.php?r=$1; - } - - location = /favicon.ico { access_log off; log_not_found off; } - location = /robots.txt { access_log off; log_not_found off; } - - access_log /var/log/nginx/'"${server_name}"'.app-access.log; - error_log /var/log/nginx/'"${server_name}"'.app-error.log; - - # allow larger file uploads and longer script runtimes - client_body_buffer_size 50k; - client_header_buffer_size 50k; - client_max_body_size 50k; - large_client_header_buffers 2 50k; - sendfile off; - - location ~ ^/index\.php$ { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_intercept_errors off; - fastcgi_buffer_size 16k; - fastcgi_buffers 4 16k; - fastcgi_connect_timeout 300; - fastcgi_send_timeout 300; - fastcgi_read_timeout 300; - try_files $uri $uri/ =404; - } - location ~ \.php$ { - return 404; - } - location ~ \.sh { - return 404; - } - location ~ /\.ht { - deny all; - } - location ~ /.well-known { - allow all; - } - location /phpmyadmin { - root /usr/share/; - index index.php; - try_files $uri $uri/ =404; - location ~ ^/phpmyadmin/(doc|sql|setup)/ { - deny all; - } - location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.3-fpm.sock; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include fastcgi_params; - include snippets/fastcgi-php.conf; - } - } - } - ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 - - sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf - sudo ln -s /var/web /var/www/$server_name/html - hide_output sudo systemctl reload php7.3-fpm.service - hide_output sudo systemctl restart nginx.service - echo -e "$GREEN Done...$COL_RESET" - - if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then - - - # Install SSL (with SubDomain) - echo - echo -e "Install LetsEncrypt and setting SSL (with SubDomain)" - echo - - apt_install letsencrypt - sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" - sudo rm /etc/nginx/sites-available/$server_name.conf - sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 - # I am SSL Man! - echo 'include /etc/nginx/blockuseragents.rules; - server { - if ($blockedagent) { - return 403; - } - if ($request_method !~ ^(GET|HEAD|POST)$) { - return 444; - } - listen 80; - listen [::]:80; - server_name '"${server_name}"'; - # enforce https - return 301 https://$server_name$request_uri; - } - - server { - if ($blockedagent) { - return 403; - } - if ($request_method !~ ^(GET|HEAD|POST)$) { - return 444; - } - listen 443 ssl http2; - listen [::]:443 ssl http2; - server_name '"${server_name}"'; - - root /var/www/'"${server_name}"'/html/web; - index index.php; - - access_log /var/log/nginx/'"${server_name}"'.app-access.log; - error_log /var/log/nginx/'"${server_name}"'.app-error.log; - - # allow larger file uploads and longer script runtimes - client_body_buffer_size 50k; - client_header_buffer_size 50k; - client_max_body_size 50k; - large_client_header_buffers 2 50k; - sendfile off; - - # strengthen ssl security - ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; - ssl_dhparam /etc/ssl/certs/dhparam.pem; - - # Add headers to serve security related headers - add_header Strict-Transport-Security "max-age=15768000; preload;"; - add_header X-Content-Type-Options nosniff; - add_header X-XSS-Protection "1; mode=block"; - add_header X-Robots-Tag none; - add_header Content-Security-Policy "frame-ancestors 'self'"; - - location / { - try_files $uri $uri/ /index.php?$args; - } - location @rewrite { - rewrite ^/(.*)$ /index.php?r=$1; - } - - - location ~ ^/index\.php$ { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_intercept_errors off; - fastcgi_buffer_size 16k; - fastcgi_buffers 4 16k; - fastcgi_connect_timeout 300; - fastcgi_send_timeout 300; - fastcgi_read_timeout 300; - include /etc/nginx/fastcgi_params; - try_files $uri $uri/ =404; - } - location ~ \.php$ { - return 404; - } - location ~ \.sh { - return 404; - } - - location ~ /\.ht { - deny all; - } - location /phpmyadmin { - root /usr/share/; - index index.php; - try_files $uri $uri/ =404; - location ~ ^/phpmyadmin/(doc|sql|setup)/ { - deny all; - } - location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.3-fpm.sock; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include fastcgi_params; - include snippets/fastcgi-php.conf; - } - } - } - - ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 - fi - - hide_output sudo systemctl reload php7.3-fpm.service - hide_output sudo systemctl restart nginx.service - echo -e "$GREEN Done...$COL_RESET" - - - else - echo 'include /etc/nginx/blockuseragents.rules; - server { - if ($blockedagent) { - return 403; - } - if ($request_method !~ ^(GET|HEAD|POST)$) { - return 444; - } - listen 80; - listen [::]:80; - server_name '"${server_name}"' www.'"${server_name}"'; - root "/var/www/'"${server_name}"'/html/web"; - index index.html index.htm index.php; - charset utf-8; - - location / { - try_files $uri $uri/ /index.php?$args; - } - location @rewrite { - rewrite ^/(.*)$ /index.php?r=$1; - } - - location = /favicon.ico { access_log off; log_not_found off; } - location = /robots.txt { access_log off; log_not_found off; } - - access_log /var/log/nginx/'"${server_name}"'.app-access.log; - error_log /var/log/nginx/'"${server_name}"'.app-error.log; - - # allow larger file uploads and longer script runtimes - client_body_buffer_size 50k; - client_header_buffer_size 50k; - client_max_body_size 50k; - large_client_header_buffers 2 50k; - sendfile off; - - location ~ ^/index\.php$ { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_intercept_errors off; - fastcgi_buffer_size 16k; - fastcgi_buffers 4 16k; - fastcgi_connect_timeout 300; - fastcgi_send_timeout 300; - fastcgi_read_timeout 300; - try_files $uri $uri/ =404; - } - location ~ \.php$ { - return 404; - } - location ~ \.sh { - return 404; - } - location ~ /\.ht { - deny all; - } - location ~ /.well-known { - allow all; - } - location /phpmyadmin { - root /usr/share/; - index index.php; - try_files $uri $uri/ =404; - location ~ ^/phpmyadmin/(doc|sql|setup)/ { - deny all; - } - location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.3-fpm.sock; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include fastcgi_params; - include snippets/fastcgi-php.conf; - } - } - } - ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 - - sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf - sudo ln -s /var/web /var/www/$server_name/html - hide_output sudo systemctl reload php7.3-fpm.service - hide_output sudo systemctl restart nginx.service - echo -e "$GREEN Done...$COL_RESET" - - - if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then - - # Install SSL (without SubDomain) - echo - echo -e "Install LetsEncrypt and setting SSL (without SubDomain)" - echo - sleep 3 - - apt_install letsencrypt - sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" - sudo rm /etc/nginx/sites-available/$server_name.conf - sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 - # I am SSL Man! - echo 'include /etc/nginx/blockuseragents.rules; - server { - if ($blockedagent) { - return 403; - } - if ($request_method !~ ^(GET|HEAD|POST)$) { - return 444; - } - listen 80; - listen [::]:80; - server_name '"${server_name}"'; - # enforce https - return 301 https://$server_name$request_uri; - } - - server { - if ($blockedagent) { - return 403; - } - if ($request_method !~ ^(GET|HEAD|POST)$) { - return 444; - } - listen 443 ssl http2; - listen [::]:443 ssl http2; - server_name '"${server_name}"' www.'"${server_name}"'; - - root /var/www/'"${server_name}"'/html/web; - index index.php; - - access_log /var/log/nginx/'"${server_name}"'.app-access.log; - error_log /var/log/nginx/'"${server_name}"'.app-error.log; - - # allow larger file uploads and longer script runtimes - client_body_buffer_size 50k; - client_header_buffer_size 50k; - client_max_body_size 50k; - large_client_header_buffers 2 50k; - sendfile off; - - # strengthen ssl security - ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; - ssl_dhparam /etc/ssl/certs/dhparam.pem; - - # Add headers to serve security related headers - add_header Strict-Transport-Security "max-age=15768000; preload;"; - add_header X-Content-Type-Options nosniff; - add_header X-XSS-Protection "1; mode=block"; - add_header X-Robots-Tag none; - add_header Content-Security-Policy "frame-ancestors 'self'"; - - location / { - try_files $uri $uri/ /index.php?$args; - } - location @rewrite { - rewrite ^/(.*)$ /index.php?r=$1; - } - - - location ~ ^/index\.php$ { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_intercept_errors off; - fastcgi_buffer_size 16k; - fastcgi_buffers 4 16k; - fastcgi_connect_timeout 300; - fastcgi_send_timeout 300; - fastcgi_read_timeout 300; - include /etc/nginx/fastcgi_params; - try_files $uri $uri/ =404; - } - location ~ \.php$ { - return 404; - } - location ~ \.sh { - return 404; - } - - location ~ /\.ht { - deny all; - } - location /phpmyadmin { - root /usr/share/; - index index.php; - try_files $uri $uri/ =404; - location ~ ^/phpmyadmin/(doc|sql|setup)/ { - deny all; - } - location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.3-fpm.sock; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include fastcgi_params; - include snippets/fastcgi-php.conf; - } - } - } - - ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 - - echo -e "$GREEN Done...$COL_RESET" - - fi - hide_output sudo systemctl reload php7.3-fpm.service - hide_output sudo systemctl restart nginx.service - fi - - - # Config Database - echo - echo - echo -e "$CYAN => Now for the database fun! $COL_RESET" - echo - sleep 3 - - # Create database - Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" - Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" - Q3="FLUSH PRIVILEGES;" - SQL="${Q1}${Q2}${Q3}" - sudo mysql -u root -p="" -e "$SQL" - - # Create stratum user - Q1="GRANT ALL ON *.* TO 'stratum'@'localhost' IDENTIFIED BY '$password2';" - Q2="FLUSH PRIVILEGES;" - SQL="${Q1}${Q2}" - sudo mysql -u root -p="" -e "$SQL" - - #Create my.cnf - - echo ' - [clienthost1] - user=panel - password='"${password}"' - database=yiimpfrontend - host=localhost - [clienthost2] - user=stratum - password='"${password2}"' - database=yiimpfrontend - host=localhost - [myphpadmin] - user=phpmyadmin - password='"${AUTOGENERATED_PASS}"' - [mysql] - user=root - password='"${rootpasswd}"' - ' | sudo -E tee ~/.my.cnf >/dev/null 2>&1 - sudo chmod 0600 ~/.my.cnf - - - # Create keys file - echo ' - /dev/null 2>&1 - - echo -e "$GREEN Done...$COL_RESET" - - - # Peforming the SQL import - echo - echo - echo -e "$CYAN => Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you $COL_RESET" - echo - echo -e "Performing the SQL import" - echo - sleep 3 - - cd ~ - cd yiimp/sql - - # Import sql dump - sudo zcat 2016-04-03-yaamp.sql.gz | sudo mysql --defaults-group-suffix=host1 - - # Oh the humanity! - sudo mysql --defaults-group-suffix=host1 --force < 2016-04-24-market_history.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-04-27-settings.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-05-11-coins.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-05-15-benchmarks.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-05-23-bookmarks.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-06-01-notifications.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-06-04-bench_chips.sql - sudo mysql --defaults-group-suffix=host1 --force < 2016-11-23-coins.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-02-05-benchmarks.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-03-31-earnings_index.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-05-accounts_case_swaptime.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-06-payouts_coinid_memo.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-09-notifications.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-10-bookmarks.sql - sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql - sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql - sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql - #if [[ ($yiimpver == "2") ]];then - echo -e "$GREEN Done...$COL_RESET" - #else - #sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql - #echo -e "$GREEN Done...$COL_RESET" - #fi - - - # Generating a basic Yiimp serverconfig.php - echo - echo - echo -e "$CYAN => Generating a basic Yiimp serverconfig.php $COL_RESET" - echo - sleep 3 - - # Make config file - echo ' - 0.3 - define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); - - // nicehash keys deposit account & amount to deposit at a time - define('"'"'NICEHASH_API_KEY'"'"','"'"'f96c65a7-3d2f-4f3a-815c-cacf00674396'"'"'); - define('"'"'NICEHASH_API_ID'"'"','"'"'825979'"'"'); - define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3ABoqBjeorjzbyHmGMppM62YLssUgJhtuf'"'"'); - define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); - - $cold_wallet_table = array( - '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"' => 0.10, - ); - - // Sample fixed pool fees - $configFixedPoolFees = array( - '"'"'zr5'"'"' => 2.0, - '"'"'scrypt'"'"' => 20.0, - '"'"'sha256'"'"' => 5.0, - ); - - // Sample custom stratum ports - $configCustomPorts = array( - // '"'"'x11'"'"' => 7000, - ); - - // mBTC Coefs per algo (default is 1.0) - $configAlgoNormCoef = array( - // '"'"'x11'"'"' => 5.0, - ); - ' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 - - echo -e "$GREEN Done...$COL_RESET" - - - # Updating stratum config files with database connection info - echo - echo - echo -e "$CYAN => Updating stratum config files with database connection info. $COL_RESET" - echo - sleep 3 - - cd /var/stratum/config - sudo sed -i 's/password = tu8tu5/password = '$blckntifypass'/g' *.conf - sudo sed -i 's/server = yaamp.com/server = '$server_name'/g' *.conf - sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf - sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf - sudo sed -i 's/username = root/username = stratum/g' *.conf - sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf - cd ~ - echo -e "$GREEN Done...$COL_RESET" - - - # Final Directory permissions - echo - echo - echo -e "$CYAN => Final Directory permissions $COL_RESET" - echo - sleep 3 - - whoami=`whoami` - sudo usermod -aG www-data $whoami - sudo usermod -a -G www-data $whoami - - sudo find /var/web -type d -exec chmod 775 {} + - sudo find /var/web -type f -exec chmod 664 {} + - sudo chgrp www-data /var/web -R - sudo chmod g+w /var/web -R - - sudo mkdir /var/log/yiimp - sudo touch /var/log/yiimp/debug.log - sudo chgrp www-data /var/log/yiimp -R - sudo chmod 775 /var/log/yiimp -R - - sudo chgrp www-data /var/stratum -R - sudo chmod 775 /var/stratum - - sudo mkdir -p /var/yiimp/sauv - sudo chgrp www-data /var/yiimp -R - sudo chmod 775 /var/yiimp -R - - - sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder - sudo rm -rf /var/log/nginx/* - - #fix error screen main - sudo sed -i 's/service $webserver start/sudo service $webserver start/g' /var/web/yaamp/modules/thread/CronjobController.php - sudo sed -i 's/service nginx stop/sudo service nginx stop/g' /var/web/yaamp/modules/thread/CronjobController.php - - #add screen script to crontab - (crontab -l 2>/dev/null; echo "@reboot sleep 20 && /etc/screen-scrypt.sh") | crontab - - - #Restart main service - sudo systemctl restart cron.service - sudo systemctl restart mysql - sudo systemctl status mysql | sed -n "1,3p" - sudo systemctl restart nginx.service - sudo systemctl status nginx | sed -n "1,3p" - sudo systemctl restart php7.3-fpm.service - sudo systemctl status php7.3-fpm | sed -n "1,3p" - - - - - echo - echo -e "$GREEN Done...$COL_RESET" - sleep 3 - - echo - echo - echo - echo -e "$GREEN***************************$COL_RESET" - echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" - echo -e "$GREEN Finish !!! $COL_RESET" - echo -e "$GREEN***************************$COL_RESET" - echo - echo - echo - echo -e "$CYAN Whew that was fun, just some reminders. $COL_RESET" - echo -e "$RED Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins. $COL_RESET" - echo - echo -e "$RED Yiimp at : http://"$server_name "(https... if SSL enabled)" - echo -e "$RED Yiimp Panel Admin at : http://"$server_name"/site/"AdminPanel "(https... if SSL enabled)" - echo -e "$RED Yiimp phpMyAdmin at : http://"$server_name"/phpmyadmin (https... if SSL enabled)" - echo - echo -e "$RED If you want change 'AdminPanel' to access Panel Admin : Edit this file : /var/web/yaamp/modules/site/SiteController.php" - echo -e "$RED Line 11 => change 'AdminPanel' and use the new address" - echo - echo -e "$CYAN Please make sure to change your wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" - echo -e "$CYAN Please make sure to add your public and private keys. $COL_RESET" - echo - echo -e "$CYAN TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig $COL_RESET" - echo -e "$CYAN Xavatar WebSite : https://www.xavatar.com $COL_RESET" - echo - echo - echo -e "$RED**************************************************$COL_RESET" - echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION!!! $COL_RESET" - echo -e "$RED**************************************************$COL_RESET" - echo - echo From 9b7a3fd2353c10df326796a191bf12e727aaeeed Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 17:45:52 +0200 Subject: [PATCH 306/360] update readme --- Old/README-v0.1.md | 78 ++++++++++++++++++++++++++++++++++++++++++++++ README.md | 27 ++++++---------- 2 files changed, 88 insertions(+), 17 deletions(-) create mode 100644 Old/README-v0.1.md diff --git a/Old/README-v0.1.md b/Old/README-v0.1.md new file mode 100644 index 00000000..04b3e9fc --- /dev/null +++ b/Old/README-v0.1.md @@ -0,0 +1,78 @@ +# Yiimp_install_scrypt v0.1 (update Avril, 2020) + +Site : https://www.xavatar.com + +Discord : https://discord.gg/zcCXjkQ + +TUTO Youtube (16.04 - Without SSL) : https://www.youtube.com/watch?v=vdBCw6_cyig + +TUTO Youtube (16.04 - With SSL) : https://www.youtube.com/watch?v=fWwGow_i-Vw + +Official Yiimp (used in this script for Yiimp Installation): https://github.com/tpruvot/yiimp + +Install script for yiimp on Ubuntu 17.10 : https://github.com/xavatar/yiimp_install_scrypt_ubuntu17.10 + +Install script for yiimp on Ubuntu 18.04 : https://github.com/xavatar/yiimp_install_scrypt_ubuntu18.04 + + +*********************************** + +## Install script for yiimp on Ubuntu Server 16.04 + +USE THIS SCRIPT ON FRESH INSTALL UBUNTU Server 16.04 ! + +Connect on your VPS => +- adduser pool +- adduser pool sudo +- su - pool +- sudo apt-get -y install git +- git clone https://github.com/xavatar/yiimp_install_scrypt.git +- cd yiimp_install_scrypt/ +- sudo bash install.sh (Do not run the script as root) +- sudo bash screen-scrypt.sh (in tuto youtube, i launch the script with root... it does not matter) +- NOT MANDATORY => sudo bash screen-stratum.sh (CONFIGURE BEFORE START this script... add or remove algo you use). + +Finish ! +Go http://xxx.xxxxxx.xxx or https://xxx.xxxxxx.xxx (if you have chosen LetsEncrypt SSL). Enjoy ! + +###### :bangbang: **YOU MUST UPDATE THE FOLLOWING FILES :** +- **/var/web/serverconfig.php :** update this file to include your public ip (line = YAAMP_ADMIN_IP) to access the admin panel (Put your PERSONNAL IP, NOT IP of your VPS). update with public keys from exchanges. update with other information specific to your server.. +- **/etc/yiimp/keys.php :** update with secrect keys from the exchanges (not mandatory) + + +###### :bangbang: **IMPORTANT** : + +- The configuration of yiimp and coin require a minimum of knowledge in linux +- Your mysql information (login/Password) is saved in **~/.my.cnf** +- **If you reboot your VPS**, you must restart screen-scrypt.sh (or add crontab) +- Remember to restart **memcached service** after the db change (update or import new .sql) + +*********************************** + +###### This script has an interactive beginning and will ask for the following information : + +- Enter time zone +- Server Name +- Are you using a subdomain +- Enter support email +- Set stratum to AutoExchange +- New location for /site/adminRights +- Your Public IP for admin access (Put your PERSONNAL IP, NOT IP of your VPS) +- Install Fail2ban +- Install UFW and configure ports +- Install LetsEncrypt SSL + +*********************************** + +**This install script will get you 95% ready to go with yiimp. There are a few things you need to do after the main install is finished.** + +While I did add some server security to the script, it is every server owners responsibility to fully secure their own servers. After the installation you will still need to customize your serverconfig.php file to your liking, add your API keys, and build/add your coins to the control panel. + +There will be several wallets already in yiimp. These have nothing to do with the installation script and are from the database import from the yiimp github. + +If you need further assistance we have a small but growing discord channel at https://discord.gg/zcCXjkQ + +If this helped you or you feel giving please donate : +- BTC Donation : 1C1hnjk3WhuAvUN6Ny6LTxPD3rwSZwapW7 +- BCH Donation : 1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz +- ETH Donation : 0xc23E6902fF8Cd8878EDADE18Dc49B3505395F0a1 diff --git a/README.md b/README.md index 04b3e9fc..ebe3d063 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,34 @@ -# Yiimp_install_scrypt v0.1 (update Avril, 2020) +# Yiimp_install_scrypt v0.2 (update Avril, 2020) Site : https://www.xavatar.com Discord : https://discord.gg/zcCXjkQ -TUTO Youtube (16.04 - Without SSL) : https://www.youtube.com/watch?v=vdBCw6_cyig - -TUTO Youtube (16.04 - With SSL) : https://www.youtube.com/watch?v=fWwGow_i-Vw +TUTO Youtube (16.04 - Without SSL) : Soon... Official Yiimp (used in this script for Yiimp Installation): https://github.com/tpruvot/yiimp -Install script for yiimp on Ubuntu 17.10 : https://github.com/xavatar/yiimp_install_scrypt_ubuntu17.10 - -Install script for yiimp on Ubuntu 18.04 : https://github.com/xavatar/yiimp_install_scrypt_ubuntu18.04 +Original SCRIPT : https://github.com/cryptopool-builders/multipool_original_yiimp_installer *********************************** -## Install script for yiimp on Ubuntu Server 16.04 +## Install script for yiimp on Ubuntu Server 16.04 / 18.04 -USE THIS SCRIPT ON FRESH INSTALL UBUNTU Server 16.04 ! +USE THIS SCRIPT ON FRESH INSTALL UBUNTU Server 16.04 / 18.04 ! Connect on your VPS => - adduser pool - adduser pool sudo - su - pool -- sudo apt-get -y install git +- sudo apt -y install git - git clone https://github.com/xavatar/yiimp_install_scrypt.git - cd yiimp_install_scrypt/ -- sudo bash install.sh (Do not run the script as root) -- sudo bash screen-scrypt.sh (in tuto youtube, i launch the script with root... it does not matter) -- NOT MANDATORY => sudo bash screen-stratum.sh (CONFIGURE BEFORE START this script... add or remove algo you use). +- bash install.sh (DO NOT RUN THE SCRIPT AS ROOT or SUDO) +- At the end, you MUST REBOOT to finalize installation... Finish ! -Go http://xxx.xxxxxx.xxx or https://xxx.xxxxxx.xxx (if you have chosen LetsEncrypt SSL). Enjoy ! +Go http://xxx.xxx.xxx.xxx or https://xxx.xxx.xxx.xxx (if you have chosen LetsEncrypt SSL). Enjoy ! ###### :bangbang: **YOU MUST UPDATE THE FOLLOWING FILES :** - **/var/web/serverconfig.php :** update this file to include your public ip (line = YAAMP_ADMIN_IP) to access the admin panel (Put your PERSONNAL IP, NOT IP of your VPS). update with public keys from exchanges. update with other information specific to your server.. @@ -44,19 +39,17 @@ Go http://xxx.xxxxxx.xxx or https://xxx.xxxxxx.xxx (if you have chosen LetsEncry - The configuration of yiimp and coin require a minimum of knowledge in linux - Your mysql information (login/Password) is saved in **~/.my.cnf** -- **If you reboot your VPS**, you must restart screen-scrypt.sh (or add crontab) - Remember to restart **memcached service** after the db change (update or import new .sql) +- NOT MANDATORY => sudo bash screen-stratum.sh (CONFIGURE BEFORE START this script... add or remove algo you use). *********************************** ###### This script has an interactive beginning and will ask for the following information : -- Enter time zone - Server Name - Are you using a subdomain - Enter support email - Set stratum to AutoExchange -- New location for /site/adminRights - Your Public IP for admin access (Put your PERSONNAL IP, NOT IP of your VPS) - Install Fail2ban - Install UFW and configure ports From bb912bae19d24d4a7df513f20bdf015f03487895 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 17:46:55 +0200 Subject: [PATCH 307/360] modif readme --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index ebe3d063..01cd5600 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,6 @@ Go http://xxx.xxx.xxx.xxx or https://xxx.xxx.xxx.xxx (if you have chosen LetsEnc - The configuration of yiimp and coin require a minimum of knowledge in linux - Your mysql information (login/Password) is saved in **~/.my.cnf** - Remember to restart **memcached service** after the db change (update or import new .sql) -- NOT MANDATORY => sudo bash screen-stratum.sh (CONFIGURE BEFORE START this script... add or remove algo you use). *********************************** From 992ea7670e25a28e6bdf70fa2f527726b4c64e0c Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 17:50:09 +0200 Subject: [PATCH 308/360] update arbo --- {test/conf => conf}/coin.list | 0 {test/conf => conf}/delcoin.sh | 0 {test/conf => conf}/editconf.py | 0 {test/conf => conf}/functions.sh | 0 {test/conf => conf}/getip.sh | 0 {test/conf => conf}/prerequisite.sh | 0 screen-scrypt.sh => conf/screen-scrypt.sh | 0 install.sh | 1033 ++++++++++-------- {Old => old}/README-v0.1.md | 0 test/install-test.sh => old/install.sh | 1033 ++++++++---------- test/conf/screen-scrypt.sh | 13 - compil.sh => utils/compil.sh | 0 packagecompil.sh => utils/packagecompil.sh | 0 screen-stratum.sh => utils/screen-stratum.sh | 0 14 files changed, 1033 insertions(+), 1046 deletions(-) rename {test/conf => conf}/coin.list (100%) rename {test/conf => conf}/delcoin.sh (100%) rename {test/conf => conf}/editconf.py (100%) rename {test/conf => conf}/functions.sh (100%) rename {test/conf => conf}/getip.sh (100%) rename {test/conf => conf}/prerequisite.sh (100%) rename screen-scrypt.sh => conf/screen-scrypt.sh (100%) rename {Old => old}/README-v0.1.md (100%) rename test/install-test.sh => old/install.sh (50%) delete mode 100644 test/conf/screen-scrypt.sh rename compil.sh => utils/compil.sh (100%) rename packagecompil.sh => utils/packagecompil.sh (100%) rename screen-stratum.sh => utils/screen-stratum.sh (100%) diff --git a/test/conf/coin.list b/conf/coin.list similarity index 100% rename from test/conf/coin.list rename to conf/coin.list diff --git a/test/conf/delcoin.sh b/conf/delcoin.sh similarity index 100% rename from test/conf/delcoin.sh rename to conf/delcoin.sh diff --git a/test/conf/editconf.py b/conf/editconf.py similarity index 100% rename from test/conf/editconf.py rename to conf/editconf.py diff --git a/test/conf/functions.sh b/conf/functions.sh similarity index 100% rename from test/conf/functions.sh rename to conf/functions.sh diff --git a/test/conf/getip.sh b/conf/getip.sh similarity index 100% rename from test/conf/getip.sh rename to conf/getip.sh diff --git a/test/conf/prerequisite.sh b/conf/prerequisite.sh similarity index 100% rename from test/conf/prerequisite.sh rename to conf/prerequisite.sh diff --git a/screen-scrypt.sh b/conf/screen-scrypt.sh similarity index 100% rename from screen-scrypt.sh rename to conf/screen-scrypt.sh diff --git a/install.sh b/install.sh index 9d145fa6..77266a2b 100644 --- a/install.sh +++ b/install.sh @@ -3,155 +3,227 @@ # Original Author: crombiecrunch # Fork Author: manfromafar # Current Author: Xavatar (https://github.com/xavatar/yiimp_install_scrypt) -# Web: https://www.xavatar.com +# Web: https://www.xavatar.com # # Program: -# Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.0 -# +# Install yiimp on Ubuntu 16.04/18.04 running Nginx, MariaDB, and php7.3 +# v0.2 # ################################################################################ -output() { + + ### Variable ### + githubrepo=https://github.com/tpruvot/yiimp.git + githubyiimptpruvot=https://github.com/tpruvot/yiimp.git + githubyiimpKudaraidee=https://github.com/Kudaraidee/yiimp.git + + + output() { printf "\E[0;33;40m" echo $1 printf "\E[0m" -} + } -displayErr() { + displayErr() { echo echo $1; echo exit 1; -} + } + + #Add user group sudo + no password + whoami=`whoami` + sudo usermod -aG sudo ${whoami} + echo '# yiimp + # It needs passwordless sudo functionality. + '""''"${whoami}"''""' ALL=(ALL) NOPASSWD:ALL + ' | sudo -E tee /etc/sudoers.d/${whoami} >/dev/null 2>&1 + + #Copy needed files + sudo cp -r conf/functions.sh /etc/ + sudo cp -r conf/screen-scrypt.sh /etc/ + sudo cp -r conf/editconf.py /usr/bin/ + sudo chmod +x /usr/bin/editconf.py + sudo chmod +x /etc/screen-scrypt.sh + + source /etc/functions.sh + + clear - output " " - output "Yiimp Install Script v0.1" - output "Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.0" - output " " + echo + echo -e "$GREEN************************************************************************$COL_RESET" + echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" + echo -e "$GREEN Install yiimp on Ubuntu 16.04/18.04 running Nginx, MariaDB, and php7.3 $COL_RESET" + echo -e "$GREEN************************************************************************$COL_RESET" + echo sleep 3 - - output " " - output " " - output "Make sure you double check before hitting enter! Only one shot at these!" - output " " - read -e -p "Enter time zone (e.g. America/New_York) : " TIME - read -e -p "Server name (no http:// or www. just : example.com or pool.example.com) : " server_name + + + # Update package and Upgrade Ubuntu + echo + echo + echo -e "$CYAN => Updating system and installing required packages :$COL_RESET" + echo + sleep 3 + + hide_output sudo apt -y update + hide_output sudo apt -y upgrade + hide_output sudo apt -y autoremove + apt_install dialog python3 python3-pip acl nano apt-transport-https + echo -e "$GREEN Done...$COL_RESET" + + + source conf/prerequisite.sh + sleep 3 + source conf/getip.sh + + + echo 'PUBLIC_IP='"${PUBLIC_IP}"' + PUBLIC_IPV6='"${PUBLIC_IPV6}"' + DISTRO='"${DISTRO}"' + PRIVATE_IP='"${PRIVATE_IP}"'' | sudo -E tee conf/pool.conf >/dev/null 2>&1 + + echo + echo + echo -e "$RED Make sure you double check before hitting enter! Only one shot at these! $COL_RESET" + echo + #read -e -p "Enter time zone (e.g. America/New_York) : " TIME + read -e -p "Domain Name (no http:// or www. just : example.com or pool.example.com or 185.22.24.26) : " server_name read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC - read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel + #read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel read -e -p "Enter the Public IP of the system you will use to access the admin panel (http://www.whatsmyip.org/) : " Public + #read -e -p "Enter desired Yiimp GitHub (1=tpruvot or 2=Kudaraidee) [1 by default] : " yiimpver read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban read -e -p "Install UFW and configure ports? [Y/n] : " UFW read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install - # Update package and Upgrade Ubuntu - output " " - output "Updating system and installing required packages." - output " " - sleep 3 - - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get -y autoremove - - # Switch Aptitude - output " " - output "Switching to Aptitude" - output " " - sleep 3 - - sudo apt-get -y install aptitude - - + #echo + #echo -e "$CYAN Switching to Aptitude $COL_RESET" + #echo + #sleep 3 + #apt_install aptitude + #echo -e "$GREEN Done...$COL_RESET $COL_RESET" + + # Installing Nginx - output " " - output "Installing Nginx server." - output " " + echo + echo + echo -e "$CYAN => Installing Nginx server : $COL_RESET" + echo sleep 3 - sudo aptitude -y install nginx - sudo rm /etc/nginx/sites-enabled/default - sudo systemctl start nginx.service - sudo systemctl enable nginx.service - sudo systemctl start cron.service - sudo systemctl enable cron.service + if [ -f /usr/sbin/apache2 ]; then + echo -e "Removing apache..." + hide_output apt-get -y purge apache2 apache2-* + hide_output apt-get -y --purge autoremove + fi + + apt_install nginx + hide_output sudo rm /etc/nginx/sites-enabled/default + hide_output sudo systemctl start nginx.service + hide_output sudo systemctl enable nginx.service + hide_output sudo systemctl start cron.service + hide_output sudo systemctl enable cron.service + sudo systemctl status nginx | sed -n "1,3p" + echo + echo -e "$GREEN Done...$COL_RESET" # Making Nginx a bit hard echo 'map $http_user_agent $blockedagent { -default 0; -~*malicious 1; -~*bot 1; -~*backdoor 1; -~*crawler 1; -~*bandit 1; -} -' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 + default 0; + ~*malicious 1; + ~*bot 1; + ~*backdoor 1; + ~*crawler 1; + ~*bandit 1; + } + ' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 # Installing Mariadb - output " " - output "Installing Mariadb Server." - output " " + echo + echo + echo -e "$CYAN => Installing Mariadb Server : $COL_RESET" + echo sleep 3 # Create random password rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" - sudo aptitude -y install mariadb-server - sudo systemctl start mysql - sudo systemctl enable mysql - + apt_install mariadb-server + hide_output sudo systemctl start mysql + hide_output sudo systemctl enable mysql + sudo systemctl status mysql | sed -n "1,3p" + echo + echo -e "$GREEN Done...$COL_RESET" + - # Installing Installing php7.x - output " " - output "Installing php7.x" - output " " + # Installing Installing php7.3 + echo + echo + echo -e "$CYAN => Installing php7.3 : $COL_RESET" + echo sleep 3 - sudo aptitude -y install php7.0-fpm - sudo aptitude -y install php7.0-opcache php7.0-fpm php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring - sudo phpenmod mcrypt - sudo phpenmod mbstring - sudo systemctl start php7.0-fpm.service - + source conf/pool.conf + if [ ! -f /etc/apt/sources.list.d/ondrej-php-bionic.list ]; then + hide_output sudo add-apt-repository -y ppa:ondrej/php + fi + hide_output sudo apt -y update + + if [[ ("$DISTRO" == "16") ]]; then + apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ + php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ + php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring + #hide_output sudo phpenmod mcrypt + #hide_output sudo phpenmod mbstring + else + apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ + php7.3-cgi php-pear imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ + php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring \ + libpsl-dev libnghttp2-dev + fi + sleep 5 + hide_output sudo systemctl start php7.3-fpm + sudo systemctl status php7.3-fpm | sed -n "1,3p" + echo + echo -e "$GREEN Done...$COL_RESET" + # Installing other needed files - output " " - output "Installing other needed files" - output " " + echo + echo + echo -e "$CYAN => Installing other needed files : $COL_RESET" + echo sleep 3 - sudo aptitude -y install libgmp3-dev - sudo aptitude -y install libmysqlclient-dev - sudo aptitude -y install libcurl4-gnutls-dev - sudo aptitude -y install libkrb5-dev - sudo aptitude -y install libldap2-dev - sudo aptitude -y install libidn11-dev - sudo aptitude -y install gnutls-dev - sudo aptitude -y install librtmp-dev - sudo aptitude -y install sendmail - sudo aptitude -y install mutt - sudo aptitude -y install git screen - sudo aptitude -y install pwgen -y - + apt_install libgmp3-dev libmysqlclient-dev libcurl4-gnutls-dev libkrb5-dev libldap2-dev libidn11-dev gnutls-dev \ + librtmp-dev sendmail mutt screen git + apt_install pwgen -y + echo -e "$GREEN Done...$COL_RESET" + sleep 3 + # Installing Package to compile crypto currency - output " " - output "Installing Package to compile crypto currency" - output " " + echo + echo + echo -e "$CYAN => Installing Package to compile crypto currency $COL_RESET" + echo sleep 3 - sudo aptitude -y install software-properties-common build-essential - sudo aptitude -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext - sudo aptitude -y install libminiupnpc10 libzmq5 - sudo aptitude -y install libcanberra-gtk-module libqrencode-dev libzmq3-dev - sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler - sudo add-apt-repository -y ppa:bitcoin/bitcoin - sudo apt-get -y update - sudo apt-get install -y libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ + apt_install software-properties-common build-essential + apt_install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext + apt_install libminiupnpc10 libzmq5 + apt_install libcanberra-gtk-module libqrencode-dev libzmq3-dev + apt_install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler + hide_output sudo add-apt-repository -y ppa:bitcoin/bitcoin + hide_output sudo apt -y update + apt_install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ + echo -e "$GREEN Done...$COL_RESET" # Generating Random Passwords @@ -161,9 +233,10 @@ default 0; # Test Email - output " " - output "Testing to see if server emails are sent" - output " " + echo + echo + echo -e "$CYAN => Testing to see if server emails are sent $COL_RESET" + echo sleep 3 if [[ "$root_email" != "" ]]; then @@ -181,87 +254,97 @@ default 0; echo "Mail sent" fi fi - + echo -e "$GREEN Done...$COL_RESET" # Installing Fail2Ban & UFW - output " " - output "Some optional installs (Fail2Ban & UFW)" - output " " + echo + echo + echo -e "$CYAN => Some optional installs (Fail2Ban & UFW) $COL_RESET" + echo sleep 3 if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then - sudo aptitude -y install fail2ban - fi + apt_install fail2ban + sudo systemctl status fail2ban | sed -n "1,3p" + fi + + if [[ ("$UFW" == "y" || "$UFW" == "Y" || "$UFW" == "") ]]; then - sudo apt-get install ufw - sudo ufw default deny incoming - sudo ufw default allow outgoing - sudo ufw allow ssh - sudo ufw allow http - sudo ufw allow https - sudo ufw allow 3333/tcp - sudo ufw allow 3339/tcp - sudo ufw allow 3334/tcp - sudo ufw allow 3433/tcp - sudo ufw allow 3555/tcp - sudo ufw allow 3556/tcp - sudo ufw allow 3573/tcp - sudo ufw allow 3535/tcp - sudo ufw allow 3533/tcp - sudo ufw allow 3553/tcp - sudo ufw allow 3633/tcp - sudo ufw allow 3733/tcp - sudo ufw allow 3636/tcp - sudo ufw allow 3737/tcp - sudo ufw allow 3739/tcp - sudo ufw allow 3747/tcp - sudo ufw allow 3833/tcp - sudo ufw allow 3933/tcp - sudo ufw allow 4033/tcp - sudo ufw allow 4133/tcp - sudo ufw allow 4233/tcp - sudo ufw allow 4234/tcp - sudo ufw allow 4333/tcp - sudo ufw allow 4433/tcp - sudo ufw allow 4533/tcp - sudo ufw allow 4553/tcp - sudo ufw allow 4633/tcp - sudo ufw allow 4733/tcp - sudo ufw allow 4833/tcp - sudo ufw allow 4933/tcp - sudo ufw allow 5033/tcp - sudo ufw allow 5133/tcp - sudo ufw allow 5233/tcp - sudo ufw allow 5333/tcp - sudo ufw allow 5433/tcp - sudo ufw allow 5533/tcp - sudo ufw allow 5733/tcp - sudo ufw allow 5743/tcp - sudo ufw allow 3252/tcp - sudo ufw allow 5755/tcp - sudo ufw allow 5766/tcp - sudo ufw allow 5833/tcp - sudo ufw allow 5933/tcp - sudo ufw allow 6033/tcp - sudo ufw allow 5034/tcp - sudo ufw allow 6133/tcp - sudo ufw allow 6233/tcp - sudo ufw allow 6333/tcp - sudo ufw allow 6433/tcp - sudo ufw allow 7433/tcp - sudo ufw allow 8333/tcp - sudo ufw allow 8463/tcp - sudo ufw allow 8433/tcp - sudo ufw allow 8533/tcp - sudo ufw --force enable + apt_install ufw + hide_output sudo ufw default deny incoming + hide_output sudo ufw default allow outgoing + hide_output sudo ufw allow ssh + hide_output sudo ufw allow http + hide_output sudo ufw allow https + hide_output sudo ufw allow 3333/tcp + hide_output sudo ufw allow 3339/tcp + hide_output sudo ufw allow 3334/tcp + hide_output sudo ufw allow 3433/tcp + hide_output sudo ufw allow 3555/tcp + hide_output sudo ufw allow 3556/tcp + hide_output sudo ufw allow 3573/tcp + hide_output sudo ufw allow 3535/tcp + hide_output sudo ufw allow 3533/tcp + hide_output sudo ufw allow 3553/tcp + hide_output sudo ufw allow 3633/tcp + hide_output sudo ufw allow 3733/tcp + hide_output sudo ufw allow 3636/tcp + hide_output sudo ufw allow 3737/tcp + hide_output sudo ufw allow 3739/tcp + hide_output sudo ufw allow 3747/tcp + hide_output sudo ufw allow 3833/tcp + hide_output sudo ufw allow 3933/tcp + hide_output sudo ufw allow 4033/tcp + hide_output sudo ufw allow 4133/tcp + hide_output sudo ufw allow 4233/tcp + hide_output sudo ufw allow 4234/tcp + hide_output sudo ufw allow 4333/tcp + hide_output sudo ufw allow 4433/tcp + hide_output sudo ufw allow 4533/tcp + hide_output sudo ufw allow 4553/tcp + hide_output sudo ufw allow 4633/tcp + hide_output sudo ufw allow 4733/tcp + hide_output sudo ufw allow 4833/tcp + hide_output sudo ufw allow 4933/tcp + hide_output sudo ufw allow 5033/tcp + hide_output sudo ufw allow 5133/tcp + hide_output sudo ufw allow 5233/tcp + hide_output sudo ufw allow 5333/tcp + hide_output sudo ufw allow 5433/tcp + hide_output sudo ufw allow 5533/tcp + hide_output sudo ufw allow 5733/tcp + hide_output sudo ufw allow 5743/tcp + hide_output sudo ufw allow 3252/tcp + hide_output sudo ufw allow 5755/tcp + hide_output sudo ufw allow 5766/tcp + hide_output sudo ufw allow 5833/tcp + hide_output sudo ufw allow 5933/tcp + hide_output sudo ufw allow 6033/tcp + hide_output sudo ufw allow 5034/tcp + hide_output sudo ufw allow 6133/tcp + hide_output sudo ufw allow 6233/tcp + hide_output sudo ufw allow 6333/tcp + hide_output sudo ufw allow 6433/tcp + hide_output sudo ufw allow 7433/tcp + hide_output sudo ufw allow 8333/tcp + hide_output sudo ufw allow 8463/tcp + hide_output sudo ufw allow 8433/tcp + hide_output sudo ufw allow 8533/tcp + hide_output sudo ufw --force enable + sudo systemctl status ufw | sed -n "1,3p" fi + + echo + echo -e "$GREEN Done...$COL_RESET" + # Installing PhpMyAdmin - output " " - output "Installing phpmyadmin" - output " " + echo + echo + echo -e "$CYAN => Installing phpMyAdmin $COL_RESET" + echo sleep 3 echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections @@ -270,43 +353,48 @@ default 0; echo "phpmyadmin phpmyadmin/mysql/admin-pass password $rootpasswd" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/mysql/app-pass password $AUTOGENERATED_PASS" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections - sudo aptitude -y install phpmyadmin + apt_install phpmyadmin + echo -e "$GREEN Done...$COL_RESET" # Installing Yiimp - output " " - output " Installing Yiimp" - output " " - output "Grabbing yiimp fron Github, building files and setting file structure." - output " " + echo + echo + echo -e "$CYAN => Installing Yiimp $COL_RESET" + echo + echo -e "Grabbing yiimp fron Github, building files and setting file structure." + echo sleep 3 - + # Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` # Compil Blocknotify cd ~ - git clone https://github.com/tpruvot/yiimp.git + #if [[ ("$yiimpver" == "1" || "$yiimpver" == "") ]];then + hide_output git clone $githubrepo + #else + #hide_output git clone $githubrepoKudaraidee + #fi cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp - sudo make + hide_output sudo make # Compil iniparser cd $HOME/yiimp/stratum/iniparser - sudo make + hide_output sudo make # Compil Stratum cd $HOME/yiimp/stratum if [[ ("$BTC" == "y" || "$BTC" == "Y") ]]; then sudo sed -i 's/CFLAGS += -DNO_EXCHANGE/#CFLAGS += -DNO_EXCHANGE/' $HOME/yiimp/stratum/Makefile - sudo make fi - sudo make + hide_output sudo make # Copy Files (Blocknotify,iniparser,Stratum) cd $HOME/yiimp - sudo sed -i 's/AdminRights/'$admin_panel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php + sudo sed -i 's/AdminRights/'AdminPanel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php sudo cp -r $HOME/yiimp/web /var/ sudo mkdir -p /var/stratum cd $HOME/yiimp/stratum @@ -324,49 +412,65 @@ default 0; #fixing run.sh sudo rm -r /var/stratum/config/run.sh echo ' -#!/bin/bash -ulimit -n 10240 -ulimit -u 10240 -cd /var/stratum -while true; do -./stratum /var/stratum/config/$1 -sleep 2 -done -exec bash -' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 + #!/bin/bash + ulimit -n 10240 + ulimit -u 10240 + cd /var/stratum + while true; do + ./stratum /var/stratum/config/$1 + sleep 2 + done + exec bash + ' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 sudo chmod +x /var/stratum/config/run.sh + echo -e "$GREEN Done...$COL_RESET" + # Update Timezone - output " " - output "Update default timezone." - output " " + echo + echo + echo -e "$CYAN => Update default timezone. $COL_RESET" + echo # Check if link file - sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime - + #sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime # Update time zone - sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime - sudo aptitude -y install ntpdate - + #sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime + #apt_install ntpdate # Write time to clock. - sudo hwclock -w + #sudo hwclock -w + #echo -e "$GREEN Done...$COL_RESET" + + echo -e " Setting TimeZone to UTC...$COL_RESET" + if [ ! -f /etc/timezone ]; then + echo "Setting timezone to UTC." + echo "Etc/UTC" > sudo /etc/timezone + sudo systemctl restart rsyslog + fi + sudo systemctl status rsyslog | sed -n "1,3p" + echo + echo -e "$GREEN Done...$COL_RESET" # Making Web Server Magic Happen - output " " - output "Making Web Server Magic Happen!" - output " " + #echo + #echo -e "$CYAN Making Web Server Magic Happen! $COL_RESET" + #echo # Adding user to group, creating dir structure, setting permissions - sudo mkdir -p /var/www/$server_name/html + #sudo mkdir -p /var/www/$server_name/html # Creating webserver initial config file - output " " - output "Creating webserver initial config file" - output " " + echo + echo + echo -e "$CYAN => Creating webserver initial config file $COL_RESET" + echo + # Adding user to group, creating dir structure, setting permissions + sudo mkdir -p /var/www/$server_name/html + if [[ ("$sub_domain" == "y" || "$sub_domain" == "Y") ]]; then echo 'include /etc/nginx/blockuseragents.rules; server { @@ -405,7 +509,7 @@ exec bash location ~ ^/index\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; @@ -435,30 +539,32 @@ exec bash try_files $uri $uri/ =404; location ~ ^/phpmyadmin/(doc|sql|setup)/ { deny all; - } + } location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; - } - } - } -' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + } + } + } + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - sudo systemctl reload php7.0-fpm.service - sudo systemctl restart nginx.service - + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + # Install SSL (with SubDomain) - output " " - output "Install LetsEncrypt and setting SSL (with SubDomain)" - output " " + echo + echo -e "Install LetsEncrypt and setting SSL (with SubDomain)" + echo - sudo aptitude -y install letsencrypt + apt_install letsencrypt sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 @@ -528,7 +634,7 @@ exec bash location ~ ^/index\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; @@ -559,19 +665,21 @@ exec bash deny all; } location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; - } - } - } + } + } + } -' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - sudo systemctl reload php7.0-fpm.service - sudo systemctl restart nginx.service + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" + else echo 'include /etc/nginx/blockuseragents.rules; @@ -611,7 +719,7 @@ exec bash location ~ ^/index\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; @@ -643,29 +751,31 @@ exec bash deny all; } location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; - } - } - } -' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + } + } + } + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - sudo systemctl reload php7.0-fpm.service - sudo systemctl restart nginx.service + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then # Install SSL (without SubDomain) - output " " - output "Install LetsEncrypt and setting SSL (without SubDomain)" - output " " + echo + echo -e "Install LetsEncrypt and setting SSL (without SubDomain)" + echo sleep 3 - sudo aptitude -y install letsencrypt + apt_install letsencrypt sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 @@ -735,7 +845,7 @@ exec bash location ~ ^/index\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; @@ -766,26 +876,29 @@ exec bash deny all; } location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; - } - } - } + } + } + } -' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 - + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + + echo -e "$GREEN Done...$COL_RESET" + fi - sudo systemctl reload php7.0-fpm.service - sudo systemctl restart nginx.service + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service fi # Config Database - output " " - output "Now for the database fun!" - output " " + echo + echo + echo -e "$CYAN => Now for the database fun! $COL_RESET" + echo sleep 3 # Create database @@ -803,56 +916,60 @@ exec bash #Create my.cnf - echo ' -[clienthost1] -user=panel -password='"${password}"' -database=yiimpfrontend -host=localhost -[clienthost2] -user=stratum -password='"${password2}"' -database=yiimpfrontend -host=localhost -[myphpadmin] -user=phpmyadmin -password='"${AUTOGENERATED_PASS}"' -[mysql] -user=root -password='"${rootpasswd}"' -' | sudo -E tee ~/.my.cnf >/dev/null 2>&1 + echo ' + [clienthost1] + user=panel + password='"${password}"' + database=yiimpfrontend + host=localhost + [clienthost2] + user=stratum + password='"${password2}"' + database=yiimpfrontend + host=localhost + [myphpadmin] + user=phpmyadmin + password='"${AUTOGENERATED_PASS}"' + [mysql] + user=root + password='"${rootpasswd}"' + ' | sudo -E tee ~/.my.cnf >/dev/null 2>&1 sudo chmod 0600 ~/.my.cnf + # Create keys file echo ' '"'"'); -define('"'"'EXCH_BITSTAMP_SECRET'"'"','"'"''"'"'); -define('"'"'EXCH_BLEUTRADE_SECRET'"'"', '"'"''"'"'); -define('"'"'EXCH_BTER_SECRET'"'"', '"'"''"'"'); -define('"'"'EXCH_CCEX_SECRET'"'"', '"'"''"'"'); -define('"'"'EXCH_COINMARKETS_PASS'"'"', '"'"''"'"'); -define('"'"'EXCH_CRYPTOPIA_SECRET'"'"', '"'"''"'"'); -define('"'"'EXCH_EMPOEX_SECKEY'"'"', '"'"''"'"'); -define('"'"'EXCH_HITBTC_SECRET'"'"', '"'"''"'"'); -define('"'"'EXCH_KRAKEN_SECRET'"'"','"'"''"'"'); -define('"'"'EXCH_LIVECOIN_SECRET'"'"', '"'"''"'"'); -define('"'"'EXCH_NOVA_SECRET'"'"','"'"''"'"'); -define('"'"'EXCH_POLONIEX_SECRET'"'"', '"'"''"'"'); -define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); -' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 - + /* Sample config file to put in /etc/yiimp/keys.php */ + define('"'"'YIIMP_MYSQLDUMP_USER'"'"', '"'"'panel'"'"'); + define('"'"'YIIMP_MYSQLDUMP_PASS'"'"', '"'"''"${password}"''"'"'); + /* Keys required to create/cancel orders and access your balances/deposit addresses */ + define('"'"'EXCH_BITTREX_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_BITSTAMP_SECRET'"'"','"'"''"'"'); + define('"'"'EXCH_BLEUTRADE_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_BTER_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_CCEX_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_COINMARKETS_PASS'"'"', '"'"''"'"'); + define('"'"'EXCH_CRYPTOPIA_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_EMPOEX_SECKEY'"'"', '"'"''"'"'); + define('"'"'EXCH_HITBTC_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_KRAKEN_SECRET'"'"','"'"''"'"'); + define('"'"'EXCH_LIVECOIN_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_NOVA_SECRET'"'"','"'"''"'"'); + define('"'"'EXCH_POLONIEX_SECRET'"'"', '"'"''"'"'); + define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); + ' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 + + echo -e "$GREEN Done...$COL_RESET" + # Peforming the SQL import - output " " - output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" - output " " - output "Peforming the SQL import" - output " " + echo + echo + echo -e "$CYAN => Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you $COL_RESET" + echo + echo -e "Performing the SQL import" + echo sleep 3 cd ~ @@ -879,119 +996,130 @@ define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql + #if [[ ("$yiimpver" == "2") ]];then + echo -e "$GREEN Done...$COL_RESET" + #else + #sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql + #echo -e "$GREEN Done...$COL_RESET" + #fi # Generating a basic Yiimp serverconfig.php - output " " - output "Generating a basic Yiimp serverconfig.php" - output " " + echo + echo + echo -e "$CYAN => Generating a basic Yiimp serverconfig.php $COL_RESET" + echo sleep 3 # Make config file -echo ' - 0.3 -define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); + echo ' + 0.3 + define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); + + // nicehash keys deposit account & amount to deposit at a time + define('"'"'NICEHASH_API_KEY'"'"','"'"'f96c65a7-3d2f-4f3a-815c-cacf00674396'"'"'); + define('"'"'NICEHASH_API_ID'"'"','"'"'825979'"'"'); + define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3ABoqBjeorjzbyHmGMppM62YLssUgJhtuf'"'"'); + define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); + + $cold_wallet_table = array( '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"' => 0.10, -); - -// Sample fixed pool fees -$configFixedPoolFees = array( + ); + + // Sample fixed pool fees + $configFixedPoolFees = array( '"'"'zr5'"'"' => 2.0, '"'"'scrypt'"'"' => 20.0, '"'"'sha256'"'"' => 5.0, -); - -// Sample custom stratum ports -$configCustomPorts = array( -// '"'"'x11'"'"' => 7000, -); + ); + + // Sample custom stratum ports + $configCustomPorts = array( + // '"'"'x11'"'"' => 7000, + ); + + // mBTC Coefs per algo (default is 1.0) + $configAlgoNormCoef = array( + // '"'"'x11'"'"' => 5.0, + ); + ' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 -// mBTC Coefs per algo (default is 1.0) -$configAlgoNormCoef = array( -// '"'"'x11'"'"' => 5.0, -); -' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 + echo -e "$GREEN Done...$COL_RESET" # Updating stratum config files with database connection info - output " " - output "Updating stratum config files with database connection info." - output " " + echo + echo + echo -e "$CYAN => Updating stratum config files with database connection info. $COL_RESET" + echo sleep 3 cd /var/stratum/config @@ -1002,69 +1130,92 @@ $configAlgoNormCoef = array( sudo sed -i 's/username = root/username = stratum/g' *.conf sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf cd ~ + echo -e "$GREEN Done...$COL_RESET" # Final Directory permissions - output " " - output "Final Directory permissions" - output " " + echo + echo + echo -e "$CYAN => Final Directory permissions $COL_RESET" + echo sleep 3 - #whoami=`whoami` - #sudo mkdir /root/backup/ - #sudo usermod -aG www-data $whoami - #sudo chown -R www-data:www-data /var/log - #sudo chown -R www-data:www-data /var/stratum - #sudo chown -R www-data:www-data /var/web - #sudo touch /var/log/debug.log - #sudo chown -R www-data:www-data /var/log/debug.log - #sudo chmod -R 775 /var/www/$server_name/html - #sudo chmod -R 775 /var/web - #sudo chmod -R 775 /var/stratum - #sudo chmod -R 775 /var/web/yaamp/runtime - #sudo chmod -R 664 /root/backup/ - #sudo chmod -R 644 /var/log/debug.log - #sudo chmod -R 775 /var/web/serverconfig.php - whoami=`whoami` sudo usermod -aG www-data $whoami sudo usermod -a -G www-data $whoami - sudo mkdir /root/backup/ + sudo find /var/web -type d -exec chmod 775 {} + + sudo find /var/web -type f -exec chmod 664 {} + + sudo chgrp www-data /var/web -R + sudo chmod g+w /var/web -R sudo mkdir /var/log/yiimp sudo touch /var/log/yiimp/debug.log - sudo chown -R www-data:www-data /var/log/yiimp - sudo chmod -R 775 /var/log/yiimp + sudo chgrp www-data /var/log/yiimp -R + sudo chmod 775 /var/log/yiimp -R - sudo chown -R www-data:www-data /var/stratum - sudo chmod -R 775 /var/stratum + sudo chgrp www-data /var/stratum -R + sudo chmod 775 /var/stratum - sudo chown -R www-data:www-data /var/web - sudo chmod -R 775 /var/web - sudo find /var/web -type d -exec chmod 755 {} + - sudo find /var/web -type f -exec chmod 664 {} + - sudo chgrp www-data /var/web -R - sudo chmod g+w /var/web -R + sudo mkdir -p /var/yiimp/sauv + sudo chgrp www-data /var/yiimp -R + sudo chmod 775 /var/yiimp -R + #Add to contrab screen-scrypt + (crontab -l 2>/dev/null; echo "@reboot sleep 20 && /etc/screen-scrypt.sh") | crontab - + + #fix error screen main + sudo sed -i 's/service $webserver start/sudo service $webserver start/g' /var/web/yaamp/modules/thread/CronjobController.php + sudo sed -i 's/service nginx stop/sudo service nginx stop/g' /var/web/yaamp/modules/thread/CronjobController.php + + #Misc sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* - sudo systemctl reload php7.0-fpm.service + #Restart service + sudo systemctl restart cron.service + sudo systemctl restart mysql + sudo systemctl status mysql | sed -n "1,3p" sudo systemctl restart nginx.service + sudo systemctl status nginx | sed -n "1,3p" + sudo systemctl restart php7.3-fpm.service + sudo systemctl status php7.3-fpm | sed -n "1,3p" + + echo + echo -e "$GREEN Done...$COL_RESET" + sleep 3 - output " " - output " " - output " " - output " " - output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." - output " " - output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." - output " " - output "Please make sure to add your public and private keys." - output " " - output "TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig" - output " " - output " " + echo + echo + echo + echo -e "$GREEN***************************$COL_RESET" + echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" + echo -e "$GREEN Finish !!! $COL_RESET" + echo -e "$GREEN***************************$COL_RESET" + echo + echo + echo + echo -e "$CYAN Whew that was fun, just some reminders. $COL_RESET" + echo -e "$RED Your mysql information is saved in ~/.my.cnf. $COL_RESET" + echo + echo -e "$RED Yiimp at : http://"$server_name" (https... if SSL enabled)" + echo -e "$RED Yiimp Admin at : http://"$server_name"/site/AdminPanel (https... if SSL enabled)" + echo -e "$RED Yiimp phpMyAdmin at : http://"$server_name"/phpmyadmin (https... if SSL enabled)" + echo + echo -e "$RED If you want change 'AdminPanel' to access Panel Admin : Edit this file : /var/web/yaamp/modules/site/SiteController.php" + echo -e "$RED Line 11 => change 'AdminPanel' and use the new address" + echo + echo -e "$CYAN Please make sure to change your wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" + echo -e "$CYAN Please make sure to add your public and private keys. $COL_RESET" + echo + echo -e "$CYAN TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig $COL_RESET" + echo -e "$CYAN Xavatar WebSite : https://www.xavatar.com $COL_RESET" + echo + echo + echo -e "$RED**************************************************$COL_RESET" + echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION!!! $COL_RESET" + echo -e "$RED**************************************************$COL_RESET" + echo + echo \ No newline at end of file diff --git a/Old/README-v0.1.md b/old/README-v0.1.md similarity index 100% rename from Old/README-v0.1.md rename to old/README-v0.1.md diff --git a/test/install-test.sh b/old/install.sh similarity index 50% rename from test/install-test.sh rename to old/install.sh index 77266a2b..9d145fa6 100644 --- a/test/install-test.sh +++ b/old/install.sh @@ -3,227 +3,155 @@ # Original Author: crombiecrunch # Fork Author: manfromafar # Current Author: Xavatar (https://github.com/xavatar/yiimp_install_scrypt) -# Web: https://www.xavatar.com +# Web: https://www.xavatar.com # # Program: -# Install yiimp on Ubuntu 16.04/18.04 running Nginx, MariaDB, and php7.3 -# v0.2 +# Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.0 +# # ################################################################################ - - ### Variable ### - githubrepo=https://github.com/tpruvot/yiimp.git - githubyiimptpruvot=https://github.com/tpruvot/yiimp.git - githubyiimpKudaraidee=https://github.com/Kudaraidee/yiimp.git - - - output() { +output() { printf "\E[0;33;40m" echo $1 printf "\E[0m" - } +} - displayErr() { +displayErr() { echo echo $1; echo exit 1; - } - - #Add user group sudo + no password - whoami=`whoami` - sudo usermod -aG sudo ${whoami} - echo '# yiimp - # It needs passwordless sudo functionality. - '""''"${whoami}"''""' ALL=(ALL) NOPASSWD:ALL - ' | sudo -E tee /etc/sudoers.d/${whoami} >/dev/null 2>&1 - - #Copy needed files - sudo cp -r conf/functions.sh /etc/ - sudo cp -r conf/screen-scrypt.sh /etc/ - sudo cp -r conf/editconf.py /usr/bin/ - sudo chmod +x /usr/bin/editconf.py - sudo chmod +x /etc/screen-scrypt.sh - - source /etc/functions.sh - - +} clear - echo - echo -e "$GREEN************************************************************************$COL_RESET" - echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" - echo -e "$GREEN Install yiimp on Ubuntu 16.04/18.04 running Nginx, MariaDB, and php7.3 $COL_RESET" - echo -e "$GREEN************************************************************************$COL_RESET" - echo - sleep 3 - - - # Update package and Upgrade Ubuntu - echo - echo - echo -e "$CYAN => Updating system and installing required packages :$COL_RESET" - echo - sleep 3 - - hide_output sudo apt -y update - hide_output sudo apt -y upgrade - hide_output sudo apt -y autoremove - apt_install dialog python3 python3-pip acl nano apt-transport-https - echo -e "$GREEN Done...$COL_RESET" - - - source conf/prerequisite.sh + output " " + output "Yiimp Install Script v0.1" + output "Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.0" + output " " sleep 3 - source conf/getip.sh - - - echo 'PUBLIC_IP='"${PUBLIC_IP}"' - PUBLIC_IPV6='"${PUBLIC_IPV6}"' - DISTRO='"${DISTRO}"' - PRIVATE_IP='"${PRIVATE_IP}"'' | sudo -E tee conf/pool.conf >/dev/null 2>&1 - - echo - echo - echo -e "$RED Make sure you double check before hitting enter! Only one shot at these! $COL_RESET" - echo - #read -e -p "Enter time zone (e.g. America/New_York) : " TIME - read -e -p "Domain Name (no http:// or www. just : example.com or pool.example.com or 185.22.24.26) : " server_name + + output " " + output " " + output "Make sure you double check before hitting enter! Only one shot at these!" + output " " + read -e -p "Enter time zone (e.g. America/New_York) : " TIME + read -e -p "Server name (no http:// or www. just : example.com or pool.example.com) : " server_name read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC - #read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel + read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel read -e -p "Enter the Public IP of the system you will use to access the admin panel (http://www.whatsmyip.org/) : " Public - #read -e -p "Enter desired Yiimp GitHub (1=tpruvot or 2=Kudaraidee) [1 by default] : " yiimpver read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban read -e -p "Install UFW and configure ports? [Y/n] : " UFW read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install + # Update package and Upgrade Ubuntu + output " " + output "Updating system and installing required packages." + output " " + sleep 3 + + sudo apt-get -y update + sudo apt-get -y upgrade + sudo apt-get -y autoremove + + # Switch Aptitude - #echo - #echo -e "$CYAN Switching to Aptitude $COL_RESET" - #echo - #sleep 3 - #apt_install aptitude - #echo -e "$GREEN Done...$COL_RESET $COL_RESET" - - + output " " + output "Switching to Aptitude" + output " " + sleep 3 + + sudo apt-get -y install aptitude + + # Installing Nginx - echo - echo - echo -e "$CYAN => Installing Nginx server : $COL_RESET" - echo + output " " + output "Installing Nginx server." + output " " sleep 3 - if [ -f /usr/sbin/apache2 ]; then - echo -e "Removing apache..." - hide_output apt-get -y purge apache2 apache2-* - hide_output apt-get -y --purge autoremove - fi - - apt_install nginx - hide_output sudo rm /etc/nginx/sites-enabled/default - hide_output sudo systemctl start nginx.service - hide_output sudo systemctl enable nginx.service - hide_output sudo systemctl start cron.service - hide_output sudo systemctl enable cron.service - sudo systemctl status nginx | sed -n "1,3p" - echo - echo -e "$GREEN Done...$COL_RESET" + sudo aptitude -y install nginx + sudo rm /etc/nginx/sites-enabled/default + sudo systemctl start nginx.service + sudo systemctl enable nginx.service + sudo systemctl start cron.service + sudo systemctl enable cron.service # Making Nginx a bit hard echo 'map $http_user_agent $blockedagent { - default 0; - ~*malicious 1; - ~*bot 1; - ~*backdoor 1; - ~*crawler 1; - ~*bandit 1; - } - ' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 +default 0; +~*malicious 1; +~*bot 1; +~*backdoor 1; +~*crawler 1; +~*bandit 1; +} +' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 # Installing Mariadb - echo - echo - echo -e "$CYAN => Installing Mariadb Server : $COL_RESET" - echo + output " " + output "Installing Mariadb Server." + output " " sleep 3 # Create random password rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" - apt_install mariadb-server - hide_output sudo systemctl start mysql - hide_output sudo systemctl enable mysql - sudo systemctl status mysql | sed -n "1,3p" - echo - echo -e "$GREEN Done...$COL_RESET" - + sudo aptitude -y install mariadb-server + sudo systemctl start mysql + sudo systemctl enable mysql - # Installing Installing php7.3 - echo - echo - echo -e "$CYAN => Installing php7.3 : $COL_RESET" - echo + + # Installing Installing php7.x + output " " + output "Installing php7.x" + output " " sleep 3 - source conf/pool.conf - if [ ! -f /etc/apt/sources.list.d/ondrej-php-bionic.list ]; then - hide_output sudo add-apt-repository -y ppa:ondrej/php - fi - hide_output sudo apt -y update - - if [[ ("$DISTRO" == "16") ]]; then - apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ - php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ - php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring - #hide_output sudo phpenmod mcrypt - #hide_output sudo phpenmod mbstring - else - apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ - php7.3-cgi php-pear imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ - php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring \ - libpsl-dev libnghttp2-dev - fi - sleep 5 - hide_output sudo systemctl start php7.3-fpm - sudo systemctl status php7.3-fpm | sed -n "1,3p" - echo - echo -e "$GREEN Done...$COL_RESET" - + sudo aptitude -y install php7.0-fpm + sudo aptitude -y install php7.0-opcache php7.0-fpm php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring + sudo phpenmod mcrypt + sudo phpenmod mbstring + sudo systemctl start php7.0-fpm.service + # Installing other needed files - echo - echo - echo -e "$CYAN => Installing other needed files : $COL_RESET" - echo + output " " + output "Installing other needed files" + output " " sleep 3 - apt_install libgmp3-dev libmysqlclient-dev libcurl4-gnutls-dev libkrb5-dev libldap2-dev libidn11-dev gnutls-dev \ - librtmp-dev sendmail mutt screen git - apt_install pwgen -y - echo -e "$GREEN Done...$COL_RESET" - sleep 3 - + sudo aptitude -y install libgmp3-dev + sudo aptitude -y install libmysqlclient-dev + sudo aptitude -y install libcurl4-gnutls-dev + sudo aptitude -y install libkrb5-dev + sudo aptitude -y install libldap2-dev + sudo aptitude -y install libidn11-dev + sudo aptitude -y install gnutls-dev + sudo aptitude -y install librtmp-dev + sudo aptitude -y install sendmail + sudo aptitude -y install mutt + sudo aptitude -y install git screen + sudo aptitude -y install pwgen -y + # Installing Package to compile crypto currency - echo - echo - echo -e "$CYAN => Installing Package to compile crypto currency $COL_RESET" - echo + output " " + output "Installing Package to compile crypto currency" + output " " sleep 3 - apt_install software-properties-common build-essential - apt_install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext - apt_install libminiupnpc10 libzmq5 - apt_install libcanberra-gtk-module libqrencode-dev libzmq3-dev - apt_install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler - hide_output sudo add-apt-repository -y ppa:bitcoin/bitcoin - hide_output sudo apt -y update - apt_install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ - echo -e "$GREEN Done...$COL_RESET" + sudo aptitude -y install software-properties-common build-essential + sudo aptitude -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext + sudo aptitude -y install libminiupnpc10 libzmq5 + sudo aptitude -y install libcanberra-gtk-module libqrencode-dev libzmq3-dev + sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler + sudo add-apt-repository -y ppa:bitcoin/bitcoin + sudo apt-get -y update + sudo apt-get install -y libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ # Generating Random Passwords @@ -233,10 +161,9 @@ # Test Email - echo - echo - echo -e "$CYAN => Testing to see if server emails are sent $COL_RESET" - echo + output " " + output "Testing to see if server emails are sent" + output " " sleep 3 if [[ "$root_email" != "" ]]; then @@ -254,97 +181,87 @@ echo "Mail sent" fi fi - echo -e "$GREEN Done...$COL_RESET" + # Installing Fail2Ban & UFW - echo - echo - echo -e "$CYAN => Some optional installs (Fail2Ban & UFW) $COL_RESET" - echo + output " " + output "Some optional installs (Fail2Ban & UFW)" + output " " sleep 3 if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then - apt_install fail2ban - sudo systemctl status fail2ban | sed -n "1,3p" - fi - - + sudo aptitude -y install fail2ban + fi if [[ ("$UFW" == "y" || "$UFW" == "Y" || "$UFW" == "") ]]; then - apt_install ufw - hide_output sudo ufw default deny incoming - hide_output sudo ufw default allow outgoing - hide_output sudo ufw allow ssh - hide_output sudo ufw allow http - hide_output sudo ufw allow https - hide_output sudo ufw allow 3333/tcp - hide_output sudo ufw allow 3339/tcp - hide_output sudo ufw allow 3334/tcp - hide_output sudo ufw allow 3433/tcp - hide_output sudo ufw allow 3555/tcp - hide_output sudo ufw allow 3556/tcp - hide_output sudo ufw allow 3573/tcp - hide_output sudo ufw allow 3535/tcp - hide_output sudo ufw allow 3533/tcp - hide_output sudo ufw allow 3553/tcp - hide_output sudo ufw allow 3633/tcp - hide_output sudo ufw allow 3733/tcp - hide_output sudo ufw allow 3636/tcp - hide_output sudo ufw allow 3737/tcp - hide_output sudo ufw allow 3739/tcp - hide_output sudo ufw allow 3747/tcp - hide_output sudo ufw allow 3833/tcp - hide_output sudo ufw allow 3933/tcp - hide_output sudo ufw allow 4033/tcp - hide_output sudo ufw allow 4133/tcp - hide_output sudo ufw allow 4233/tcp - hide_output sudo ufw allow 4234/tcp - hide_output sudo ufw allow 4333/tcp - hide_output sudo ufw allow 4433/tcp - hide_output sudo ufw allow 4533/tcp - hide_output sudo ufw allow 4553/tcp - hide_output sudo ufw allow 4633/tcp - hide_output sudo ufw allow 4733/tcp - hide_output sudo ufw allow 4833/tcp - hide_output sudo ufw allow 4933/tcp - hide_output sudo ufw allow 5033/tcp - hide_output sudo ufw allow 5133/tcp - hide_output sudo ufw allow 5233/tcp - hide_output sudo ufw allow 5333/tcp - hide_output sudo ufw allow 5433/tcp - hide_output sudo ufw allow 5533/tcp - hide_output sudo ufw allow 5733/tcp - hide_output sudo ufw allow 5743/tcp - hide_output sudo ufw allow 3252/tcp - hide_output sudo ufw allow 5755/tcp - hide_output sudo ufw allow 5766/tcp - hide_output sudo ufw allow 5833/tcp - hide_output sudo ufw allow 5933/tcp - hide_output sudo ufw allow 6033/tcp - hide_output sudo ufw allow 5034/tcp - hide_output sudo ufw allow 6133/tcp - hide_output sudo ufw allow 6233/tcp - hide_output sudo ufw allow 6333/tcp - hide_output sudo ufw allow 6433/tcp - hide_output sudo ufw allow 7433/tcp - hide_output sudo ufw allow 8333/tcp - hide_output sudo ufw allow 8463/tcp - hide_output sudo ufw allow 8433/tcp - hide_output sudo ufw allow 8533/tcp - hide_output sudo ufw --force enable - sudo systemctl status ufw | sed -n "1,3p" + sudo apt-get install ufw + sudo ufw default deny incoming + sudo ufw default allow outgoing + sudo ufw allow ssh + sudo ufw allow http + sudo ufw allow https + sudo ufw allow 3333/tcp + sudo ufw allow 3339/tcp + sudo ufw allow 3334/tcp + sudo ufw allow 3433/tcp + sudo ufw allow 3555/tcp + sudo ufw allow 3556/tcp + sudo ufw allow 3573/tcp + sudo ufw allow 3535/tcp + sudo ufw allow 3533/tcp + sudo ufw allow 3553/tcp + sudo ufw allow 3633/tcp + sudo ufw allow 3733/tcp + sudo ufw allow 3636/tcp + sudo ufw allow 3737/tcp + sudo ufw allow 3739/tcp + sudo ufw allow 3747/tcp + sudo ufw allow 3833/tcp + sudo ufw allow 3933/tcp + sudo ufw allow 4033/tcp + sudo ufw allow 4133/tcp + sudo ufw allow 4233/tcp + sudo ufw allow 4234/tcp + sudo ufw allow 4333/tcp + sudo ufw allow 4433/tcp + sudo ufw allow 4533/tcp + sudo ufw allow 4553/tcp + sudo ufw allow 4633/tcp + sudo ufw allow 4733/tcp + sudo ufw allow 4833/tcp + sudo ufw allow 4933/tcp + sudo ufw allow 5033/tcp + sudo ufw allow 5133/tcp + sudo ufw allow 5233/tcp + sudo ufw allow 5333/tcp + sudo ufw allow 5433/tcp + sudo ufw allow 5533/tcp + sudo ufw allow 5733/tcp + sudo ufw allow 5743/tcp + sudo ufw allow 3252/tcp + sudo ufw allow 5755/tcp + sudo ufw allow 5766/tcp + sudo ufw allow 5833/tcp + sudo ufw allow 5933/tcp + sudo ufw allow 6033/tcp + sudo ufw allow 5034/tcp + sudo ufw allow 6133/tcp + sudo ufw allow 6233/tcp + sudo ufw allow 6333/tcp + sudo ufw allow 6433/tcp + sudo ufw allow 7433/tcp + sudo ufw allow 8333/tcp + sudo ufw allow 8463/tcp + sudo ufw allow 8433/tcp + sudo ufw allow 8533/tcp + sudo ufw --force enable fi - - echo - echo -e "$GREEN Done...$COL_RESET" - # Installing PhpMyAdmin - echo - echo - echo -e "$CYAN => Installing phpMyAdmin $COL_RESET" - echo + output " " + output "Installing phpmyadmin" + output " " sleep 3 echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections @@ -353,48 +270,43 @@ echo "phpmyadmin phpmyadmin/mysql/admin-pass password $rootpasswd" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/mysql/app-pass password $AUTOGENERATED_PASS" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections - apt_install phpmyadmin - echo -e "$GREEN Done...$COL_RESET" + sudo aptitude -y install phpmyadmin # Installing Yiimp - echo - echo - echo -e "$CYAN => Installing Yiimp $COL_RESET" - echo - echo -e "Grabbing yiimp fron Github, building files and setting file structure." - echo + output " " + output " Installing Yiimp" + output " " + output "Grabbing yiimp fron Github, building files and setting file structure." + output " " sleep 3 - + # Generating Random Password for stratum blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` # Compil Blocknotify cd ~ - #if [[ ("$yiimpver" == "1" || "$yiimpver" == "") ]];then - hide_output git clone $githubrepo - #else - #hide_output git clone $githubrepoKudaraidee - #fi + git clone https://github.com/tpruvot/yiimp.git cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp - hide_output sudo make + sudo make # Compil iniparser cd $HOME/yiimp/stratum/iniparser - hide_output sudo make + sudo make # Compil Stratum cd $HOME/yiimp/stratum if [[ ("$BTC" == "y" || "$BTC" == "Y") ]]; then sudo sed -i 's/CFLAGS += -DNO_EXCHANGE/#CFLAGS += -DNO_EXCHANGE/' $HOME/yiimp/stratum/Makefile + sudo make fi - hide_output sudo make + sudo make # Copy Files (Blocknotify,iniparser,Stratum) cd $HOME/yiimp - sudo sed -i 's/AdminRights/'AdminPanel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php + sudo sed -i 's/AdminRights/'$admin_panel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php sudo cp -r $HOME/yiimp/web /var/ sudo mkdir -p /var/stratum cd $HOME/yiimp/stratum @@ -412,65 +324,49 @@ #fixing run.sh sudo rm -r /var/stratum/config/run.sh echo ' - #!/bin/bash - ulimit -n 10240 - ulimit -u 10240 - cd /var/stratum - while true; do - ./stratum /var/stratum/config/$1 - sleep 2 - done - exec bash - ' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 +#!/bin/bash +ulimit -n 10240 +ulimit -u 10240 +cd /var/stratum +while true; do +./stratum /var/stratum/config/$1 +sleep 2 +done +exec bash +' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 sudo chmod +x /var/stratum/config/run.sh - echo -e "$GREEN Done...$COL_RESET" - # Update Timezone - echo - echo - echo -e "$CYAN => Update default timezone. $COL_RESET" - echo + output " " + output "Update default timezone." + output " " # Check if link file - #sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime + sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime + # Update time zone - #sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime - #apt_install ntpdate + sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime + sudo aptitude -y install ntpdate + # Write time to clock. - #sudo hwclock -w - #echo -e "$GREEN Done...$COL_RESET" - - echo -e " Setting TimeZone to UTC...$COL_RESET" - if [ ! -f /etc/timezone ]; then - echo "Setting timezone to UTC." - echo "Etc/UTC" > sudo /etc/timezone - sudo systemctl restart rsyslog - fi - sudo systemctl status rsyslog | sed -n "1,3p" - echo - echo -e "$GREEN Done...$COL_RESET" + sudo hwclock -w # Making Web Server Magic Happen - #echo - #echo -e "$CYAN Making Web Server Magic Happen! $COL_RESET" - #echo + output " " + output "Making Web Server Magic Happen!" + output " " # Adding user to group, creating dir structure, setting permissions - #sudo mkdir -p /var/www/$server_name/html + sudo mkdir -p /var/www/$server_name/html # Creating webserver initial config file - echo - echo - echo -e "$CYAN => Creating webserver initial config file $COL_RESET" - echo + output " " + output "Creating webserver initial config file" + output " " - # Adding user to group, creating dir structure, setting permissions - sudo mkdir -p /var/www/$server_name/html - if [[ ("$sub_domain" == "y" || "$sub_domain" == "Y") ]]; then echo 'include /etc/nginx/blockuseragents.rules; server { @@ -509,7 +405,7 @@ location ~ ^/index\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; @@ -539,32 +435,30 @@ try_files $uri $uri/ =404; location ~ ^/phpmyadmin/(doc|sql|setup)/ { deny all; - } + } location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.3-fpm.sock; + fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; - } - } - } - ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + } + } + } +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - hide_output sudo systemctl reload php7.3-fpm.service - hide_output sudo systemctl restart nginx.service - echo -e "$GREEN Done...$COL_RESET" - + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then - # Install SSL (with SubDomain) - echo - echo -e "Install LetsEncrypt and setting SSL (with SubDomain)" - echo + output " " + output "Install LetsEncrypt and setting SSL (with SubDomain)" + output " " - apt_install letsencrypt + sudo aptitude -y install letsencrypt sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 @@ -634,7 +528,7 @@ location ~ ^/index\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; @@ -665,21 +559,19 @@ deny all; } location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.3-fpm.sock; + fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; - } - } - } + } + } + } - ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - hide_output sudo systemctl reload php7.3-fpm.service - hide_output sudo systemctl restart nginx.service - echo -e "$GREEN Done...$COL_RESET" - + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service else echo 'include /etc/nginx/blockuseragents.rules; @@ -719,7 +611,7 @@ location ~ ^/index\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; @@ -751,31 +643,29 @@ deny all; } location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.3-fpm.sock; + fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; - } - } - } - ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + } + } + } +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - hide_output sudo systemctl reload php7.3-fpm.service - hide_output sudo systemctl restart nginx.service - echo -e "$GREEN Done...$COL_RESET" - + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then # Install SSL (without SubDomain) - echo - echo -e "Install LetsEncrypt and setting SSL (without SubDomain)" - echo + output " " + output "Install LetsEncrypt and setting SSL (without SubDomain)" + output " " sleep 3 - apt_install letsencrypt + sudo aptitude -y install letsencrypt sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 @@ -845,7 +735,7 @@ location ~ ^/index\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; @@ -876,29 +766,26 @@ deny all; } location ~ /phpmyadmin/(.+\.php)$ { - fastcgi_pass unix:/run/php/php7.3-fpm.sock; + fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; - } - } - } + } + } + } - ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 - - echo -e "$GREEN Done...$COL_RESET" - +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + fi - hide_output sudo systemctl reload php7.3-fpm.service - hide_output sudo systemctl restart nginx.service + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service fi # Config Database - echo - echo - echo -e "$CYAN => Now for the database fun! $COL_RESET" - echo + output " " + output "Now for the database fun!" + output " " sleep 3 # Create database @@ -916,60 +803,56 @@ #Create my.cnf - echo ' - [clienthost1] - user=panel - password='"${password}"' - database=yiimpfrontend - host=localhost - [clienthost2] - user=stratum - password='"${password2}"' - database=yiimpfrontend - host=localhost - [myphpadmin] - user=phpmyadmin - password='"${AUTOGENERATED_PASS}"' - [mysql] - user=root - password='"${rootpasswd}"' - ' | sudo -E tee ~/.my.cnf >/dev/null 2>&1 + echo ' +[clienthost1] +user=panel +password='"${password}"' +database=yiimpfrontend +host=localhost +[clienthost2] +user=stratum +password='"${password2}"' +database=yiimpfrontend +host=localhost +[myphpadmin] +user=phpmyadmin +password='"${AUTOGENERATED_PASS}"' +[mysql] +user=root +password='"${rootpasswd}"' +' | sudo -E tee ~/.my.cnf >/dev/null 2>&1 sudo chmod 0600 ~/.my.cnf - # Create keys file echo ' /dev/null 2>&1 - - echo -e "$GREEN Done...$COL_RESET" - +/* Sample config file to put in /etc/yiimp/keys.php */ +define('"'"'YIIMP_MYSQLDUMP_USER'"'"', '"'"'panel'"'"'); +define('"'"'YIIMP_MYSQLDUMP_PASS'"'"', '"'"''"${password}"''"'"'); +/* Keys required to create/cancel orders and access your balances/deposit addresses */ +define('"'"'EXCH_BITTREX_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_BITSTAMP_SECRET'"'"','"'"''"'"'); +define('"'"'EXCH_BLEUTRADE_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_BTER_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_CCEX_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_COINMARKETS_PASS'"'"', '"'"''"'"'); +define('"'"'EXCH_CRYPTOPIA_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_EMPOEX_SECKEY'"'"', '"'"''"'"'); +define('"'"'EXCH_HITBTC_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_KRAKEN_SECRET'"'"','"'"''"'"'); +define('"'"'EXCH_LIVECOIN_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_NOVA_SECRET'"'"','"'"''"'"'); +define('"'"'EXCH_POLONIEX_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); +' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 + # Peforming the SQL import - echo - echo - echo -e "$CYAN => Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you $COL_RESET" - echo - echo -e "Performing the SQL import" - echo + output " " + output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" + output " " + output "Peforming the SQL import" + output " " sleep 3 cd ~ @@ -996,130 +879,119 @@ sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql - #if [[ ("$yiimpver" == "2") ]];then - echo -e "$GREEN Done...$COL_RESET" - #else - #sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql - #echo -e "$GREEN Done...$COL_RESET" - #fi # Generating a basic Yiimp serverconfig.php - echo - echo - echo -e "$CYAN => Generating a basic Yiimp serverconfig.php $COL_RESET" - echo + output " " + output "Generating a basic Yiimp serverconfig.php" + output " " sleep 3 # Make config file - echo ' - 0.3 - define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); - - // nicehash keys deposit account & amount to deposit at a time - define('"'"'NICEHASH_API_KEY'"'"','"'"'f96c65a7-3d2f-4f3a-815c-cacf00674396'"'"'); - define('"'"'NICEHASH_API_ID'"'"','"'"'825979'"'"'); - define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3ABoqBjeorjzbyHmGMppM62YLssUgJhtuf'"'"'); - define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); - - $cold_wallet_table = array( +define('"'"'YAAMP_PRODUCTION'"'"', true); +define('"'"'YAAMP_RENTAL'"'"', false); + +define('"'"'YAAMP_LIMIT_ESTIMATE'"'"', false); + +define('"'"'YAAMP_FEES_MINING'"'"', 0.5); +define('"'"'YAAMP_FEES_EXCHANGE'"'"', 2); +define('"'"'YAAMP_FEES_RENTING'"'"', 2); +define('"'"'YAAMP_TXFEE_RENTING_WD'"'"', 0.002); + +define('"'"'YAAMP_PAYMENTS_FREQ'"'"', 2*60*60); +define('"'"'YAAMP_PAYMENTS_MINI'"'"', 0.001); + +define('"'"'YAAMP_ALLOW_EXCHANGE'"'"', false); +define('"'"'YIIMP_PUBLIC_EXPLORER'"'"', true); +define('"'"'YIIMP_PUBLIC_BENCHMARK'"'"', false); + +define('"'"'YIIMP_FIAT_ALTERNATIVE'"'"', '"'"'USD'"'"'); // USD is main +define('"'"'YAAMP_USE_NICEHASH_API'"'"', false); + +define('"'"'YAAMP_BTCADDRESS'"'"', '"'"'1C1hnjk3WhuAvUN6Ny6LTxPD3rwSZwapW7'"'"'); + +define('"'"'YAAMP_SITE_URL'"'"', '"'"''"${server_name}"''"'"'); +define('"'"'YAAMP_STRATUM_URL'"'"', YAAMP_SITE_URL); // change if your stratum server is on a different host +define('"'"'YAAMP_SITE_NAME'"'"', '"'"'YIIMP'"'"'); +define('"'"'YAAMP_ADMIN_EMAIL'"'"', '"'"''"${EMAIL}"''"'"'); +define('"'"'YAAMP_ADMIN_IP'"'"', '"'"''"${Public}"''"'"'); // samples: "80.236.118.26,90.234.221.11" or "10.0.0.1/8" + +define('"'"'YAAMP_ADMIN_WEBCONSOLE'"'"', true); +define('"'"'YAAMP_CREATE_NEW_COINS'"'"', false); +define('"'"'YAAMP_NOTIFY_NEW_COINS'"'"', false); + +define('"'"'YAAMP_DEFAULT_ALGO'"'"', '"'"'x11'"'"'); + +define('"'"'YAAMP_USE_NGINX'"'"', true); + +// Exchange public keys (private keys are in a separate config file) +define('"'"'EXCH_CRYPTOPIA_KEY'"'"', '"'"''"'"'); +define('"'"'EXCH_POLONIEX_KEY'"'"', '"'"''"'"'); +define('"'"'EXCH_BITTREX_KEY'"'"', '"'"''"'"'); +define('"'"'EXCH_BLEUTRADE_KEY'"'"', '"'"''"'"'); +define('"'"'EXCH_BTER_KEY'"'"', '"'"''"'"'); +define('"'"'EXCH_YOBIT_KEY'"'"', '"'"''"'"'); +define('"'"'EXCH_CCEX_KEY'"'"', '"'"''"'"'); +define('"'"'EXCH_COINMARKETS_USER'"'"', '"'"''"'"'); +define('"'"'EXCH_COINMARKETS_PIN'"'"', '"'"''"'"'); +define('"'"'EXCH_BITSTAMP_ID'"'"','"'"''"'"'); +define('"'"'EXCH_BITSTAMP_KEY'"'"','"'"''"'"'); +define('"'"'EXCH_HITBTC_KEY'"'"','"'"''"'"'); +define('"'"'EXCH_KRAKEN_KEY'"'"', '"'"''"'"'); +define('"'"'EXCH_LIVECOIN_KEY'"'"', '"'"''"'"'); +define('"'"'EXCH_NOVA_KEY'"'"', '"'"''"'"'); + +// Automatic withdraw to Yaamp btc wallet if btc balance > 0.3 +define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); + +// nicehash keys deposit account & amount to deposit at a time +define('"'"'NICEHASH_API_KEY'"'"','"'"'f96c65a7-3d2f-4f3a-815c-cacf00674396'"'"'); +define('"'"'NICEHASH_API_ID'"'"','"'"'825979'"'"'); +define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3ABoqBjeorjzbyHmGMppM62YLssUgJhtuf'"'"'); +define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); + +$cold_wallet_table = array( '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"' => 0.10, - ); - - // Sample fixed pool fees - $configFixedPoolFees = array( +); + +// Sample fixed pool fees +$configFixedPoolFees = array( '"'"'zr5'"'"' => 2.0, '"'"'scrypt'"'"' => 20.0, '"'"'sha256'"'"' => 5.0, - ); - - // Sample custom stratum ports - $configCustomPorts = array( - // '"'"'x11'"'"' => 7000, - ); - - // mBTC Coefs per algo (default is 1.0) - $configAlgoNormCoef = array( - // '"'"'x11'"'"' => 5.0, - ); - ' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 +); + +// Sample custom stratum ports +$configCustomPorts = array( +// '"'"'x11'"'"' => 7000, +); - echo -e "$GREEN Done...$COL_RESET" +// mBTC Coefs per algo (default is 1.0) +$configAlgoNormCoef = array( +// '"'"'x11'"'"' => 5.0, +); +' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 # Updating stratum config files with database connection info - echo - echo - echo -e "$CYAN => Updating stratum config files with database connection info. $COL_RESET" - echo + output " " + output "Updating stratum config files with database connection info." + output " " sleep 3 cd /var/stratum/config @@ -1130,92 +1002,69 @@ sudo sed -i 's/username = root/username = stratum/g' *.conf sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf cd ~ - echo -e "$GREEN Done...$COL_RESET" # Final Directory permissions - echo - echo - echo -e "$CYAN => Final Directory permissions $COL_RESET" - echo + output " " + output "Final Directory permissions" + output " " sleep 3 + #whoami=`whoami` + #sudo mkdir /root/backup/ + #sudo usermod -aG www-data $whoami + #sudo chown -R www-data:www-data /var/log + #sudo chown -R www-data:www-data /var/stratum + #sudo chown -R www-data:www-data /var/web + #sudo touch /var/log/debug.log + #sudo chown -R www-data:www-data /var/log/debug.log + #sudo chmod -R 775 /var/www/$server_name/html + #sudo chmod -R 775 /var/web + #sudo chmod -R 775 /var/stratum + #sudo chmod -R 775 /var/web/yaamp/runtime + #sudo chmod -R 664 /root/backup/ + #sudo chmod -R 644 /var/log/debug.log + #sudo chmod -R 775 /var/web/serverconfig.php + whoami=`whoami` sudo usermod -aG www-data $whoami sudo usermod -a -G www-data $whoami - sudo find /var/web -type d -exec chmod 775 {} + - sudo find /var/web -type f -exec chmod 664 {} + - sudo chgrp www-data /var/web -R - sudo chmod g+w /var/web -R + sudo mkdir /root/backup/ sudo mkdir /var/log/yiimp sudo touch /var/log/yiimp/debug.log - sudo chgrp www-data /var/log/yiimp -R - sudo chmod 775 /var/log/yiimp -R + sudo chown -R www-data:www-data /var/log/yiimp + sudo chmod -R 775 /var/log/yiimp - sudo chgrp www-data /var/stratum -R - sudo chmod 775 /var/stratum + sudo chown -R www-data:www-data /var/stratum + sudo chmod -R 775 /var/stratum - sudo mkdir -p /var/yiimp/sauv - sudo chgrp www-data /var/yiimp -R - sudo chmod 775 /var/yiimp -R - - - #Add to contrab screen-scrypt - (crontab -l 2>/dev/null; echo "@reboot sleep 20 && /etc/screen-scrypt.sh") | crontab - + sudo chown -R www-data:www-data /var/web + sudo chmod -R 775 /var/web + sudo find /var/web -type d -exec chmod 755 {} + + sudo find /var/web -type f -exec chmod 664 {} + + sudo chgrp www-data /var/web -R + sudo chmod g+w /var/web -R - #fix error screen main - sudo sed -i 's/service $webserver start/sudo service $webserver start/g' /var/web/yaamp/modules/thread/CronjobController.php - sudo sed -i 's/service nginx stop/sudo service nginx stop/g' /var/web/yaamp/modules/thread/CronjobController.php - #Misc sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* - #Restart service - sudo systemctl restart cron.service - sudo systemctl restart mysql - sudo systemctl status mysql | sed -n "1,3p" + sudo systemctl reload php7.0-fpm.service sudo systemctl restart nginx.service - sudo systemctl status nginx | sed -n "1,3p" - sudo systemctl restart php7.3-fpm.service - sudo systemctl status php7.3-fpm | sed -n "1,3p" - - echo - echo -e "$GREEN Done...$COL_RESET" - sleep 3 - echo - echo - echo - echo -e "$GREEN***************************$COL_RESET" - echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" - echo -e "$GREEN Finish !!! $COL_RESET" - echo -e "$GREEN***************************$COL_RESET" - echo - echo - echo - echo -e "$CYAN Whew that was fun, just some reminders. $COL_RESET" - echo -e "$RED Your mysql information is saved in ~/.my.cnf. $COL_RESET" - echo - echo -e "$RED Yiimp at : http://"$server_name" (https... if SSL enabled)" - echo -e "$RED Yiimp Admin at : http://"$server_name"/site/AdminPanel (https... if SSL enabled)" - echo -e "$RED Yiimp phpMyAdmin at : http://"$server_name"/phpmyadmin (https... if SSL enabled)" - echo - echo -e "$RED If you want change 'AdminPanel' to access Panel Admin : Edit this file : /var/web/yaamp/modules/site/SiteController.php" - echo -e "$RED Line 11 => change 'AdminPanel' and use the new address" - echo - echo -e "$CYAN Please make sure to change your wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" - echo -e "$CYAN Please make sure to add your public and private keys. $COL_RESET" - echo - echo -e "$CYAN TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig $COL_RESET" - echo -e "$CYAN Xavatar WebSite : https://www.xavatar.com $COL_RESET" - echo - echo - echo -e "$RED**************************************************$COL_RESET" - echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION!!! $COL_RESET" - echo -e "$RED**************************************************$COL_RESET" - echo - echo \ No newline at end of file + output " " + output " " + output " " + output " " + output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." + output " " + output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." + output " " + output "Please make sure to add your public and private keys." + output " " + output "TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig" + output " " + output " " diff --git a/test/conf/screen-scrypt.sh b/test/conf/screen-scrypt.sh deleted file mode 100644 index e97c01c7..00000000 --- a/test/conf/screen-scrypt.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - LOG_DIR=/var/log/yiimp - WEB_DIR=/var/web - STRATUM_DIR=/var/stratum - USR_BIN=/usr/bin - - screen -dmS main bash $WEB_DIR/main.sh - screen -dmS loop2 bash $WEB_DIR/loop2.sh - screen -dmS blocks bash $WEB_DIR/blocks.sh - screen -dmS debug tail -f $LOG_DIR/debug.log - - - \ No newline at end of file diff --git a/compil.sh b/utils/compil.sh similarity index 100% rename from compil.sh rename to utils/compil.sh diff --git a/packagecompil.sh b/utils/packagecompil.sh similarity index 100% rename from packagecompil.sh rename to utils/packagecompil.sh diff --git a/screen-stratum.sh b/utils/screen-stratum.sh similarity index 100% rename from screen-stratum.sh rename to utils/screen-stratum.sh From 6e4a79dfe4bc9497eeb71443ab6b1da3276faafa Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 18:01:46 +0200 Subject: [PATCH 309/360] move delcoin.sh --- {conf => utils}/coin.list | 0 {conf => utils}/delcoin.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {conf => utils}/coin.list (100%) rename {conf => utils}/delcoin.sh (100%) diff --git a/conf/coin.list b/utils/coin.list similarity index 100% rename from conf/coin.list rename to utils/coin.list diff --git a/conf/delcoin.sh b/utils/delcoin.sh similarity index 100% rename from conf/delcoin.sh rename to utils/delcoin.sh From ba044cb027c40d06708f2428a6d0051cd49b4644 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 18:02:05 +0200 Subject: [PATCH 310/360] Create changelog --- changelog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 00000000..d5469532 --- /dev/null +++ b/changelog @@ -0,0 +1,18 @@ +Yiimp v0.2 // 10.04.2020 + +Information => +* Works with Ubuntu Server 16.04 / 18.04 +* Update PHP 7.3 +* Remove question Panel Admin +* Remove question Time Zone +* Add screen-scrypt to crontab +* Add script to remove all coin (utils/delcoin.sh) + +Fix => +* Fix command cli « Yiimp » : OK +* Fix Backup SQL FrontEnd : OK (/var/log/yiimp/sauv) +* Fix Permission on folder + +Change => +* /etc/screen-scrypt.sh = add to crontab (main,loop2,blocks,debug) +* /var/yiimp/sauv = Backup SQL FrontEnd From 3986ae138e765ccfa77f31cf4390ebfa636d4251 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 18:04:48 +0200 Subject: [PATCH 311/360] fix typo --- utils/packagecompil.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/utils/packagecompil.sh b/utils/packagecompil.sh index ec350127..b0602326 100644 --- a/utils/packagecompil.sh +++ b/utils/packagecompil.sh @@ -16,12 +16,11 @@ output " " sleep 3 - sudo apt-get -y install aptitude - sudo aptitude -y install software-properties-common build-essential - sudo aptitude -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext - sudo aptitude -y install libminiupnpc10 libzmq5 - sudo aptitude -y install libcanberra-gtk-module libqrencode-dev libzmq3-dev - sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler + sudo apt -y install software-properties-common build-essential + sudo apt -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext + sudo apt -y install libminiupnpc10 libzmq5 + sudo apt -y install libcanberra-gtk-module libqrencode-dev libzmq3-dev + sudo apt -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler sudo add-apt-repository -y ppa:bitcoin/bitcoin - sudo apt-get -y update - sudo apt-get install -y libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ + sudo apt -y update + sudo apt install -y libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ From 7a34cc11c316710c2fa765b7846fcb1b6377020b Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 18:07:58 +0200 Subject: [PATCH 312/360] typo --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 01cd5600..01e24522 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,6 @@ Go http://xxx.xxx.xxx.xxx or https://xxx.xxx.xxx.xxx (if you have chosen LetsEnc - The configuration of yiimp and coin require a minimum of knowledge in linux - Your mysql information (login/Password) is saved in **~/.my.cnf** -- Remember to restart **memcached service** after the db change (update or import new .sql) *********************************** From 1a90c7d86aefeec5c08cd99cde14e9612b6506e1 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 18:10:56 +0200 Subject: [PATCH 313/360] add thanks cryptopool-builders --- changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog b/changelog index d5469532..f397a4a4 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,5 @@ Yiimp v0.2 // 10.04.2020 +Thanks to cryptopool-builders !!!!!!!! Information => * Works with Ubuntu Server 16.04 / 18.04 From 21963e79dc8431201892ed540c22778f9608d61e Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 19:17:10 +0200 Subject: [PATCH 314/360] chg name v01 --- old/{install.sh => install-v0.1.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename old/{install.sh => install-v0.1.sh} (100%) diff --git a/old/install.sh b/old/install-v0.1.sh similarity index 100% rename from old/install.sh rename to old/install-v0.1.sh From 79b0de7dfb483311441819d80cd6c98936b3117e Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 19:19:47 +0200 Subject: [PATCH 315/360] Update changelog --- changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog b/changelog index f397a4a4..10a8c99b 100644 --- a/changelog +++ b/changelog @@ -4,6 +4,7 @@ Thanks to cryptopool-builders !!!!!!!! Information => * Works with Ubuntu Server 16.04 / 18.04 * Update PHP 7.3 +* Change Aptitude by APT * Remove question Panel Admin * Remove question Time Zone * Add screen-scrypt to crontab @@ -12,7 +13,7 @@ Information => Fix => * Fix command cli « Yiimp » : OK * Fix Backup SQL FrontEnd : OK (/var/log/yiimp/sauv) -* Fix Permission on folder +* Fix Permission on some folder Change => * /etc/screen-scrypt.sh = add to crontab (main,loop2,blocks,debug) From 9927f5de4c8365c6ed0c06aee81f8a336202fd30 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Fri, 10 Apr 2020 19:48:52 +0200 Subject: [PATCH 316/360] Create RELEASE --- RELEASE | 1 + 1 file changed, 1 insertion(+) create mode 100644 RELEASE diff --git a/RELEASE b/RELEASE new file mode 100644 index 00000000..3b04cfb6 --- /dev/null +++ b/RELEASE @@ -0,0 +1 @@ +0.2 From 64c474f3d4a9e771c9f18edadca3d6f3c2b1cb14 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 11 Apr 2020 12:45:56 +0200 Subject: [PATCH 317/360] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 01e24522..4ff4d1fd 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Original SCRIPT : https://github.com/cryptopool-builders/multipool_original_yiim USE THIS SCRIPT ON FRESH INSTALL UBUNTU Server 16.04 / 18.04 ! Connect on your VPS => -- adduser pool +- adduser pool (pool it's just an example...) - adduser pool sudo - su - pool - sudo apt -y install git From a0e6d13fdffd3b2b880709f22e4d23218023e84d Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 11 Apr 2020 12:49:35 +0200 Subject: [PATCH 318/360] add readme chg panel --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 01e24522..f4ef4188 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Go http://xxx.xxx.xxx.xxx or https://xxx.xxx.xxx.xxx (if you have chosen LetsEnc ###### :bangbang: **YOU MUST UPDATE THE FOLLOWING FILES :** - **/var/web/serverconfig.php :** update this file to include your public ip (line = YAAMP_ADMIN_IP) to access the admin panel (Put your PERSONNAL IP, NOT IP of your VPS). update with public keys from exchanges. update with other information specific to your server.. - **/etc/yiimp/keys.php :** update with secrect keys from the exchanges (not mandatory) +- **If you want change 'AdminPanel' to access Panel Admin :** Edit this file "/var/web/yaamp/modules/site/SiteController.php" and Line 11 => change 'AdminPanel' ###### :bangbang: **IMPORTANT** : From 07051502587aff376edf7ec54182e8b49560feda Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 11 Apr 2020 12:51:24 +0200 Subject: [PATCH 319/360] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a7698d70..4ae90601 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,8 @@ Connect on your VPS => - At the end, you MUST REBOOT to finalize installation... Finish ! -Go http://xxx.xxx.xxx.xxx or https://xxx.xxx.xxx.xxx (if you have chosen LetsEncrypt SSL). Enjoy ! +- Go http://xxx.xxx.xxx.xxx or https://xxx.xxx.xxx.xxx (if you have chosen LetsEncrypt SSL). Enjoy ! +- Go http://xxx.xxx.xxx.xxx/AdminPanel or https://xxx.xxx.xxx.xxx/AdminPanel to access Panel Admin ###### :bangbang: **YOU MUST UPDATE THE FOLLOWING FILES :** - **/var/web/serverconfig.php :** update this file to include your public ip (line = YAAMP_ADMIN_IP) to access the admin panel (Put your PERSONNAL IP, NOT IP of your VPS). update with public keys from exchanges. update with other information specific to your server.. From c830be6ed811122ec0612ab1d9538876a0d98ed9 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 11 Apr 2020 12:55:42 +0200 Subject: [PATCH 320/360] add inf --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4ae90601..32f60248 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,8 @@ Finish ! ###### This script has an interactive beginning and will ask for the following information : -- Server Name -- Are you using a subdomain +- Server Name (crypto.com OR pool.crypto.com OR 80.41.52.63) +- Are you using a subdomain (mypoolx11.crypto.com) - Enter support email - Set stratum to AutoExchange - Your Public IP for admin access (Put your PERSONNAL IP, NOT IP of your VPS) From 413550fd41653f58b04546c3a677f9e1b9dc257f Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 11 Apr 2020 12:57:46 +0200 Subject: [PATCH 321/360] upd readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 32f60248..7eaa1732 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Finish ! ###### This script has an interactive beginning and will ask for the following information : -- Server Name (crypto.com OR pool.crypto.com OR 80.41.52.63) +- Server Name (no http:// or www !!!!! Example : crypto.com OR pool.crypto.com OR 80.41.52.63) - Are you using a subdomain (mypoolx11.crypto.com) - Enter support email - Set stratum to AutoExchange From 504380485fcb9957e7ac7668d7061f592be27ebc Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 11 Apr 2020 13:00:12 +0200 Subject: [PATCH 322/360] move script screen to utils --- install.sh | 2 +- {conf => utils}/screen-scrypt.sh | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename {conf => utils}/screen-scrypt.sh (100%) diff --git a/install.sh b/install.sh index 77266a2b..a6c25eaf 100644 --- a/install.sh +++ b/install.sh @@ -40,7 +40,7 @@ #Copy needed files sudo cp -r conf/functions.sh /etc/ - sudo cp -r conf/screen-scrypt.sh /etc/ + sudo cp -r utils/screen-scrypt.sh /etc/ sudo cp -r conf/editconf.py /usr/bin/ sudo chmod +x /usr/bin/editconf.py sudo chmod +x /etc/screen-scrypt.sh diff --git a/conf/screen-scrypt.sh b/utils/screen-scrypt.sh similarity index 100% rename from conf/screen-scrypt.sh rename to utils/screen-scrypt.sh From 6a9923acf447c8bb045b200f4766f6c473eac2b2 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 11 Apr 2020 13:06:48 +0200 Subject: [PATCH 323/360] Update changelog --- changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog b/changelog index 10a8c99b..bbc01e83 100644 --- a/changelog +++ b/changelog @@ -12,7 +12,7 @@ Information => Fix => * Fix command cli « Yiimp » : OK -* Fix Backup SQL FrontEnd : OK (/var/log/yiimp/sauv) +* Fix Backup SQL FrontEnd : OK (/var/yiimp/sauv) * Fix Permission on some folder Change => From 8b6fc18896192874664997b6c1eac47fadfc4523 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 11 Apr 2020 13:09:48 +0200 Subject: [PATCH 324/360] Update changelog --- changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog b/changelog index bbc01e83..ad22585d 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,4 @@ -Yiimp v0.2 // 10.04.2020 +yiimp_install_scrypt v0.2 // 10.04.2020 Thanks to cryptopool-builders !!!!!!!! Information => From 0d211b63db533f72b104a3a8c73c5c7fbfcdc9d6 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 11 Apr 2020 13:10:49 +0200 Subject: [PATCH 325/360] Update changelog --- changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog b/changelog index ad22585d..3904aaa5 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,4 @@ -yiimp_install_scrypt v0.2 // 10.04.2020 +Yiimp Install Scrypt v0.2 // 10.04.2020 Thanks to cryptopool-builders !!!!!!!! Information => From 00ef8b44b209dff79a501b9c758a700885f5697c Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 11 Apr 2020 13:21:13 +0200 Subject: [PATCH 326/360] chg name file utils --- utils/{compil.sh => compile.sh} | 0 utils/{packagecompil.sh => packagecompile.sh} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename utils/{compil.sh => compile.sh} (100%) rename utils/{packagecompil.sh => packagecompile.sh} (100%) diff --git a/utils/compil.sh b/utils/compile.sh similarity index 100% rename from utils/compil.sh rename to utils/compile.sh diff --git a/utils/packagecompil.sh b/utils/packagecompile.sh similarity index 100% rename from utils/packagecompil.sh rename to utils/packagecompile.sh From bdf29ede917a7c4d872770b8b2e47b42d5681ff1 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sat, 11 Apr 2020 22:45:01 +0200 Subject: [PATCH 327/360] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7eaa1732..83202e4a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Site : https://www.xavatar.com Discord : https://discord.gg/zcCXjkQ -TUTO Youtube (16.04 - Without SSL) : Soon... +TUTO Youtube (16.04 - Without SSL) : https://www.youtube.com/watch?v=qE0rhfJ1g2k Official Yiimp (used in this script for Yiimp Installation): https://github.com/tpruvot/yiimp From 4a80cb7a8675e6c9a28d1a60636c69f6b9db0458 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 12 Apr 2020 10:52:37 +0200 Subject: [PATCH 328/360] chg typo --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a6c25eaf..50f9dfd5 100644 --- a/install.sh +++ b/install.sh @@ -88,7 +88,7 @@ echo #read -e -p "Enter time zone (e.g. America/New_York) : " TIME read -e -p "Domain Name (no http:// or www. just : example.com or pool.example.com or 185.22.24.26) : " server_name - read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain + read -e -p "Are you using a subdomain (mycryptopool.example.com?) [y/N] : " sub_domain read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC #read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel From 16a148b3e11090432164447ceb854eedcbfac4db Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 12 Apr 2020 10:54:27 +0200 Subject: [PATCH 329/360] chg info --- install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 50f9dfd5..da5be9a2 100644 --- a/install.sh +++ b/install.sh @@ -1,13 +1,12 @@ #!/bin/bash ################################################################################ # Original Author: crombiecrunch -# Fork Author: manfromafar -# Current Author: Xavatar (https://github.com/xavatar/yiimp_install_scrypt) +# Modified by : Xavatar (https://github.com/xavatar/yiimp_install_scrypt) # Web: https://www.xavatar.com # # Program: # Install yiimp on Ubuntu 16.04/18.04 running Nginx, MariaDB, and php7.3 -# v0.2 +# v0.2 (update Avril, 2020) # ################################################################################ From 2620dd4f8627db59c3f3ae17285e26d8c7a7ba1f Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 12 Apr 2020 10:58:19 +0200 Subject: [PATCH 330/360] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83202e4a..2e2e0a77 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Site : https://www.xavatar.com Discord : https://discord.gg/zcCXjkQ -TUTO Youtube (16.04 - Without SSL) : https://www.youtube.com/watch?v=qE0rhfJ1g2k +TUTO Youtube (16.04 / 18.04 - Without SSL) : https://www.youtube.com/watch?v=qE0rhfJ1g2k Official Yiimp (used in this script for Yiimp Installation): https://github.com/tpruvot/yiimp From 97233cc16b3c668548eefc8277fe9e4b83f026c8 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 12 Apr 2020 11:02:48 +0200 Subject: [PATCH 331/360] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e2e0a77..d5df3acb 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ TUTO Youtube (16.04 / 18.04 - Without SSL) : https://www.youtube.com/watch?v=qE0 Official Yiimp (used in this script for Yiimp Installation): https://github.com/tpruvot/yiimp -Original SCRIPT : https://github.com/cryptopool-builders/multipool_original_yiimp_installer +Original Yiimp Installer : https://github.com/cryptopool-builders/multipool_original_yiimp_installer *********************************** From 29429b9f0efe745f318dab117dcbe14b5e0e6921 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 12 Apr 2020 20:26:15 +0200 Subject: [PATCH 332/360] updt final info --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index da5be9a2..520bb601 100644 --- a/install.sh +++ b/install.sh @@ -1206,8 +1206,8 @@ echo -e "$RED If you want change 'AdminPanel' to access Panel Admin : Edit this file : /var/web/yaamp/modules/site/SiteController.php" echo -e "$RED Line 11 => change 'AdminPanel' and use the new address" echo - echo -e "$CYAN Please make sure to change your wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" - echo -e "$CYAN Please make sure to add your public and private keys. $COL_RESET" + echo -e "$CYAN Please make sure to change your public keys / wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" + echo -e "$CYAN Please make sure to change your private keys in the /etc/yiimp/keys.php file. $COL_RESET" echo echo -e "$CYAN TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig $COL_RESET" echo -e "$CYAN Xavatar WebSite : https://www.xavatar.com $COL_RESET" From 023d9a615309aaddd49ec5ce90147ed82a26a098 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 12 Apr 2020 20:27:39 +0200 Subject: [PATCH 333/360] fix blank --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 520bb601..e538e7fc 100644 --- a/install.sh +++ b/install.sh @@ -10,10 +10,10 @@ # ################################################################################ - ### Variable ### + ### Variable ### githubrepo=https://github.com/tpruvot/yiimp.git - githubyiimptpruvot=https://github.com/tpruvot/yiimp.git - githubyiimpKudaraidee=https://github.com/Kudaraidee/yiimp.git + githubyiimptpruvot=https://github.com/tpruvot/yiimp.git + githubyiimpKudaraidee=https://github.com/Kudaraidee/yiimp.git output() { From 1f125351f6390422d9d7909b9b61bb18eeb51f8f Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 12 Apr 2020 20:29:08 +0200 Subject: [PATCH 334/360] fix typo --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index e538e7fc..8abdef6a 100644 --- a/install.sh +++ b/install.sh @@ -12,11 +12,11 @@ ### Variable ### githubrepo=https://github.com/tpruvot/yiimp.git - githubyiimptpruvot=https://github.com/tpruvot/yiimp.git - githubyiimpKudaraidee=https://github.com/Kudaraidee/yiimp.git + githubyiimp-tpruvot=https://github.com/tpruvot/yiimp.git + githubyiimp-Kudaraidee=https://github.com/Kudaraidee/yiimp.git - output() { + output() { printf "\E[0;33;40m" echo $1 printf "\E[0m" From 6dfcd0556f0e19b4bd39a3691e32e76804037337 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 12 Apr 2020 20:31:43 +0200 Subject: [PATCH 335/360] chg address youtube video --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 8abdef6a..83e3e98b 100644 --- a/install.sh +++ b/install.sh @@ -1209,7 +1209,7 @@ echo -e "$CYAN Please make sure to change your public keys / wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" echo -e "$CYAN Please make sure to change your private keys in the /etc/yiimp/keys.php file. $COL_RESET" echo - echo -e "$CYAN TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig $COL_RESET" + echo -e "$CYAN TUTO Youtube : https://www.youtube.com/watch?v=qE0rhfJ1g2k $COL_RESET" echo -e "$CYAN Xavatar WebSite : https://www.xavatar.com $COL_RESET" echo echo From 0a11dba455a74a6398145656e4350973a55c09db Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 12 Apr 2020 20:37:15 +0200 Subject: [PATCH 336/360] fix typo --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 83e3e98b..5231c6d3 100644 --- a/install.sh +++ b/install.sh @@ -11,9 +11,10 @@ ################################################################################ ### Variable ### + #githubyiimp-tpruvot=https://github.com/tpruvot/yiimp.git + #githubyiimp-Kudaraidee=https://github.com/Kudaraidee/yiimp.git githubrepo=https://github.com/tpruvot/yiimp.git - githubyiimp-tpruvot=https://github.com/tpruvot/yiimp.git - githubyiimp-Kudaraidee=https://github.com/Kudaraidee/yiimp.git + output() { From 54ebedf8066fb71a2b5e6d7b637c9658fe17c8f4 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 12 Apr 2020 20:50:36 +0200 Subject: [PATCH 337/360] add speep5 before return service --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 5231c6d3..f101a0d8 100644 --- a/install.sh +++ b/install.sh @@ -127,6 +127,7 @@ hide_output sudo systemctl enable nginx.service hide_output sudo systemctl start cron.service hide_output sudo systemctl enable cron.service + sleep 5 sudo systemctl status nginx | sed -n "1,3p" echo echo -e "$GREEN Done...$COL_RESET" @@ -157,6 +158,7 @@ apt_install mariadb-server hide_output sudo systemctl start mysql hide_output sudo systemctl enable mysql + sleep 5 sudo systemctl status mysql | sed -n "1,3p" echo echo -e "$GREEN Done...$COL_RESET" @@ -266,6 +268,7 @@ if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then apt_install fail2ban + sleep 5 sudo systemctl status fail2ban | sed -n "1,3p" fi @@ -331,7 +334,8 @@ hide_output sudo ufw allow 8463/tcp hide_output sudo ufw allow 8433/tcp hide_output sudo ufw allow 8533/tcp - hide_output sudo ufw --force enable + hide_output sudo ufw --force enable + sleep 5 sudo systemctl status ufw | sed -n "1,3p" fi From 5e8831597d1855bba8a6e8e67b124405bdce1465 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Mon, 13 Apr 2020 11:07:40 +0200 Subject: [PATCH 338/360] fix error screen main "backup sql frontend" --- install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index f101a0d8..0b59e96f 100644 --- a/install.sh +++ b/install.sh @@ -947,6 +947,7 @@ /* Sample config file to put in /etc/yiimp/keys.php */ define('"'"'YIIMP_MYSQLDUMP_USER'"'"', '"'"'panel'"'"'); define('"'"'YIIMP_MYSQLDUMP_PASS'"'"', '"'"''"${password}"''"'"'); + define('"'"'YIIMP_MYSQLDUMP_PATH'"'"', '"'"''"/var/yiimp/sauv"''"'"'); /* Keys required to create/cancel orders and access your balances/deposit addresses */ define('"'"'EXCH_BITTREX_SECRET'"'"', '"'"''"'"'); define('"'"'EXCH_BITSTAMP_SECRET'"'"','"'"''"'"'); @@ -1023,8 +1024,7 @@ define('"'"'YAAMP_LOGS'"'"', '"'"'/var/log/yiimp'"'"'); define('"'"'YAAMP_HTDOCS'"'"', '"'"'/var/web'"'"'); - define('"'"'YIIMP_MYSQLDUMP_PATH'"'"', '"'"''"/var/yiimp/sauv"''"'"'); - + define('"'"'YAAMP_BIN'"'"', '"'"'/var/bin'"'"'); define('"'"'YAAMP_DBHOST'"'"', '"'"'localhost'"'"'); @@ -1173,6 +1173,10 @@ sudo sed -i 's/service $webserver start/sudo service $webserver start/g' /var/web/yaamp/modules/thread/CronjobController.php sudo sed -i 's/service nginx stop/sudo service nginx stop/g' /var/web/yaamp/modules/thread/CronjobController.php + #fix error screen main "backup sql frontend" + sudo sed -i "s|/root/backup|/var/yiimp/sauv|g" /var/web/yaamp/core/backend/system.php + sudo sed '14d' /var/web/yaamp/defaultconfig.php + #Misc sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* From 0c7148539cb8ab869779859bfbe448e3b325f3cd Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Mon, 13 Apr 2020 11:17:52 +0200 Subject: [PATCH 339/360] some fix + cleanup code --- install.sh | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/install.sh b/install.sh index 0b59e96f..17f9fba5 100644 --- a/install.sh +++ b/install.sh @@ -10,12 +10,6 @@ # ################################################################################ - ### Variable ### - #githubyiimp-tpruvot=https://github.com/tpruvot/yiimp.git - #githubyiimp-Kudaraidee=https://github.com/Kudaraidee/yiimp.git - githubrepo=https://github.com/tpruvot/yiimp.git - - output() { printf "\E[0;33;40m" @@ -93,7 +87,6 @@ read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC #read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel read -e -p "Enter the Public IP of the system you will use to access the admin panel (http://www.whatsmyip.org/) : " Public - #read -e -p "Enter desired Yiimp GitHub (1=tpruvot or 2=Kudaraidee) [1 by default] : " yiimpver read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban read -e -p "Install UFW and configure ports? [Y/n] : " UFW read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install @@ -376,11 +369,7 @@ # Compil Blocknotify cd ~ - #if [[ ("$yiimpver" == "1" || "$yiimpver" == "") ]];then - hide_output git clone $githubrepo - #else - #hide_output git clone $githubrepoKudaraidee - #fi + hide_output git clone https://github.com/tpruvot/yiimp cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp hide_output sudo make @@ -437,15 +426,6 @@ echo -e "$CYAN => Update default timezone. $COL_RESET" echo - # Check if link file - #sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime - # Update time zone - #sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime - #apt_install ntpdate - # Write time to clock. - #sudo hwclock -w - #echo -e "$GREEN Done...$COL_RESET" - echo -e " Setting TimeZone to UTC...$COL_RESET" if [ ! -f /etc/timezone ]; then echo "Setting timezone to UTC." @@ -457,15 +437,6 @@ echo -e "$GREEN Done...$COL_RESET" - # Making Web Server Magic Happen - #echo - #echo -e "$CYAN Making Web Server Magic Happen! $COL_RESET" - #echo - - # Adding user to group, creating dir structure, setting permissions - #sudo mkdir -p /var/www/$server_name/html - - # Creating webserver initial config file echo echo @@ -1001,13 +972,8 @@ sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql - #if [[ ("$yiimpver" == "2") ]];then echo -e "$GREEN Done...$COL_RESET" - #else - #sudo mysql --defaults-group-suffix=host1 --force < 2018-09-22-workers.sql - #echo -e "$GREEN Done...$COL_RESET" - #fi - + # Generating a basic Yiimp serverconfig.php echo @@ -1169,7 +1135,7 @@ #Add to contrab screen-scrypt (crontab -l 2>/dev/null; echo "@reboot sleep 20 && /etc/screen-scrypt.sh") | crontab - - #fix error screen main + #fix error screen main "service" sudo sed -i 's/service $webserver start/sudo service $webserver start/g' /var/web/yaamp/modules/thread/CronjobController.php sudo sed -i 's/service nginx stop/sudo service nginx stop/g' /var/web/yaamp/modules/thread/CronjobController.php From a1737c627f58899281897534df36734bfda48e9d Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Mon, 13 Apr 2020 11:36:47 +0200 Subject: [PATCH 340/360] miss -i sed "backup sql frontend" --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 17f9fba5..0112751c 100644 --- a/install.sh +++ b/install.sh @@ -1141,7 +1141,7 @@ #fix error screen main "backup sql frontend" sudo sed -i "s|/root/backup|/var/yiimp/sauv|g" /var/web/yaamp/core/backend/system.php - sudo sed '14d' /var/web/yaamp/defaultconfig.php + sudo sed -i '14d' /var/web/yaamp/defaultconfig.php #Misc sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder From ac83badd379d2831eaffd45f47b0707e521cb7fb Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 19 Apr 2020 09:41:15 +0200 Subject: [PATCH 341/360] Create install-oct18.sh --- old/install-oct18.sh | 1016 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1016 insertions(+) create mode 100644 old/install-oct18.sh diff --git a/old/install-oct18.sh b/old/install-oct18.sh new file mode 100644 index 00000000..09047723 --- /dev/null +++ b/old/install-oct18.sh @@ -0,0 +1,1016 @@ +#!/bin/bash +################################################################################ +# Original Author: crombiecrunch +# Fork Author: manfromafar +# Current Author: Xavatar (https://github.com/xavatar/yiimp_install_scrypt) +# Web: +# +# Program: +# Install yiimp on Ubuntu 16.04 running Nginx, MariaDB, and php7.0.x +# +# +################################################################################ +output() { + printf "\E[0;33;40m" + echo $1 + printf "\E[0m" +} + +displayErr() { + echo + echo $1; + echo + exit 1; +} + + output " " + output "Make sure you double check before hitting enter! Only one shot at these!" + output " " + read -e -p "Enter time zone (e.g. America/New_York) : " TIME + read -e -p "Server name (no http:// or www. just : example.com or pool.example.com) : " server_name + read -e -p "Are you using a subdomain (pool.example.com?) [y/N] : " sub_domain + read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL + read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC + read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel + read -e -p "Enter the Public IP of the system you will use to access the admin panel (http://www.whatsmyip.org/) : " Public + read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban + read -e -p "Install UFW and configure ports? [Y/n] : " UFW + read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install + + + # Update package and Upgrade Ubuntu + output " " + output "Updating system and installing required packages." + output " " + sleep 3 + + sudo apt-get -y update + sudo apt-get -y upgrade + sudo apt-get -y autoremove + + + # Switch Aptitude + output " " + output "Switching to Aptitude" + output " " + sleep 3 + + sudo apt-get -y install aptitude + + + # Installing Nginx + output " " + output "Installing Nginx server." + output " " + sleep 3 + + sudo aptitude -y install nginx + sudo rm /etc/nginx/sites-enabled/default + sudo systemctl start nginx.service + sudo systemctl enable nginx.service + sudo systemctl start cron.service + sudo systemctl enable cron.service + + + # Making Nginx a bit hard + echo 'map $http_user_agent $blockedagent { +default 0; +~*malicious 1; +~*bot 1; +~*backdoor 1; +~*crawler 1; +~*bandit 1; +} +' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 + + + # Installing Mariadb + output " " + output "Installing Mariadb Server." + output " " + sleep 3 + + # Create random password + rootpasswd=$(openssl rand -base64 12) + export DEBIAN_FRONTEND="noninteractive" + sudo aptitude -y install mariadb-server + sudo systemctl start mysql + sudo systemctl enable mysql + + + # Installing Installing php7.x + output " " + output "Installing php7.x" + output " " + sleep 3 + + sudo aptitude -y install php7.0-fpm + sudo aptitude -y install php7.0-opcache php7.0-fpm php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring + sudo phpenmod mcrypt + sudo phpenmod mbstring + sudo systemctl start php7.0-fpm.service + + + # Installing other needed files + output " " + output "Installing other needed files" + output " " + sleep 3 + + sudo aptitude -y install libgmp3-dev + sudo aptitude -y install libmysqlclient-dev + sudo aptitude -y install libcurl4-gnutls-dev + sudo aptitude -y install libkrb5-dev + sudo aptitude -y install libldap2-dev + sudo aptitude -y install libidn11-dev + sudo aptitude -y install gnutls-dev + sudo aptitude -y install librtmp-dev + sudo aptitude -y install sendmail + sudo aptitude -y install mutt + sudo aptitude -y install git screen + sudo aptitude -y install pwgen -y + + + # Installing Package to compile crypto currency + output " " + output "Installing Package to compile crypto currency" + output " " + sleep 3 + + sudo aptitude -y install software-properties-common build-essential + sudo aptitude -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev + sudo aptitude -y install libminiupnpc10 libzmq5 + sudo aptitude -y install libcanberra-gtk-module libqrencode-dev libzmq3-dev + sudo aptitude -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler + sudo add-apt-repository -y ppa:bitcoin/bitcoin + sudo apt-get -y update + sudo apt-get install -y libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ + + + # Generating Random Passwords + password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + AUTOGENERATED_PASS=`pwgen -c -1 20` + + + # Test Email + output " " + output "Testing to see if server emails are sent" + output " " + sleep 3 + + if [[ "$root_email" != "" ]]; then + echo $root_email > sudo tee --append ~/.email + echo $root_email > sudo tee --append ~/.forward + + if [[ ("$send_email" == "y" || "$send_email" == "Y" || "$send_email" == "") ]]; then + echo "This is a mail test for the SMTP Service." > sudo tee --append /tmp/email.message + echo "You should receive this !" >> sudo tee --append /tmp/email.message + echo "" >> sudo tee --append /tmp/email.message + echo "Cheers" >> sudo tee --append /tmp/email.message + sudo sendmail -s "SMTP Testing" $root_email < sudo tee --append /tmp/email.message + + sudo rm -f /tmp/email.message + echo "Mail sent" + fi + fi + + + # Installing Fail2Ban & UFW + output " " + output "Some optional installs (Fail2Ban & UFW)" + output " " + sleep 3 + + + if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then + sudo aptitude -y install fail2ban + fi + if [[ ("$UFW" == "y" || "$UFW" == "Y" || "$UFW" == "") ]]; then + sudo apt-get install ufw + sudo ufw default deny incoming + sudo ufw default allow outgoing + sudo ufw allow ssh + sudo ufw allow http + sudo ufw allow https + sudo ufw allow 3333/tcp + sudo ufw allow 3339/tcp + sudo ufw allow 3334/tcp + sudo ufw allow 3433/tcp + sudo ufw allow 3555/tcp + sudo ufw allow 3556/tcp + sudo ufw allow 3573/tcp + sudo ufw allow 3535/tcp + sudo ufw allow 3533/tcp + sudo ufw allow 3553/tcp + sudo ufw allow 3633/tcp + sudo ufw allow 3733/tcp + sudo ufw allow 3636/tcp + sudo ufw allow 3737/tcp + sudo ufw allow 3739/tcp + sudo ufw allow 3747/tcp + sudo ufw allow 3833/tcp + sudo ufw allow 3933/tcp + sudo ufw allow 4033/tcp + sudo ufw allow 4133/tcp + sudo ufw allow 4233/tcp + sudo ufw allow 4234/tcp + sudo ufw allow 4333/tcp + sudo ufw allow 4433/tcp + sudo ufw allow 4533/tcp + sudo ufw allow 4553/tcp + sudo ufw allow 4633/tcp + sudo ufw allow 4733/tcp + sudo ufw allow 4833/tcp + sudo ufw allow 4933/tcp + sudo ufw allow 5033/tcp + sudo ufw allow 5133/tcp + sudo ufw allow 5233/tcp + sudo ufw allow 5333/tcp + sudo ufw allow 5433/tcp + sudo ufw allow 5533/tcp + sudo ufw allow 5733/tcp + sudo ufw allow 5743/tcp + sudo ufw allow 3252/tcp + sudo ufw allow 5755/tcp + sudo ufw allow 5766/tcp + sudo ufw allow 5833/tcp + sudo ufw allow 5933/tcp + sudo ufw allow 6033/tcp + sudo ufw allow 5034/tcp + sudo ufw allow 6133/tcp + sudo ufw allow 6233/tcp + sudo ufw allow 6333/tcp + sudo ufw allow 6433/tcp + sudo ufw allow 7433/tcp + sudo ufw allow 8333/tcp + sudo ufw allow 8463/tcp + sudo ufw allow 8433/tcp + sudo ufw allow 8533/tcp + sudo ufw --force enable + fi + + + # Installing PhpMyAdmin + output " " + output "Installing phpmyadmin" + output " " + sleep 3 + + echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/admin-user string root" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/admin-pass password $rootpasswd" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/app-pass password $AUTOGENERATED_PASS" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections + sudo aptitude -y install phpmyadmin + + + # Installing Yiimp + output " " + output " Installing Yiimp" + output " " + output "Grabbing yiimp fron Github, building files and setting file structure." + output " " + sleep 3 + + + # Generating Random Password for stratum + blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + + # Compil Blocknotify + cd ~ + git clone https://github.com/tpruvot/yiimp.git + cd $HOME/yiimp/blocknotify + sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp + sudo make + + # Compil iniparser + cd $HOME/yiimp/stratum/iniparser + sudo make + + # Compil Stratum + cd $HOME/yiimp/stratum + if [[ ("$BTC" == "y" || "$BTC" == "Y") ]]; then + sudo sed -i 's/CFLAGS += -DNO_EXCHANGE/#CFLAGS += -DNO_EXCHANGE/' $HOME/yiimp/stratum/Makefile + sudo make + fi + sudo make + + # Copy Files (Blocknotify,iniparser,Stratum) + cd $HOME/yiimp + sudo sed -i 's/AdminRights/'$admin_panel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php + sudo cp -r $HOME/yiimp/web /var/ + sudo mkdir -p /var/stratum + cd $HOME/yiimp/stratum + sudo cp -a config.sample/. /var/stratum/config + sudo cp -r stratum /var/stratum + sudo cp -r run.sh /var/stratum + cd $HOME/yiimp + sudo cp -r $HOME/yiimp/bin/. /bin/ + sudo cp -r $HOME/yiimp/blocknotify/blocknotify /usr/bin/ + sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum/ + sudo mkdir -p /etc/yiimp + sudo mkdir -p /$HOME/backup/ + #fixing yiimp + sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp + #fixing run.sh + sudo rm -r /var/stratum/config/run.sh + echo ' +#!/bin/bash +ulimit -n 10240 +ulimit -u 10240 +cd /var/stratum +while true; do +./stratum /var/stratum/config/$1 +sleep 2 +done +exec bash +' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 + sudo chmod +x /var/stratum/config/run.sh + + + # Update Timezone + output " " + output "Update default timezone." + output " " + + # Check if link file + sudo [ -L /etc/localtime ] && sudo unlink /etc/localtime + + # Update time zone + sudo ln -sf /usr/share/zoneinfo/$TIME /etc/localtime + sudo aptitude -y install ntpdate + + # Write time to clock. + sudo hwclock -w + + + # Making Web Server Magic Happen + output " " + output "Making Web Server Magic Happen!" + output " " + + # Adding user to group, creating dir structure, setting permissions + sudo mkdir -p /var/www/$server_name/html + + + # Creating webserver initial config file + output " " + output "Creating webserver initial config file" + output " " + + if [[ ("$sub_domain" == "y" || "$sub_domain" == "Y") ]]; then + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"'; + root "/var/www/'"${server_name}"'/html/web"; + index index.html index.htm index.php; + charset utf-8; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + location ~ /\.ht { + deny all; + } + location ~ /.well-known { + allow all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + + sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf + sudo ln -s /var/web /var/www/$server_name/html + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + + # Install SSL (with SubDomain) + output " " + output "Install LetsEncrypt and setting SSL (with SubDomain)" + output " " + + sudo aptitude -y install letsencrypt + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" + sudo rm /etc/nginx/sites-available/$server_name.conf + sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 + # I am SSL Man! + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"'; + # enforce https + return 301 https://$server_name$request_uri; + } + + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name '"${server_name}"'; + + root /var/www/'"${server_name}"'/html/web; + index index.php; + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + # strengthen ssl security + ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + ssl_dhparam /etc/ssl/certs/dhparam.pem; + + # Add headers to serve security related headers + add_header Strict-Transport-Security "max-age=15768000; preload;"; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header Content-Security-Policy "frame-ancestors 'self'"; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + include /etc/nginx/fastcgi_params; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + + location ~ /\.ht { + deny all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } + +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + fi + + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + + else + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"' www.'"${server_name}"'; + root "/var/www/'"${server_name}"'/html/web"; + index index.html index.htm index.php; + charset utf-8; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + location ~ /\.ht { + deny all; + } + location ~ /.well-known { + allow all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + + sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf + sudo ln -s /var/web /var/www/$server_name/html + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + + # Install SSL (without SubDomain) + output " " + output "Install LetsEncrypt and setting SSL (without SubDomain)" + output " " + sleep 3 + + sudo aptitude -y install letsencrypt + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" + sudo rm /etc/nginx/sites-available/$server_name.conf + sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 + # I am SSL Man! + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"'; + # enforce https + return 301 https://$server_name$request_uri; + } + + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name '"${server_name}"' www.'"${server_name}"'; + + root /var/www/'"${server_name}"'/html/web; + index index.php; + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + # strengthen ssl security + ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + ssl_dhparam /etc/ssl/certs/dhparam.pem; + + # Add headers to serve security related headers + add_header Strict-Transport-Security "max-age=15768000; preload;"; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header Content-Security-Policy "frame-ancestors 'self'"; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + include /etc/nginx/fastcgi_params; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + + location ~ /\.ht { + deny all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } + +' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + + fi + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + fi + + + # Config Database + output " " + output "Now for the database fun!" + output " " + sleep 3 + + # Create database + Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" + Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" + Q3="FLUSH PRIVILEGES;" + SQL="${Q1}${Q2}${Q3}" + sudo mysql -u root -p="" -e "$SQL" + + # Create stratum user + Q1="GRANT ALL ON *.* TO 'stratum'@'localhost' IDENTIFIED BY '$password2';" + Q2="FLUSH PRIVILEGES;" + SQL="${Q1}${Q2}" + sudo mysql -u root -p="" -e "$SQL" + + #Create my.cnf + + echo ' +[clienthost1] +user=panel +password='"${password}"' +database=yiimpfrontend +host=localhost +[clienthost2] +user=stratum +password='"${password2}"' +database=yiimpfrontend +host=localhost +[myphpadmin] +user=phpmyadmin +password='"${AUTOGENERATED_PASS}"' +[mysql] +user=root +password='"${rootpasswd}"' +' | sudo -E tee ~/.my.cnf >/dev/null 2>&1 + sudo chmod 0600 ~/.my.cnf + + # Create keys file + echo ' + '"'"'); +define('"'"'EXCH_BITSTAMP_SECRET'"'"','"'"''"'"'); +define('"'"'EXCH_BLEUTRADE_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_BTER_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_CCEX_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_COINMARKETS_PASS'"'"', '"'"''"'"'); +define('"'"'EXCH_CRYPTOPIA_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_EMPOEX_SECKEY'"'"', '"'"''"'"'); +define('"'"'EXCH_HITBTC_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_KRAKEN_SECRET'"'"','"'"''"'"'); +define('"'"'EXCH_LIVECOIN_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_NOVA_SECRET'"'"','"'"''"'"'); +define('"'"'EXCH_POLONIEX_SECRET'"'"', '"'"''"'"'); +define('"'"'EXCH_YOBIT_SECRET'"'"', '"'"''"'"'); +' | sudo -E tee /etc/yiimp/keys.php >/dev/null 2>&1 + + + # Peforming the SQL import + output " " + output "Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you" + output " " + output "Peforming the SQL import" + output " " + sleep 3 + + cd ~ + cd yiimp/sql + + # Import sql dump + sudo zcat 2016-04-03-yaamp.sql.gz | sudo mysql --defaults-group-suffix=host1 + + # Oh the humanity! + sudo mysql --defaults-group-suffix=host1 --force < 2016-04-24-market_history.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-04-27-settings.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-11-coins.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-15-benchmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-23-bookmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-06-01-notifications.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-06-04-bench_chips.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-11-23-coins.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-02-05-benchmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-03-31-earnings_index.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-05-accounts_case_swaptime.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-06-payouts_coinid_memo.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-09-notifications.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-10-bookmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql + sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql + sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql + + + # Generating a basic Yiimp serverconfig.php + output " " + output "Generating a basic Yiimp serverconfig.php" + output " " + sleep 3 + + # Make config file +echo ' + 0.3 +define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); +// nicehash keys deposit account & amount to deposit at a time +define('"'"'NICEHASH_API_KEY'"'"','"'"'f96c65a7-3d2f-4f3a-815c-cacf00674396'"'"'); +define('"'"'NICEHASH_API_ID'"'"','"'"'825979'"'"'); +define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3ABoqBjeorjzbyHmGMppM62YLssUgJhtuf'"'"'); +define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); +$cold_wallet_table = array( + '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"' => 0.10, +); +// Sample fixed pool fees +$configFixedPoolFees = array( + '"'"'zr5'"'"' => 2.0, + '"'"'scrypt'"'"' => 20.0, + '"'"'sha256'"'"' => 5.0, +); +// Sample custom stratum ports +$configCustomPorts = array( +// '"'"'x11'"'"' => 7000, +); +// mBTC Coefs per algo (default is 1.0) +$configAlgoNormCoef = array( +// '"'"'x11'"'"' => 5.0, +); +' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 + + + # Updating stratum config files with database connection info + output " " + output "Updating stratum config files with database connection info." + output " " + sleep 3 + + cd /var/stratum/config + sudo sed -i 's/password = tu8tu5/password = '$blckntifypass'/g' *.conf + sudo sed -i 's/server = yaamp.com/server = '$server_name'/g' *.conf + sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf + sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf + sudo sed -i 's/username = root/username = stratum/g' *.conf + sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf + cd ~ + + + # Final Directory permissions + output " " + output "Final Directory permissions" + output " " + sleep 3 + + whoami=`whoami` + sudo mkdir /root/backup/ + #sudo usermod -aG www-data $whoami + #sudo chown -R www-data:www-data /var/log + sudo chown -R www-data:www-data /var/stratum + sudo chown -R www-data:www-data /var/web + sudo touch /var/log/debug.log + sudo chown -R www-data:www-data /var/log/debug.log + sudo chmod -R 775 /var/www/$server_name/html + sudo chmod -R 775 /var/web + sudo chmod -R 775 /var/stratum + sudo chmod -R 775 /var/web/yaamp/runtime + sudo chmod -R 664 /root/backup/ + sudo chmod -R 644 /var/log/debug.log + sudo chmod -R 775 /var/web/serverconfig.php + sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder + sudo rm -rf /var/log/nginx/* + sudo systemctl reload php7.0-fpm.service + sudo systemctl restart nginx.service + + + output " " + output " " + output " " + output " " + output "Whew that was fun, just some reminders. Your mysql information is saved in ~/.my.cnf. this installer did not directly install anything required to build coins." + output " " + output "Please make sure to change your wallet addresses in the /var/web/serverconfig.php file." + output " " + output "Please make sure to add your public and private keys." + output " " + output "TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig" + output " " + output " " \ No newline at end of file From ceee7a62b840d554da69c0bf0aa27cb74b420690 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 19 Apr 2020 09:49:04 +0200 Subject: [PATCH 342/360] Update install-v0.1.sh --- old/install-v0.1.sh | 51 +++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/old/install-v0.1.sh b/old/install-v0.1.sh index 9d145fa6..b78d7e85 100644 --- a/old/install-v0.1.sh +++ b/old/install-v0.1.sh @@ -829,6 +829,7 @@ password='"${rootpasswd}"' /* Sample config file to put in /etc/yiimp/keys.php */ define('"'"'YIIMP_MYSQLDUMP_USER'"'"', '"'"'panel'"'"'); define('"'"'YIIMP_MYSQLDUMP_PASS'"'"', '"'"''"${password}"''"'"'); +define('"'"'YIIMP_MYSQLDUMP_PATH'"'"', '"'"''"/var/yiimp/sauv"''"'"'); /* Keys required to create/cancel orders and access your balances/deposit addresses */ define('"'"'EXCH_BITTREX_SECRET'"'"', '"'"''"'"'); define('"'"'EXCH_BITSTAMP_SECRET'"'"','"'"''"'"'); @@ -1010,44 +1011,40 @@ $configAlgoNormCoef = array( output " " sleep 3 - #whoami=`whoami` - #sudo mkdir /root/backup/ - #sudo usermod -aG www-data $whoami - #sudo chown -R www-data:www-data /var/log - #sudo chown -R www-data:www-data /var/stratum - #sudo chown -R www-data:www-data /var/web - #sudo touch /var/log/debug.log - #sudo chown -R www-data:www-data /var/log/debug.log - #sudo chmod -R 775 /var/www/$server_name/html - #sudo chmod -R 775 /var/web - #sudo chmod -R 775 /var/stratum - #sudo chmod -R 775 /var/web/yaamp/runtime - #sudo chmod -R 664 /root/backup/ - #sudo chmod -R 644 /var/log/debug.log - #sudo chmod -R 775 /var/web/serverconfig.php - whoami=`whoami` sudo usermod -aG www-data $whoami sudo usermod -a -G www-data $whoami - sudo mkdir /root/backup/ + sudo find /var/web -type d -exec chmod 775 {} + + sudo find /var/web -type f -exec chmod 664 {} + + sudo chgrp www-data /var/web -R + sudo chmod g+w /var/web -R sudo mkdir /var/log/yiimp sudo touch /var/log/yiimp/debug.log - sudo chown -R www-data:www-data /var/log/yiimp - sudo chmod -R 775 /var/log/yiimp + sudo chgrp www-data /var/log/yiimp -R + sudo chmod 775 /var/log/yiimp -R - sudo chown -R www-data:www-data /var/stratum - sudo chmod -R 775 /var/stratum + sudo chgrp www-data /var/stratum -R + sudo chmod 775 /var/stratum - sudo chown -R www-data:www-data /var/web - sudo chmod -R 775 /var/web - sudo find /var/web -type d -exec chmod 755 {} + - sudo find /var/web -type f -exec chmod 664 {} + - sudo chgrp www-data /var/web -R - sudo chmod g+w /var/web -R + sudo mkdir -p /var/yiimp/sauv + sudo chgrp www-data /var/yiimp -R + sudo chmod 775 /var/yiimp -R + + + #Add to contrab screen-scrypt + (crontab -l 2>/dev/null; echo "@reboot sleep 20 && /etc/screen-scrypt.sh") | crontab - + + #fix error screen main "service" + sudo sed -i 's/service $webserver start/sudo service $webserver start/g' /var/web/yaamp/modules/thread/CronjobController.php + sudo sed -i 's/service nginx stop/sudo service nginx stop/g' /var/web/yaamp/modules/thread/CronjobController.php + #fix error screen main "backup sql frontend" + sudo sed -i "s|/root/backup|/var/yiimp/sauv|g" /var/web/yaamp/core/backend/system.php + sudo sed -i '14d' /var/web/yaamp/defaultconfig.php + #Misc sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* From 8de0e15f683f4974ba5f4716e737743282eadc53 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 19 Apr 2020 10:10:56 +0200 Subject: [PATCH 343/360] Update install-v0.1.sh --- old/install-v0.1.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/old/install-v0.1.sh b/old/install-v0.1.sh index b78d7e85..abe085f2 100644 --- a/old/install-v0.1.sh +++ b/old/install-v0.1.sh @@ -22,6 +22,16 @@ displayErr() { echo exit 1; } + + #Add user group sudo + no password + whoami=`whoami` + sudo usermod -aG sudo ${whoami} + echo '# yiimp + # It needs passwordless sudo functionality. + '""''"${whoami}"''""' ALL=(ALL) NOPASSWD:ALL + ' | sudo -E tee /etc/sudoers.d/${whoami} >/dev/null 2>&1 + + clear output " " output "Yiimp Install Script v0.1" From 5e440264046eb4aa6dc86f08a12b164d15ce88e6 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 19 Apr 2020 10:14:17 +0200 Subject: [PATCH 344/360] Update install-v0.1.sh --- old/install-v0.1.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/old/install-v0.1.sh b/old/install-v0.1.sh index abe085f2..cc107367 100644 --- a/old/install-v0.1.sh +++ b/old/install-v0.1.sh @@ -31,6 +31,9 @@ displayErr() { '""''"${whoami}"''""' ALL=(ALL) NOPASSWD:ALL ' | sudo -E tee /etc/sudoers.d/${whoami} >/dev/null 2>&1 + #Copy needed files + sudo cp -r ../utils/screen-scrypt.sh /etc/ + clear output " " From e8e9ebaa6a1dba930e084320ea01c12b1fe77f06 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 19 Apr 2020 10:24:41 +0200 Subject: [PATCH 345/360] Create install-debug.sh --- install-debug.sh | 1195 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1195 insertions(+) create mode 100644 install-debug.sh diff --git a/install-debug.sh b/install-debug.sh new file mode 100644 index 00000000..3ae8f802 --- /dev/null +++ b/install-debug.sh @@ -0,0 +1,1195 @@ +#!/bin/bash +################################################################################ +# Original Author: crombiecrunch +# Modified by : Xavatar (https://github.com/xavatar/yiimp_install_scrypt) +# Web: https://www.xavatar.com +# +# Program: +# Install yiimp on Ubuntu 16.04/18.04 running Nginx, MariaDB, and php7.3 +# v0.2 (update Avril, 2020) +# +################################################################################ + + + output() { + printf "\E[0;33;40m" + echo $1 + printf "\E[0m" + } + + displayErr() { + echo + echo $1; + echo + exit 1; + } + + #Add user group sudo + no password + whoami=`whoami` + sudo usermod -aG sudo ${whoami} + echo '# yiimp + # It needs passwordless sudo functionality. + '""''"${whoami}"''""' ALL=(ALL) NOPASSWD:ALL + ' | sudo -E tee /etc/sudoers.d/${whoami} >/dev/null 2>&1 + + #Copy needed files + sudo cp -r conf/functions.sh /etc/ + sudo cp -r utils/screen-scrypt.sh /etc/ + sudo cp -r conf/editconf.py /usr/bin/ + sudo chmod +x /usr/bin/editconf.py + sudo chmod +x /etc/screen-scrypt.sh + + source /etc/functions.sh + + + clear + echo + echo -e "$GREEN************************************************************************$COL_RESET" + echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" + echo -e "$GREEN Install yiimp on Ubuntu 16.04/18.04 running Nginx, MariaDB, and php7.3 $COL_RESET" + echo -e "$GREEN************************************************************************$COL_RESET" + echo + sleep 3 + + + # Update package and Upgrade Ubuntu + echo + echo + echo -e "$CYAN => Updating system and installing required packages :$COL_RESET" + echo + sleep 3 + + hide_output sudo apt -y update + hide_output sudo apt -y upgrade + hide_output sudo apt -y autoremove + apt_install dialog python3 python3-pip acl nano apt-transport-https + echo -e "$GREEN Done...$COL_RESET" + + + source conf/prerequisite.sh + sleep 3 + source conf/getip.sh + + + echo 'PUBLIC_IP='"${PUBLIC_IP}"' + PUBLIC_IPV6='"${PUBLIC_IPV6}"' + DISTRO='"${DISTRO}"' + PRIVATE_IP='"${PRIVATE_IP}"'' | sudo -E tee conf/pool.conf >/dev/null 2>&1 + + echo + echo + echo -e "$RED Make sure you double check before hitting enter! Only one shot at these! $COL_RESET" + echo + #read -e -p "Enter time zone (e.g. America/New_York) : " TIME + read -e -p "Domain Name (no http:// or www. just : example.com or pool.example.com or 185.22.24.26) : " server_name + read -e -p "Are you using a subdomain (mycryptopool.example.com?) [y/N] : " sub_domain + read -e -p "Enter support email (e.g. admin@example.com) : " EMAIL + read -e -p "Set Pool to AutoExchange? i.e. mine any coin with BTC address? [y/N] : " BTC + #read -e -p "Please enter a new location for /site/adminRights this is to customize the Admin Panel entrance url (e.g. myAdminpanel) : " admin_panel + read -e -p "Enter the Public IP of the system you will use to access the admin panel (http://www.whatsmyip.org/) : " Public + read -e -p "Install Fail2ban? [Y/n] : " install_fail2ban + read -e -p "Install UFW and configure ports? [Y/n] : " UFW + read -e -p "Install LetsEncrypt SSL? IMPORTANT! You MUST have your domain name pointed to this server prior to running the script!! [Y/n]: " ssl_install + + + # Switch Aptitude + #echo + #echo -e "$CYAN Switching to Aptitude $COL_RESET" + #echo + #sleep 3 + #apt_install aptitude + #echo -e "$GREEN Done...$COL_RESET $COL_RESET" + + + # Installing Nginx + echo + echo + echo -e "$CYAN => Installing Nginx server : $COL_RESET" + echo + sleep 3 + + if [ -f /usr/sbin/apache2 ]; then + echo -e "Removing apache..." + hide_output apt-get -y purge apache2 apache2-* + hide_output apt-get -y --purge autoremove + fi + + apt_install nginx + hide_output sudo rm /etc/nginx/sites-enabled/default + hide_output sudo systemctl start nginx.service + hide_output sudo systemctl enable nginx.service + hide_output sudo systemctl start cron.service + hide_output sudo systemctl enable cron.service + sleep 5 + sudo systemctl status nginx | sed -n "1,3p" + echo + echo -e "$GREEN Done...$COL_RESET" + + + # Making Nginx a bit hard + echo 'map $http_user_agent $blockedagent { + default 0; + ~*malicious 1; + ~*bot 1; + ~*backdoor 1; + ~*crawler 1; + ~*bandit 1; + } + ' | sudo -E tee /etc/nginx/blockuseragents.rules >/dev/null 2>&1 + + + # Installing Mariadb + echo + echo + echo -e "$CYAN => Installing Mariadb Server : $COL_RESET" + echo + sleep 3 + + # Create random password + rootpasswd=$(openssl rand -base64 12) + export DEBIAN_FRONTEND="noninteractive" + apt_install mariadb-server + hide_output sudo systemctl start mysql + hide_output sudo systemctl enable mysql + sleep 5 + sudo systemctl status mysql | sed -n "1,3p" + echo + echo -e "$GREEN Done...$COL_RESET" + + + # Installing Installing php7.3 + echo + echo + echo -e "$CYAN => Installing php7.3 : $COL_RESET" + echo + sleep 3 + + source conf/pool.conf + if [ ! -f /etc/apt/sources.list.d/ondrej-php-bionic.list ]; then + hide_output sudo add-apt-repository -y ppa:ondrej/php + fi + hide_output sudo apt -y update + + if [[ ("$DISTRO" == "16") ]]; then + apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ + php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ + php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring + #hide_output sudo phpenmod mcrypt + #hide_output sudo phpenmod mbstring + else + apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ + php7.3-cgi php-pear imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ + php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring \ + libpsl-dev libnghttp2-dev + fi + sleep 5 + hide_output sudo systemctl start php7.3-fpm + sudo systemctl status php7.3-fpm | sed -n "1,3p" + echo + echo -e "$GREEN Done...$COL_RESET" + + + # Installing other needed files + echo + echo + echo -e "$CYAN => Installing other needed files : $COL_RESET" + echo + sleep 3 + + apt_install libgmp3-dev libmysqlclient-dev libcurl4-gnutls-dev libkrb5-dev libldap2-dev libidn11-dev gnutls-dev \ + librtmp-dev sendmail mutt screen git + apt_install pwgen -y + echo -e "$GREEN Done...$COL_RESET" + sleep 3 + + + # Installing Package to compile crypto currency + echo + echo + echo -e "$CYAN => Installing Package to compile crypto currency $COL_RESET" + echo + sleep 3 + + apt_install software-properties-common build-essential + apt_install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext + apt_install libminiupnpc10 libzmq5 + apt_install libcanberra-gtk-module libqrencode-dev libzmq3-dev + apt_install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler + hide_output sudo add-apt-repository -y ppa:bitcoin/bitcoin + hide_output sudo apt -y update + apt_install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ + echo -e "$GREEN Done...$COL_RESET" + + + # Generating Random Passwords + password=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + password2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + AUTOGENERATED_PASS=`pwgen -c -1 20` + + + # Test Email + echo + echo + echo -e "$CYAN => Testing to see if server emails are sent $COL_RESET" + echo + sleep 3 + + if [[ "$root_email" != "" ]]; then + echo $root_email > sudo tee --append ~/.email + echo $root_email > sudo tee --append ~/.forward + + if [[ ("$send_email" == "y" || "$send_email" == "Y" || "$send_email" == "") ]]; then + echo "This is a mail test for the SMTP Service." > sudo tee --append /tmp/email.message + echo "You should receive this !" >> sudo tee --append /tmp/email.message + echo "" >> sudo tee --append /tmp/email.message + echo "Cheers" >> sudo tee --append /tmp/email.message + sudo sendmail -s "SMTP Testing" $root_email < sudo tee --append /tmp/email.message + + sudo rm -f /tmp/email.message + echo "Mail sent" + fi + fi + echo -e "$GREEN Done...$COL_RESET" + + # Installing Fail2Ban & UFW + echo + echo + echo -e "$CYAN => Some optional installs (Fail2Ban & UFW) $COL_RESET" + echo + sleep 3 + + + if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then + apt_install fail2ban + sleep 5 + sudo systemctl status fail2ban | sed -n "1,3p" + fi + + + if [[ ("$UFW" == "y" || "$UFW" == "Y" || "$UFW" == "") ]]; then + apt_install ufw + hide_output sudo ufw default deny incoming + hide_output sudo ufw default allow outgoing + hide_output sudo ufw allow ssh + hide_output sudo ufw allow http + hide_output sudo ufw allow https + hide_output sudo ufw allow 3333/tcp + hide_output sudo ufw allow 3339/tcp + hide_output sudo ufw allow 3334/tcp + hide_output sudo ufw allow 3433/tcp + hide_output sudo ufw allow 3555/tcp + hide_output sudo ufw allow 3556/tcp + hide_output sudo ufw allow 3573/tcp + hide_output sudo ufw allow 3535/tcp + hide_output sudo ufw allow 3533/tcp + hide_output sudo ufw allow 3553/tcp + hide_output sudo ufw allow 3633/tcp + hide_output sudo ufw allow 3733/tcp + hide_output sudo ufw allow 3636/tcp + hide_output sudo ufw allow 3737/tcp + hide_output sudo ufw allow 3739/tcp + hide_output sudo ufw allow 3747/tcp + hide_output sudo ufw allow 3833/tcp + hide_output sudo ufw allow 3933/tcp + hide_output sudo ufw allow 4033/tcp + hide_output sudo ufw allow 4133/tcp + hide_output sudo ufw allow 4233/tcp + hide_output sudo ufw allow 4234/tcp + hide_output sudo ufw allow 4333/tcp + hide_output sudo ufw allow 4433/tcp + hide_output sudo ufw allow 4533/tcp + hide_output sudo ufw allow 4553/tcp + hide_output sudo ufw allow 4633/tcp + hide_output sudo ufw allow 4733/tcp + hide_output sudo ufw allow 4833/tcp + hide_output sudo ufw allow 4933/tcp + hide_output sudo ufw allow 5033/tcp + hide_output sudo ufw allow 5133/tcp + hide_output sudo ufw allow 5233/tcp + hide_output sudo ufw allow 5333/tcp + hide_output sudo ufw allow 5433/tcp + hide_output sudo ufw allow 5533/tcp + hide_output sudo ufw allow 5733/tcp + hide_output sudo ufw allow 5743/tcp + hide_output sudo ufw allow 3252/tcp + hide_output sudo ufw allow 5755/tcp + hide_output sudo ufw allow 5766/tcp + hide_output sudo ufw allow 5833/tcp + hide_output sudo ufw allow 5933/tcp + hide_output sudo ufw allow 6033/tcp + hide_output sudo ufw allow 5034/tcp + hide_output sudo ufw allow 6133/tcp + hide_output sudo ufw allow 6233/tcp + hide_output sudo ufw allow 6333/tcp + hide_output sudo ufw allow 6433/tcp + hide_output sudo ufw allow 7433/tcp + hide_output sudo ufw allow 8333/tcp + hide_output sudo ufw allow 8463/tcp + hide_output sudo ufw allow 8433/tcp + hide_output sudo ufw allow 8533/tcp + hide_output sudo ufw --force enable + sleep 5 + sudo systemctl status ufw | sed -n "1,3p" + fi + + + echo + echo -e "$GREEN Done...$COL_RESET" + + + # Installing PhpMyAdmin + echo + echo + echo -e "$CYAN => Installing phpMyAdmin $COL_RESET" + echo + sleep 3 + + echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/admin-user string root" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/admin-pass password $rootpasswd" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/mysql/app-pass password $AUTOGENERATED_PASS" | sudo debconf-set-selections + echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections + apt_install phpmyadmin + echo -e "$GREEN Done...$COL_RESET" + + + # Installing Yiimp + echo + echo + echo -e "$CYAN => Installing Yiimp $COL_RESET" + echo + echo -e "Grabbing yiimp fron Github, building files and setting file structure." + echo + sleep 3 + + + # Generating Random Password for stratum + blckntifypass=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` + + # Compil Blocknotify + cd ~ + hide_output git clone https://github.com/tpruvot/yiimp + cd $HOME/yiimp/blocknotify + sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp + hide_output sudo make + + # Compil iniparser + cd $HOME/yiimp/stratum/iniparser + hide_output sudo make + + # Compil Stratum + cd $HOME/yiimp/stratum + if [[ ("$BTC" == "y" || "$BTC" == "Y") ]]; then + sudo sed -i 's/CFLAGS += -DNO_EXCHANGE/#CFLAGS += -DNO_EXCHANGE/' $HOME/yiimp/stratum/Makefile + fi + hide_output sudo make + + # Copy Files (Blocknotify,iniparser,Stratum) + cd $HOME/yiimp + sudo sed -i 's/AdminRights/'AdminPanel'/' $HOME/yiimp/web/yaamp/modules/site/SiteController.php + sudo cp -r $HOME/yiimp/web /var/ + sudo mkdir -p /var/stratum + cd $HOME/yiimp/stratum + sudo cp -a config.sample/. /var/stratum/config + sudo cp -r stratum /var/stratum + sudo cp -r run.sh /var/stratum + cd $HOME/yiimp + sudo cp -r $HOME/yiimp/bin/. /bin/ + sudo cp -r $HOME/yiimp/blocknotify/blocknotify /usr/bin/ + sudo cp -r $HOME/yiimp/blocknotify/blocknotify /var/stratum/ + sudo mkdir -p /etc/yiimp + sudo mkdir -p /$HOME/backup/ + #fixing yiimp + sudo sed -i "s|ROOTDIR=/data/yiimp|ROOTDIR=/var|g" /bin/yiimp + #fixing run.sh + sudo rm -r /var/stratum/config/run.sh + echo ' + #!/bin/bash + ulimit -n 10240 + ulimit -u 10240 + cd /var/stratum + while true; do + ./stratum /var/stratum/config/$1 + sleep 2 + done + exec bash + ' | sudo -E tee /var/stratum/config/run.sh >/dev/null 2>&1 + sudo chmod +x /var/stratum/config/run.sh + + echo -e "$GREEN Done...$COL_RESET" + + + # Update Timezone + echo + echo + echo -e "$CYAN => Update default timezone. $COL_RESET" + echo + + echo -e " Setting TimeZone to UTC...$COL_RESET" + if [ ! -f /etc/timezone ]; then + echo "Setting timezone to UTC." + echo "Etc/UTC" > sudo /etc/timezone + sudo systemctl restart rsyslog + fi + sudo systemctl status rsyslog | sed -n "1,3p" + echo + echo -e "$GREEN Done...$COL_RESET" + + + # Creating webserver initial config file + echo + echo + echo -e "$CYAN => Creating webserver initial config file $COL_RESET" + echo + + # Adding user to group, creating dir structure, setting permissions + sudo mkdir -p /var/www/$server_name/html + + if [[ ("$sub_domain" == "y" || "$sub_domain" == "Y") ]]; then + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"'; + root "/var/www/'"${server_name}"'/html/web"; + index index.html index.htm index.php; + charset utf-8; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + location ~ /\.ht { + deny all; + } + location ~ /.well-known { + allow all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.3-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + + sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf + sudo ln -s /var/web /var/www/$server_name/html + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" + + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + + + # Install SSL (with SubDomain) + echo + echo -e "Install LetsEncrypt and setting SSL (with SubDomain)" + echo + + apt_install letsencrypt + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" + sudo rm /etc/nginx/sites-available/$server_name.conf + sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 + # I am SSL Man! + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"'; + # enforce https + return 301 https://$server_name$request_uri; + } + + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name '"${server_name}"'; + + root /var/www/'"${server_name}"'/html/web; + index index.php; + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + # strengthen ssl security + ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + ssl_dhparam /etc/ssl/certs/dhparam.pem; + + # Add headers to serve security related headers + add_header Strict-Transport-Security "max-age=15768000; preload;"; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header Content-Security-Policy "frame-ancestors 'self'"; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + include /etc/nginx/fastcgi_params; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + + location ~ /\.ht { + deny all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.3-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } + + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + fi + + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" + + + else + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"' www.'"${server_name}"'; + root "/var/www/'"${server_name}"'/html/web"; + index index.html index.htm index.php; + charset utf-8; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + location ~ /\.ht { + deny all; + } + location ~ /.well-known { + allow all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.3-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + + sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf + sudo ln -s /var/web /var/www/$server_name/html + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service + echo -e "$GREEN Done...$COL_RESET" + + + if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then + + # Install SSL (without SubDomain) + echo + echo -e "Install LetsEncrypt and setting SSL (without SubDomain)" + echo + sleep 3 + + apt_install letsencrypt + sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" + sudo rm /etc/nginx/sites-available/$server_name.conf + sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 + # I am SSL Man! + echo 'include /etc/nginx/blockuseragents.rules; + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 80; + listen [::]:80; + server_name '"${server_name}"'; + # enforce https + return 301 https://$server_name$request_uri; + } + + server { + if ($blockedagent) { + return 403; + } + if ($request_method !~ ^(GET|HEAD|POST)$) { + return 444; + } + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name '"${server_name}"' www.'"${server_name}"'; + + root /var/www/'"${server_name}"'/html/web; + index index.php; + + access_log /var/log/nginx/'"${server_name}"'.app-access.log; + error_log /var/log/nginx/'"${server_name}"'.app-error.log; + + # allow larger file uploads and longer script runtimes + client_body_buffer_size 50k; + client_header_buffer_size 50k; + client_max_body_size 50k; + large_client_header_buffers 2 50k; + sendfile off; + + # strengthen ssl security + ssl_certificate /etc/letsencrypt/live/'"${server_name}"'/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/'"${server_name}"'/privkey.pem; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + ssl_dhparam /etc/ssl/certs/dhparam.pem; + + # Add headers to serve security related headers + add_header Strict-Transport-Security "max-age=15768000; preload;"; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header Content-Security-Policy "frame-ancestors 'self'"; + + location / { + try_files $uri $uri/ /index.php?$args; + } + location @rewrite { + rewrite ^/(.*)$ /index.php?r=$1; + } + + + location ~ ^/index\.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + include /etc/nginx/fastcgi_params; + try_files $uri $uri/ =404; + } + location ~ \.php$ { + return 404; + } + location ~ \.sh { + return 404; + } + + location ~ /\.ht { + deny all; + } + location /phpmyadmin { + root /usr/share/; + index index.php; + try_files $uri $uri/ =404; + location ~ ^/phpmyadmin/(doc|sql|setup)/ { + deny all; + } + location ~ /phpmyadmin/(.+\.php)$ { + fastcgi_pass unix:/run/php/php7.3-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include snippets/fastcgi-php.conf; + } + } + } + + ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 + + echo -e "$GREEN Done...$COL_RESET" + + fi + hide_output sudo systemctl reload php7.3-fpm.service + hide_output sudo systemctl restart nginx.service + fi + + + # Config Database + echo + echo + echo -e "$CYAN => Now for the database fun! $COL_RESET" + echo + sleep 3 + + # Create database + Q1="CREATE DATABASE IF NOT EXISTS yiimpfrontend;" + Q2="GRANT ALL ON *.* TO 'panel'@'localhost' IDENTIFIED BY '$password';" + Q3="FLUSH PRIVILEGES;" + SQL="${Q1}${Q2}${Q3}" + sudo mysql -u root -p="" -e "$SQL" + + # Create stratum user + Q1="GRANT ALL ON *.* TO 'stratum'@'localhost' IDENTIFIED BY '$password2';" + Q2="FLUSH PRIVILEGES;" + SQL="${Q1}${Q2}" + sudo mysql -u root -p="" -e "$SQL" + + #Create my.cnf + + echo ' + [clienthost1] + user=panel + password='"${password}"' + database=yiimpfrontend + host=localhost + [clienthost2] + user=stratum + password='"${password2}"' + database=yiimpfrontend + host=localhost + [myphpadmin] + user=phpmyadmin + password='"${AUTOGENERATED_PASS}"' + [mysql] + user=root + password='"${rootpasswd}"' + ' | sudo -E tee ~/.my.cnf >/dev/null 2>&1 + sudo chmod 0600 ~/.my.cnf + + + # Create keys file + echo ' + /dev/null 2>&1 + + echo -e "$GREEN Done...$COL_RESET" + + + # Peforming the SQL import + echo + echo + echo -e "$CYAN => Database 'yiimpfrontend' and users 'panel' and 'stratum' created with password $password and $password2, will be saved for you $COL_RESET" + echo + echo -e "Performing the SQL import" + echo + sleep 3 + + cd ~ + cd yiimp/sql + + # Import sql dump + sudo zcat 2016-04-03-yaamp.sql.gz | sudo mysql --defaults-group-suffix=host1 + + # Oh the humanity! + sudo mysql --defaults-group-suffix=host1 --force < 2016-04-24-market_history.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-04-27-settings.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-11-coins.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-15-benchmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-05-23-bookmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-06-01-notifications.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-06-04-bench_chips.sql + sudo mysql --defaults-group-suffix=host1 --force < 2016-11-23-coins.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-02-05-benchmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-03-31-earnings_index.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-05-accounts_case_swaptime.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-06-payouts_coinid_memo.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-09-notifications.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-10-bookmarks.sql + sudo mysql --defaults-group-suffix=host1 --force < 2017-11-segwit.sql + sudo mysql --defaults-group-suffix=host1 --force < 2018-01-stratums_ports.sql + sudo mysql --defaults-group-suffix=host1 --force < 2018-02-coins_getinfo.sql + echo -e "$GREEN Done...$COL_RESET" + + + # Generating a basic Yiimp serverconfig.php + echo + echo + echo -e "$CYAN => Generating a basic Yiimp serverconfig.php $COL_RESET" + echo + sleep 3 + + # Make config file + echo ' + 0.3 + define('"'"'EXCH_AUTO_WITHDRAW'"'"', 0.3); + + // nicehash keys deposit account & amount to deposit at a time + define('"'"'NICEHASH_API_KEY'"'"','"'"'f96c65a7-3d2f-4f3a-815c-cacf00674396'"'"'); + define('"'"'NICEHASH_API_ID'"'"','"'"'825979'"'"'); + define('"'"'NICEHASH_DEPOSIT'"'"','"'"'3ABoqBjeorjzbyHmGMppM62YLssUgJhtuf'"'"'); + define('"'"'NICEHASH_DEPOSIT_AMOUNT'"'"','"'"'0.01'"'"'); + + $cold_wallet_table = array( + '"'"'1PqjApUdjwU9k4v1RDWf6XveARyEXaiGUz'"'"' => 0.10, + ); + + // Sample fixed pool fees + $configFixedPoolFees = array( + '"'"'zr5'"'"' => 2.0, + '"'"'scrypt'"'"' => 20.0, + '"'"'sha256'"'"' => 5.0, + ); + + // Sample custom stratum ports + $configCustomPorts = array( + // '"'"'x11'"'"' => 7000, + ); + + // mBTC Coefs per algo (default is 1.0) + $configAlgoNormCoef = array( + // '"'"'x11'"'"' => 5.0, + ); + ' | sudo -E tee /var/web/serverconfig.php >/dev/null 2>&1 + + echo -e "$GREEN Done...$COL_RESET" + + + # Updating stratum config files with database connection info + echo + echo + echo -e "$CYAN => Updating stratum config files with database connection info. $COL_RESET" + echo + sleep 3 + + cd /var/stratum/config + sudo sed -i 's/password = tu8tu5/password = '$blckntifypass'/g' *.conf + sudo sed -i 's/server = yaamp.com/server = '$server_name'/g' *.conf + sudo sed -i 's/host = yaampdb/host = localhost/g' *.conf + sudo sed -i 's/database = yaamp/database = yiimpfrontend/g' *.conf + sudo sed -i 's/username = root/username = stratum/g' *.conf + sudo sed -i 's/password = patofpaq/password = '$password2'/g' *.conf + cd ~ + echo -e "$GREEN Done...$COL_RESET" + + + # Final Directory permissions + echo + echo + echo -e "$CYAN => Final Directory permissions $COL_RESET" + echo + sleep 3 + + whoami=`whoami` + sudo usermod -aG www-data $whoami + sudo usermod -a -G www-data $whoami + + sudo find /var/web -type d -exec chmod 775 {} + + sudo find /var/web -type f -exec chmod 664 {} + + sudo chgrp www-data /var/web -R + sudo chmod g+w /var/web -R + + sudo mkdir /var/log/yiimp + sudo touch /var/log/yiimp/debug.log + sudo chgrp www-data /var/log/yiimp -R + sudo chmod 775 /var/log/yiimp -R + + sudo chgrp www-data /var/stratum -R + sudo chmod 775 /var/stratum + + sudo mkdir -p /var/yiimp/sauv + sudo chgrp www-data /var/yiimp -R + sudo chmod 775 /var/yiimp -R + + + #Add to contrab screen-scrypt + (crontab -l 2>/dev/null; echo "@reboot sleep 20 && /etc/screen-scrypt.sh") | crontab - + + #fix error screen main "service" + sudo sed -i 's/service $webserver start/sudo service $webserver start/g' /var/web/yaamp/modules/thread/CronjobController.php + sudo sed -i 's/service nginx stop/sudo service nginx stop/g' /var/web/yaamp/modules/thread/CronjobController.php + + #fix error screen main "backup sql frontend" + sudo sed -i "s|/root/backup|/var/yiimp/sauv|g" /var/web/yaamp/core/backend/system.php + sudo sed -i '14d' /var/web/yaamp/defaultconfig.php + + #Misc + sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder + sudo rm -rf /var/log/nginx/* + + #Restart service + sudo systemctl restart cron.service + sudo systemctl restart mysql + sudo systemctl status mysql | sed -n "1,3p" + sudo systemctl restart nginx.service + sudo systemctl status nginx | sed -n "1,3p" + sudo systemctl restart php7.3-fpm.service + sudo systemctl status php7.3-fpm | sed -n "1,3p" + + + echo + echo -e "$GREEN Done...$COL_RESET" + sleep 3 + + echo + echo + echo + echo -e "$GREEN***************************$COL_RESET" + echo -e "$GREEN Yiimp Install Script v0.2 $COL_RESET" + echo -e "$GREEN Finish !!! $COL_RESET" + echo -e "$GREEN***************************$COL_RESET" + echo + echo + echo + echo -e "$CYAN Whew that was fun, just some reminders. $COL_RESET" + echo -e "$RED Your mysql information is saved in ~/.my.cnf. $COL_RESET" + echo + echo -e "$RED Yiimp at : http://"$server_name" (https... if SSL enabled)" + echo -e "$RED Yiimp Admin at : http://"$server_name"/site/AdminPanel (https... if SSL enabled)" + echo -e "$RED Yiimp phpMyAdmin at : http://"$server_name"/phpmyadmin (https... if SSL enabled)" + echo + echo -e "$RED If you want change 'AdminPanel' to access Panel Admin : Edit this file : /var/web/yaamp/modules/site/SiteController.php" + echo -e "$RED Line 11 => change 'AdminPanel' and use the new address" + echo + echo -e "$CYAN Please make sure to change your public keys / wallet addresses in the /var/web/serverconfig.php file. $COL_RESET" + echo -e "$CYAN Please make sure to change your private keys in the /etc/yiimp/keys.php file. $COL_RESET" + echo + echo -e "$CYAN TUTO Youtube : https://www.youtube.com/watch?v=qE0rhfJ1g2k $COL_RESET" + echo -e "$CYAN Xavatar WebSite : https://www.xavatar.com $COL_RESET" + echo + echo + echo -e "$RED**************************************************$COL_RESET" + echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION!!! $COL_RESET" + echo -e "$RED**************************************************$COL_RESET" + echo + echo \ No newline at end of file From 06961fb631df4f67f0605ab38eafc65643596839 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 19 Apr 2020 10:32:22 +0200 Subject: [PATCH 346/360] update install-debug & install-v0.1 --- install-debug.sh | 220 +++++++++++++++++++++---------------------- old/install-v0.1.sh | 2 +- old/screen-scrypt.sh | 13 +++ 3 files changed, 124 insertions(+), 111 deletions(-) create mode 100644 old/screen-scrypt.sh diff --git a/install-debug.sh b/install-debug.sh index 3ae8f802..12e7da34 100644 --- a/install-debug.sh +++ b/install-debug.sh @@ -59,10 +59,10 @@ echo sleep 3 - hide_output sudo apt -y update - hide_output sudo apt -y upgrade - hide_output sudo apt -y autoremove - apt_install dialog python3 python3-pip acl nano apt-transport-https + sudo apt -y update + sudo apt -y upgrade + sudo apt -y autoremove + sudo apt -y install dialog python3 python3-pip acl nano apt-transport-https echo -e "$GREEN Done...$COL_RESET" @@ -97,7 +97,7 @@ #echo -e "$CYAN Switching to Aptitude $COL_RESET" #echo #sleep 3 - #apt_install aptitude + #sudo apt -y install aptitude #echo -e "$GREEN Done...$COL_RESET $COL_RESET" @@ -110,16 +110,16 @@ if [ -f /usr/sbin/apache2 ]; then echo -e "Removing apache..." - hide_output apt-get -y purge apache2 apache2-* - hide_output apt-get -y --purge autoremove + apt-get -y purge apache2 apache2-* + apt-get -y --purge autoremove fi - apt_install nginx - hide_output sudo rm /etc/nginx/sites-enabled/default - hide_output sudo systemctl start nginx.service - hide_output sudo systemctl enable nginx.service - hide_output sudo systemctl start cron.service - hide_output sudo systemctl enable cron.service + sudo apt -y install nginx + sudo rm /etc/nginx/sites-enabled/default + sudo systemctl start nginx.service + sudo systemctl enable nginx.service + sudo systemctl start cron.service + sudo systemctl enable cron.service sleep 5 sudo systemctl status nginx | sed -n "1,3p" echo @@ -148,9 +148,9 @@ # Create random password rootpasswd=$(openssl rand -base64 12) export DEBIAN_FRONTEND="noninteractive" - apt_install mariadb-server - hide_output sudo systemctl start mysql - hide_output sudo systemctl enable mysql + sudo apt -y install mariadb-server + sudo systemctl start mysql + sudo systemctl enable mysql sleep 5 sudo systemctl status mysql | sed -n "1,3p" echo @@ -166,24 +166,24 @@ source conf/pool.conf if [ ! -f /etc/apt/sources.list.d/ondrej-php-bionic.list ]; then - hide_output sudo add-apt-repository -y ppa:ondrej/php + sudo add-apt-repository -y ppa:ondrej/php fi - hide_output sudo apt -y update + sudo apt -y update if [[ ("$DISTRO" == "16") ]]; then - apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ + sudo apt -y install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ php7.3-cgi php-pear php-auth imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring - #hide_output sudo phpenmod mcrypt - #hide_output sudo phpenmod mbstring + #sudo phpenmod mcrypt + #sudo phpenmod mbstring else - apt_install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ + sudo apt -y install php7.3-fpm php7.3-opcache php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli \ php7.3-cgi php-pear imagemagick libruby php7.3-curl php7.3-intl php7.3-pspell mcrypt\ php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring \ libpsl-dev libnghttp2-dev fi sleep 5 - hide_output sudo systemctl start php7.3-fpm + sudo systemctl start php7.3-fpm sudo systemctl status php7.3-fpm | sed -n "1,3p" echo echo -e "$GREEN Done...$COL_RESET" @@ -196,9 +196,9 @@ echo sleep 3 - apt_install libgmp3-dev libmysqlclient-dev libcurl4-gnutls-dev libkrb5-dev libldap2-dev libidn11-dev gnutls-dev \ + sudo apt -y install libgmp3-dev libmysqlclient-dev libcurl4-gnutls-dev libkrb5-dev libldap2-dev libidn11-dev gnutls-dev \ librtmp-dev sendmail mutt screen git - apt_install pwgen -y + sudo apt -y install pwgen -y echo -e "$GREEN Done...$COL_RESET" sleep 3 @@ -210,14 +210,14 @@ echo sleep 3 - apt_install software-properties-common build-essential - apt_install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext - apt_install libminiupnpc10 libzmq5 - apt_install libcanberra-gtk-module libqrencode-dev libzmq3-dev - apt_install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler - hide_output sudo add-apt-repository -y ppa:bitcoin/bitcoin - hide_output sudo apt -y update - apt_install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ + sudo apt -y install software-properties-common build-essential + sudo apt -y install libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev zlib1g-dev libz-dev libseccomp-dev libcap-dev libminiupnpc-dev gettext + sudo apt -y install libminiupnpc10 libzmq5 + sudo apt -y install libcanberra-gtk-module libqrencode-dev libzmq3-dev + sudo apt -y install libqt5gui5 libqt5core5a libqt5webkit5-dev libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler + sudo add-apt-repository -y ppa:bitcoin/bitcoin + sudo apt -y update + sudo apt -y install libdb4.8-dev libdb4.8++-dev libdb5.3 libdb5.3++ echo -e "$GREEN Done...$COL_RESET" @@ -260,74 +260,74 @@ if [[ ("$install_fail2ban" == "y" || "$install_fail2ban" == "Y" || "$install_fail2ban" == "") ]]; then - apt_install fail2ban + sudo apt -y install fail2ban sleep 5 sudo systemctl status fail2ban | sed -n "1,3p" fi if [[ ("$UFW" == "y" || "$UFW" == "Y" || "$UFW" == "") ]]; then - apt_install ufw - hide_output sudo ufw default deny incoming - hide_output sudo ufw default allow outgoing - hide_output sudo ufw allow ssh - hide_output sudo ufw allow http - hide_output sudo ufw allow https - hide_output sudo ufw allow 3333/tcp - hide_output sudo ufw allow 3339/tcp - hide_output sudo ufw allow 3334/tcp - hide_output sudo ufw allow 3433/tcp - hide_output sudo ufw allow 3555/tcp - hide_output sudo ufw allow 3556/tcp - hide_output sudo ufw allow 3573/tcp - hide_output sudo ufw allow 3535/tcp - hide_output sudo ufw allow 3533/tcp - hide_output sudo ufw allow 3553/tcp - hide_output sudo ufw allow 3633/tcp - hide_output sudo ufw allow 3733/tcp - hide_output sudo ufw allow 3636/tcp - hide_output sudo ufw allow 3737/tcp - hide_output sudo ufw allow 3739/tcp - hide_output sudo ufw allow 3747/tcp - hide_output sudo ufw allow 3833/tcp - hide_output sudo ufw allow 3933/tcp - hide_output sudo ufw allow 4033/tcp - hide_output sudo ufw allow 4133/tcp - hide_output sudo ufw allow 4233/tcp - hide_output sudo ufw allow 4234/tcp - hide_output sudo ufw allow 4333/tcp - hide_output sudo ufw allow 4433/tcp - hide_output sudo ufw allow 4533/tcp - hide_output sudo ufw allow 4553/tcp - hide_output sudo ufw allow 4633/tcp - hide_output sudo ufw allow 4733/tcp - hide_output sudo ufw allow 4833/tcp - hide_output sudo ufw allow 4933/tcp - hide_output sudo ufw allow 5033/tcp - hide_output sudo ufw allow 5133/tcp - hide_output sudo ufw allow 5233/tcp - hide_output sudo ufw allow 5333/tcp - hide_output sudo ufw allow 5433/tcp - hide_output sudo ufw allow 5533/tcp - hide_output sudo ufw allow 5733/tcp - hide_output sudo ufw allow 5743/tcp - hide_output sudo ufw allow 3252/tcp - hide_output sudo ufw allow 5755/tcp - hide_output sudo ufw allow 5766/tcp - hide_output sudo ufw allow 5833/tcp - hide_output sudo ufw allow 5933/tcp - hide_output sudo ufw allow 6033/tcp - hide_output sudo ufw allow 5034/tcp - hide_output sudo ufw allow 6133/tcp - hide_output sudo ufw allow 6233/tcp - hide_output sudo ufw allow 6333/tcp - hide_output sudo ufw allow 6433/tcp - hide_output sudo ufw allow 7433/tcp - hide_output sudo ufw allow 8333/tcp - hide_output sudo ufw allow 8463/tcp - hide_output sudo ufw allow 8433/tcp - hide_output sudo ufw allow 8533/tcp - hide_output sudo ufw --force enable + sudo apt -y install ufw + sudo ufw default deny incoming + sudo ufw default allow outgoing + sudo ufw allow ssh + sudo ufw allow http + sudo ufw allow https + sudo ufw allow 3333/tcp + sudo ufw allow 3339/tcp + sudo ufw allow 3334/tcp + sudo ufw allow 3433/tcp + sudo ufw allow 3555/tcp + sudo ufw allow 3556/tcp + sudo ufw allow 3573/tcp + sudo ufw allow 3535/tcp + sudo ufw allow 3533/tcp + sudo ufw allow 3553/tcp + sudo ufw allow 3633/tcp + sudo ufw allow 3733/tcp + sudo ufw allow 3636/tcp + sudo ufw allow 3737/tcp + sudo ufw allow 3739/tcp + sudo ufw allow 3747/tcp + sudo ufw allow 3833/tcp + sudo ufw allow 3933/tcp + sudo ufw allow 4033/tcp + sudo ufw allow 4133/tcp + sudo ufw allow 4233/tcp + sudo ufw allow 4234/tcp + sudo ufw allow 4333/tcp + sudo ufw allow 4433/tcp + sudo ufw allow 4533/tcp + sudo ufw allow 4553/tcp + sudo ufw allow 4633/tcp + sudo ufw allow 4733/tcp + sudo ufw allow 4833/tcp + sudo ufw allow 4933/tcp + sudo ufw allow 5033/tcp + sudo ufw allow 5133/tcp + sudo ufw allow 5233/tcp + sudo ufw allow 5333/tcp + sudo ufw allow 5433/tcp + sudo ufw allow 5533/tcp + sudo ufw allow 5733/tcp + sudo ufw allow 5743/tcp + sudo ufw allow 3252/tcp + sudo ufw allow 5755/tcp + sudo ufw allow 5766/tcp + sudo ufw allow 5833/tcp + sudo ufw allow 5933/tcp + sudo ufw allow 6033/tcp + sudo ufw allow 5034/tcp + sudo ufw allow 6133/tcp + sudo ufw allow 6233/tcp + sudo ufw allow 6333/tcp + sudo ufw allow 6433/tcp + sudo ufw allow 7433/tcp + sudo ufw allow 8333/tcp + sudo ufw allow 8463/tcp + sudo ufw allow 8433/tcp + sudo ufw allow 8533/tcp + sudo ufw --force enable sleep 5 sudo systemctl status ufw | sed -n "1,3p" fi @@ -350,7 +350,7 @@ echo "phpmyadmin phpmyadmin/mysql/admin-pass password $rootpasswd" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/mysql/app-pass password $AUTOGENERATED_PASS" | sudo debconf-set-selections echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENERATED_PASS" | sudo debconf-set-selections - apt_install phpmyadmin + sudo apt -y install phpmyadmin echo -e "$GREEN Done...$COL_RESET" @@ -369,21 +369,21 @@ # Compil Blocknotify cd ~ - hide_output git clone https://github.com/tpruvot/yiimp + git clone https://github.com/tpruvot/yiimp cd $HOME/yiimp/blocknotify sudo sed -i 's/tu8tu5/'$blckntifypass'/' blocknotify.cpp - hide_output sudo make + sudo make # Compil iniparser cd $HOME/yiimp/stratum/iniparser - hide_output sudo make + sudo make # Compil Stratum cd $HOME/yiimp/stratum if [[ ("$BTC" == "y" || "$BTC" == "Y") ]]; then sudo sed -i 's/CFLAGS += -DNO_EXCHANGE/#CFLAGS += -DNO_EXCHANGE/' $HOME/yiimp/stratum/Makefile fi - hide_output sudo make + sudo make # Copy Files (Blocknotify,iniparser,Stratum) cd $HOME/yiimp @@ -527,8 +527,8 @@ sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - hide_output sudo systemctl reload php7.3-fpm.service - hide_output sudo systemctl restart nginx.service + sudo systemctl reload php7.3-fpm.service + sudo systemctl restart nginx.service echo -e "$GREEN Done...$COL_RESET" if [[ ("$ssl_install" == "y" || "$ssl_install" == "Y" || "$ssl_install" == "") ]]; then @@ -539,7 +539,7 @@ echo -e "Install LetsEncrypt and setting SSL (with SubDomain)" echo - apt_install letsencrypt + sudo apt -y install letsencrypt sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 @@ -651,8 +651,8 @@ ' | sudo -E tee /etc/nginx/sites-available/$server_name.conf >/dev/null 2>&1 fi - hide_output sudo systemctl reload php7.3-fpm.service - hide_output sudo systemctl restart nginx.service + sudo systemctl reload php7.3-fpm.service + sudo systemctl restart nginx.service echo -e "$GREEN Done...$COL_RESET" @@ -737,8 +737,8 @@ sudo ln -s /etc/nginx/sites-available/$server_name.conf /etc/nginx/sites-enabled/$server_name.conf sudo ln -s /var/web /var/www/$server_name/html - hide_output sudo systemctl reload php7.3-fpm.service - hide_output sudo systemctl restart nginx.service + sudo systemctl reload php7.3-fpm.service + sudo systemctl restart nginx.service echo -e "$GREEN Done...$COL_RESET" @@ -750,7 +750,7 @@ echo sleep 3 - apt_install letsencrypt + sudo apt -y install letsencrypt sudo letsencrypt certonly -a webroot --webroot-path=/var/web --email "$EMAIL" --agree-tos -d "$server_name" -d www."$server_name" sudo rm /etc/nginx/sites-available/$server_name.conf sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 @@ -864,8 +864,8 @@ echo -e "$GREEN Done...$COL_RESET" fi - hide_output sudo systemctl reload php7.3-fpm.service - hide_output sudo systemctl restart nginx.service + sudo systemctl reload php7.3-fpm.service + sudo systemctl restart nginx.service fi diff --git a/old/install-v0.1.sh b/old/install-v0.1.sh index cc107367..bee638ca 100644 --- a/old/install-v0.1.sh +++ b/old/install-v0.1.sh @@ -32,7 +32,7 @@ displayErr() { ' | sudo -E tee /etc/sudoers.d/${whoami} >/dev/null 2>&1 #Copy needed files - sudo cp -r ../utils/screen-scrypt.sh /etc/ + sudo cp -r screen-scrypt.sh /etc/ clear diff --git a/old/screen-scrypt.sh b/old/screen-scrypt.sh new file mode 100644 index 00000000..e97c01c7 --- /dev/null +++ b/old/screen-scrypt.sh @@ -0,0 +1,13 @@ +#!/bin/bash + LOG_DIR=/var/log/yiimp + WEB_DIR=/var/web + STRATUM_DIR=/var/stratum + USR_BIN=/usr/bin + + screen -dmS main bash $WEB_DIR/main.sh + screen -dmS loop2 bash $WEB_DIR/loop2.sh + screen -dmS blocks bash $WEB_DIR/blocks.sh + screen -dmS debug tail -f $LOG_DIR/debug.log + + + \ No newline at end of file From 8f715fc200fc636ef92c29d4e4df17a50f96708c Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 19 Apr 2020 10:37:57 +0200 Subject: [PATCH 347/360] Update install-v0.1.sh --- old/install-v0.1.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/old/install-v0.1.sh b/old/install-v0.1.sh index bee638ca..60d4ec73 100644 --- a/old/install-v0.1.sh +++ b/old/install-v0.1.sh @@ -32,7 +32,8 @@ displayErr() { ' | sudo -E tee /etc/sudoers.d/${whoami} >/dev/null 2>&1 #Copy needed files - sudo cp -r screen-scrypt.sh /etc/ + sudo cp -r ../utils/screen-scrypt.sh /etc/ + sudo chmod +x /etc/screen-scrypt.sh clear From 6985cb0bcd25b4d7baae1b47430db7e3c44d2ce2 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 19 Apr 2020 10:40:04 +0200 Subject: [PATCH 348/360] fix typo --- install.sh | 6 +++--- old/install-v0.1.sh | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 0112751c..4014cdd3 100644 --- a/install.sh +++ b/install.sh @@ -1188,8 +1188,8 @@ echo -e "$CYAN Xavatar WebSite : https://www.xavatar.com $COL_RESET" echo echo - echo -e "$RED**************************************************$COL_RESET" - echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION!!! $COL_RESET" - echo -e "$RED**************************************************$COL_RESET" + echo -e "$RED***************************************************$COL_RESET" + echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION !!! $COL_RESET" + echo -e "$RED***************************************************$COL_RESET" echo echo \ No newline at end of file diff --git a/old/install-v0.1.sh b/old/install-v0.1.sh index 60d4ec73..32fed7c4 100644 --- a/old/install-v0.1.sh +++ b/old/install-v0.1.sh @@ -1079,3 +1079,8 @@ $configAlgoNormCoef = array( output "TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig" output " " output " " + echo -e "$RED***************************************************$COL_RESET" + echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION !!! $COL_RESET" + echo -e "$RED***************************************************$COL_RESET" + echo + echo From 0e7ca456a89fcd4861b74d67dd8dc475a1e26985 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 19 Apr 2020 10:44:14 +0200 Subject: [PATCH 349/360] add sleep after install nginx-mariadb-php --- install-debug.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/install-debug.sh b/install-debug.sh index 12e7da34..5dafac85 100644 --- a/install-debug.sh +++ b/install-debug.sh @@ -122,6 +122,7 @@ sudo systemctl enable cron.service sleep 5 sudo systemctl status nginx | sed -n "1,3p" + sleep 15 echo echo -e "$GREEN Done...$COL_RESET" @@ -153,6 +154,7 @@ sudo systemctl enable mysql sleep 5 sudo systemctl status mysql | sed -n "1,3p" + sleep 15 echo echo -e "$GREEN Done...$COL_RESET" @@ -185,6 +187,7 @@ sleep 5 sudo systemctl start php7.3-fpm sudo systemctl status php7.3-fpm | sed -n "1,3p" + sleep 15 echo echo -e "$GREEN Done...$COL_RESET" @@ -1188,8 +1191,8 @@ echo -e "$CYAN Xavatar WebSite : https://www.xavatar.com $COL_RESET" echo echo - echo -e "$RED**************************************************$COL_RESET" - echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION!!! $COL_RESET" - echo -e "$RED**************************************************$COL_RESET" + echo -e "$RED***************************************************$COL_RESET" + echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION !!! $COL_RESET" + echo -e "$RED***************************************************$COL_RESET" echo echo \ No newline at end of file From 8b2ee4136490858d75e153a63c43fd9dccfc0ac9 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 19 Apr 2020 12:54:09 +0200 Subject: [PATCH 350/360] upd readme --- README.md | 8 +++++++- old/screen-scrypt.sh | 13 ------------- 2 files changed, 7 insertions(+), 14 deletions(-) delete mode 100644 old/screen-scrypt.sh diff --git a/README.md b/README.md index d5df3acb..b9370a9f 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Original Yiimp Installer : https://github.com/cryptopool-builders/multipool_orig *********************************** -## Install script for yiimp on Ubuntu Server 16.04 / 18.04 +## Install script for yiimp on Ubuntu Server 16.04 / 18.04 (use Trpuvot's Yiimp) USE THIS SCRIPT ON FRESH INSTALL UBUNTU Server 16.04 / 18.04 ! @@ -31,6 +31,12 @@ Finish ! - Go http://xxx.xxx.xxx.xxx or https://xxx.xxx.xxx.xxx (if you have chosen LetsEncrypt SSL). Enjoy ! - Go http://xxx.xxx.xxx.xxx/AdminPanel or https://xxx.xxx.xxx.xxx/AdminPanel to access Panel Admin +If you are issue after installation (nginx,mariadb... not found), use this script : bash install-debug.sh (watch the log during installation) + +###### :bangbang: **Kudaraidee Install Script :** +- Instead Trpuvot's Yiimp, you can use the Kudaraidee's Repo Yiimp : git clone -b Kudaraidee https://github.com/Kudaraidee/yiimp.git +- It's an updated Yiimp, with more algo, some fix.... + ###### :bangbang: **YOU MUST UPDATE THE FOLLOWING FILES :** - **/var/web/serverconfig.php :** update this file to include your public ip (line = YAAMP_ADMIN_IP) to access the admin panel (Put your PERSONNAL IP, NOT IP of your VPS). update with public keys from exchanges. update with other information specific to your server.. - **/etc/yiimp/keys.php :** update with secrect keys from the exchanges (not mandatory) diff --git a/old/screen-scrypt.sh b/old/screen-scrypt.sh deleted file mode 100644 index e97c01c7..00000000 --- a/old/screen-scrypt.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - LOG_DIR=/var/log/yiimp - WEB_DIR=/var/web - STRATUM_DIR=/var/stratum - USR_BIN=/usr/bin - - screen -dmS main bash $WEB_DIR/main.sh - screen -dmS loop2 bash $WEB_DIR/loop2.sh - screen -dmS blocks bash $WEB_DIR/blocks.sh - screen -dmS debug tail -f $LOG_DIR/debug.log - - - \ No newline at end of file From d757fd87f4866d7c9001702b899804d93a88403d Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 19 Apr 2020 12:55:10 +0200 Subject: [PATCH 351/360] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b9370a9f..e683918e 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Original Yiimp Installer : https://github.com/cryptopool-builders/multipool_orig *********************************** -## Install script for yiimp on Ubuntu Server 16.04 / 18.04 (use Trpuvot's Yiimp) +## Install script for yiimp on Ubuntu Server 16.04 / 18.04 (use Tpruvot's Yiimp) USE THIS SCRIPT ON FRESH INSTALL UBUNTU Server 16.04 / 18.04 ! @@ -34,7 +34,7 @@ Finish ! If you are issue after installation (nginx,mariadb... not found), use this script : bash install-debug.sh (watch the log during installation) ###### :bangbang: **Kudaraidee Install Script :** -- Instead Trpuvot's Yiimp, you can use the Kudaraidee's Repo Yiimp : git clone -b Kudaraidee https://github.com/Kudaraidee/yiimp.git +- Instead Tpruvot's Yiimp, you can use the Kudaraidee's Repo Yiimp : git clone -b Kudaraidee https://github.com/Kudaraidee/yiimp.git - It's an updated Yiimp, with more algo, some fix.... ###### :bangbang: **YOU MUST UPDATE THE FOLLOWING FILES :** From 8cb5fc2c9359ed345fff872e885cbc217995cffb Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Sun, 26 Apr 2020 20:13:00 +0200 Subject: [PATCH 352/360] Rename install-oct18.sh to install-v0.11.sh --- old/{install-oct18.sh => install-v0.11.sh} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename old/{install-oct18.sh => install-v0.11.sh} (99%) diff --git a/old/install-oct18.sh b/old/install-v0.11.sh similarity index 99% rename from old/install-oct18.sh rename to old/install-v0.11.sh index 09047723..60a9f403 100644 --- a/old/install-oct18.sh +++ b/old/install-v0.11.sh @@ -1013,4 +1013,4 @@ $configAlgoNormCoef = array( output " " output "TUTO Youtube : https://www.youtube.com/watch?v=vdBCw6_cyig" output " " - output " " \ No newline at end of file + output " " From b08701b9bc216f2fa554aa24707819cda0bef864 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 29 Apr 2020 08:37:08 +0200 Subject: [PATCH 353/360] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index e683918e..e4447616 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,9 @@ Original Yiimp Installer : https://github.com/cryptopool-builders/multipool_orig USE THIS SCRIPT ON FRESH INSTALL UBUNTU Server 16.04 / 18.04 ! Connect on your VPS => +- apt update +- apt upgrade +- reboot - adduser pool (pool it's just an example...) - adduser pool sudo - su - pool From 7ed25069563b9aed44572ddf9c4d91fe982bea62 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 29 Apr 2020 09:06:12 +0200 Subject: [PATCH 354/360] Hold update openssl --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 4014cdd3..8380d9cc 100644 --- a/install.sh +++ b/install.sh @@ -1146,6 +1146,10 @@ #Misc sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* + + #Hold update OpenSSL + #If you want remove the hold : sudo apt-mark unhold openssl + sudo apt-mark hold openssl #Restart service sudo systemctl restart cron.service @@ -1192,4 +1196,4 @@ echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION !!! $COL_RESET" echo -e "$RED***************************************************$COL_RESET" echo - echo \ No newline at end of file + echo From 6994cad517a92918caedca77b798f93e0b629619 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 29 Apr 2020 09:06:54 +0200 Subject: [PATCH 355/360] hold update openssl --- install-debug.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install-debug.sh b/install-debug.sh index 5dafac85..8b2746a8 100644 --- a/install-debug.sh +++ b/install-debug.sh @@ -1149,6 +1149,10 @@ #Misc sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* + + #Hold update OpenSSL + #If you want remove the hold : sudo apt-mark unhold openssl + sudo apt-mark hold openssl #Restart service sudo systemctl restart cron.service @@ -1195,4 +1199,4 @@ echo -e "$RED YOU MUST REBOOT NOW TO FINALIZE INSTALLATION !!! $COL_RESET" echo -e "$RED***************************************************$COL_RESET" echo - echo \ No newline at end of file + echo From 23c406592a0c34f903d8109db6466649767e09fc Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 29 Apr 2020 09:08:05 +0200 Subject: [PATCH 356/360] hold update openssl --- old/install-v0.11.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/old/install-v0.11.sh b/old/install-v0.11.sh index 60a9f403..40cac639 100644 --- a/old/install-v0.11.sh +++ b/old/install-v0.11.sh @@ -979,7 +979,11 @@ $configAlgoNormCoef = array( output "Final Directory permissions" output " " sleep 3 - + + #Hold update OpenSSL + #If you want remove the hold : sudo apt-mark unhold openssl + sudo apt-mark hold openssl + whoami=`whoami` sudo mkdir /root/backup/ #sudo usermod -aG www-data $whoami @@ -999,7 +1003,7 @@ $configAlgoNormCoef = array( sudo rm -rf /var/log/nginx/* sudo systemctl reload php7.0-fpm.service sudo systemctl restart nginx.service - + output " " output " " From 9593ed5a44bb7ad8df51be0ad2f26b80cbec8ec0 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 29 Apr 2020 09:10:28 +0200 Subject: [PATCH 357/360] Rename install-v0.1.sh to install-v0.111.sh --- old/{install-v0.1.sh => install-v0.111.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename old/{install-v0.1.sh => install-v0.111.sh} (100%) diff --git a/old/install-v0.1.sh b/old/install-v0.111.sh similarity index 100% rename from old/install-v0.1.sh rename to old/install-v0.111.sh From 6f9e75ba69ff4f48cdfc0dd7ea02d09f7e36ec44 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 29 Apr 2020 09:10:58 +0200 Subject: [PATCH 358/360] Update and rename install-v0.11.sh to install-v0.1.sh --- old/{install-v0.11.sh => install-v0.1.sh} | 4 ---- 1 file changed, 4 deletions(-) rename old/{install-v0.11.sh => install-v0.1.sh} (99%) diff --git a/old/install-v0.11.sh b/old/install-v0.1.sh similarity index 99% rename from old/install-v0.11.sh rename to old/install-v0.1.sh index 40cac639..772e3934 100644 --- a/old/install-v0.11.sh +++ b/old/install-v0.1.sh @@ -980,10 +980,6 @@ $configAlgoNormCoef = array( output " " sleep 3 - #Hold update OpenSSL - #If you want remove the hold : sudo apt-mark unhold openssl - sudo apt-mark hold openssl - whoami=`whoami` sudo mkdir /root/backup/ #sudo usermod -aG www-data $whoami From 69696946cb7b3af38c4b434e095d8723e407fdf7 Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 29 Apr 2020 09:11:25 +0200 Subject: [PATCH 359/360] Update install-v0.111.sh --- old/install-v0.111.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/old/install-v0.111.sh b/old/install-v0.111.sh index 32fed7c4..f95a4920 100644 --- a/old/install-v0.111.sh +++ b/old/install-v0.111.sh @@ -1061,6 +1061,10 @@ $configAlgoNormCoef = array( #Misc sudo mv $HOME/yiimp/ $HOME/yiimp-install-only-do-not-run-commands-from-this-folder sudo rm -rf /var/log/nginx/* + + #Hold update OpenSSL + #If you want remove the hold : sudo apt-mark unhold openssl + sudo apt-mark hold openssl sudo systemctl reload php7.0-fpm.service sudo systemctl restart nginx.service From 7ad747224979bcc5b82d3d5b3ba7d38fb12d2b1e Mon Sep 17 00:00:00 2001 From: Tatar Xavatar Date: Wed, 29 Apr 2020 09:11:36 +0200 Subject: [PATCH 360/360] Rename install-v0.111.sh to install-v0.11.sh --- old/{install-v0.111.sh => install-v0.11.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename old/{install-v0.111.sh => install-v0.11.sh} (100%) diff --git a/old/install-v0.111.sh b/old/install-v0.11.sh similarity index 100% rename from old/install-v0.111.sh rename to old/install-v0.11.sh