Download presentation
Presentation is loading. Please wait.
Published byQuentin Lynch Modified over 9 years ago
1
Setup Environment: Instructions for CS1520 Server Setup Nils Murrugarra nineil.cs@gmail.com
2
Setup To run PHP scripts on the cs1520.cs.pitt.edu server, you need to set up your directories and permissions properly. The cs1520.cs.pitt.edu server parses the url in the following way: http://cs1520.cs.pitt.edu/~yourid/dir/script.php yourid is your Pitt network id (don't forget the ~ before it). The server will interpret this to be your_unix_home_directory/public/csweb/ dir is any subdirectory within your csweb directory script.php is any php script that you wish to run 2
3
Setup For example, my Pitt network id is nim60 and my unix home directory is: /afs/pitt.edu/home/n/i/nim60 Thus, the url: http://cs1520.cs.pitt.edu/~nim60/php/ex1.php would be parsed by the cs1520.cs.pitt.edu server to be /afs/pitt.edu/home/n/i/nim60/public/csweb/php 3
4
Setup In order to give permission to the server to execute scripts in your directories, you must set an AFS access control list. For more information on access control lists, see: http://www.cs.cmu.edu/~help/afs/afs_acls.html. http://www.cs.cmu.edu/~help/afs/afs_acls.html In particular in this case you must give access permission to the csweb account, which is the cs1520 web server. Also, you must also give read permission to the professor's account (nomad) and the TA's account (nim60) so that we can look at your files when grading your programs. 4
5
Configuration We are going to use putty software: http://www.putty.org/http://www.putty.org/ 5
6
Configuration 1. ssh user@unixs.cis.pitt.edu or connect to unixs in some other way (We are going to use putty) 2. Click Open 3. Enter your username (pitt account) 4. Enter your password 5. pwd 6. ls 7. cd public 8. mkdir csweb 9. cd csweb 10. fs setacl -dir. -acl system:anyuser none 11. fs setacl -dir. -acl nomad rl 12. fs setacl -dir. -acl nim60 rl 13. fs setacl -dir. -acl csweb rliwdk 6
7
Configuration Next, you'll want to create a directory for your PHP scripts and move into it: mkdir php cd php To upload the files to the server, you can use WinSCP: http://winscp.net/eng/download.php http://winscp.net/eng/download.php 7
8
Configuration You can login with your pitt account: login, ok, ok 8
9
Configuration In our example, we are going to use the command cp. 1. Access the directory of the examples 1. cd /afs/cs.pitt.edu/usr0/ramirez/public/html/cs1520/php/ 2. ls 2. Copy files: ex1.php and ex1.txt to your csweb/php directory, notice that the red text is different in your directory 1. cp ex1.php /afs/pitt.edu/home/n/i/nim60/public/csweb/php 2. cp ex1.txt /afs/pitt.edu/home/n/i/nim60/public/csweb/php Note: the file ex1.php needs the file ex1.txt 3. Verify if the copy was succesfull 1. cd /afs/pitt.edu/home/n/i/nim60/public/csweb/php 2. ls 9
10
Configuration Finally, open up your favorite web browser, and go to the following web page: http://cs1520.cs.pitt.edu/~yourid/php/handoutname.php In our example handoutname = ex1.php The url for the TA’s id is: http://cs1520.cs.pitt.edu/~nim60/php/ex1.php 10
11
Configuration Your result should be: 11
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.