Archive for the Linux Category

ffmpeg-php undefined symbol php_gd_gdImageSetPixel

Posted on February 13, 2010 with No Comments

When i install ffmpeg-php on a plesk server, i got following error

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/ffmpeg.so' - /usr/lib/php/modules/ffmpeg.so: undefined symbol: php_gd_gdImageSetPixel in Unknown on line 0

This is caused by loading ffmpeg.so before gd.so

To fix the error, i edited

vi /etc/php.d/gd.ini

added following as last line

extension=ffmpeg.so

Tags: , , , ,

Category: Linux

Auto update CentOS server with yum

Posted on January 31, 2010 with No Comments

Create file yum_update.sh

vi /etc/cron.daily/yum_update.sh

With following content

#!/bin/bash
 
/usr/bin/yum -y -R 120 -d 0 -e 0 update yum
/usr/bin/yum -y -R 10 -e 0 -d 0 update

-e 0 -d 0 are to only show critical errors.
-R adds random delay between command execution.

Make it executable

chmod 755 /etc/cron.daily/yum_update.sh

fipscheck conflicts with fipscheck-lib-1.2.0-1.el5.x86_64

Posted on January 30, 2010 with No Comments

When i run yum update i get error

[root@server12 ~]# yum update
.....
..... some text removed
.....
ERROR with rpm_check_debug vs depsolve:
fipscheck conflicts with fipscheck-lib-1.2.0-1.el5.x86_64
Complete!
(1, ['Please report this error in bugzilla'])
[root@server12 ~]#

This is caused by both 32 and 64 bit version installed.

[root@server12 ~]# rpm -qa fipscheck
fipscheck-1.0.3-1.el5
fipscheck-1.0.3-1.el5
[root@server12 ~]#

I got the error fixed by

yum remove fipscheck

This will also remove package “nss_ldap”.

Tags: , , ,

Category: Linux

Installing Java on CentOs

Posted on October 1, 2009 with No Comments

Java is available in CentOS 5.

root@server70 [~]# yum list|grep openjdk
java-1.6.0-openjdk.x86_64                  1:1.6.0.0-1.2.b09.el5       installed
java-1.6.0-openjdk-demo.x86_64             1:1.6.0.0-1.2.b09.el5       updates
java-1.6.0-openjdk-devel.x86_64            1:1.6.0.0-1.2.b09.el5       updates
java-1.6.0-openjdk-javadoc.x86_64          1:1.6.0.0-1.2.b09.el5       updates
java-1.6.0-openjdk-src.x86_64              1:1.6.0.0-1.2.b09.el5       updates
root@server70 [~]#

To install java, run

yum install java-1.6.0-openjdk

Java will be installed on

/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/java
root@server70 [/var/log]# rpm -q --filesbypkg java-1.6.0-openjdk  | grep "/bin/java"
java-1.6.0-openjdk        /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java
root@server70 [/var/log]# which java
/usr/bin/java
root@server70 [/var/log]# cd /usr/bin
root@server70 [/usr/bin]# ls -la |grep java
lrwxrwxrwx  1 root root          22 Aug 25 02:56 java -> /etc/alternatives/java*
root@server70 [/usr/bin]# ls -la /etc/alternatives/java
lrwxrwxrwx 1 root root 46 Aug 25 02:56 /etc/alternatives/java -> /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java*
root@server70 [/usr/bin]#

Tags: , , ,

Category: Linux

Go with Mac (or Linux) if you don’t want virus

Posted on August 26, 2009 with No Comments

Advertisement by Apple Mac.

The Get A Mac Ad: ”Top Of The Line”

Tags:

Category: Linux

Error: Missing Dependency: perl(Convert::ASN1) is needed by package samba-3.0.33-3.7.el5.i386 (base)

Posted on July 6, 2009 with No Comments

When i run “yum update” i get error

[root@server28 ~]# yum upgrade
.....
.....
samba-3.0.33-3.7.el5.i386 from base has depsolving problems
  --> Missing Dependency: perl(Convert::ASN1) is needed by package samba-3.0.33-3.7.el5.i386 (base)
Error: Missing Dependency: perl(Convert::ASN1) is needed by package samba-3.0.33-3.7.el5.i386 (base)
[root@server28 ~]#

To fix the error we need to find package perl-Convert-ASN1 and install it.

But this server do not need samba, so i just removed samba. samba is used to connect to windows network. Most web servers do not need samba.

yum remove samba samba-client

Creating zip archive in linux

Posted on June 18, 2009 with No Comments

Today i want to move a site from linux server to windows.

Moving with FTP takes long. Normal tar.gz transfer will not work as windows by default do not support extraction of tar.gz file.

To create a ZIP file on linux, run

