This repo stores the term project for Database Class CPSC 332 for CSUF
- Ensure that
sshpass
is installedapt-get install sshpass
for Debian-based OSes
- Ensure that
upload.sh
has permissions to runchmod 755 upload.sh db.sh
- Ensure that the
password
file is configured (see Step 7 below) - Run
upload.sh
to transfer everything inhomepage
folder into the virtual machine. - Run
db.sh
to update the database AFTER runningupload.sh
. - Use
Visual Studio Code
withPHP
andMySQL
on local PC to locally test changes - In Bash run
php -S 127.0.0.1:5500
to be able to execute and view PHP files locally.
- create a file in the repo root called
password
(no file extensions) - commit and push
- create a file in the repo root called
.gitignore
, and typepassword
in the that file - commit and push
- use the command
git rm --cached ./password
to tell Git to stop tracking the file - commit and push
- After cloning on WSL, add the VM's password to the first line of the
password
file- On Ubuntu, use
nano ./password
- Type the password
CTRL + O
andCTRL + X
to save and exit
- On Ubuntu, use
- Alter
upload.sh
with the correct account number andpwd
of the destination directory - Create a file with the following name:
.my.cnf
- Add the following contents (replace the contents inside the quotes):
[client]
user=cs332g20
password="INSERT_THE_DATABASE_PASSWORD_BETWEEN_THE_QUOTES"
- SCP the file onto
~/
of th remote server (since text editors are not installed there)
Link to the website: http://ecs.fullerton.edu/~cs332g20/