Install PHP on CentOS 5.3

Install

# yum  install php php-devel php-gd php-imap php-ldap php-mysql php -odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel php-session

Loaded plugins: fastestmirror
Determining fastest mirrors
* epel: ftp.jaist.ac.jp
* base: centosf.centos.org
* updates: centosk2.centos.org
* addons: centosl.centos.org
* extras: centosl.centos.org
epel                                                                                                                                   | 2.1 kB     00:00
base                                                                                                                                   | 1.1 kB     00:00
updates                                                                                                                                |  951 B     00:00
primary.xml.gz                                                                                                                         | 135 kB     00:02
updates                                                        207/207
addons                                                                                                                                 |  951 B     00:00
extras                                                                                                                                 | 1.1 kB     00:00
primary.xml.gz                                                                                                                         |  90 kB     00:01
extras                                                         298/298
Setting up Install Process
Parsing package install arguments
Package php-5.1.6-23.2.el5_3.i386 already installed and latest version
Package php-ldap-5.1.6-23.2.el5_3.i386 already installed and latest version
Package curl-7.15.5-2.1.el5_3.4.i386 already installed and latest version
Package curl-devel-7.15.5-2.1.el5_3.4.i386 already installed and latest version
Package perl-libwww-perl-5.805-1.1.1.noarch already installed and latest version
Package libxml2-2.6.26-2.1.2.7.i386 already installed and latest version
Package libxml2-devel-2.6.26-2.1.2.7.i386 already installed and latest version
Package php-common-5.1.6-23.2.el5_3.i386 already installed and latest version
Resolving Dependencies
–> Running transaction check
—> Package php-odbc.i386 0:5.1.6-23.2.el5_3 set to be updated
–> Processing Dependency: libodbcpsql.so.2 for package: php-odbc
–> Processing Dependency: libodbc.so.1 for package: php-odbc
–> Processing Dependency: php-pdo for package: php-odbc
—> Package php-xml.i386 0:5.1.6-23.2.el5_3 set to be updated
—> Package php-gd.i386 0:5.1.6-23.2.el5_3 set to be updated
—> Package php-mysql.i386 0:5.1.6-23.2.el5_3 set to be updated
—> Package php-imap.i386 0:5.1.6-23.2.el5_3 set to be updated
–> Processing Dependency: libc-client.so.1 for package: php-imap
—> Package php-xmlrpc.i386 0:5.1.6-23.2.el5_3 set to be updated
—> Package php-pear.noarch 1:1.4.9-4.el5.1 set to be updated
—> Package ImageMagick.i386 0:6.2.8.0-4.el5_1.1 set to be updated
–> Processing Dependency: liblcms.so.1 for package: ImageMagick
–> Processing Dependency: libwmflite-0.2.so.7 for package: ImageMagick
–> Processing Dependency: libgs.so.8 for package: ImageMagick
–> Processing Dependency: librsvg-2.so.2 for package: ImageMagick
—> Package php-devel.i386 0:5.1.6-23.2.el5_3 set to be updated
–> Running transaction check
—> Package lcms.i386 0:1.18-0.1.beta1.el5_3.2 set to be updated
—> Package libc-client.i386 0:2004g-2.2.1 set to be updated
—> Package php-pdo.i386 0:5.1.6-23.2.el5_3 set to be updated
—> Package libwmf.i386 0:0.2.8.4-10.1 set to be updated
—> Package ghostscript.i386 0:8.15.2-9.4.el5_3.7 set to be updated
–> Processing Dependency: urw-fonts >= 1.1 for package: ghostscript
–> Processing Dependency: ghostscript-fonts for package: ghostscript
—> Package unixODBC.i386 0:2.2.11-7.1 set to be updated
—> Package librsvg2.i386 0:2.16.1-1.el5 set to be updated
–> Processing Dependency: libcroco >= 0.6.1 for package: librsvg2
–> Processing Dependency: libgsf >= 1.6.0 for package: librsvg2
–> Processing Dependency: libgsf-1.so.114 for package: librsvg2
–> Processing Dependency: libcroco-0.6.so.3 for package: librsvg2
–> Running transaction check
—> Package libcroco.i386 0:0.6.1-2.1 set to be updated
—> Package ghostscript-fonts.noarch 0:5.50-13.1.1 set to be updated
—> Package urw-fonts.noarch 0:2.3-6.1.1 set to be updated
—> Package libgsf.i386 0:1.14.1-6.1 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package               Arch       Version                     Repository   Size
================================================================================
Installing:
ImageMagick           i386       6.2.8.0-4.el5_1.1           base        3.3 M
php-devel             i386       5.1.6-23.2.el5_3            updates     502 k
php-gd                i386       5.1.6-23.2.el5_3            updates     116 k
php-imap              i386       5.1.6-23.2.el5_3            updates      53 k
php-mysql             i386       5.1.6-23.2.el5_3            updates      85 k
php-odbc              i386       5.1.6-23.2.el5_3            updates      52 k
php-pear              noarch     1:1.4.9-4.el5.1             base        356 k
php-xml               i386       5.1.6-23.2.el5_3            updates      95 k
php-xmlrpc            i386       5.1.6-23.2.el5_3            updates      56 k
Installing for dependencies:
ghostscript           i386       8.15.2-9.4.el5_3.7          updates     5.9 M
ghostscript-fonts     noarch     5.50-13.1.1                 base        801 k
lcms                  i386       1.18-0.1.beta1.el5_3.2      updates     176 k
libc-client           i386       2004g-2.2.1                 base        516 k
libcroco              i386       0.6.1-2.1                   base        127 k
libgsf                i386       1.14.1-6.1                  base        116 k
librsvg2              i386       2.16.1-1.el5                base        178 k
libwmf                i386       0.2.8.4-10.1                base        821 k
php-pdo               i386       5.1.6-23.2.el5_3            updates      64 k
unixODBC              i386       2.2.11-7.1                  base        832 k
urw-fonts             noarch     2.3-6.1.1                   base        4.5 M