zip -9 -y -r -q FILE_NAME.ZIP FOLDER_HERE
# zip -9 -y -r -q httpdocs.zip httpdocs

Now i transfer the file to remote windows server with FTP. The server have FTP access configured for user administrator, this is not secure, but that is how the server is configured.

# ftp 74.53.87.116
Connected to 74.53.87.116 (74.53.87.116).
220 Microsoft FTP Service
Name (74.53.87.116:root): administrator
331 Password required for administrator.
Password:
230 User administrator logged in.
Remote system type is Windows_NT.
ftp> bin
200 Type set to I.
ftp> put httpdocs.zip
local: httpdocs.zip remote: httpdocs.zip
227 Entering Passive Mode (74,53,87,146,16,157).
125 Data connection already open; Transfer starting.
226 Transfer complete.
115400108 bytes sent in 11.8 secs (9.6e+03 Kbytes/sec)
ftp>

Tags: ,

Category: Linux

Debian: How to find a package is installed from .deb or source

Posted on June 17, 2009 with No Comments

When installing ffmpeg-php in a debian server, i got error

# phpize
-bash: phpize: command not found
#

This is because php-devel package is not installed on the server.

Before installing, you need to find out whether php is installed from source or apt-get

On CentOS, you can find it by

yum list |grep php

On Debian/Ubuntu, dpkg -l list all packages installed.

# dpkg -l *php5*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                      Version                   Description
+++-=========================-=========================-==================================================================
un  libapache-mod-php5        <none>                    (no description available)
ii  libapache2-mod-php5       5.2.0+dfsg-8+etch15       server-side, HTML-embedded scripting language (apache 2 module)
ii  php5                      5.2.0+dfsg-8+etch15       server-side, HTML-embedded scripting language (meta-package)
un  php5-cgi                  <none>                    (no description available)
ii  php5-cli                  5.2.0+dfsg-8+etch15       command-line interpreter for the php5 scripting language
ii  php5-common               5.2.0+dfsg-8+etch15       Common files for packages built from the php5 source
ii  php5-curl                 5.2.0+dfsg-8+etch15       CURL module for php5
ii  php5-gd                   5.2.0+dfsg-8+etch15       GD module for php5
ii  php5-imap                 5.2.0+dfsg-8+etch15       IMAP module for php5
ii  php5-ioncube-loader       3.2-dbn40.build07072610   ionCube Loader for PHP5
ii  php5-mysql                5.2.0+dfsg-8+etch15       MySQL module for php5
un  php5-mysqli               <none>                    (no description available)
ii  php5-xsl                  5.2.0+dfsg-8+etch15       XSL module for php5
ii  psa-php5-configurator     1.4.0-debian4.0.build8608 Plesk configurator for php5
#

You can also use

apt-cache policy php5
# apt-cache policy php5
php5:
  Installed: 5.2.0+dfsg-8+etch15
  Candidate: 5.2.0+dfsg-8+etch15
  Version table:
 *** 5.2.0+dfsg-8+etch15 0
        500 http://ftp.de.debian.org etch/updates/main Packages
        100 /var/lib/dpkg/status
     5.2.0-8+etch13 0
        500 http://ftp.de.debian.org etch/main Packages
#

In this server, php is installed from apt. So to install php-devel, i run

apt-cache search php5 | more

This command list all php5 packages available. From the list i found

php5-dev - Files for PHP5 module development

To install, run

apt-get install php5-dev

Here is the result

# apt-get install php5-dev
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  automake1.4 libssl-dev libssl0.9.8 shtool
The following NEW packages will be installed:
  automake1.4 libssl-dev php5-dev shtool
The following packages will be upgraded:
  libssl0.9.8
1 upgraded, 4 newly installed, 0 to remove and 57 not upgraded.
Need to get 5586kB of archives.
After unpacking 10.2MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
WARNING: The following packages cannot be authenticated!
  automake1.4 shtool
Install these packages without verification [y/N]? y
Get:1 http://ftp.de.debian.org etch/updates/main libssl0.9.8 0.9.8c-4etch5 [2721kB]
Get:2 http://ftp.de.debian.org etch/main automake1.4 1:1.4-p6-12 [272kB]
Get:3 http://ftp.de.debian.org etch/updates/main libssl-dev 0.9.8c-4etch5 [2094kB]
Get:4 http://ftp.de.debian.org etch/main shtool 2.0.1-2 [152kB]
Get:5 http://ftp.de.debian.org etch/updates/main php5-dev 5.2.0+dfsg-8+etch15 [346kB]
Fetched 5586kB in 2s (1908kB/s)
Preconfiguring packages ...
(Reading database ... 55619 files and directories currently installed.)
Preparing to replace libssl0.9.8 0.9.8c-4etch3 (using .../libssl0.9.8_0.9.8c-4etch5_i386.deb) ...
Unpacking replacement libssl0.9.8 ...
Selecting previously deselected package automake1.4.
Unpacking automake1.4 (from .../automake1.4_1%3a1.4-p6-12_all.deb) ...
Selecting previously deselected package libssl-dev.
Unpacking libssl-dev (from .../libssl-dev_0.9.8c-4etch5_i386.deb) ...
Selecting previously deselected package shtool.
Unpacking shtool (from .../shtool_2.0.1-2_all.deb) ...
Selecting previously deselected package php5-dev.
Unpacking php5-dev (from .../php5-dev_5.2.0+dfsg-8+etch15_i386.deb) ...
Setting up libssl0.9.8 (0.9.8c-4etch5) ...
 
