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 ...
随机推荐
- Educational Codeforces Round 76 (Rated for Div. 2) C. Dominated Subarray
Let's call an array tt dominated by value vv in the next situation. At first, array tt should have a ...
- backward的gradient参数的作用
backward的gradient参数的作用 待办 https://zhuanlan.zhihu.com/p/29904755 https://zhuanlan.zhihu.com/p/2992309 ...
- 2020ICPC 博弈题 纳新一百的石子游戏
https://ac.nowcoder.com/acm/contest/4010/C 这道题为尼姆博弈的其中一种裸类型: 要求求出前(1~n)堆的必胜方案. 对于这种类型,假如我们现在就前k堆,那么我 ...
- (c#)拼写单词
题目 解
- 【做题笔记】CF1311A、B、C
或许以后会有D. A 题目大意:给定两个整数 \(a,b\) ,每次可以进行一下任意一个操作: \(a\) 加上任意一个正奇数 \(b\) 减去任意一个正偶数 问是否可以通过若干次操作把 \(a\) ...
- Flask 教程 第二十章:加点JavaScript魔法
本文翻译自The Flask Mega-Tutorial Part XX: Some JavaScript Magic 这是Flask Mega-Tutorial系列的第二十部分,我将添加一个功能,当 ...
- 设置datagridview 单个单元格的背景色
方法一: private void dataGridView1_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e){DataG ...
- Python(一):一行解法参考
#一行快速排序quick_sort = lambda array: array if len(array) <= 1 else quick_sort([item for item in arra ...
- Opencv模块
参考博客:https://blog.csdn.net/u012679707/article/details/79505279
- Spring AOP编程(一)-AOP介绍
1. AOP介绍 l 在软件业,AOP为Aspect Oriented Programming的缩写,意为:面向切面编程,通过预编译方式和运行期动态代理实现程序功能的统一维护的一种技术 ...