Difference between revisions of "Tutorial: PhpRunner 9.8 and Photo Display"
(Created page with "~~~~ ---- <onlydft> =Remote Server: Hadoop0= * Reinstall Ubuntu 16.04.4 on Hadoop0. Desktop AMD64. * Install ddclient with hadoop0.dyndns.org * Install emacs * Install opens...") |
|||
Line 12: | Line 12: | ||
* Install ddclient, hadoop01 | * Install ddclient, hadoop01 | ||
* Install emacs | * Install emacs | ||
+ | * Install php-gd | ||
* Install LAMP (use tasksel: https://www.linode.com/docs/web-servers/lamp/install-lamp-stack-on-ubuntu-16-04/), super simple | * Install LAMP (use tasksel: https://www.linode.com/docs/web-servers/lamp/install-lamp-stack-on-ubuntu-16-04/), super simple | ||
* MYSQL: root/void_function | * MYSQL: root/void_function | ||
+ | * Web server root: <tt>/var/www/html/</tt> | ||
* PHP: changed php.ini in /etc/php/7.0/cli/php.ini | * PHP: changed php.ini in /etc/php/7.0/cli/php.ini | ||
::* changed two lines in php.ini: | ::* changed two lines in php.ini: | ||
− | + | ::<source lang="bash"> | |
upload_max_filesize = 40M | upload_max_filesize = 40M | ||
post_max_size = 48M | post_max_size = 48M | ||
+ | </source> | ||
+ | ==Script to copy PHPRunner Output Folder to Hadoop01== | ||
+ | <br /> | ||
+ | ::<source lang="bash"> | ||
+ | #! /bin/bash | ||
+ | # rsyncPhotos.sh | ||
+ | # D. Thiebaut | ||
+ | |||
+ | # Copy all php files to hadoop01 | ||
+ | echo "rsyncing php dir to hadoop01" | ||
+ | rsync -azv ~/Documents/PHPRunnerOutput/* dominique@hadoop01.dyndns.org:/var/www/html/photos/ | ||
+ | |||
+ | # dump photo database to sql file | ||
+ | cd ~/Downloads/ | ||
+ | echo "USE NohoSkies;" > NohoSkies.sql | ||
+ | |||
+ | #echo -n "Enter mysql root password on MacBook: " | ||
+ | mysqldump -u root -pvoidm%20 NohoSkies >> NohoSkies.sql | ||
+ | |||
+ | echo "rsyncing dum to hadoop01" | ||
+ | rsync -azv NohoSkies.sql dominique@hadoop01.dyndns.org:Downloads/ | ||
+ | |||
+ | echo "loading up dump on remote db" | ||
+ | ssh -tt dominique@hadoop01.dyndns.org <<EOF | ||
+ | mysql -u root -pvoidm%20 < ~/Downloads/NohoSkies.sql | ||
+ | exit | ||
+ | EOF | ||
+ | |||
+ | </source> | ||