Transaction Summary
================================================================================
Install     20 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 19 M
Is this ok [y/N]: Y

Downloading Packages:
(1/20): php-odbc-5.1.6-23.2.el5_3.i386.rpm                                                                                             |  52 kB     00:00
(2/20): php-imap-5.1.6-23.2.el5_3.i386.rpm                                                                                             |  53 kB     00:00
(3/20): php-xmlrpc-5.1.6-23.2.el5_3.i386.rpm                                                                                           |  56 kB     00:01
(4/20): php-pdo-5.1.6-23.2.el5_3.i386.rpm                                                                                              |  64 kB     00:00
(5/20): php-mysql-5.1.6-23.2.el5_3.i386.rpm                                                                                            |  85 kB     00:03
(6/20): php-xml-5.1.6-23.2.el5_3.i386.rpm                                                                                              |  95 kB     00:00
(7/20): libgsf-1.14.1-6.1.i386.rpm                                                                                                     | 116 kB     00:04
(8/20): php-gd-5.1.6-23.2.el5_3.i386.rpm                                                                                               | 116 kB     00:03
(9/20): libcroco-0.6.1-2.1.i386.rpm                                                                                                    | 127 kB     00:04
(10/20): lcms-1.18-0.1.beta1.el5_3.2.i386.rpm                                                                                          | 176 kB     00:05
(11/20): librsvg2-2.16.1-1.el5.i386.rpm                                                                                                | 178 kB     00:06
(12/20): php-pear-1.4.9-4.el5.1.noarch.rpm                                                                                             | 356 kB     00:21
(13/20): php-devel-5.1.6-23.2.el5_3.i386.rpm                                                                                           | 502 kB     00:09
(14/20): libc-client-2004g-2.2.1.i386.rpm                                                                                              | 516 kB     00:33
(15/20): ghostscript-fonts-5.50-13.1.1.noarch.rpm                                                                                      | 801 kB     00:49
(16/20): libwmf-0.2.8.4-10.1.i386.rpm                                                                                                  | 821 kB     00:59
(17/20): unixODBC-2.2.11-7.1.i386.rpm                                                                                                  | 832 kB     01:00
(18/20): ImageMagick-6.2.8.0-4.el5_1.1.i386.rpm                                                                                        | 3.3 MB     04:06
(19/20): urw-fonts-2.3-6.1.1.noarch.rpm                                                                                                | 4.5 MB     05:48
(20/20): ghostscript-8.15.2-9.4.el5_3.7.i386.rpm                                                                                       | 5.9 MB     02:42
————————————————————————————————————————————————————–
Total                                                                                                                          18 kB/s |  19 MB     17:14
Running rpm_check_debug

Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing     : php-pdo                                         [ 1/20]
Installing     : libcroco                                        [ 2/20]
Installing     : libwmf                                          [ 3/20]
Installing     : libc-client                                     [ 4/20]
Installing     : lcms                                            [ 5/20]
Installing     : unixODBC                                        [ 6/20]
Installing     : libgsf                                          [ 7/20]
Installing     : urw-fonts                                       [ 8/20]
Installing     : php-pear                                        [ 9/20]
Installing     : php-devel                                       [10/20]
Installing     : librsvg2                                        [11/20]
Installing     : php-odbc                                        [12/20]
Installing     : php-imap                                        [13/20]
Installing     : php-mysql                                       [14/20]
Installing     : php-xml                                         [15/20]
Installing     : php-gd                                          [16/20]
Installing     : php-xmlrpc                                      [17/20]
Installing     : ghostscript                                     [18/20]
Installing     : ImageMagick                                     [19/20]
Installing     : ghostscript-fonts                               [20/20]

