Tuesday, February 23, 2010

rsync command

rsync -avz '-e ssh -p prtnumbver' filename destination

rsync -avz '-e ssh -p 39999' cpmove-minferie.tar.gz root@IP:/home/

for cating zip file

zcat filename

screen command

1. screen
2.run the command
3.ctrl+A+D for dettaching
4.screen -r id

script for auto restart of red5

root@system [~]# cat /root/red5cron
#!/bin/bash

sitepoint=`ps aux | grep -v grep | grep -c 'red5'`

if [ $sitepoint -le "2" ]; then

killall -9 /usr/local/jdk/bin/java;

cd /usr/local/red

./red5.sh&

fi

root@system [~]# cd

Monday, February 22, 2010

ffmpeg: error while loading shared libraries: libswscale.so.0: cannot open shared object file: No such file or directory

2 other solutions. Begin by making sure that you indeed have the libraries installed. Run the command locate libavdevice.so.52 and you should have the specific file path showing up in the list.

I will assume that the location of these libraries is /usr/local/lib/ such as /usr/local/lib/libavdevice.so.52 .

- Now that we know that the libraries are there, The first solution to fix this problem is to create symlinks of the missing libraries from /usr/lib to /usr/local/lib

ln -s /usr/local/lib/libavdevice.so.52 /usr/lib/libavdevice.so.52
ln -s /usr/local/lib/libavformat.so.52 /usr/lib/libavformat.so.52
etc ...

Not a very elegant solution.

- My preferred solution: there's a file called /etc/ld.so.conf. In my ubuntu install it contains a single line that includes the content of the directory /etc/ld.so.conf.d/

That directory in turn should normally have a couple of files. One of them should be /etc/ld.so.conf.d/libc.conf, which contains the line /usr/local/lib . If this is the case, then simply run the command sudo ldconfig -v to reload the libraries cache and your problem should be fixed.

If the file doesn't exist you could create one called /etc/ld.so.conf.d/ffmpeg.conf (or even libc.conf) and add the line /usr/local/lib in it, then run sudo ldconfig -v.

account tranfer pdf

http://docs.cpanel.net/twiki/pub/AllDocumentation/ReleaseNotes/1125releasenotes.pdf

*phpMyAdmin cannot upload or import databases issue

if any customer face *phpMyAdmin cannot upload or import databases issue
follow the below steps at once.

=================================
To correct ths issue, edit
/usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini and change
Code:
'upload_tmp_dir '
to
Code:
'upload_tmp_dir = /tmp '

==============================
Antony, Richard, please make sure this is implemented on our shared
servers.

shoutcast installation

Note: not for common use(ideamine)

Please follow the steps to install in on any server.

[root@sserver]# wget http://69.72.132.53/shoutcast_install.sh
[root@sserver]#sh shoutcast_install.sh

Thats all! you may now access the shoutcast web interface using
http://Ip_address:8000

The default admin login details are as follows.

Username: admin
Password:changeme

I have updated our Hostv forum regarding this, the link is at

http://forums.hostv.com/how-tos/622-how-install-shoutcast.html#post7351

Sunday, February 21, 2010

download remote servers backup via ftp

1. login into remote server using login credentials
2.get filename

Saturday, February 20, 2010

Red5 installation.

ps: scripts is not for common use(ideamine)

Hi,

Red autoinstaller is ready and can be used by the following steps at the
command prompt.I have implemented a startup script also which will help us
to auto start red5 while VPS reboots. Do the following at ssh as root.

**************************************

wget http://69.72.132.53/red5install.sh
sh red5install.sh

Press Ctrl+C

/etc/init.d/red5 restart

*********************************

after this access the demo URL using http://ipaddress:5080 and install the
demos using installer.

Please note that the latest build of red5 is at
/usr/local/apache/htdocs/trunk/red5.tar.gz of spicy, we may need to update
the same when a new release is out and we are happy with that.

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

As per this red5 .8 is installed on the server

location /usr/local/red5

If one need to install red5 .7 then
first install .8 then
go to /usr/local/red5/
===============================================
403 cd /usr/src
404 wget http://69.72.132.53/red5install.sh
405 sh red5install.sh
406 cd /usr/local/
407 ls
408 cd red5
409 ls
410 cd ..
411 mv red5 red5.bak
412 wget http://red5.nl/installer/red5-0.7.0.tar.gz
414 tar -xzf red5-0.7.0.tar.gz
415 ls
416 mkdir red5
417 mv red5-0.7.0.tar.gz red5/
418 cd red5
419 ls
420 tar -xzf red5-0.7.0.tar.gz
421 /etc/init.d/red5 restart
422 hostname -i
423 /etc/init.d/red5 restart
424 /etc/init.d/red5 restart
425 ls
426 sh red5-shutdown.sh
427 ps aux | grep java
==========================================
you can check the red5 installation in the following manner

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

1. http://69.72.202.134:5080/ (servers IP >>69.72.202.134)
2 click on here i.e http://69.72.202.134:5080/demos/
3.click on ofla demo i.e http://69.72.202.134:5080/demos/ofla_demo.html

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

