Install SSH module for PHP » History » Version 20
Amber Herold, 06/08/2010 02:42 PM
1 | 1 | Neil Voss | h1. Install SSH module for PHP |
---|---|---|---|
2 | |||
3 | 10 | Neil Voss | This installation occurs on the web server. |
4 | |||
5 | 3 | Neil Voss | h2. The ssh2 extension for php |
6 | 1 | Neil Voss | |
7 | 7 | Neil Voss | |_.Name:|_.Download site:|_.CentOS yum package name|_.Fedora yum package name|_.SuSE rpm name| |
8 | 18 | Neil Voss | |php devel |http://www.php.net |php-devel |php-devel| | |
9 | |libssh2 devel |http://www.libssh2.org |libssh2-devel |libssh2-devel| | |
||
10 | 15 | Neil Voss | |SSH PECL extension |http://www.php.net/manual/en/ssh2.installation.php |- |php-pecl-ssh2 | | |
11 | 1 | Neil Voss | |
12 | bq. For newer systems the extension is available through the repository, e.g., on Fedora 12 type "@sudo yum install php-pecl-ssh2@" |
||
13 | |||
14 | 8 | Neil Voss | h2. Download and compile the ssh2 extension |
15 | 3 | Neil Voss | |
16 | 13 | Neil Voss | bq. This setup is almost identical to the [[Install the MRC PHP Extension]]. See http://www.php.net/manual/en/ssh2.installation.php for more information. |
17 | 9 | Neil Voss | |
18 | 4 | Neil Voss | # Go the website http://pecl.php.net/package/ssh2 |
19 | # Download the latest version of ssh2:<pre> |
||
20 | wget http://pecl.php.net/get/ssh2-0.11.0.tgz</pre> |
||
21 | # Extract the tar ball<pre> |
||
22 | 1 | Neil Voss | tar zxvf ssh2-0.11.0.tgz</pre> |
23 | 5 | Neil Voss | # Go into the directory<pre> |
24 | cd ssh2-0.11.0</pre> |
||
25 | 6 | Neil Voss | # Run phpize and standard make process<pre> |
26 | phpize |
||
27 | ./configure |
||
28 | 1 | Neil Voss | make</pre> |
29 | 10 | Neil Voss | # Install the module:<pre> |
30 | 1 | Neil Voss | sudo make install</pre> |
31 | 11 | Neil Voss | # Add a ssh2.ini to your php ini folder:<pre> |
32 | sudo touch /etc/php.d/ssh2.ini |
||
33 | sudo chmod 666 /etc/php.d/ssh2.ini |
||
34 | 12 | Neil Voss | echo "; Enable ssh2 extension module" > /etc/php.d/ssh2.ini |
35 | echo "extension=ssh2.so" >> /etc/php.d/ssh2.ini |
||
36 | 11 | Neil Voss | sudo chmod 444 /etc/php.d/ssh2.ini |
37 | cat /etc/php.d/ssh2.ini |
||
38 | </pre> |
||
39 | 10 | Neil Voss | # Restart httpd:<pre> |
40 | sudo /sbin/service httpd restart</pre> |
||
41 | 1 | Neil Voss | |
42 | 13 | Neil Voss | h2. Test if the module is working: |
43 | |||
44 | # go to the info.php that was created earlier in the [[Install the MRC PHP Extension]], http://localhost/info.php or http://HOST.INSTITUTE.EDU/info.php |
||
45 | # search for the ssh2 module, you should see this section: |
||
46 | |||
47 | 14 | Neil Voss | !ssh2box.png! |
48 | 1 | Neil Voss | _______ |
49 | |||
50 | 20 | Amber Herold | [[Setup job submission server|< Setup job submission server]] | [[Configure_web_server_to_submit_job_to_local_cluster|Configure web server to submit job to local cluster >]] |
51 | 1 | Neil Voss | |
52 | _______ |