centos6的64位在安装virtualmin,webmin时出现错误的解决办法

如果centos6.0或centos6.3的64位在安装virtualmin,webmin时出现下方的错误,

Error: Package: 1:httpd-manual-2.2.15-15.el6.vm.noarch (@virtualmin)
           Requires: httpd = 1:2.2.15-15.el6.vm
           Removing: 1:httpd-2.2.15-15.el6.vm.x86_64 (@virtualmin)
               httpd = 1:2.2.15-15.el6.vm
           Updated By: 1:httpd-2.2.15-15.el6.vm.1.x86_64 (virtualmin)
               httpd = 1:2.2.15-15.el6.vm.1
           Available: httpd-2.2.15-15.el6.i386 (virtualmin)
               httpd = 2.2.15-15.el6
           Available: httpd-2.2.15-15.el6.centos.x86_64 (base)
               httpd = 2.2.15-15.el6.centos
           Available: httpd-2.2.15-15.el6.centos.1.x86_64 (updates)
               httpd = 2.2.15-15.el6.centos.1
           Available: 1:httpd-2.2.15-5.el6.vm.x86_64 (virtualmin)
               httpd = 1:2.2.15-5.el6.vm
           Available: 1:httpd-2.2.15-9.el6.2.vm.x86_64 (virtualmin)
               httpd = 1:2.2.15-9.el6.2.vm
           Available: 1:httpd-2.2.15-15.el6.x86_64 (virtualmin)
               httpd = 1:2.2.15-15.el6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
.. install failed!

直接运行
rpm -e httpd-manual
后,再安装
virtualmin,webmin即可!

centos 6环境下安装mcrypt方法

centos 6环境下正常没有mcrypt的yum安装包
网站各种方法中,都是引用epel-release-6-5.noarch.rpm,这个文件现在是不存在的
经操作操作,以下方法可行:
rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm
yum -y install mcrypt php-mcrypt mbstring php-mbstring
 service httpd restart

php -m 检查

centos 如何安装yum的方法

CentOS 5 i386:

wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/elfutils-libs-0.137-3.el5.i386.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/gmp-4.1.4-10.el5.i386.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/readline-5.1-3.el5.i386.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-2.4.3-27.el5.i386.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/libxml2-2.6.26-2.1.2.8.i386.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/libxml2-python-2.6.26-2.1.2.8.i386.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/expat-1.95.8-8.2.1.i386.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-elementtree-1.2.6-5.i386.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/sqlite-3.3.6-5.i386.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-sqlite-1.1.7-1.2.1.i386.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/elfutils-0.137-3.el5.i386.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/rpm-python-4.4.2.3-18.el5.i386.rpm # (1)
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/m2crypto-0.16-6.el5.6.i386.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-urlgrabber-3.1.0-5.el5.noarch.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/yum-3.2.22-20.el5.centos.noarch.rpm (2)
wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm (2)

rpm -Uvh elfutils-libs-0.137-3.el5.i386.rpm
rpm -Uvh gmp-4.1.4-10.el5.i386.rpm
rpm -Uvh readline-5.1-3.el5.i386.rpm
rpm -Uvh python-2.4.3-27.el5.i386.rpm
rpm -Uvh python-iniparse-0.2.3-4.el5.noarch.rpm
rpm -Uvh libxml2-2.6.26-2.1.2.8.i386.rpm
rpm -Uvh libxml2-python-2.6.26-2.1.2.8.i386.rpm
rpm -Uvh expat-1.95.8-8.2.1.i386.rpm
rpm -Uvh python-elementtree-1.2.6-5.i386.rpm
rpm -Uvh sqlite-3.3.6-5.i386.rpm
rpm -Uvh python-sqlite-1.1.7-1.2.1.i386.rpm
rpm -Uvh elfutils-0.137-3.el5.i386.rpm
rpm -Uvh rpm-python-4.4.2.3-18.el5.i386.rpm # (1)
rpm -Uvh m2crypto-0.16-6.el5.6.i386.rpm
rpm -Uvh python-urlgrabber-3.1.0-5.el5.noarch.rpm
rpm -Uvh yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
rpm -Uvh yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm   yum-3.2.22-20.el5.centos.noarch.rpm
yum -y update
CentOS 5 X86_64:

wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/gmp-4.1.4-10.el5.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/readline-5.1-3.el5.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-2.4.3-27.el5.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/libxml2-2.6.26-2.1.2.8.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/libxml2-python-2.6.26-2.1.2.8.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/expat-1.95.8-8.2.1.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-elementtree-1.2.6-5.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/sqlite-3.3.6-5.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-sqlite-1.1.7-1.2.1.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/elfutils-libelf-0.137-3.el5.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/elfutils-0.137-3.el5.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/rpm-4.4.2.3-18.el5.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/rpm-python-4.4.2.3-18.el5.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/m2crypto-0.16-6.el5.6.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-urlgrabber-3.1.0-5.el5.noarch.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm

wget ftp://ftp.sunet.se/pub/Linux/distributions/centos/5.5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm

wget ftp://ftp.sunet.se/pub/Linux/distributions/centos/5.5/os/x86_64/CentOS/yum-3.2.22-26.el5.centos.noarch.rpm

rpm -Uvh gmp-4.1.4-10.el5.x86_64.rpm

