Showing posts with label Centos Tutorials. Show all posts
Showing posts with label Centos Tutorials. Show all posts
Saturday, 18 July 2015
How To Zip a File in Centos
HOW TO ZIP
Format :
Zip -rf foldername.zip folderlocation
For Example if the folder location is /var/www/html and we have to zip html folder.
we'll use the command
zip -rf html.zip /var/www/html
If u need any help regarding copying files or zipping them or in unzipping Comment below.
Friday, 3 July 2015
Installing SSH2 Extension for PHP on CentOS 5,6
Ssh2 is a very important extension especially while making connections of games with gamepanels etc.
Installing the SSH2 PHP extension on CentOS is actually pretty simple. Although it isn’t available as a straight yum install, it boils down to a few short steps.
Before we start, please ensure that you have the EPEL repo installed. If you don’t, goto http://fedoraproject.org/wiki/About_EPEL to get instructions.
Firstly, we’re going to install the dependencies:
These will allow us to build the SSH2 extension using pecl.
After running that command, it should stop at a line like:
..
........done: 22,740 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
libssh2 prefix? [autodetect] :
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.
Now restart your webserver and test to see if the changes took effect.
You should get a line returned with ‘ssh2′.
If you are still having problems post below I will love to help :)
Installing the SSH2 PHP extension on CentOS is actually pretty simple. Although it isn’t available as a straight yum install, it boils down to a few short steps.
Before we start, please ensure that you have the EPEL repo installed. If you don’t, goto http://fedoraproject.org/wiki/About_EPEL to get instructions.
Firstly, we’re going to install the dependencies:
- yum install gcc php-devel php-pear libssh2 libssh2-devel
These will allow us to build the SSH2 extension using pecl.
- pecl install -f ssh2
After running that command, it should stop at a line like:
..
........done: 22,740 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
libssh2 prefix? [autodetect] :
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
Now restart your webserver and test to see if the changes took effect.
- /etc/init.d/httpd restart
- php -m | grep ssh2
You should get a line returned with ‘ssh2′.
If you are still having problems post below I will love to help :)
Subscribe to:
Posts (Atom)