Installed: ImageMagick.i386 0:6.2.8.0-4.el5_1.1 php-devel.i386 0:5.1.6-23.2.el5_3 php-gd.i386 0:5.1.6-23.2.el5_3 php-imap.i386 0:5.1.6-23.2.el5_3 php-mysql.i386 0:5.1.6-23.2.el5_3 php-odbc.i386 0:5.1.6-23.2.el5_3 php-pear.noarch 1:1.4.9-4.el5.1 php-xml.i386 0:5.1.6-23.2.el5_3 php-xmlrpc.i386 0:5.1.6-23.2.el5_3
Dependency Installed: ghostscript.i386 0:8.15.2-9.4.el5_3.7 ghostscript-fonts.noarch 0:5.50-13.1.1 lcms.i386 0:1.18-0.1.beta1.el5_3.2 libc-client.i386 0:2004g-2.2.1 libcroco.i386 0:0.6.1-2.1 libgsf.i386 0:1.14.1-6.1 librsvg2.i386 0:2.16.1-1.el5 libwmf.i386 0:0.2.8.4-10.1 php-pdo.i386 0:5.1.6-23.2.el5_3 unixODBC.i386 0:2.2.11-7.1 urw-fonts.noarch 0:2.3-6.1.1
Complete!
[root@mail ~]#

# php -v

PHP 5.1.6 (cli) (built: Apr  7 2009 08:00:04)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
[root@mail ~]#

Incoming search terms for the article:

  • libc-client so 1
  • Error: Missing Dependency: libcurl so 3 is needed by package php
  • libcurl so 3 is needed by package php
  • Error: Missing Dependency: libc-client so 1 is needed by package php-imap
  • centos libodbc so 1
  • Missing Dependency: libcurl so 3 is needed by package php
  • install libodbc so 1 centos
  • install libcurl so 3
  • install libcurl centos
  • instalar libodbc so 1 en centos

Install NginX on CentOS 5.3

Install

# yum install nginx

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centosn3.centos.org
* updates: centoso3.centos.org
* addons: centosw.centos.org
* extras: centosy.centos.org
base                                                                                                                                   | 1.1 kB     00:00
updates                                                                                                                                |  951 B     00:00
addons                                                                                                                                 |  951 B     00:00
extras                                                                                                                                 | 1.1 kB     00:00
Setting up Install Process
Parsing package install arguments
No package nginx available.
Nothing to do

Ups, no nginx :-)

Check yum list

