Fixing “unsupported protocol”
Friday, November 6th, 2009cd `pear config-get php_dir`mv .channels .channels-brokenpear update-channels
cd `pear config-get php_dir`mv .channels .channels-brokenpear update-channels
sometime, you can use ipcs and kill them, But this won’t work always for me.
try to edit your sysctl.conf, and add in this few command
kernel.msgmni = 1024
kernel.sem = 250 256000 32 1024
and sysctl -p
Mdadm is the modern tool most Linux distributions use these days to manage software RAIDarrays; in the past raidtools was the tool we have used for this. This cheat sheet will show the most common usages of mdadm to manage software raid arrays; it assumes you have a good understanding of software RAID and Linux in general, and it will just explain the commands line usage of mdadm. The examples bellow use RAID1, but they can be adapted for any RAID level the Linux kernel driver supports. Create (mdadm –create) is used to create a new array: /etc/mdadm.conf or /etc/mdadm/mdadm.conf (on debian) is the main configuration file for mdadm. After we create our RAID arrays we add them to this file using: We can’t remove a disk directly from the array, unless it is failed, so we first have to fail it (if the drive it is failed this is normally already in failed state and this step is not needed): This can be done in a single step using: We can add a new disk to an array (replacing a failed one probably): We can check the status of the arrays on the system with: The output of this command will look like: here we can see both drives are used and working fine – U. A failed drive will show as F, while a degraded array will miss the second disk - Note: while monitoring the status of a RAID rebuild operation using watch can be useful: If we want to completely remove a raid array we have to stop if first and then remove it: Finally in using RAID1 arrays, where we create identical partitions on both drives this can be useful to copy the partitions from sda to sdb: (this will dump the partition table of sda, removing completely the existing partitions on sdb, so be sure you want this before running this command, as it will not warn you at all). There are many other usages of mdadm particular for each type of RAID level, and I would recommend to use the manual page (man mdadm) or the help (mdadm –help) if you need more details on its usage. Hopefully these quick examples will put you on the fast track with how mdadm works.
Mdadm Cheat Sheet
1. Create a new RAID array
mdadm --create --verbose /dev/md0 --level=1 /dev/sda1 /dev/sdb2
or using the compact notation:mdadm -Cv /dev/md0 -l1 -n2 /dev/sd[ab]12. /etc/mdadm.conf
mdadm --detail --scan >> /etc/mdadm.conf
or on debianmdadm --detail --scan >> /etc/mdadm/mdadm.conf3. Remove a disk from an array
mdadm --fail /dev/md0 /dev/sda1
and now we can remove it:mdadm --remove /dev/md0 /dev/sda1mdadm /dev/md0 --fail /dev/sda1 --remove /dev/sda14. Add a disk to an existing array
mdadm --add /dev/md0 /dev/sdb15. Verifying the status of the RAID arrays
cat /proc/mdstat
ormdadm --detail /dev/md0cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sdb1[1] sda1[0] 104320 blocks [2/2] [UU] md1 : active raid1 sdb3[1] sda3[0] 19542976 blocks [2/2] [UU] md2 : active raid1 sdb4[1] sda4[0] 223504192 blocks [2/2] [UU]watch cat /proc/mdstat6. Stop and delete a RAID array
mdadm --stop /dev/md0
mdadm –remove /dev/md0
and finally we can even delete the superblock from the individual drives:mdadm --zero-superblock /dev/sdasfdisk -d /dev/sda | sfdisk /dev/sdb
rpm --import http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy
cd /etc/yum.repos.d/ wget http://repo.webtatic.com/yum/webtatic.repo
yum --enablerepo=webtatic update php
Very Good!
We need several packages to create yum repository, you can install them from CD/DVD disks or ISO images.
# yum install createrepo wget
# cd /mnt # createrepo .
Mount your CD/DVD or ISO images
DVD Disk or DVD ISO image
* If you have DVD disk, please mount dvd-rom first, and then create yum repository:
# mkdir /mnt/dvd/
# mount /dev/cdrom /mnt/dvd/
* If you use DVD iso, please copy it to the system, and then create yum repository:
# mkdir /mnt/dvd/
# mount -o loop /root/rhel5.1-dvd.iso /mnt/dvd
CD images
If you have multiple CD image files, you should mount all iso images and then create yum repository.
* Mount all iso images:
# mkdir -p /mnt/{1,2,3,4,5}
# mount -o loop rhel5.1-disc1.iso /mnt/1
# mount -o loop rhel5.1-disc2.iso /mnt/2
# mount -o loop rhel5.1-disc3.iso /mnt/3
# mount -o loop rhel5.1-disc4.iso /mnt/4
# mount -o loop rhel5.1-disc5.iso /mnt/5
Install necessary package
* Find and install ‘createrepo’ package in /mnt directory:
# find /mnt -iname ‘createrepo*’
/mnt/dvd/Server/createrepo-0.4.11-3.el5.noarch.rpm
# rpm -ivh /mnt/dvd/Server/createrepo-0.4.11-3.el5.noarch.rpm
Create yum repository
Create metadata
* Create yum repository:
# cd /mnt/
# createrepo .
Define yum repository
Create yum repository define file /etc/yum.repos.d/dvdiso.repo:
[MailRepo]
name=MailRepo
baseurl=file:///mnt/
enabled=1
gpgcheck=0
Test it
# yum clean all
# yum list
yum groupinstall “groupname” yum groupinstall “X Window System” “GNOME Desktop Environment”
Run this command
partprobe
# yum install php-devel php-pear mysql-devel httpd-devel
# pecl install pdo
# PHP_PDO_SHARED=1 pecl install pdo_mysql
add php.ini
extension=pdo.so
extension=pdo_mysql.so
# apachectl restart
yum install tomcat5 tomcat5-jsp tomcat5-webapps -y