码迷,mamicode.com
首页 > 其他好文 > 详细

centos7配置环境LNMP

时间:2017-10-19 13:57:17      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:redis3   密码   opcache   epo   gre   5.6   启动   string   ice   

#yum安装epel-release第三方软件包
yum install epel-release
#要验证EPEL仓库是否建立成功
yum repolist

  

#安装php5.6.31
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm 

yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-fpm php-redis php-gd

#设置时区
vim /etc/php.ini
#date.timezone = "Asia/Shanghai"

#设置php-fpm运行用户组
vim /etc/php-fpm.d/www.conf
#user = nginx
#group = nginx
#listen = 127.0.0.1:9000 	前面;去掉
#listen.owner = nobody		前面;去掉
#listen.group = nobody		前面;去掉
#listen.mode = 0660			前面;去掉

  

#安装nginx
yum list nginx
yum install nginx

#启动nginx
systemctl start  nginx.service
systemctl status nginx.service

#启动php-fpm
systemctl start  php-fpm.service
systemctl status php-fpm.service

  

#安装mysql5.7.20
wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm 

#安装mysql源
yum localinstall mysql57-community-release-el7-8.noarch.rpm
#安装mysql server
yum install mysql-community-server

#启动mysqld
systemctl start mysqld
systemctl status mysqld

#查看临时密码
grep ‘A temporary password‘ /var/log/mysqld.log

#登录设置root新密码
alter user ‘root‘@‘localhost‘ identified by ‘Abc#123!‘;

#查看mysql版本
->status;

#新建用户
create user huirong identified by ‘huirongAbc#123‘;

  

#安装redis3.2.10
yum list redis
yum install redis

#启动redis
systemctl start redis.service
systemctl status redis.service

#查看redis版本
redis-cli 
->info

  

#yum安装lrzsz
yum list lrzsz
yum install lrzsz 
#rz上传 sz下载

  

centos7配置环境LNMP

标签:redis3   密码   opcache   epo   gre   5.6   启动   string   ice   

原文地址:http://www.cnblogs.com/lovekingly/p/7691832.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!