1. 换源,sohu的相当好用。
1.1备份CentOS-Base.repocd /etc/yum.repos.d/cp CentOS-Base.repo CentOS-Base.repo.bak1.2替换源用vi打开CentOS-Base.repo,并将内容清空,然后将下面的内容复制进去,并保存。# CentOS-Base.repo## This file uses a new mirrorlist system developed by Lance Davis for CentOS.# the mirror system uses the connecting IP address of the client and the# update status of each mirror to pick mirrors that are updated to and# geographically close to the client. You should use this for CentOS updates# unless you are manually picking other mirrors.## If the mirrorlist= does not work for you, as a fall back you can try the# remarked out baseurl= line instead.##[base]name=CentOS-$releasever - Basebaseurl=$releasever/os/$basearch/gpgcheck=1gpgkey=updates[updates]name=CentOS-$releasever - Updatesbaseurl=$releasever/updates/$basearch/gpgcheck=1gpgkey=used/produced in the build but not released[addons]name=CentOS-$releasever - Addonsbaseurl=$releasever/addons/$basearch/gpgcheck=1gpgkey=packages that may be useful[extras]name=CentOS-$releasever - Extrasbaseurl=$releasever/extras/$basearch/gpgcheck=1gpgkey=packages that extend functionality of existing packages[centosplus]name=CentOS-$releasever - Plusbaseurl=$releasever/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=更新一下。yum -y update
2. 用yum安装Apache,MYSQL,PHP.
2.1安装Apacheyum install httpd httpd-devel安装完成后,用/etc/init.d/httpd start 启动apache设为开机启动:chkconfig httpd on2.2 安装mysql2.2.1 yum install mysql mysql-server mysql-devel同样,完成后,用/etc/init.d/mysqld start 启动mysql2.2.2 设置mysql密码mysql>; USE mysql;mysql>; UPDATE user SET Password=PASSWORD('newpassword') WHERE user='root';mysql>; FLUSH PRIVILEGES;2.2.3 允许远程登录mysql -u root -pEnter Password:
5.5使用yum来安装LAMP-CentOS-php运行环境
本文版权声明本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,请联系本站客服,一经查实,本站将立刻删除。














发表评论