# yum repolist

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centosn3.centos.org
* updates: centoso3.centos.org
* addons: centosw.centos.org
* extras: mirrors.kernel.org
repo id              repo name                                status
addons               CentOS-5 – Addons                        enabled :       0
base                 CentOS-5 – Base                          enabled :   2,508
extras               CentOS-5 – Extras                        enabled :     298
updates              CentOS-5 – Updates                       enabled :     186
repolist: 2,992
Enable EPEL ( Extra Packages for Enterprise Linux ) repository.

# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

Retrieving http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
warning: /var/tmp/rpm-xfer.UBZ4Bc: Header V3 DSA signature: NOKEY, key ID 217521f6
Preparing…                ########################################### [100%]
1:epel-release           ########################################### [100%]

Check again status of yum list

# yum repolist

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: ftp.yz.yamagata-u.ac.jp
* base: centosj.centos.org
* updates: centoso3.centos.org
* addons: centosw.centos.org
* extras: centosy.centos.org
epel                                                                                                                                   | 2.1 kB     00:00
primary.sqlite.bz2                                                                                                                     | 2.4 MB     01:16
repo id              repo name                                status
addons               CentOS-5 – Addons                        enabled :       0
base                 CentOS-5 – Base                          enabled :   2,508
epel                 Extra Packages for Enterprise Linux 5 -  enabled :   4,048
extras               CentOS-5 – Extras                        enabled :     298
updates              CentOS-5 – Updates                       enabled :     186
repolist: 7,040

Try again install nginx

# yum install nginx

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: ftp.kddilabs.jp
* base: centosn3.centos.org
* updates: centoso3.centos.org
* addons: centosw.centos.org
* extras: centosy.centos.org
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package nginx.i386 0:0.6.35-2.el5 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================
Package                             Arch                               Version                                      Repository                          Size
==============================================================================================================================================================
Installing:
nginx                               i386                               0.6.35-2.el5                                 epel                               316 k

Transaction Summary
==============================================================================================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 316 k
Is this ok [y/N]: y

Downloading Packages:
nginx-0.6.35-2.el5.i386.rpm                                                                                                            | 316 kB     00:05
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 217521f6
Importing GPG key 0x217521F6 “Fedora EPEL <epel@fedoraproject.org>” from /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing     : nginx                                             [1/1]

Installed: nginx.i386 0:0.6.35-2.el5
Complete!
Check using rpm command

# rpm -qa | grep nginx

nginx-0.6.35-2.el5

Nice, nginx installed.

Make it run on startup using ntsysv.

nginx_centos53

Incoming search terms for the article:

  • No package nginx available
  • uninstall nginx centos
  • remove nginx centos
  • warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY key ID 217521f6
  • nginx remove header
  • centos uninstall nginx
  • 217521f6
  • NOKEY key ID 217521f6
  • centos remove nginx
  • how to uninstall nginx centos

Configure DNS Server on CentOS 5.3

Check if dns already installed

# rpm -qa | grep bind

bind-libs-9.3.4-10.P1.el5
ypbind-1.19-11.el5
bind-chroot-9.3.4-10.P1.el5
bind-9.3.4-10.P1.el5
bind-utils-9.3.4-10.P1.el5
[root@mail ~]#

Great, its installed.

Starting bind

# /etc/init.d/named start

Locating /var/named/chroot//etc/named.conf failed:
[FAILED]

Ok, time to configure.

Remove

# yum remove dnsmasq

# yum remove bind-chroot-9.3.4-10.P1.el5

# yum remove bind-9.3.4-10.P1.el

Install

# yum install bind

# nano /etc/named.conf

Put these lines :

options {

directory    “/var/named”;

query-source port 53;

allow-transfer {

localhost;

};

};

zone “digitalfusi.com” {

type master;

file “digitalfusi.com.db”;

};

zone “localhost” {

type master;

file “localhost.db”;

};

zone “0.0.127.in-addr.arpa” {

type master;

file “127.0.0.rev”;

};

zone “.” in {

type hint;

file “root.db”;

};

# nano /var/named/digitalfusi.com.db

$TTL 2d ; 172800 seconds

$ORIGIN digitalfusi.com.

