Forum Moderators: phranque
My network admin wrote a script to setup a few PEAR modules as follow
##=============start cut here=============== #!/bin/bash
pear channel-update pear.php.net
pear install Mail_Mime
pear install channel://pear.php.net/SOAP-0.10.1
pear install channel://pear.php.net/SOAP_Interop-0.8.1
##=============end cut here===============
I know how to start a SSH session with “Putty”
but do not now how to perform what is required to accomplish the task at hand.
He said “Use SSH to create a new file with the contents above
and.
Set the execute permission on the file and then execute the file.
This is where I am clueless regarding the required typing.
and how execute it.
Could you help me with that
By advance thank you
Henry
ssh -2 username@12.34.56.78
cd /path/to/directory/you/want/script/in
pico pearsetup.sh
That opens the ssh connection, changes to a particular directory and opens a document in that directory named pearsetup.sh (if that file doesn't exist, it automagically creates it). Inside of pico, you paste the content of your script. (Make sure the very first line of the script is "#!/bin/bash" without quotes.)
Next, you must save the document in pico (Control + X, then type "Y" to save, then hit return to confirm file name). Then we go back into the shell to set permissions and proceed to execute the script:
chmod 0700 pearsetup.sh
./pearsetup.sh
And you should be all set! To delete the script when you are done, just:
unlink pearsetup.sh