A step-by-step guide for Windows computers.
| Software | Link |
|---|---|
| Ampps v3.9+ 64-Bit | http://www.ampps.com/downloads |
| Git For Windows | https://gitforwindows.org/ |
| Wget | https://eternallybored.org/misc/wget/ |
- Download the wget.exe file from your source
- Extract to a folder, e.g. C:\Tools\wget\
- Create a user variable for the exe. In Start Menu, search 'variables' Open the link for "Edit system environment variables". Click 'Environment Variables...'
- Add new variable (I called it "WGET_HOME" and its value the directory "C:\Tools\wget" )
- Select the "PATH" variable and append to the list following a ";" "%WGET_HOME%"
- Click OK. MINGW should be able to find wget
- Download the version of PHP the project is currently using, e.g. php-7.2
- Extract the folder into the correct Ampps subfolder ~\Program Files\Ampps\php-7.2
- Now MINGW64 can locate the php.exe file
Before adding a new SSH key to your GitHub account, you should:
- Check for existing SSH keys
- Generate a new SSH key and add it to the ssh-agent
- Open Git Bash
- Enter ls -al ~/.ssh to see if existing SSH keys are present:
ls -al ~/.ssh- Check the directory listing to see if you already have a public SSH key
By default, the filenames of the public keys are one of the following:
- id_rsa.pub
- id_ecdsa.pub
- id_ed25519.pub
If you don't have an existing public and private key pair, or don't wish to use any that are available to connect to GitHub, then generate a new SSH key If you have an SSH key to add to your GitHub, you can skip this next step
- Open Git Bash.
- Paste the text below, substituting in your GitHub email address.
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"This creates a new ssh key, using the provided email as a label.
- When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location. At the prompt, either type a secure passphrase or leave empty for no passphrase
Ensure the ssh-agent is running manually by entering:
$ eval $(ssh-agent -s)Then, add your SSH private key to the ssh-agent
$ ssh-add ~/.ssh/id_rsaIf you created your key with a different name, or if you are adding an existing key that has a different name, replace id_rsa in the command with the name of your private key file.
- Copy the SSH key to your clipboard If your SSH key file has a different name than the example code, modify the filename to match your current setup. When copying your key, don't add any newlines or whitespace. You can also just copy and paste using your mouse and keyboard
$ clip < ~/.ssh/id_rsa.pub
# Copies the contents of the id_rsa.pub file to your clipboard- In the upper-right corner of any page, click your profile photo, then click Settings
- In the user settings sidebar, click SSH and GPG keys.
- Click New SSH key or Add SSH key.
- In the "Title" field, add a descriptive label for the new key.
- Paste your key into the "Key" field.
- Click Add SSH key.
Go to the the folder /c/Program Files/Ampps/www/
Clone the repository into the www folder: git clone git@github.com:OregonStateUniversity/MyEventBoard.git
- Copy
.env.exampleto.envin the root directory of this application - Input passwords where they're missing
- Set ENVIRONMENT to development
ENVIRONMENT should be entirely uppercase development should be entirely lowercase
In Git Bash, in the MyEventBoard folder, run - sh setup.sh
Now that everything is set up, you can start the running the site on your localhost. This simulates hosting the site on the OSU engineering server.
- Connect to the OSU VPN
- Start Ampps
- Visit http://localhost in your browser. Click into the project folder and you’re done.
Setting up a local environment is convenient for development, but the environment isn't exactly the same as an OSU server. Changes to the application should always be tested on an OSU server.