@        IN      SOA    digitalfusi.com. hostmaster.digitalfusi.com. (

2008051200 ; serial number (change when you modify DNS)

1d12h      ; refresh =  1 day 12 hours

15M        ; update retry = 15 minutes

3W12h      ; expiry = 3 weeks + 12 hours

2h20M )    ; minimum = 2 hours + 20 minutes

@        IN     NS      ns1.digitalfusi.com.

@        IN     A       192.168.12.105

ns1      IN     A       192.168.12.105

www      IN     A       192.168.12.105

mail     IN     A       192.168.12.105

mail2    IN     A       192.168.12.105

postfixadmin   IN    A    192.168.12.105

mailguard   IN    A      192.168.12.105

# nano /var/named/localhost.db

$TTL 2d

$ORIGIN localhost.

@      IN  SOA  localhost. hostmaster.localhost. (

2008051101 ; serial number (change when you modify DNS)

1d12h      ; refresh =  1 day 12 hours

15M        ; update retry = 15 minutes

3W12h      ; expiry = 3 weeks + 12 hours

2h20M )    ; minimum = 2 hours + 20 minutes

@      IN  NS localhost.

@      IN  A  127.0.0.1

# nano /var/named/127.0.0.rev

$TTL 2d

$ORIGIN 0.0.127.in-addr.arpa.

@        IN SOA localhost. hostmaster.localhost. (

2008051101 ; serial number (change when you modify DNS)

1d12h      ; refresh =  1 day 12 hours

15M        ; update retry = 15 minutes

3W12h      ; expiry = 3 weeks + 12 hours

2h20M )    ; minimum = 2 hours + 20 minutes

@        IN NS   localhost.

1        IN PTR  localhost.

# nano /var/named/root.db

; This file holds the information on root name servers needed to

; initialize cache of Internet domain name servers

; (e.g. reference this file in the “cache . <file>”

; configuration file of BIND domain name servers).

;

; This file is made available by InterNIC

; under anonymous FTP as

; file /domain/named.root

; on server FTP.INTERNIC.NET

; -OR- RS.INTERNIC.NET

;

; last update: Feb 04, 2008

; related version of root zone: 2008020400

;

; formerly NS.INTERNIC.NET

;

. 3600000 IN NS A.ROOT-SERVERS.NET.

A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4

A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:BA3E::2:30

;

; formerly NS1.ISI.EDU

;

. 3600000 NS B.ROOT-SERVERS.NET.

B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201

;

; formerly C.PSI.NET

;

. 3600000 NS C.ROOT-SERVERS.NET.

C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12

;

; formerly TERP.UMD.EDU

;

. 3600000 NS D.ROOT-SERVERS.NET.

D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90

;

; formerly NS.NASA.GOV

;

. 3600000 NS E.ROOT-SERVERS.NET.

E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10

;

; formerly NS.ISC.ORG

;

. 3600000 NS F.ROOT-SERVERS.NET.

F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241

F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f

;

; formerly NS.NIC.DDN.MIL

;

. 3600000 NS G.ROOT-SERVERS.NET.

G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4

;

; formerly AOS.ARL.ARMY.MIL

;

. 3600000 NS H.ROOT-SERVERS.NET.

H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53

H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803f:235

;

; formerly NIC.NORDU.NET

;

. 3600000 NS I.ROOT-SERVERS.NET.

I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17

;

; operated by VeriSign, Inc.

;

. 3600000 NS J.ROOT-SERVERS.NET.

J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30

J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:C27::2:30

;

; operated by RIPE NCC

;

. 3600000 NS K.ROOT-SERVERS.NET.

K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129

K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1

;

; operated by ICANN

;

. 3600000 NS L.ROOT-SERVERS.NET.

L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42

;

; operated by WIDE

;

. 3600000 NS M.ROOT-SERVERS.NET.

M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33

M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35

; End of File


Testing start dns

# /etc/init.d/named start

Starting named:                                            [  OK  ]

Activate dns server in /etc/resolv.conf into like this

search digitalfusi.com
nameserver 192.168.12.105
nameserver 192.168.12.1

Try if dns work

# dig digitalfusi.com

; <<>> DiG 9.3.4-P1 <<>> digitalfusi.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39096
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;digitalfusi.com.               IN      A

