본문 바로가기

SugarCRM/Server운영

SSH2 로~~~~~~

반응형

\sites\all\themes\tb_sirate

logo 변경

drupal  "Connection method" SFTP "Update manager"

https://drupal.org/https-information

http://httpd.apache.org/docs/2.2/ssl/ssl_howto.html

현재 Kserver PHP 버전 - PHP Version 5.3.6

http://forum.sa-mp.com/showthread.php?t=243793

Having trouble installing the PHP-SSH2 extension on your server? Read on.


centos php5-dev libssh2-1-dev libssh2-php

yum install libssh2-1-dev libssh2-php

[root@qsh-0404 ~]# yum install libssh2-1-dev libssh2-php

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: centos.tt.co.kr

 * extras: centos.tt.co.kr

 * updates: centos.tt.co.kr

base                                                                        | 1.1 kB     00:00     

extras                                                                      | 2.1 kB     00:00     

updates                                                                     | 1.9 kB     00:00     

Setting up Install Process

No package libssh2-1-dev available.

No package libssh2-php available.

Nothing to do

--------------

[root@qsh-0404 ~]# cat /etc/redhat-release

CentOS release 5.8 (Final)

------------------

[root@qsh-0404 ~]#  yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

 * base: centos.tt.co.kr

 * extras: centos.tt.co.kr

 * updates: centos.tt.co.kr

repo id                                  repo name                                           status

base                                     CentOS-5 - Base                                     3,641

extras                                   CentOS-5 - Extras                                     270

updates                                  CentOS-5 - Updates                                    550

repolist: 4,461

http://fedoraproject.org/wiki/About_EPEL

Select the package from EPEL repository and Download the RPM.
You need to check the architecture of your processor and download the appropriate package from the URL: 
http://dl.fedoraproject.org/pub/epel/6/


http://blog.naver.com/budget74/90103398933
openssl + libssh2 + ssh2 설치

1. RPM 설치

- CentOS release 5.5 (Final) 2.6.18-194.el5

- remi 와 epel 을 repository 에 추가하는 건 다른 글을 참조하세요


http://blog.naver.com/PostView.nhn?blogId=jwlee25&logNo=150147666346

오늘은 EPEL repo 를 추가해볼께요.

 

보통 리눅스 상태로는 yum 명령으로 안깔리는 프로그램이 많습니다 

이 문제를 해결하기 위해 EPEL repo 를 추가하는거랍니다^^

 

먼저 단어의 뜻을 알아볼께요.

 EPEL 이란   : Extra Packages of Enterprise Linux 를 뜻하며  말 그대로 엔터프라이즈 리눅스의 추가 패키지이고,

 repo 란 : repository 를 뜻하며 yum 의 저장소(repository)를 말합니다.

 

yum으로 프로그램을 설치할때  

저장소(repository)에 저장되어있는 주소를 읽어서 

파일을 다운받고 설치를 합니다.

 

 

만약, 프로그램이 설치되지 않는다면

 

저장소에 그 프로그램의 설치주소가 저장되어있지 않기떄문이겠죠.

 

 

그래서 EPEL repo 를 추가시키는겁니다.

 

이것만 추가시키면 왠만한 프로그램은 다 yum 으로 간단히 설치가 가능합니다^^

 

 

 

먼저,

 

# yum repolist

 

로 저장소에 무엇이 있는지 확인합니다.

 

 

뭐 별거 없네요;;;

 

 

 

이제 EPEL 의 최신버전인

 

EPEL6 를 설치해볼께요.

 

# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

 

위와 같이 입력하여 url을 통해 바로 설치할께요.

 

wget 으로 파일을 다운받은 후, rpm 으로 설치하셔도 상관없습니다.

 

# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

[root@qsh-0404 ~]# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm(을)를 복구합니다

경고: /var/tmp/rpm-xfer.JyD6TA: Header V3 DSA signature: NOKEY, key ID 217521f6

준비 중...               ########################################### [100%]

   1:epel-release           ########################################### [100%]

[root@qsh-0404 ~]# 



[root@qsh-0404 ~]# rpm -q centos-release

centos-release-5-8.el5.centos


[root@qsh-0404 ~]# uname -a

Linux qsh-0404.cafe24.com 2.6.18-308.1.1.el5 #1 SMP Wed Mar 7 04:16:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux


  • 설치하신다음에 uname -a 해보시면 i686 i686 i386 GNU/Linux 이렇게 나오면 32비트 

    x86_64 이런식이면 64비트 입니다.


If it's a 5.x box then you need the epel-release-5.x not 6.x.

i386 은 처음으로 만들어진 32bit x86 아키텍쳐(IA-32 또는 x86-32) CPU.

