Centos 6.0 下LAMP环境搭建从入门到精通(yum命令)

CentOS自带(yum-*.noarch.rpm)

yum安装

# wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-3.2.22-26.el5.centos.noarch.rpm

安装:

# rpm -ivh yum-*.noarch.rpm
确认安装成功:
# rpm -qa|grep yum
yum-3.0.5-1.el5.centos.5
yum-metadata-parser-1.0-8.fc6

# rpm -Uvh http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-3.2.22-26.el5.centos.noarch.rpm

在第一次启用yum之前首先需要导入系统的RPM-GPG-KEY:

# rpm -import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

------------------------------------------------------
安装Apahce, PHP, Mysql, 以及php连接mysql库组件
------------------------------------------------------
# yum -y install httpd php mysql mysql-server php-mysql

------------------------------------------------------
安装mysql扩展
------------------------------------------------------
# yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql

------------------------------------------------------
或一次性粘贴安装:
------------------------------------------------------
# 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

//////////////////////////////////////////////////
安装EPEL,它是由 Fedora 社区打造,为 RHEL 及衍生发行版如
CentOS、Scientific Linux 等提供高质量、高性能、高可靠性软件包的项目。
装上了 EPEL,就像在 Fedora 上一样,可以通过 yum install package-name,随意安装软件。

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

Leave a Reply