;; ANSWER SECTION:
digitalfusi.com.        172800  IN      A       192.168.12.105

;; AUTHORITY SECTION:
digitalfusi.com.        172800  IN      NS      ns1.digitalfusi.com.

;; ADDITIONAL SECTION:
ns1.digitalfusi.com.    172800  IN      A       192.168.12.105

;; Query time: 10 msec
;; SERVER: 192.168.12.105#53(192.168.12.105)
;; WHEN: Mon May  4 20:07:52 2009
;; MSG SIZE  rcvd: 83

Yes, it work for resolve dns and serve dns.

Incoming search terms for the article:

  • centOS 5 3 dns
  • configure dns centos
  • dns centos 5 3
  • configure dns in centos
  • centos dns server setup
  • centos 5 3 DNS server
  • dns server centos 5 3
  • remove postfix centos 5
  • howto dns centos
  • howto dns and centos

Install Postfix in CentOS 5.3

Check if postfix installed.

# rpm -qa | grep postfix
#

no postfix, maybe sendmail ?

# rpm -qa | grep sendmail

sendmail-8.13.8-2.el5

Remove sendmail

# yum remove sendmail

Install requirement development stuff

# yum groupinstall ‘Development Tools’

# yum groupinstall ‘Development Libraries’

Build postfix with quota and mysql support

# wget -c  http://ftp-stud.fht-esslingen.de/Mirrors/centos/5.3/os/SRPMS/postfix-2.3.3-2.1.el5_2.src.rpm

# rpm -ivh postfix-2.3.3-2.1.el5_2.src.rpm

1:postfix                warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
########################################### [100%]
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root

Next build

# cd /usr/src/redhat/SOURCES

# wget -c http://vda.sourceforge.net/VDA/postfix-2.3.3-vda.patch.gz

# gunzip postfix-2.3.3-vda.patch.gz

# cd /usr/src/redhat/SPECS/

Edit postfix.spec

# nano postfix.spec

Change :

%define MYSQL 0 into

%define MYSQL 1

and add :

Patch0: postfix-2.3.3-vda.patch

into patches area, like this :

# Patches
Patch0: postfix-2.3.3-vda.patch
Patch1: postfix-2.1.1-config.patch
Patch3: postfix-alternatives.patch
Patch6: postfix-2.1.1-obsolete.patch
Patch7: postfix-2.1.5-aliases.patch
Patch8: postfix-large-fs.patch
Patch9: postfix-2.2.5-cyrus.patch
Patch10: postfix-CVE-2008-2936.patch

# rpmbuild -ba postfix.spec
error: Failed build dependencies:
pcre-devel is needed by postfix-2.3.3-2.1.i386
mysql-devel is needed by postfix-2.3.3-2.1.i386

Ok, install pcre-devel dan mysql-devel.

# yum install pcre-devel

# yum install mysql-devel

Try again.

# cd /usr/src/redhat/RPMS/i386 && ls -l

total 11208
-rw-r–r– 1 root root 3792217 May  3 00:19 postfix-2.3.3-2.1.i386.rpm
-rw-r–r– 1 root root 7596206 May  3 00:19 postfix-debuginfo-2.3.3-2.1.i386.rpm
-rw-r–r– 1 root root   49793 May  3 00:19 postfix-pflogsumm-2.3.3-2.1.i386.rpm

Install

# rpm -ivh postfix-2.3.3-2.1.i386.rpm

Preparing…                ########################################### [100%]
1:postfix                ########################################### [100%]
#

Check it.

# rpm -qa | grep postfix

postfix-2.3.3-2.1

Yes, postfix installation process work well :-)

Incoming search terms for the article:

  • postfix-2 3 3-2 1 el5_2 src rpm
  • postfix-pcre centos
  • postfix pcre centos
  • group development libraries does not exist
  • centos group development libraries does not exist
  • group development libraries does not exists
  • apply quota patch to postfix centos 5 3 mirrors
  • development lybraries not exist centos
  • warning: user mysql does not exist - using root
  • rpm -i user mockbuild does not exist - using root

