Jun 19

Here is how to compile your php on cpanel, in this case i want to add Mysqli module on my php.

we will use easyapache script from cpanel

What is EasyApache ?

EasyApache is a pre configured script that allows you to easily update Apache Web server through WHM or SSH. In this tutorial we will show you how to update apache using SSH /scripts/easyapache.

Run EasyApache

[~]# /scripts/easyapache
^[[B!! Pre allocation testing was successfully able to allocate 90MB !!
!!
Ouput from ‘/bin/sh -c “ulimit -a”‘:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 73728
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) 524288
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 73728
virtual memory (kbytes, -v) 524288
file locks (-x) unlimited
!!

easyapache1

choose the default  option, Klik tab to go to [Start customizing based on profile] and enter

easyapache2

choose your current apache version and next

easyapache3

easyapache4
choose the modules you want to set, if the modules did not exist pick the Exhaustive Option List

easyapache5 select the Mysqli option

easyapache6

Save and buildeasyapache7

Jun 16

For CentOS that also using windows as their dual boot OS must have diffilcuties to see or mount windows on their CentOS directory, at least it happen with one of my friend and here is the solution.

First you need to check the windows partition first

# fdisk -l
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 3187 25599546 7 HPFS/NTFS
/dev/hda2 3188 4865 13478535 83 Linux
Disk /dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 4865 39078081 7 HPFS/NTFS

as you can see windows partition located on /dev/hda1 ( program files , windows etc) and /dev/hdb1 (data)

Now installed the required packages

yum install fuse fuse-ntfs-3g dkms dkms-fuse
(dkms and dkms-fuse install the fuse kernel module)

If the rpmforge repo is disabled by default,
# yum --enablerepo=rpmforge install fuse fuse-ntfs-3g dkms dkms-fuse

Mounting windows NTFS filesystem

First, create a mount point.

mkdir /mounting/win

Next, edit /etc/fstab as follows. To mount read-only:

/dev/hda1 /mounting/win ntfs-3g ro,umask=0222,defaults 0 0
/dev/hdb1 /mounting/win1 ntfs-3g ro,umask=0222,defaults 0 0

To mount read-write:

/dev/hda1 /mounting/win ntfs-3g rw,umask=0000,defaults 0 0
/dev/hdb1 /mounting/win1 ntfs-3g rw,umask=0000,defaults 0 0

You can now mount it by running:

#mount /mounting/win
# mount /mounting/win1

Common Error
When you try to mount you will see this error

# mount /mymnt/win
FATAL: Module fuse not found.
ntfs-3g-mount: fuse device is missing, try 'modprobe fuse' as root

and when you try to run modprove fuse you will get this error
# modprobe fuse
FATAL: Module fuse not found.

Solution :
The error could be cause by the kernel dependecies problem here you should do

Lets just check which kernel packages you have installed and which kernel you are currently running.
# uname -a
Linux cahpct 2.6.18-128.el5 #1 SMP Wed Jan 21 10:44:23 EST 2009 i686 i686 i386 GNU/Linux

then use depmod (handle dependency descriptions for loadable kernel modules )

# depmod -a 2.6.18-128.el5

Then reboot the machine and select the 2.6.18-53.1.21.el5 kernel from the list available( if you don’t see it , it’s usually use the default 2.6.18-53.1.21.el5 kernel)
# reboot

then run modprobe fuse again and mount it:

# modprobe fuse dan mount
# mount -t ntfs-3g /dev/hdb1 /mymnt/win1
# mount -t ntfs-3g /dev/hda1 /mymnt/win

or

#mount /mounting/win
# mount /mounting/win1