Project

General

Profile

Install SSH module for PHP » History » Version 9

Neil Voss, 05/27/2010 03:35 PM

1 1 Neil Voss
h1. Install SSH module for PHP
2
3 3 Neil Voss
h2. The ssh2 extension for php
4 1 Neil Voss
5 7 Neil Voss
|_.Name:|_.Download site:|_.CentOS yum package name|_.Fedora yum package name|_.SuSE rpm name|
6 8 Neil Voss
|re2c |http://re2c.org/ |re2c |re2c | |
7 7 Neil Voss
|php devel |http://pear.php.net/ |php-devel |php-devel| |
8
|libssh2 devel |http://pear.php.net/ |libssh2-devel |libssh2-devel| |
9 5 Neil Voss
|SSH PECL extension |http://www.php.net/manual/en/ssh2.installation.php |php-pear |php-pear | |
10 1 Neil Voss
11
bq. For newer systems the extension is available through the repository, e.g., on Fedora 12 type "@sudo yum install php-pecl-ssh2@"
12
13 8 Neil Voss
h2. Download and compile the ssh2 extension
14 3 Neil Voss
15 9 Neil Voss
bq. See http://www.php.net/manual/en/ssh2.installation.php for more information
16
17 4 Neil Voss
# Go the website http://pecl.php.net/package/ssh2
18
# Download the latest version of ssh2:<pre>
19
wget http://pecl.php.net/get/ssh2-0.11.0.tgz</pre>
20
# Extract the tar ball<pre>
21 1 Neil Voss
tar zxvf ssh2-0.11.0.tgz</pre>
22 5 Neil Voss
# Go into the directory<pre>
23
cd ssh2-0.11.0</pre>
24 6 Neil Voss
# Run phpize and standard make process<pre>
25
phpize
26
./configure
27
make</pre>
28 9 Neil Voss
# Finally install the module:<pre>
29
sudo make install</pre>
30 1 Neil Voss
31
32 9 Neil Voss
33 1 Neil Voss
    Install openssl and compile libssh first before compiling php-ssh2 extension. Once you get the final ssh2.so, add it in your php.ini
34
35
The extension module is added to php in the same way as does the php-mrc module we distribute for the viewing mrc images through php.  To check whether it worked and for alternative way to make php recognize the module used in newer php, see http://emg.nysbc.org/documentation/leginon/bk02ch04s07.php under the section *Check php information* and *Alternative approach if mrc module does not show up in info.php output*
36
_______
37
38
[[Setup job submission server|< Setup job submission server]] | [[Configure web server to submit jobs|Configure web server to submit jobs >]]
39
40
_______