"CentOS php-pecl-ssh2 설치"의 두 판 사이의 차이

잔글 (봇: Jmnote bot의 2016-03-29T01:08:50Z 에 작성한 181121 판으로 되돌림)
잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
4번째 줄: 4번째 줄:


==확인==
==확인==
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# rpm -qa | grep php-pecl-ssh2
[root@zetawiki ~]# rpm -qa | grep php-pecl-ssh2
[root@zetawiki ~]# php -r "ssh2_tunnel();"
[root@zetawiki ~]# php -r "ssh2_tunnel();"
10번째 줄: 10번째 줄:


Fatal error: Call to undefined function ssh2_tunnel() in Command line code on line 1
Fatal error: Call to undefined function ssh2_tunnel() in Command line code on line 1
</source>
</syntaxhighlight>
:→ ssh2_tunnel 명령어를 인식하지 못함.
:→ ssh2_tunnel 명령어를 인식하지 못함.
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# yum list php-pecl-ssh2
[root@zetawiki ~]# yum list php-pecl-ssh2
... (생략)
... (생략)
Error: No matching Packages to list
Error: No matching Packages to list
</source>
</syntaxhighlight>
:→ yum으로 설치 불가
:→ yum으로 설치 불가


23번째 줄: 23번째 줄:


==php-pecl-ssh2 설치==
==php-pecl-ssh2 설치==
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# yum install php-pecl-ssh2
[root@zetawiki ~]# yum install php-pecl-ssh2
... (생략)
... (생략)
39번째 줄: 39번째 줄:
Installed size: 73 k
Installed size: 73 k
Is this ok [y/N]: y
Is this ok [y/N]: y
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
... (생략)
... (생략)
Installed:
Installed:
46번째 줄: 46번째 줄:


Complete!
Complete!
</source>
</syntaxhighlight>


==확인 2==
==확인 2==
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# rpm -qa | grep php-pecl-ssh2
[root@zetawiki ~]# rpm -qa | grep php-pecl-ssh2
php-pecl-ssh2-0.11.0-7.el6.x86_64
php-pecl-ssh2-0.11.0-7.el6.x86_64
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# php -r "ssh2_tunnel();"
[root@zetawiki ~]# php -r "ssh2_tunnel();"
PHP Warning:  ssh2_tunnel() expects exactly 3 parameters, 0 given in Command line code on line 1
PHP Warning:  ssh2_tunnel() expects exactly 3 parameters, 0 given in Command line code on line 1


Warning: ssh2_tunnel() expects exactly 3 parameters, 0 given in Command line code on line 1
Warning: ssh2_tunnel() expects exactly 3 parameters, 0 given in Command line code on line 1
</source>
</syntaxhighlight>
:→ PHP 모듈이 ssh2_tunnel 함수를 인식하였다.
:→ PHP 모듈이 ssh2_tunnel 함수를 인식하였다.


*웹에도 적용하려면 아파치를 재시작해야 한다.
*웹에도 적용하려면 아파치를 재시작해야 한다.
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# service httpd restart
[root@zetawiki ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==

2020년 11월 2일 (월) 00:55 기준 최신판

PHP에서 SSH2 터널링 사용
리눅스 php-pecl-ssh2 설치

1 확인[ | ]

[root@zetawiki ~]# rpm -qa | grep php-pecl-ssh2
[root@zetawiki ~]# php -r "ssh2_tunnel();"
PHP Fatal error:  Call to undefined function ssh2_tunnel() in Command line code on line 1

Fatal error: Call to undefined function ssh2_tunnel() in Command line code on line 1
→ ssh2_tunnel 명령어를 인식하지 못함.
[root@zetawiki ~]# yum list php-pecl-ssh2
... (생략)
Error: No matching Packages to list
→ yum으로 설치 불가

2 epel-release 설치[ | ]

3 php-pecl-ssh2 설치[ | ]

[root@zetawiki ~]# yum install php-pecl-ssh2
... (생략)
===================================================================================================================================
 Package                            Arch                        Version                            Repository                 Size
===================================================================================================================================
Installing:
 php-pecl-ssh2                      x86_64                      0.11.0-7.el6                       epel                       31 k

Transaction Summary
===================================================================================================================================
Install       1 Package(s)

Total download size: 31 k
Installed size: 73 k
Is this ok [y/N]: y
... (생략)
Installed:
  php-pecl-ssh2.x86_64 0:0.11.0-7.el6                                                                                              

Complete!

4 확인 2[ | ]

[root@zetawiki ~]# rpm -qa | grep php-pecl-ssh2
php-pecl-ssh2-0.11.0-7.el6.x86_64
[root@zetawiki ~]# php -r "ssh2_tunnel();"
PHP Warning:  ssh2_tunnel() expects exactly 3 parameters, 0 given in Command line code on line 1

Warning: ssh2_tunnel() expects exactly 3 parameters, 0 given in Command line code on line 1
→ PHP 모듈이 ssh2_tunnel 함수를 인식하였다.
  • 웹에도 적용하려면 아파치를 재시작해야 한다.
[root@zetawiki ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

5 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}