CentOS 5.5使用yum安装LAMP环境(sohu源)
2011-08-23 18:29
1121 查看
CentOS 5.5默认的是163的源,据说sohu的源很好用,今天小试了下。
1、修改yum配置文件,更改为sohu源
清空CentOS-Base.repo文件内容,替换为以下内容:
更新源
2、使用yum命令安装apache、mysql、PHP环境
3、设定服务启动与自启动
4、防火墙设置
5、修改mysql的密码
其他的配置,童鞋们自己搞吧
1、修改yum配置文件,更改为sohu源
# cd /etc/yum.repos.d/ # cp CentOS-Base.repo CentOS-Base.repo.bak
清空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 - Base baseurl=http://mirrors.sohu.com/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5 #released updates [updates] name=CentOS-$releasever - Updates baseurl=http://mirrors.sohu.com/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5 #packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons baseurl=http://mirrors.sohu.com/centos/$releasever/addons/$basearch/ gpgcheck=1 gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras baseurl=http://mirrors.sohu.com/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus baseurl=http://mirrors.sohu.com/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
更新源
# yum -y update
2、使用yum命令安装apache、mysql、PHP环境
#yum -y install httpd php mysql mysql-server php-mysql #这里只装了最基础的,其他扩展没装
3、设定服务启动与自启动
# chkconfig httpd on # chkconfig --add mysqld # chkconfig mysqld on # service httpd start # service mysqld start
4、防火墙设置
a.添加.允许访问端口{21: ftp, 80: http}. # iptables -I INPUT -p tcp --dport 80 -j ACCEPT # 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 b.或者关闭防火墙(不推荐). # service iptables stop c.重置加载防火墙 # service iptables restart
5、修改mysql的密码
#mysqladmin -u root password 'root'
其他的配置,童鞋们自己搞吧
相关文章推荐
- CentOS 5.5使用yum安装LAMP环境(sohu源)
- CentOS 5.5使用yum来安装LAMP(php运行环境)
- CentOS 5.5使用yum来安装LAMP(php运行环境)
- CentOS 5.5使用yum来安装LAMP(php运行环境)
- CentOS 5.5使用yum来安装LAMP(php运行环境)(转)
- CentOS 5.5使用yum来安装LAMP(php运行环境)
- CentOS 5.5使用yum来升级安装LAMP(php运行环境)【转载并修改】
- CentOS 5.5使用yum来安装LAMP(php运行环境)【转载】
- CentOS 6.5系统使用yum方式安装LAMP环境和phpMyAdmin详细过程
- CentOS5.5使用yum来安装LAMP
- CentOS 6.5系统使用yum方式安装LAMP环境和phpMyAdmin详细过程
- CentOS5.5使用yum来安装LAMP
- CentOS5.5使用yum来安装LAMP
- CentOS使用yum配置安装LAMP环境自动化脚本
- centos(7) 使用yum进行安装lamp环境
- CentOS 7.4 yum方式安装LAMP环境,并部署WordPress,使用XCache优化性能
- CentOS 5.5使用yum来安装LAMP并安装phpMyAdmin
- entOS 5.5使用yum来安装LAMP(php运行环境)
- CentOS-6.5(X64)使用yum安装LAMP环境
- CentOS5.5使用yum来安装LAMP