Centos5.5+LAMP环境
Note:如果网络正常,apache服务正常,仍然不能访问网页。需要检查linux 防火墙是否关闭。
(
先重新启动防火墙
service iptables start
然后输入配置防火墙的命令并查看配置后的防火墙策略
iptables -I INPUT -p TCP --dport 80 -j ACCEPT
service iptables status
完成后如图所示,配置完成,远程访问服务器上的网页已经OK了

)
1.安装apache
[root@admin-pc mnt]# yum -y install httpd*
2.创建默认index.html页面(默认没有index.html页面)
[root@admin-pc mnt]# vi /var/www/html/index.html
<html>
<body>
this is a test a page for apache
</body>
</html>
3.enable ip访问在配置文件中
[root@admin-pc mnt]# vi /etc/httpd/conf/httpd.conf
ServerName www.example.com:80
4.重新启动 apache服务
[root@admin-pc mnt]# /etc/init.d/httpd stop
[root@admin-pc mnt]# /etc/init.d/httpd start
5.打开浏览器http://192.168.1.11/index.html

#安装mysql
1.[root@admin-pc mnt]# yum -y install mysql mysql-server
2.登录mysql(默认用户名和密码为空)
3.修改用户名和密码为root 123
[root@admin-pc mnt]# mysqladmin -u root -p password 123
4,重新登录mysql
[root@admin-pc mnt]# mysql -uroot -p123
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 67
Server version: 5.0.95 Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
#安装 php
1.yum安装php
[root@admin-pc mnt]# yum -y install php*
2.创建index.php页面
[root@admin-pc mnt]# vi /var/www/html/index.php
3.编辑index.php页面
<?php
phpinfo();
?>
4.打开浏览器http://192.168.1.11/index.php

Centos5.5+LAMP环境的更多相关文章
- (转)CentOS5.5 下搭建 PHP 环境(最佳的LAMP环境)
本文详细阐述在 Linux 系统中搭建 PHP 环境,由于 PHP 就是由 C 语言编写的,最初也是运行在 Linux 系统中,所以Linux 是 PHP 的最佳环境. 关于本文中使用到的软件,请点击 ...
- lamp环境centos6.4
http://www.centos.bz/2011/09/centos-compile-lamp-apache-mysql-php/comment-page-1/#comments 编译安装: 首先卸 ...
- CentOS 6.5下的lamp环境rsyslog+MySQL+loganalyzer实现日志集中分析管理
前言 rsyslog系统日志,在CentOS5上叫syslog,而在CentOS6上叫rsyslog,是增强版的syslog,CentOS5上的配置文件在/etc/syslog.conf下,而Cent ...
- CentOS使用yum源中自带的rpm包安装LAMP环境
CentOS使用yum源中自带的rpm包安装LAMP环境.这是Linux下安装LAMP的环境一种最基本最简便的方式.新手可以从容安装使用. 1. 安装基础包(可选安装)yum install -y w ...
- Ubuntu14.04 lamp环境 php 无法加载mcrypt扩展
Ubuntu14.04中安装后的LAMP环境(http://www.cnblogs.com/daiyu/p/4380657.html)中没有加载:mcrypt扩展,后期再laravel5使用中发现报错 ...
- CentOS 7 yum方式配置LAMP环境
环境:CentOS 7 最小化安装 采用Putty连接 方法:采用YUM安装方法 目的:搭建Apache+Mysql+PHP环境 1,安装Apache yum install httpd //默认情况 ...
- CentOS下搭建LAMP环境详解
前言:在这里将介绍如何在CentOS下搭建LAMP环境(全部使用源码编译安装),用于web服务器开发. •LAMP: Linux + Apache + PHP + Mysql. •系统: CentOS ...
- 7. LAMP环境搭建
一.准备工作 1.安装编译工具gcc.gcc-c++ 注意解决依赖关系,推荐使用yum安装,若不能联网可使用安装光盘做为yum源-- 1)编辑yum配置文件: # mount /dev/cdrom / ...
- Ubuntu-server14.04搭建LAMP环境
转自:http://www.cnblogs.com/myzhibie/p/4330327.html 对于很多PHP初学开发者来讲,搭建一个可用于生产的LAMP环境是一件费时费力的事情,本文以 ubun ...
随机推荐
- 数据库程序接口——JDBC——初篇——目录
目录 建立连接 核心对象 Driver DriverManager Connection DataSource 常用功能 第一个程序 C3P0数据源 DBCP数据源 事务之Spring事务 执行SQL ...
- Dreamoon and WiFi
Dreamoon is standing at the position 0 on a number line. Drazil is sending a list of commands throug ...
- 2019HDU多校第一场1001 BLANK (DP)(HDU6578)
2019HDU多校第一场1001 BLANK (DP) 题意:构造一个长度为n(n<=10)的序列,其中的值域为{0,1,2,3}存在m个限制条件,表示为 l r x意义为[L,R]区间里最多能 ...
- Js选择器总结
一.原生JS选择器 JS选择器常用的有getElementById().getElementsByName().getElementsByTagName().getElementsByClassNam ...
- python正则非贪婪模式
上一篇python正则匹配次数大家应该也发现了,除了?其他匹配次数规则都是尽可能多的匹配 那如果只想匹配1次怎么办呢,这就是正则中非贪婪模式的概念了 原理就是利用?与其他匹配次数规则进行组合 单个匹配 ...
- auto_prt的VS版本源码剖析
通过对VC版本的auto_ptr的源代码得知VC版本还有一点小缺陷,又对VS版本的auto_ptr做了一些剖析,具体代码和注释如下: //假设全局pa2都是用pa1来构造 //如:pa2(pa1).p ...
- Redis读写分离的简单配置
Master进行写操作,可能只需要一台Master.进行写操作,关闭数据持久化. Slave进行读操作,可能需要多台Slave.进行读操作,打开数据持久化. 假设初始配置有Master服务器为A,sl ...
- Mac下ssh远程无密码登录
入手Mac,对很多工具的使用都不太熟悉,这不,做web开发,登录远程服务器非常繁琐,想要去掉输入密码这个环节,找到网友的分享如下: http://www.cnblogs.com/shuaiwhu/ar ...
- 吴裕雄 python 机器学习——集成学习随机森林RandomForestRegressor回归模型
import numpy as np import matplotlib.pyplot as plt from sklearn import datasets,ensemble from sklear ...
- html 中embed标签使用
代码如下: embed src=url 说明:embed可以用来插入各种多媒体,格式可以是 Midi.Wav.AIFF.AU.MP3.PDF.jpg等等,Netscape及新版的IE 都支持.url为 ...