centos7 安装LAM8P7 并配置https

5 篇文章 0 订阅
2 篇文章 0 订阅

一、环境
主机 :CentOS Linux release 7.7.1908 (Core)
httpd:Apache/2.4.6 (CentOS)
PHP  :PHP 7.2.24 (cli) (built: Oct 26 2019 12:28:19) ( NTS )
Mysql:8.0.11 MySQL Community Server - GPL

环境准备
    关闭防火墙和selinux
    vim /etc/selinux/config    
    SELINUX=enforcing 修改为 SELINUX=disabled

    systemctl stop  firewalld
    systemctl disable firewalld


二、安装
1.httpd
 yum install httpd
 
 https模块安装
 yum install mod_ssl openssl
 
 配置项目
 vim /etc/httpd/conf.d/ssl.conf
 在 <VirtualHost _default_:443> 下一行添加  DocumentRoot "/var/www/html/zzpt/"

2.PHP
 rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
 rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
 yum -y install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml

 修改时区
 vim /etc/php.ini
 ;date.timezone 修改为 date.timezone=PRC
 
 3.MySQL8(参考 https://blog.csdn.net/qq_38591756/article/details/82958333)
 wget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
 yum localinstall mysql80-community-release-el7-1.noarch.rpm
 yum install mysql-community-server
 
 systemctl start mysqld
 systemctl enable mysqld
 
 grep 'password' /var/log/mysqld.log

 mysql -uroot -p
 set password for 'root'@'localhost'=password('*******');

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值