Kmaiti

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Tuesday, 20 July 2010

How to install APC(alternative php cache) on 64 bit linux? machine

Posted on 17:14 by Unknown
Guys,

Here are the steps those I followed :

=========
#cd /usr/local/src
#wget http://pecl.php.net/get/APC-3.0.14.tgz
#tar -xzvf APC-3.0.14.tgz
#cd APC-3.0.14
#phpize
#./configure --enable-apc --enable-apc-mmap --with-apxs --with-php-config=/usr/bin/php-config
#make
#make test
#make install

The extension will be stored inside "/usr/lib/php/extensions/no-debug-non-zts-20060613/".

Now, find php.ini file like : #php --ini
Add the extension="apc.so" at the last in php.ini file and restart apache.
=========

Note : You can install latest APC. Just search in google like : download APC-3.

That's it. try :)
Read More
Posted in | No comments

Sunday, 18 July 2010

How to install ImageMagick on linux?

Posted on 21:15 by Unknown
Here are the steps that I have followed :

============
1.Check whether ImageMagick has been installed or not.
which convert or which montage like this or locate ImageMagick. Or rpm -qa |grep ImageMagic
2. yum install ImageMagick
3. Now check once again.
4. rpm -ql ImageMagic| more
5. rpm -qf /usr/local/bin/convert //to check the exact rpm which has used for this binary.
============

That's it. Try now :)
Read More
Posted in | No comments

Friday, 16 July 2010

How to use ncftpget command to download files from remote server?

Posted on 17:27 by Unknown
Guys,

Please make it sure that ncftp has been installed on the destination server. check it out like :

===
root@mixstream [~]# which ncftpget
/usr/bin/ncftpget
root@mixstream [~]# which ncftp
/usr/bin/ncftp
root@mixstream [~]#
===

If these are not there, please install it on the server.

Ref URL :
===
http://www.question-defense.com/2010/01/25/install-ncftp-ncftpget-ncftpput-using-yum-on-centos-linux-server
===

Now FTP to remote server to download files :

===
root@mixstream [~/migrated_via_ncftp]# ncftpget -T -R -v -u FTP_user -p FTP_PW IP_ADDRESS_of_remote_SERVER /root/migrated_via_ncftp /
===

Here : /root/migrated_via_ncftp is destination folder
/ is source folder
root@mixstream : Local machine

You can set it at screen:

Like :
1. #command : screen //Now execute this command.
2. now CTRL +A+D // to log out from screen
3. screen -ls //to see the session ID of the screen
4. To login into the screen : screen -r seesID
5. CTRL+D //to kill the screen and logout from there.

Try :)
Read More
Posted in | No comments

Wednesday, 14 July 2010

How to install suPHP on centos linux OS?

Posted on 16:59 by Unknown
Installing suPHP on Centos 5

suPHP is a tool that allows PHP scripts to be executed with the permissions of their owners. By not running PHP script using web server’s user rights, suPHP increase the server security.

First install httpd-devel and compiler tools:

-----
yum install httpd-devel gcc gcc-c++ make
-----
Download suPHP source code and extract it

----
wget http://www.suphp.org/download/suphp-0.7.1.tar.gz
tar -xvzf suphp-0.7.1.tar.gz
cd suphp-0.7.1
----
Note: source : http://www.suphp.org/Download.html

Now we compile suPHP :

----
./configure --with-apxs=/usr/sbin/apxs --with-apache-user=apache --with-logfile=/var/log/httpd/suphp_log --with-setid-mode=paranoid --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-php=/usr/bin/php-cgi --enable-SUPHP_USE_USERGROUP=yes

make
make install
----
Next create suphp.conf to configure Apache so it will call suPHP for interpreting PHP scripts

vi /etc/httpd/conf.d/suphp.conf
Add this configuration:

----
LoadModule suphp_module modules/mod_suphp.so
suPHP_Engine on
AddType application/x-httpd-php .php

suPHP_AddHandler application/x-httpd-php

----

Save the file and the next step is to disable mod_php configuration as we are now using suPHP :

---
mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf.disabled
---

After we finished with Apache configuration, next we create suphp.conf file which contain suPHP configuration :

vi /etc/suphp.conf

----
[global]
;Path to logfile
logfile=/var/log/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=apache

;Path all scripts have to be in
docroot=/var/www:${HOME}/public_html

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true

;Send minor error messages to browser
errors_to_browser=false

