CentOS 6.6 yum 搭建LAMP环境
CentOS 查看操作系统版本
[root@oa ~]# cat /etc/redhat-release
CentOS release 6.6 (Final)
Yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器。
基于RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软件包,无须繁琐地一次次下载、安装。
1、更新一下yum
[root@oa ~]# yum -y update
2、用yum安装Apache,Mysql,PHP
安装Apache:
[root@oa ~]# yum install httpd httpd-devel
安装完成后, 启动apache
[root@oa ~]# /etc/init.d/httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for oa.aioute.com
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
设为开机启动
[root@oa ~]# chkconfig httpd on
安装mysql:
[root@oa ~]# yum install mysql mysql-server mysql-devel
启动mysql
[root@oa ~]# /etc/init.d/mysqld start
参考:[CentOS 0010] CentOS 配置mysql允许远程登录
设置mysql密码,并开启远程权限:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> EXIT
允许3306端口:
[root@oa ~]# iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
[root@oa ~]# iptables -L -n
安装php:
yum install php php-devel
重启apache使php生效:
/etc/init.d/httpd restart
[root@oa ~]# yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
重新启动php:
[root@oa ~]# /etc/init.d/httpd restart
Starting httpd:
3、允许端口访问
[root@oa ~]# iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
[root@oa ~]# iptables -L -n
配置文档参考 CentOS下安装配置LAMP(Linux+Apache+MySQL+PHP)
文件夹权限 CentOS的文件权限与目录配置
CentOS 6.6 yum 搭建LAMP环境的更多相关文章
- 利用yum搭建lamp环境并进一步创建博客
用yum搭建lamp环境 第一.安装apache yum -y install httpd 第二.安装mariadb Yum -y mariadb mariadb-server 第三.安装php Yu ...
- yum搭建 Lamp环境
yum搭建Lamp yum install -y httpd yum install -y nano rpm 安装 Php7 相应的 yum源 rpm -Uvh https://dl.fedorapr ...
- centos7用yum搭建LAMP环境
用yum快速搭建LAMP平台 实验环境: [root@nmserver- html]# cat /etc/redhat-release CentOS release (AltArch) [root@n ...
- CentOS 6.5下搭建LAMP环境详细步骤
1.确认搭建LAMP所需的环境是否已经安装: [root@localhost ~]#rpm -q make gcc gcc-c++ zlib-devel libtool libtool-ltdl li ...
- 64位CentOS 6.0下搭建LAMP环境
系统环境:Centos6.0 x64 1.确认搭建LAMP所需要的环境是否已经安装 [root@centos6 ~]# rpm -q make gcc gcc-c++ zlib-devel libai ...
- CentOS 7.4 yum安装LAMP环境
配置防火墙,开启80.3306端口.CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. #停止firewall服务 systemctl stop firewa ...
- Centos 7 下yum搭建lnmp环境(yum安装方式)
我们都知道linux下安装软件主要有三种方式: 1.源码编译安装,即下载软件源代码,利用gcc g++ make 等编译工具进行编译安装: 此方式的优点:可以指定软件版本,可选择性好:编译时可以手动指 ...
- centos7 yum搭建lamp环境
=============================================== 2018/1/14_第1次修改 ccb_warlock == ...
- yum搭建LAMP环境
LAMP=Linux+Apache(httpd)+Mysql(mariadb)+PHP Apache HTTP 服务器 2.4 文档:http://httpd.apache.org/docs/2.4/ ...
随机推荐
- 细说LastLogonTimeStamp
微软在Windows Server 2003中引入了LastLogonTimeStamp属性.管理员们可以利用这个属性查看用户或者计算机最近是否登录过域.根据这些信息,管理员可以对长时间没有登录的账户 ...
- Web中的图标
随着时代的变迁与技术的不断的更新,在当今这个时代,Web中的图标(Icons)不再仅仅是局限于<img>.除了<img>直接调用Icons文件之外,还有Sprites(俗称雪碧 ...
- 每天学点GDB 12
本文介绍在archlinux环境下,如何进行内核使用gdb配合qemu进行调试. 1. 安装qemu 2. 编译linux kernel 选择最新的内核版本,规避gcc编译出错的问题具体步骤如 ...
- PHP调用java的class
PHP调用java的class 转:http://hi.baidu.com/lei0827/blog/item/28439a4e923234ced1c86a18.html PHP调用java的cl ...
- DataSet key points
In a typical multiple-tier implementation, the steps for creating and refreshing a DataSet, and in t ...
- Bootstrap页面布局13 - BS按钮
bootstrap中的按钮类 一般可以作为按钮的标签有:<a></a> <button></button> <input type='butt ...
- LR网页细分图中的时间详解
Web Page Diagnostics: 1)DNS Resolution:浏览器访问一个网站的时候,一般用的是域名,需要dns服务器把这个域名解析为IP,这个过程就是域名解析时间,如果我们在局域网 ...
- 1.PHP内核探索:从SAPI接口开始
SAPI:Server Application Programming Interface 服务器端应用编程端口.研究过PHP架构的同学应该知道这个东东的重要性,它提供了一个接口,使得PHP可以和其他 ...
- space ship
按下向上箭头,飞船速度不是一直增加 而且飞船移动的方向是固定的不是有角度的 按下箭头飞船可以飞了,但是不减速 加一个keyup handler就可以啦!可以一直加速,不按的时候也可以减速 按下向下按钮 ...
- changing a pointer rather than erasing memory cells
Computer Science An Overview _J. Glenn Brookshear _11th Edition In a data structure based on a point ...