Setting up automake1.4 (1.4-p6-12) ...
 
Setting up libssl-dev (0.9.8c-4etch5) ...
Setting up shtool (2.0.1-2) ...
 
Setting up php5-dev (5.2.0+dfsg-8+etch15) ...
 
#

Now phpize is availale

# which phpize
/usr/bin/phpize
#

Tags: , , , ,

Category: Linux

error: zlib not found on system or in local libs

Posted on June 17, 2009 with No Comments

On installing gpac i got following error on Debian 4

latinvideo1:/usr/local/src/gpac# sh ./configure
error: zlib not found on system or in local libs
latinvideo1:/usr/local/src/gpac#

This is fixed by installing zlib.

apt-cache search zlib
apt-get install zlib-bin zlib1g zlib1g-dev zlibc

Tags:

Category: Linux

Error: Missing Dependency: perl(Crypt::PasswdMD5) is needed by package syslinux

Posted on June 16, 2009 with No Comments

When i run

yum update

I got following error

root@server70 [~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * rpmforge: fr2.rpmfind.net
 * base: mirrors.service.softlayer.com
 * updates: mirrors.service.softlayer.com
 * addons: mirrors.service.softlayer.com
 * extras: mirrors.service.softlayer.com
rpmforge                                                                                               | 1.1 kB     00:00
base                                                                                                   | 1.1 kB     00:00
updates                                                                                                |  951 B     00:00
addons                                                                                                 |  951 B     00:00
extras                                                                                                 | 1.1 kB     00:00
Excluding Packages in global exclude list
Finished
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package syslinux.x86_64 0:3.82-1.el5.rf set to be updated
--> Processing Dependency: perl(Crypt::PasswdMD5) for package: syslinux
--> Finished Dependency Resolution
syslinux-3.82-1.el5.rf.x86_64 from rpmforge has depsolving problems
  --> Missing Dependency: perl(Crypt::PasswdMD5) is needed by package syslinux-3.82-1.el5.rf.x86_64 (rpmforge)
Error: Missing Dependency: perl(Crypt::PasswdMD5) is needed by package syslinux-3.82-1.el5.rf.x86_64 (rpmforge)
root@server70 [~]#

syslinux is not useful on servers, so this can be fixed by editing /etc/yum.conf

vi /etc/yum.conf

In the line exclude =, at the end add syslinux*

In this cause, installation is from “rpmforge” repo, it is not used, so i removed rpmforge repository

root@server70 [~]# cd /etc/yum.repos.d
root@server70 [/etc/yum.repos.d]# ls -l
total 60
drwxr-xr-x  2 root root  4096 Jan 22 04:53 ./
drwxr-xr-x 98 root root 12288 Jun 16 10:36 ../
-rw-r--r--  1 root root  1946 Dec  3  2007 CentOS-Base.repo
-rw-r--r--  1 root root  2049 Nov 22  2007 CentOS-Base.repo.original
-rw-r--r--  1 root root  2323 Mar 16 20:27 CentOS-Base.repo.rpmnew
-rw-r--r--  1 root root   626 Mar 16 20:27 CentOS-Media.repo
-rw-r--r--  1 root root   954 Apr 25  2008 epel.repo_old
-rw-r--r--  1 root root  1054 Apr 25  2008 epel-testing.repo_old
-rw-r--r--  1 root root   684 Mar  8  2007 mirrors-rpmforge
-rw-r--r--  1 root root   428 Mar  8  2007 rpmforge.repo
root@server70 [/etc/yum.repos.d]# mv rpmforge.repo rpmforge.repo_old
root@server70 [/etc/yum.repos.d]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.service.softlayer.com
 * updates: mirrors.service.softlayer.com
 * addons: mirrors.service.softlayer.com
 * extras: mirrors.service.softlayer.com
Excluding Packages in global exclude list
Finished
Setting up Update Process
No Packages marked for Update
root@server70 [/etc/yum.repos.d]#

Tags:

Category: Linux