;PATH environment variable
env_path=/bin:/usr/bin

;Umask to set, specify in octal notation
umask=0077

; Minimum UID
min_uid=0

; Minimum GID
----

After Apache and suPHP is configured, we need to add suPHP_UserGroup option on each virtual hosting we hosted on the server. For example, the domain.com virtual host would look like:

----

DocumentRoot /home/user/public_html

allow from all
Options +Indexes

ServerName domain.com
ErrorLog /var/log/httpd/domain.com
LogLevel warn
suPHP_UserGroup user user

----

Restart httpd. try :)
Read More
Posted in | No comments

How to install Red5 (Ray Media server) on linux machine ?

Posted on 16:20 by Unknown
Guys,

What is red5 server?

Red5 is an Open Source Flash Server written in Java that supports:

a)Streaming Audio/Video : flv, mp3, s4v,mp4,aac, m4a
b) Recording Client Streams (FLV only)
c) Shared Objects
d) Live Stream Publishing : Sorenson, VP6,h.264,Nelly Moser, MP3, Speex, AAC , NSV
e) Remoting

How does it work?

Red5 server converts the video file to the flash file and we everyone knows that flash files play instantly once someone accesses it. Here when we request or select a particular video, the video script will send the video(stream the video) to red5 server. Red5 will convert the video file to flash and sends the output to the video script to display on the browser. Lot of video scripts are being used now a days like dolphin, videowhisper etc for the site. You can configure the admin panel using the server's IP and port details.

You have the opportunity to test most of RED5 servers functions at this site. For example, webcam and audio/video streaming, clients webcam stream recording, live stream publishing, multi user video chat - you must be logged in as a site member to your account for testing.


Installation steps :

To install red5 on linux you need to install JDK and ANT first. I have already published two articles on jdk and ant. Here are those links.

------
http://kmaiti.blogspot.com/2010/07/how-to-install-jdk16021-on-64-bit-linux.html
http://kmaiti.blogspot.com/2010/08/how-to-install-apache-ant-on-linux.html
------

Once you successfully install jdk and ant then refer the following steps.

====
1. Download the Red5 tar from :
http://code.google.com/p/red5/
wget http://www.red5.org/downloads/0_9/red5-0.9.1.tar.gz
2. Make it untar:
tar -xvzf red5-0.9.1.tar.gz
3. copy content :
cd red5-0.9.1
mkdir /usr/local/red5
cp -apr * /usr/local/red5
4. Run red5 :
./red5.sh &
or
/usr/local/red5/red5.sh &
6. Add following line in /etc/rc.local
/bin/bash /usr/local/red/red5.sh &
OR run red5 server as a daemon:
./red5.sh >/dev/null 2>&1 & or nohup sh red5.sh &

7) Now test :
The RED5 installation by opening following URL in browser
http://server_ip:5080

ps : Red5 http service run on port 5080 and rtmp on port 1935.
====


Note :
Allow port 5080 and 1935 in the firewall.

Port and server details :

====
root@server [/usr/local/red5]# cat red5.properties
# HTTP
http.host=0.0.0.0
http.port=8080
# RTMP
rtmp.host=0.0.0.0
rtmp.port=1935
rtmp.event_threads_core=16
rtmp.event_threads_max=32
# event threads queue: -1 unbounded, 0 direct (no queue), n bounded queue
rtmp.event_threads_queue=-1
rtmp.event_threads_keepalive=60
rtmp.send_buffer_size=271360
rtmp.receive_buffer_size=65536
rtmp.ping_interval=5000
rtmp.max_inactivity=60000
# RTMPT
rtmpt.host=0.0.0.0
rtmpt.port=8080
rtmpt.ping_interval=5000
rtmpt.max_inactivity=60000
# Debug proxy (needs to be activated in red5-core.xml)
proxy.source_host=127.0.0.1
proxy.source_port=1936
proxy.destination_host=127.0.0.1
proxy.destination_port=1935
====

Try :)
Read More
Posted in | No comments

WHM + http showing failed ?

Posted on 10:47 by Unknown
Guys,

Please check the log of the apache server like :

1. tail -f /usr/local/apache/logs/error_log
2. check the http port in /usr/local/apache/conf/httpd.conf
3. Check MaxClients in /usr/local/apache/conf/httpd.conf. Just grep it in log.

In WHM, http was displaying failed. I got the following error message in apache log.

