Strona 1 z 1

Instalacja SSH2

: 14 lipca 2010, 16:18
autor: piotrek1349
Witam.
Chcę zainstalować na swoim VPS ssh2.
Używałem poradnika:

Kod: Zaznacz cały

Install libssh2

    cd /usr/src

    wget [url=http://surfnet.dl.sourceforge.net/sourceforge/libssh2/libssh2-0.14.tar.gz]http://surfnet.dl.sourceforge.net/so...h2-0.14.tar.gz[/URL]

    tar -zxf libssh2-0.14.tar.gz

    cd libssh2-0.14

    ./configure

    vi Makefile

     Change "CFLAGS = -c -g -O2 /usr/include -I/usr/include -Iinclude/ -Wall" (Yours might look different)
         to "CFLAGS = -c -g -O2 -I/usr/include -Iinclude/ -Wall" (Delete first /usr/include)

    vi src/Makefile

      Change "CFLAGS = -c -g -O2 /usr/include -I/usr/include -Wall -I../include/ -fPIC" (Yours might look different)
          to "CFLAGS = -c -g -O2 -I/usr/include -Wall  -I../include/ -fPIC" (Delete first /usr/include)

    make all install

    cd /usr/src

    rm -Rf libssh2-0.14

    rm -f libssh2-0.14.tar.gz


Install ssh2 PHP bindings

    cd /usr/lib/php (Path might differ on your server) (Most likely /usr/lib/php4 if you are using PHP 4)

    wget [URL]http://pecl.php.net/get/ssh2-0.10.tgz[/URL]

    tar -zxf ssh2-0.10.tgz

    cd ssh2-0.10

    phpize && ./configure --with-ssh2 && make

    cd modules

    mv ssh2.so /usr/local/lib/php/extensions/no-debug-non-zts-20060613 (Replace with your Extension Path)

    cd /usr/lib/php (Path might differ on your server)

    rm -Rf ssh2-0.10

    rm -f ssh2-0.10.tgz

Edit PHP settings

    vi /usr/local/lib/php.ini (Replace with your Configuration Path)

    extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613" (Replace with your Extension Path)

    extension = ssh2.so
Mój problem tkwi iż nie posiadam folderu php/extensions/no-debug-non-zts-20060613
Mam zainstalowany PHP5.
Tym sposobem nie mogę uruchomić polecenia

Kod: Zaznacz cały

   mv ssh2.so /usr/local/lib/php/extensions/no-debug-non-zts-20060613 (Replace with your Extension Path)
W folderze lib znajdują się tylko: libssh2.so python2.5

Proszę o porady.
Pozdrawiam

: 14 lipca 2010, 20:00
autor: Bastian

Kod: Zaznacz cały

whereis php

Kod: Zaznacz cały

sudo find /usr -name extensions

: 14 lipca 2010, 20:07
autor: Daku
cześć tu masz kompletną instalację SSH2 w razie czego pytaj

Kod: Zaznacz cały

SSH2 Module
1. sudo aptitude update

2. sudo aptitude install php5-dev php5-cli php-pear build-essential \
openssl-dev zlib1g-dev

3.aptitude install libssh2-1-dev libssh2-php

4. pecl install -f ssh2

5. echo 'extension=ssh2.so' > /etc/php5/conf.d/ssh2.ini

Libssh2 install (Required)

1. cd /usr/src

2. wget http://surfnet.dl.sourceforge.net/sourceforge/libssh2/libssh2-0.14.tar.gz

3. tar -zxvf libssh2-0.14.tar.gz

4. cd libssh2-0.14/

5. ./configure

6. make all install

: 14 lipca 2010, 23:50
autor: adasiek_j
Przecież to wszystko jest w Lennym w repo......
apt-get install libssh2 ssh
p.s. A Foldery to są w Windows. W Linuksie są katalogi.

Adam

: 15 lipca 2010, 12:39
autor: Bastian
adasiek_j: ja to wiem, ale uznałem, że z jakiś względów kolega woli kompilowane.