在Linux(centos)中搭建LAMP的小过程
来源:互联网 发布:什么软件可以汉化 编辑:程序博客网 时间:2024/06/01 11:58
更新软件列表:yum -y update
在Cenos安装apache:yum install httpd httpd-devel
启动apache:/etc/init.d/httpd start
此时输入服务器的IP地址,应该看到apache的服务页面,端口不用输,apache默认就是使用80端口
安装mysql:
yum install mysql mysql-server
启动mysql:
/etc/init.d/mysqld start
安装php
yum install php php-devel
重启apache使php生效
/etc/init.d/httpd restart
开机后自动启动mysql,apache,vsftpd服务,用以下命令即可:
chkconfig mysqld on
chkconfig httpd on
chkconfig vsftpd on
要关闭自动启动的话,把on改为off就行了。
chkconfig mysqld off
不过要注意的是,如果某个服务尚未被添加到chkconfig列表中,则现需要使用--add参数将其添加进去:
chkconfig --add postfix
如果要查询当前所有自动启动的服务,可以输入:
chkconfig --list
但是这样显示东西太多了,看起来很晕。如果只想看指定的服务怎么办呢?这个时候只需要在“--list”之后加上服务名就好了,比如查看httpd服务是否为自动启动,就输入:
chkconfig --list httpd
这个时候输出的结果:
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
此时0~6均为off,则说明httpd服务不会在系统启动的时候自动启动。我们输入chkconfig httpdon后,再次检查输出结果变为:
httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
这个时候2~5都是on,就表明会自动启动了。
- 在Linux(centos)中搭建LAMP的小过程
- 在centos 7中搭建lamp平台
- Centos搭建LAMP(详细过程)
- Centos搭建LAMP(详细过程)
- 本人的Linux服务器环境(LAMP架构)搭建过程
- 在linux服务器上lamp环境中怎样安装php的扩展模块(centos系统)
- linux的ubuntu和centos下快速搭建LAMP环境
- 在CentOS下搭建LAMP(Apache、MySQL、PHP)环境
- CentOS、Linux搭建LAMP(Apache、MySQL、PHP)环境
- centos 7中搭建Lamp环境(php5.6+marisdb)
- 快速在centos上搭建LAMP环境
- 在centos下搭建lamp环境
- Linux CentOS-5.5下搭建LAMP环境
- LAMP环境搭建过程中遇到的几个错误
- 在Linux(CentOS)中安装was8.5的详细过程
- 基于centos 的Lamp环境搭建
- centos 6.4搭建LAMP环境的phpwind
- centOS下的lamp环境搭建
- 札记——设计模式之多个工厂方法模式
- Loongson Kernel编译与使用
- Android的UDP请求与响应
- ViewPager 详解(三)---PagerTabStrip与PagerTitleStrip添加标题栏的异同
- codeforce 148->A. Insomnia cure
- 在Linux(centos)中搭建LAMP的小过程
- Hibernate
- 如何把一个包含features和plugins的folder 变成一个Maven Tycho支持的 P2仓库?
- Linux中创建别名
- 错误1error LNK2019: 无法解析的外部符号 _wWinMain@16,该符号在函数 ___tmainCRTStartup 中被引用E:\elipse demo\LTG\LTG\
- 设计模式(五)桥接模式Bridge == Pointer To Implementation
- C++经典面试题
- 使用轨迹球来实现视图的旋转
- ViewPager 详解(四)----自主实现滑动指示条