결론적으로 i386 과 x86-64 는 둘다 x86 아키텍쳐이고.
i386 은 32bit 운영체제. 응용프로그램은 16bit(보호모드), 32bit 실행 가능.
x86-64 는 64bit 운영체제. 응용프로그램은 16bit(보호모드), 32bit, 64bit 실행 가능.
특히 x86-64는 AMD64, EM64T 라고도 불리운다.

x86 = IA-32
IA-32(Intel Architecture, 32-bit) 또는 x86-32는 인텔의 32비트 마이크로프로세서에서 사용하는 명령 집합 아키텍처이며, 이전에 사용되던IA-16 아키텍처의 32비트 확장이다. IA-32를 x86이라는 이름으로 부르기도 하지만 엄밀하게는 x86 아키텍처는 IA-16, IA-32 등을 모두 포함하는 일반적인 이름이다.
http://ko.wikipedia.org/wiki/IA-32


x64 = x86-64, AMD64, EM64T
x86-64는 x86 명령어 집합 아키텍처의 64비트 모임이다. x86-64 명령어 집합은 에뮬레이션 없이 인텔의 x86를 지원하며 AMD64로 이름 붙인 AMD에 의해 고안되었다. 이 아키텍처는 인텔 64라는 이름으로 인텔에 의해 복제되기도 했다. (옘힐, 클래카마스 기술, CT, IA-32e, EM64T 등으로 불렸음)[1] 이로써 x86-64 또는 x64의 이름을 일상적으로 사용하기에 이르렀다.
http://ko.wikipedia.org/wiki/X64




 

인터넷이 켜져있어야 다운을 받을수 있어요~

 

yum 도 마찬가지로 인터넷으 켜져있어야 사용 가능하구요.

 

인터넷 켜는 방법은

 

http://blog.naver.com/jwlee25/150147199648      <-----    요기로^^b

 

 

그럼, epel을 깔아봅니다.

 

 

 

epel을 설치한 뒤,

 

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

위와 같이 입력하여 remi를 설치합니다. 

remi 는 repository(저장소) 를 자동으로 설정해줍니다.



 rpm -Uvh  http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

[root@qsh-0404 ~]#  rpm -Uvh  http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

http://rpms.famillecollet.com/enterprise/remi-release-5.rpm(을)를 복구합니다

준비 중...               ########################################### [100%]

   1:remi-release           ########################################### [100%]

 

 

설치가 끝나면 다시 repolist 를 확인해봅니다.

 

 

 

epel 이 추가된 것을 확인할수 있으며

 

리스트가 2배이상 증가된것을 볼수 있습니다.

 

 [root@qsh-0404 ~]# yum repolist

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: centos.tt.co.kr

 * epel: ftp.neowiz.com

 * extras: centos.tt.co.kr

 * updates: centos.tt.co.kr

base                                                                        | 1.1 kB     00:00     

epel                                                                        | 3.6 kB     00:00     

epel/primary_db                                                             | 3.8 MB     00:00     

extras                                                                      | 2.1 kB     00:00     

updates                                                                     | 1.9 kB     00:00     

repo id                    repo name                                                         status

base                       CentOS-5 - Base                                                   3,641

epel                       Extra Packages for Enterprise Linux 5 - x86_64                    7,368

extras                     CentOS-5 - Extras                                                   270

updates                    CentOS-5 - Updates                                                  550

repolist: 11,829





 

이제 yum 으로 설치가 안되었던 프로그램들을 마음껏 깔아줍니다~^^끝! 


http://blog.dynamichosting.biz/2011/01/10/installing-ssh2-extension-for-php-on-centos-5/


=============

[root@qsh-0404 ~]# yum install gcc php-devel php-pear libssh2 libssh2-devel

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: centos.tt.co.kr

 * epel: ftp.neowiz.com

 * extras: centos.tt.co.kr

 * updates: centos.tt.co.kr

Setting up Install Process

Package gcc-4.1.2-54.el5.x86_64 already installed and latest version

Package php-devel-5.1.6-40.el5_9.x86_64 already installed and latest version

Package 1:php-pear-1.4.9-8.el5.noarch already installed and latest version

Resolving Dependencies

--> Running transaction check

---> Package libssh2.i386 0:0.18-10.el5 set to be updated

---> Package libssh2.x86_64 0:0.18-10.el5 set to be updated

---> Package libssh2-devel.i386 0:0.18-10.el5 set to be updated

---> Package libssh2-devel.x86_64 0:0.18-10.el5 set to be updated

--> Finished Dependency Resolution


Dependencies Resolved


===================================================================================================

 Package                    Arch                Version                    Repository         Size

===================================================================================================