rpm -Uvh readline-5.1-3.el5.x86_64.rpm
rpm -Uvh python-2.4.3-27.el5.x86_64.rpm
rpm -Uvh libxml2-2.6.26-2.1.2.8.x86_64.rpm
rpm -Uvh libxml2-python-2.6.26-2.1.2.8.x86_64.rpm
rpm -Uvh expat-1.95.8-8.2.1.x86_64.rpm
rpm -Uvh python-elementtree-1.2.6-5.x86_64.rpm
rpm -Uvh sqlite-3.3.6-5.x86_64.rpm
rpm -Uvh python-sqlite-1.1.7-1.2.1.x86_64.rpm
rpm -Uvh elfutils-libelf-0.137-3.el5.x86_64.rpm
rpm -Uvh elfutils-0.137-3.el5.x86_64.rpm
rpm -Uvh rpm-4.4.2.3-18.el5.x86_64.rpm
rpm -Uvh rpm-python-4.4.2.3-18.el5.x86_64.rpm
rpm -Uvh m2crypto-0.16-6.el5.6.x86_64.rpm
rpm -Uvh python-urlgrabber-3.1.0-5.el5.noarch.rpm
rpm -Uvh yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
rpm -Uvh python-iniparse-0.2.3-4.el5.noarch.rpm
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
rpm -Uvh yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm yum-3.2.22-26.el5.centos.noarch.rpm
yum -y update

如上述文件找不到,可到http://rpm.pbone.net/,找查找,然后继续安装
注意:安装的时候最好几个同时安装,如果单个安装的话可能会出现依赖问题。
出现了相互依赖的问题。

混在一起安装,如
# rpm -ihv xxx.rpm yyyy.rpm

centos系统的vps如何升级php5.1到php5.2

centos系统的Linux vps安装的php默认都是php5.1, 如何升级php5.1到php5.2? 这里有个方法可以参考:
1. 安装“yum-priorities”:
yum -y install yum-priorities
2. 将 http://dev.centos.org/centos/5/CentOS-Testing.repo 的内容复制粘贴到 /etc/yum.conf 的最下面
3. 安装 PHP with enabling “c5-testing” repository
yum –enablerepo=c5-testing –exclude=php*5.3* -y install php

4. 重启Apache:
5. 完成. 用php -v 检查是不是php5.2

首先就是要升级我们的php 等升级完成以后就可以升级相应的包了。
shell>yum install php-gd
shell>yum install php-mcrypt
shell>yum install php-mbstring
如执行php -v 遇到以下错误:
PHP Warning:  PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0

通过执行以下语句解决:
yum –enablerepo=c5-testing install php-mcrypt
yum –enablerepo=c5-testing install php-mbstring

centos下使用yum来升级php和mysql

yum是CentOS系统自带的用于方便地添加/删除/更新RPM包的工具,它能自动解决包的倚赖性问题。
用yum更新PHP,只需用一条命令就可以搞定.
#yum update php
#yum update mysql
使用此命令后,系统告诉我,没有发现可更新的包。而当前的PHP版本只是5.2.1,php官方已经更新到更新到5.2.6了。原来CentOS系统的源里PHP仍旧是5.2.1,需要额外的源才能升级PHP。根据其它人的资料,将步骤额外源的步骤如下:
#rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
#vi /etc/yum.repos.d/utterramblings.repo

在打开的文档中加入下面内容
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

保存。
再次运行下面的命令就可以完成php的升级了
#yum update php
升级到5.2.13
运行下面命令,升级mysql
#yum update mysql
升到5.0.99

具体看:http://www.jasonlitka.com/yum-repository/ 原始出处

centos下用yum安装zen-cart的lamp基本步骤和命令

1、安装Apahce, PHP, Mysql, 以及php连接mysql库组件
yum -y install httpd php mysql mysql-server php-mysql
也可分别安装
  1)、安装MySql   #yum install -y mysql-server
  2)、安装Apache   #yum install -y httpd*    PS:这里是httpd*,不是httpd
  3)、安装php及其apache扩展和mysql扩展    #yum install -y php php-mbstring php-mysql
2、安装扩展
  1)、其中一种:yum -y install gcc make patch gcc-c++ gcc-g77 flex bison autoconf automake libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel  openssl openssl-devel libtiff-devel fontconfig-devel libXpm-devel gettext-devel pam-devel pcre-devel libtool libtool-ltdl  php-mcrypt
 2)、其中一种:yum -y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc mysql-connector-odbc mysql-devel libdbi-dbd-mysql
 3)、分开:
安装mysql扩展
yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
安装php的扩展
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
安装apache扩展
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
上述环境安装完毕,根据需要选择

3. 启动服务配置

/sbin/chkconfig httpd on [设置apache为自启动]
/sbin/chkconfig -add mysqld [mysql服务]
/sbin/chkconfig mysqld on [mysqld服务]

/sbin/service httpd start [自启动 httpd 服务]
/sbin/service mysqld start [自启动mysqld服务]

4.设置mysql数据库root帐号密码。
mysqladmin -u root password ‘新密码’ [引号内填密码]

5. 防火墙配置
a.添加.允许访问端口{21: ftp, 80: http}.
iptables -I RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 21 -j ACCEPT
iptables -I RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
iptables -I RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 10000 -j ACCEPT
b.关闭防火墙{不推荐}.
service iptables stop
c.重置加载防火墙
service iptables restart