CENTOS 7 系统环境安装简要版
发布时间: 2020-02-04 00:00:00 浏览量: 0
一、一键安装mysql、php、ssl
yum install mysql mysql-server httpd php php-mysql mod_ssl -y
二、配置系统以支持伪静态
vim /etc/httpd/conf/httpd.conf
查找 AllowOverride None 改成 AllowOverride All
三、 常用指令
systemctl enable httpd.service // 服务器自动开启php
/bin/systemctl start httpd.service // 服务器开启php
/bin/systemctl stophttpd.service // 服务器关闭php
/bin/systemctl restart httpd.service // 服务器重启php
Systemctl disable firewalld.service //禁止防火墙开机启动
Systemctl stop firewalld.service //临时关闭防火墙
Systemctl enable firewalld.service //启用防火墙开机启动
四、SSL相关指令
ls /etc/httpd/modules/ | grep "mod_ssl" //检查是否安装了mod_ssl
yum list all mod_ssl //查看mod_ssl的安装包信息
yum install -y mod_ssl //安装mod_ssl, -y 表示遇到y/n选择时自动y
rpm -qc mod_ssl //查找mod_ssl的配置文件存放位置
相关信息
- 02月04日CENTOS 7 系统环境安装简要版