Installing:

 libssh2                    i386                0.18-10.el5                epel               88 k

 libssh2                    x86_64              0.18-10.el5                epel               88 k

 libssh2-devel              i386                0.18-10.el5                epel               13 k

 libssh2-devel              x86_64              0.18-10.el5                epel               13 k


Transaction Summary

===================================================================================================

Install       4 Package(s)

Upgrade       0 Package(s)


Total download size: 202 k

Is this ok [y/N]: y

Downloading Packages:

(1/4): libssh2-devel-0.18-10.el5.x86_64.rpm                                 |  13 kB     00:00     

(2/4): libssh2-devel-0.18-10.el5.i386.rpm                                   |  13 kB     00:00     

(3/4): libssh2-0.18-10.el5.x86_64.rpm                                       |  88 kB     00:00     

(4/4): libssh2-0.18-10.el5.i386.rpm                                         |  88 kB     00:00     

---------------------------------------------------------------------------------------------------

Total                                                              325 kB/s | 202 kB     00:00     

경고: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 217521f6

epel/gpgkey                                                                 | 1.7 kB     00:00     

Importing GPG key 0x217521F6 "Fedora EPEL <epel@fedoraproject.org>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL

Is this ok [y/N]: y

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing     : libssh2                                                                     1/4 

  Installing     : libssh2                                                                     2/4 

  Installing     : libssh2-devel                                                               3/4 

  Installing     : libssh2-devel                                                               4/4 


Installed:

  libssh2.i386 0:0.18-10.el5         libssh2.x86_64 0:0.18-10.el5 libssh2-devel.i386 0:0.18-10.el5

  libssh2-devel.x86_64 0:0.18-10.el5


Complete!


===========

[root@qsh-0404 ~]# pecl install -f ssh2

WARNING: failed to download pecl.php.net/ssh2 within preferred state "stable", will instead download version 0.12, stability "beta"

downloading ssh2-0.12.tgz ...

Starting to download ssh2-0.12.tgz (26,223 bytes)

.........done: 26,223 bytes

6 source files, building

running: phpize

Configuring for:

PHP Api Version:         20090626

Zend Module Api No:      20090626

Zend Extension Api No:   220090626

libssh2 prefix? [autodetect] : 

building in /tmp/pear/temp/pear-build-rootFOTrsP/ssh2-0.12

running: /tmp/pear/temp/ssh2/configure --with-ssh2

checking for egrep... grep -E

checking for a sed that does not truncate output... /bin/sed

checking for cc... cc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether cc accepts -g... yes

checking for cc option to accept ANSI C... none needed

checking how to run the C preprocessor... cc -E

checking for icc... no

checking for suncc... no

checking whether cc understands -c and -o together... yes

checking for system library directory... lib

checking if compiler supports -R... no

checking if compiler supports -Wl,-rpath,... yes

checking build system type... x86_64-unknown-linux-gnu

checking host system type... x86_64-unknown-linux-gnu

checking target system type... x86_64-unknown-linux-gnu

checking for PHP prefix... /usr/local

checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib

checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20090626

checking for PHP installed headers prefix... /usr/local/include/php

checking if debug is enabled... no

checking if zts is enabled... no

checking for re2c... no

configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.

checking for gawk... gawk

checking for ssh2 support... yes, shared

checking for ssh2 files in default path... found in /usr

checking for libssh2_session_hostkey in -lssh2... no

configure: error: libssh2 version >= 1.2 not found

ERROR: `/tmp/pear/temp/ssh2/configure --with-ssh2' failed



After running that command, it should stop at a line like:


All you have to do is hit Enter and
it should detect the proper path.
Once the install is completed, you just have to tell PHP to load the extension when it boots.




touch /etc/php.d/ssh2.ini

echo extension=ssh2.so > /etc/php.d/ssh2.ini 

 


[root@qsh-0404 /]# find -name "*ssh2*"

./etc/php.d/ssh2.ini

./usr/include/libssh2.h

./usr/include/libssh2_publickey.h

./usr/include/libssh2_sftp.h

./usr/lib64/libssh2.so

./usr/lib64/libssh2.so.1.0.0

./usr/lib64/libssh2.so.1

./usr/share/doc/libssh2-0.18

./usr/share/doc/libssh2-devel-0.18

./usr/lib/libssh2.so

./usr/lib/libssh2.so.1.0.0

./usr/lib/libssh2.so.1

./tmp/pear/download/ssh2-0.12.tgz

[출처] EPEL repo 추가하기|작성자 오리꽥


반응형

'SugarCRM > Server운영' 카테고리의 다른 글

centos::버전확인  (0) 2013.10.28
cafe24-Quick SandyBridge311  (0) 2013.05.19
(펌) SSO의 종류  (1) 2012.09.18