=====
[Tue Jul 13 22:48:38 2010] [error] [client 122.181.3.130] ModSecurity: Access denied with code 501 (phase 2). Match of "rx ^((?:(?:POS|GE)T|OPTIONS|HEAD))$" against "REQUEST_METHOD" required. [file "/usr/local/apache/conf/modsec2.user.conf"] [line "38"] [id "960032"] [msg "Method is not allowed by policy"] [severity "CRITICAL"]
=====

Please go to the 38th line and disable the rules. Then restart the apache. It'll work :) try
Read More
Posted in | No comments

Tuesday, 13 July 2010

WHM + http showing failed ?

Posted on 21:02 by Unknown
Guys,

Please check the log of the apache server like :

1. tail -f /usr/local/apache/logs/error_log
2. check the http port in /usr/local/apache/conf/httpd.conf
3. Check MaxClients in /usr/local/apache/conf/httpd.conf. Just grep it in log.

In WHM, http was displaying failed. I got the following error message in apache log.

=====
[Tue Jul 13 22:48:38 2010] [error] [client 122.181.3.130] ModSecurity: Access denied with code 501 (phase 2). Match of "rx ^((?:(?:POS|GE)T|OPTIONS|HEAD))$" against "REQUEST_METHOD" required. [file "/usr/local/apache/conf/modsec2.user.conf"] [line "38"] [id "960032"] [msg "Method is not allowed by policy"] [severity "CRITICAL"]
=====

Please go to the 38th line and disable the rules. Then restart the apache. It'll work :) try
Read More
Posted in | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • [a fatal error or timeout occurred while processing this directive] + cpanel
    Guys, Just check the cpanel log file and you'll get the clue from there. I got following messages : execute : tail -f /usr/local/cpanel/...
  • How to access the webalizer from the outside of the cpanel?
    Guys, I don't want to post this type of article since you'll get it from the Google. But still I did. I followed following steps : E...
  • How to enable php in apache on RHEL ?
    1. In order to enable php engine in apache, you should make sure php is installed in the system first. Then refer following steps : locate l...
  • WHM + http showing failed ?
    Guys, Please check the log of the apache server like : 1. tail -f /usr/local/apache/logs/error_log 2. check the http port in /usr/local/apac...
  • How to verify UDP packet communication between two linux system?
    Guys, Today, I had to check UDP packet communication between linux and a windows system. Main purpose of the windows system was to capturing...
  • Addition, multiplication etc in bash script?
    ======== #!/bin/bash x=5 # initialize x to 5 y=3 # initialize y to 3 add=$(($x + $y)) # add the values of x and y and assign it to va...
  • How do I determine if my x86-compatible Intel system is multi-processor, multi-core or supports hyperthreading?
    Guys, We need to know about multi-processor, multi-core or supports hyperthreading. Here are the details : Physical ID (Physical processor o...
  • make: *** [install-webconf] Error 1
    Guys, I got this error message during configuring the nagios : Here is the exact error message. ======= root@server [/usr/local/src/nagios-3...
  • How to configure tata photon + on linux machine + rdehat
    Guys, Please read the article before proceeding to configure the USB modem. ============== [root@kmaiti ~]# wvdial --> WvDial: Internet d...
  • How to store sftp log messages in custom file on RHEL 6?
    How to setup chrooted sftp account on RHEL 6? $groupadd sftponly $$useradd user123 $usermod -d /myhome -g sftponly -s /bin/false user123 $mk...

Categories

  • ACL
  • ESX
  • Linux
  • Storage
  • UCS

Blog Archive

  • ▼  2013 (5)
    • ▼  May (1)
      • NDMP communication failure error
    • ►  April (3)
    • ►  February (1)
  • ►  2012 (10)
    • ►  July (1)
    • ►  June (1)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (1)
  • ►  2011 (86)
    • ►  December (3)
    • ►  November (2)
    • ►  September (19)
    • ►  August (9)
    • ►  July (5)
    • ►  June (9)
    • ►  May (12)
    • ►  April (3)
    • ►  March (4)
    • ►  February (5)
    • ►  January (15)
  • ►  2010 (152)
    • ►  December (9)
    • ►  November (34)
    • ►  October (20)
    • ►  September (14)
    • ►  August (24)
    • ►  July (19)
    • ►  June (3)
    • ►  May (25)
    • ►  April (3)
    • ►  January (1)
Powered by Blogger.