Install MySQL in CentOS 5.3

We need MySQL as place of  virtual user account.

Checking current mysql installation status

# rpm -qa | grep mysql

mysql-5.0.45-7.el5

Search mysql

# yum search mysql

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centosf3.centos.org
* updates: centosn3.centos.org
* addons: centosq.centos.org
* extras: centosq.centos.org
======================================================================= Matched: mysql =======================================================================
mod_auth_mysql.i386 : Basic authentication for the Apache web server using a MySQL database.
qt-MySQL.i386 : MySQL drivers for Qt’s SQL classes.
MySQL-python.i386 : An interface to MySQL
bytefx-data-mysql.i386 : MySQL database connectivity for Mono
freeradius-mysql.i386 : MySQL bindings for freeradius
libdbi-dbd-mysql.i386 : MySQL plugin for libdbi
mysql.i386 : MySQL client programs and shared libraries.
mysql-bench.i386 : MySQL benchmark scripts and data.
mysql-connector-odbc.i386 : ODBC driver for MySQL
mysql-devel.i386 : Files for development of MySQL applications.
mysql-server.i386 : The MySQL server and related files.
mysql-test.i386 : The test suite distributed with MySQL.
pdns-backend-mysql.i386 : MySQL backend for pdns
perl-DBD-MySQL.i386 : A MySQL interface for perl
php-mysql.i386 : A module for PHP applications that use MySQL databases.
php-pdo.i386 : A database access abstraction module for PHP applications
php-pear-MDB2-Driver-mysql.noarch : MySQL MDB2 driver
qt4-mysql.i386 : MySQL drivers for Qt’s SQL classes
rsyslog.i386 : Enhanced system logging and kernel message trapping daemons
rsyslog-mysql.i386 : MySQL support for rsyslog
unixODBC.i386 : A complete ODBC driver manager for Linux.

Ok, we need mysql-server.

Install MySQL server

# yum install mysql-server

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centosq2.centos.org
* updates: centose.centos.org
* addons: centose.centos.org
* extras: centosk3.centos.org
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package mysql-server.i386 0:5.0.45-7.el5 set to be updated
–> Processing Dependency: perl-DBD-MySQL for package: mysql-server
–> Running transaction check
—> Package perl-DBD-MySQL.i386 0:3.0007-2.el5 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================
Package                                    Arch                             Version                                   Repository                        Size
==============================================================================================================================================================
Installing:
mysql-server                               i386                             5.0.45-7.el5                              base                             9.7 M
Installing for dependencies:
perl-DBD-MySQL                             i386                             3.0007-2.el5                              base                             148 k

Transaction Summary
==============================================================================================================================================================
Install      2 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 9.8 M
Is this ok [y/N]: Y

Press Y to start install mysql server in CentOS 5.3

After installation step finish we need to start MySQL.

Start MySQL

# /etc/init.d/mysqld start

Initializing MySQL database:  Installing MySQL system tables…
OK
Filling help tables…
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password ‘new-password’
/usr/bin/mysqladmin -u root -h mail.digitalfusi.com password ‘new-password’
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at

http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com
[  OK  ]
Starting MySQL:                                            [  OK  ]

Try to login into MySQL server

# mysql

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.45 Source distribution

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> quit
Bye

Start MySQL running in boot

# ntsysv

Pick ‘mysqld’ on list.

mysql_start_at_boot

Incoming search terms for the article:

  • MySQL Daemon failed to start
  • mysql daemon failed to start centos
  • yum install mysql client
  • yum install mysql-client
  • centos MySQL Daemon failed to start
  • centos install mysqlclient
  • Installing mysql on CentOS 5 3
  • maia mailguard redhat 6
  • mysql daemon failed to start centos where log php 5 3
  • mysql daemon failed to start dns

Change IP Address in CentOS 5.3

List all ethernet :

# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:0C:29:65:9B:A9
inet addr:192.168.12.105  Bcast:192.168.12.255  Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe65:9ba9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:1491 errors:0 dropped:0 overruns:0 frame:0
TX packets:542 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:128452 (125.4 KiB)  TX bytes:67613 (66.0 KiB)
Interrupt:169 Base address:0×2000

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING  MTU:16436  Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:760 (760.0 b)  TX bytes:760 (760.0 b)

