PHP package in linux
Case: read streams from host server using ssh2 protocol, since ftp not available.
Hints: ssh2 is newer protocol implemented, after there were some deficiencies with plain text protocol such ftp.
What first thing to do?
Check job server capabilities in handling ssh2... and found the server has none.
Since our LAN is restricted to connect internet, I ended up using local terminal to download just everything needed to get right then upload using sftp to web server.
It were:
libssh2 from libssh2.org
SSH2 lib from pecl.php.net (use v0.11.3 or above, the downer has bug in checking EOF)
Since it is a job to add new package/modules to already dead exists php in server (5.1.3 version, yes i know it's an old bag but still works), it shoud be fairly simple for someone who acquinted to linux terminal.
But alas, I am not that one, so reading here and there drawn me to a conclusion. Get everything, upload to job server and work out there.
What step required?
1. build server lib module
- tar xzf libssh..tar.gz
- ./configure --enable-ssh2
- make
- make install
2. build ssh2 pecl for php
- tar xfz ssh2..tar.gz
- phpize
- ./configure --enable-ssh2
- make
- make install
Now we have placed ssh2 module to its proper seats.
Next step is restart web server to reload php extensions: /etc/init.d/httpd restart
and check wheneverything is correctly setup.
-
I got a call to build a (not so) simple monitoring system, from scratch. Long time not getting touch by programming and sort of thing made m...
-
The idea is to retrieve data from router without need to login to router's web interface. What kind of data? I have some use case for p...
-
checking: dmesg -T --since '1 hour ago' | grep -v audit [Fri Jan 10 07:05:38 2025] wlp2s0: Connection to AP 5c:e7:47:fa:62:a0 lost...