天天看點

linux centos7.2 安裝mysq,nginx,phpwget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm rpm -ivh mysql-community-release-el7-5.noarch.rpmyum install mysql-community-server

linux centos7.2 安裝mysq

由于yum源上沒有mysql-server。是以必須去官網下載下傳,這裡 我們用wget命,**直接擷取。    

完成之後重新啟動

systemctl restart mysqld.service

終端下檢視 mysql 版本

mysql -v

mysql ver 14.14 distrib 5.6.35, for linux (x86_64) using editline wrapper

我們給mysql 設定一個密碼

mysqladmin -u root password "123456"

下面可能會警告

warning: using a password on the command line interface can be insecure.

就是說指令行使用密碼可能會不安全

此時我們已經設定好mysql 的密碼

mysql -u root -p123456 直接進入

此時我們想在windows 下使用工具連接配接,會報錯誤1130

我們在linux 修改/etc/my.cnf

加入

skip-grant-tables

即可連接配接

安裝nginx

我們直接用yum源安裝

yum -y install nginx

systemctl start nginx 啟動nginx

systemctl restart nginx 重新開機nginx

systemctl stop nginx 停止nginx

安裝php

yum -y install php-fpm

對于nginx我們安裝的是php-fpm

繼續閱讀