Sunday, February 14, 2010

How to SSH login to your server without password ?

You need to generate SSH Key ( the private key )on your linux local computer and then update remote linux computer or server with the authorized_keys
(the public key).

1. Check if .ssh folder already exist under your home directory
(/home/user-name/.shh ).
If not create a folder .ssh

# mkdir .ssh


2. Generate or create SSH key run ssh-keygen command.

# ssh-keygen -t rsa

Press enter for all the below options to save the default settings:


-> Enter file in which to save the key (/Users/exampleuser/.ssh/id_rsa)

-> Enter passphrase (empty for no passphrase)

-> Enter same passphrase again

Now you have created the key pair.You can find all the newly generated files in your .ssh folder.

# ls

id_rsa id_rsa.pub known_hosts

you need to copy the *.pub file to your remote computer or server. Copy the file id_rsa.pub to your web server and save it as authorized_keys under

/home/user-name/.ssh/



Restart sshd.

Thats it

Thursday, February 11, 2010

Installing PHP APC on GNU/Linux Centos 5

Installing PHP APC on GNU/Linux Centos 5

* Articles

Published Mon, 2008/03/24 - 13:49, Updated Wed, 2009/07/15 - 23:40

Complex PHP applications, such as Drupal, can gain a lot of performance benefits from running a PHP op-code cache/accelerators.

APC,
Alternate PHP Cache, is now the most maintained free/open source op-code cache, and is being used more and more as it emerges to be the
most stable.

The instructions here detail how to get APC running on a CentOS 5 server. The server happened to have Plesk on it as well, which initially made me hesitant to install APC "normally", since Plesk is so picky on what other software is installed on the server. However, it seems to have worked out well.

First, we need the pecl command so we can download and install APC from the repositories.

Do to so, we execute the following command:

yum install php-pear

But, this will not run on its own, we need the following package for the phpize command:

yum install php-devel

We also need the apxs command, which is installed via the following package:

yum install httpd-devel

Now we have all the software we need, so we install apc via the pecl command:

pecl install apc

Once that finishes, we need to enable apc in Apache's configuration. the following command should do this for us.

echo "extension=apc.so" > /etc/php.d/apc.ini

Then we restart Apache:

/etc/init.d/httpd start

And we are all done. Watch for less execution time per page, and decreased memory usage per Apache process compared to what you had
before.

Tuesday, February 9, 2010

Joomla error

the problem of modules is as follows ... administrator in the area .. www.benicar-honda.com.br/administrator => extensions => Install / Uninstall => I select the file in the module zip pra install module => and when I try to install the error and appears written JFolder:: create : Could not create directory
Warning! Failed to move file.
login and password for you to access the administrator area:
login: wmanhattan

=====================================
error:
JFolder::create: Could not create directory

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

Solution:

go to the joomla home folder
and edit the configuration.php


then search for this line From:

var $tmp_path = '/home/public_html/your_name/tmp';

To:
var $tmp_path = 'tmp';


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

Sample php mail script

$to = "amazondrygoods-@webtv.net";
$subject = "Testmail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>

Friday, February 5, 2010

Shell change

chsh -l newshell name(path of the shell name)

changing to bash shell
eg: chsh -l /bin/bash/

Stop A Directory Index From Being Shown

Stop A Directory Index From Being Shown

Sometimes, for one reason or another, you will have no index file in your directory. This will, of course, mean that if someone types the directory name into their browser, a full listing of all the files in that directory will be shown. This could be a security risk for your site.

To prevent against this (without creating lots of new 'index' files, you can enter a command into your .htaccess file to stop the directory list from being shown:

Options -Indexes

apache modules

* mod_access
* mod_actions
* mod_alias
* mod_asis
* mod_auth
* mod_auth_passthrough
* mod_autoindex
* mod_cgi
* mod_dav
* mod_dir
* mod_env
* mod_expires
* mod_imap
* mod_include
* mod_log_config
* mod_mime
* mod_negotiation
* mod_php5
* mod_proxy
* mod_rewrite
* mod_setenvif
* mod_ssl
* mod_status

php modules

* Zend Optimizer
* Calendar
* cURL (with SSL)
* Date
* DOM
* XML
* libXML
* SimpleXML
* XMLRPC
* XSL / XSLT / EXSLT
* EXIF
* FTP
* GD (with FreeType)
* GetText
* IMAP
* mbstring (Multibyte Support)
* mcrypt
* mhash
* PDO (sqlite2, sqlite, mysql, pgsql)
* JSON

* MySQL
* MySQLi
* ODBC
* PCRE (Perl Compatible Regular Expressions)
* PEAR
* PostgreSQL (pgsql)
* SOAP
* Sockets
* SPL
* SQLite (SQLite2 and SQLite3)
* Tidy (libtidy)
* Zlib
* Zip
* BCMath
* ctype
* iconv
* PSpell
* Session
* Tokenizer
* WDDX