sit0      Link encap:IPv6-in-IPv4
NOARP  MTU:1480  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Find where configuration file located

# locate ifcfg-eth0

/etc/sysconfig/network-scripts/ifcfg-eth0

Edit this file using nano

# nano /etc/sysconfig/network-scripts/ifcfg-eth0

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.12.255
HWADDR=00:0C:29:65:9B:A9
IPADDR=192.168.12.105
NETMASK=255.255.255.0
NETWORK=192.168.12.0
ONBOOT=yes

This configuration is result from previous install step.

How to change it from command line :

# ifconfig eth0 192.168.12.103/24

This will change ip address to 192.168.12.103 with netmask 255.255.255.0

Changing default route :

# route delete default

SIOCDELRT: No such process

# route add default gw 192.168.12.1

Check if ip address has changed

# ifconfig eth0

eth0      Link encap:Ethernet  HWaddr 00:0C:29:65:9B:A9
inet addr:192.168.12.103  Bcast:192.168.12.255  Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe65:9ba9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:1954 errors:0 dropped:0 overruns:0 frame:0
TX packets:925 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:168934 (164.9 KiB)  TX bytes:118134 (115.3 KiB)
Interrupt:169 Base address:0×2000

Incoming search terms for the article:

  • centos change IP address
  • change ip address centos
  • centos ifconfig static ip
  • change static ip cli centos
  • centos ifconfig static
  • centos ifconfig
  • ifconfig centos 5
  • ifconfig centos
  • change ip address on centos 5 3
  • centos 5 ifconfig

Checking Connection

Login to system

login as: root
root@192.168.12.105′s password:
Last login: Sat May  2 18:12:31 2009

Test ping

# ping yahoo.com

PING yahoo.com (69.147.114.224) 56(84) bytes of data.
64 bytes from b1.www.vip.re3.yahoo.com (69.147.114.224): icmp_seq=1 ttl=48 time=338 ms
64 bytes from b1.www.vip.re3.yahoo.com (69.147.114.224): icmp_seq=2 ttl=48 time=396 ms
64 bytes from b1.www.vip.re3.yahoo.com (69.147.114.224): icmp_seq=3 ttl=48 time=412 ms

— yahoo.com ping statistics —
4 packets transmitted, 3 received, 25% packet loss, time 3000ms
rtt min/avg/max/mdev = 338.380/382.339/412.314/31.770 ms

Trying yum update :

# yum update

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centosr3.centos.org
* updates: centosw.centos.org
* addons: centosf3.centos.org
* extras: centosl3.centos.org
Setting up Update Process
No Packages marked for Update

So far connection working well, ready for next step.

Download CentOS 5.3

CentOS distributed in 2 forms :

  • 32 bit
  • 64 bit

Make sure to pick closest mirror for fast download.

Click here to download.

download_centos

Note :

i386 mean its 32 bit.

Install CentOS 5.3

Insert DVD or iso file in Virtual Machine and start install :

centos1

Press ENTER to start install in graphical mode.

centos1

Click Next

centos1

Choose English for language of installation.

centos1

Pick U.S English for keyboard layout.

Click Next.

centos1

Choose ‘Remove all partition on selected drives and create layout’.

Click Next.

centos1

Since I use ‘Bridged’ mode I must insert network information :

IP address : 192.168.12.105

Netmask : 255.255.255.0

centos1

Followed by input :

Gateway : 192.168.12.1

Primary DNS : 192.168.12.1

centos1

Choose a region.

centos1

Enter password for root account.

centos1

Pick ‘Server’ from the list as the system intended for server task, no need GUI.

centos1

Click Next to start intallation process till finish.

centos1

When computer restart, ntsysv will ask a few things that might need to configure.

I choose to configure ‘services’ that will automatically started for CentOS 5.3

centos1

Computer restart and I try to login and check if ssh server started.

It works well so far :-)

  • Pages

  • Download Ubuntu

  • Download Fedora

  • Tags

  • Categories

    • Translate to: