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环境的更多相关文章

  1. (转)CentOS5.5 下搭建 PHP 环境(最佳的LAMP环境)

    本文详细阐述在 Linux 系统中搭建 PHP 环境,由于 PHP 就是由 C 语言编写的,最初也是运行在 Linux 系统中,所以Linux 是 PHP 的最佳环境. 关于本文中使用到的软件,请点击 ...

  2. lamp环境centos6.4

    http://www.centos.bz/2011/09/centos-compile-lamp-apache-mysql-php/comment-page-1/#comments 编译安装: 首先卸 ...

  3. CentOS 6.5下的lamp环境rsyslog+MySQL+loganalyzer实现日志集中分析管理

    前言 rsyslog系统日志,在CentOS5上叫syslog,而在CentOS6上叫rsyslog,是增强版的syslog,CentOS5上的配置文件在/etc/syslog.conf下,而Cent ...

  4. CentOS使用yum源中自带的rpm包安装LAMP环境

    CentOS使用yum源中自带的rpm包安装LAMP环境.这是Linux下安装LAMP的环境一种最基本最简便的方式.新手可以从容安装使用. 1. 安装基础包(可选安装)yum install -y w ...

  5. Ubuntu14.04 lamp环境 php 无法加载mcrypt扩展

    Ubuntu14.04中安装后的LAMP环境(http://www.cnblogs.com/daiyu/p/4380657.html)中没有加载:mcrypt扩展,后期再laravel5使用中发现报错 ...

  6. CentOS 7 yum方式配置LAMP环境

    环境:CentOS 7 最小化安装 采用Putty连接 方法:采用YUM安装方法 目的:搭建Apache+Mysql+PHP环境 1,安装Apache yum install httpd //默认情况 ...

  7. CentOS下搭建LAMP环境详解

    前言:在这里将介绍如何在CentOS下搭建LAMP环境(全部使用源码编译安装),用于web服务器开发. •LAMP: Linux + Apache + PHP + Mysql. •系统: CentOS ...

  8. 7. LAMP环境搭建

    一.准备工作 1.安装编译工具gcc.gcc-c++ 注意解决依赖关系,推荐使用yum安装,若不能联网可使用安装光盘做为yum源-- 1)编辑yum配置文件: # mount /dev/cdrom / ...

  9. Ubuntu-server14.04搭建LAMP环境

    转自:http://www.cnblogs.com/myzhibie/p/4330327.html 对于很多PHP初学开发者来讲,搭建一个可用于生产的LAMP环境是一件费时费力的事情,本文以 ubun ...

随机推荐

  1. koa2第一天 安装koa2found 1 low severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details

    安装全局koa2:npm install -g koa2 -generator 创建一个koa2文件夹:koa2 -e koa2 进入koa2文件夹:cd koa2 安装npm模块:npm insta ...

  2. active Directory域服务安装配置

    1.在Windows功能启用 2.安装一直下一步即可, 添加用户 添加域管理员 将普通用户添加到Domain Admins里

  3. 【做题笔记】P1090 合并果子

    题目大意:给定 \(n\) 个数,每次可以任意选两个数 \(a_i,a_j\) 相加,把相加的结果作为一个新数继续执行此操作,直到只剩一个数为止.现要求使最后得出的这个数最小. 一个显然的贪心策略:每 ...

  4. PyCharm中的django项目的引入

    1.从github或者从本地的文件打开项目 2.项目引入后,python manage.py runserver 8080启动 1.启动的时候有错误,看看要引入的模块错误,然后把模块引入 D:\.St ...

  5. Codeforces Global Round 6D(VECTOR<ARRAY<INT,3> >)

    一个人只要存在债务关系,那么他的债务可以和这整个债务关系网中任何人连边,和他当初借出或欠下的人没有关系.只需要记录他的债务值即可. #define HAVE_STRUCT_TIMESPEC #incl ...

  6. PHP中使用CURL实现Get和Post请求方法

    1.cURL介绍 cURL 是一个利用URL语法规定来传输文件和数据的工具,支持很多协议,如HTTP.FTP.TELNET等.最爽的是,PHP也支持 cURL 库.本文将介绍 cURL的一些高级特性, ...

  7. 【Vue实例生命周期】

    目录 实例创建之前执行--beforeCreate 实例创建之后执行--created 挂载之前执行--beforeMount 挂载之后执行--mounted 数据更新之前执行--beforeUpda ...

  8. ARM架构Linux环境安装python2.7.9

    1.下载python # wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz 2.解压.编译安装 # tar -zxvf Pyt ...

  9. Linux Ubuntu运行线程程序出现undefined reference to ‘pthread_create’和undefined reference to ‘pthread_join’错误。

    Linux Ubuntu运行线程程序出现undefined reference to ‘pthread_create’和undefined reference to ‘pthread_join’错误. ...

  10. Python - 字符串为多行时,转换为列表

    例如一个IP代理池,这是个字符串,有多行 120.236.137.65:8060 193.112.208.216:8118 121.8.98.198:80 121.8.98.197:80 121.8. ...