Linux命令:nginx及php和mysql安装使用

首先下载mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz

lftp [email protected]:/> get mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz

314592758 bytes transferred in 28 seconds (10.66M/s)

lftp [email protected]:/> quit

[[email protected] ~]# ls

anaconda-ks.cfg  Downloads      Music     Pictures   Videos   install.log     mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz   nginx-1.4.1      Templates

[[email protected] ~]# du -lh mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz

301Mmysql-5.6.30-linux-glibc2.5-x86_64.tar.gz

[[email protected] ~]# tar xf mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz -C /usr/local

#解压缩,-C指定解压缩目录

[[email protected] ~]# ls /usr/local/

bin  games    lib     mysql-5.6.30-linux-glibc2.5-x86_64  share

etc  include  lib64  lost+found  sbin

[[email protected]amp ~]# mkdir /mydata/data -pv  #-pv递归创建/mydata/data目录

mkdir: created directory `/mydata‘

mkdir: created directory `/mydata/data‘

[[email protected] ~]# useradd -r mysql  #新增mysql用户,-r指定创建的为系统用户,不作为登录用户

[[email protected] ~]# chown -R mysql.mysql /mydata/data  #更改属主和属组 -R指目录下的所有子文件

都一同更改属主和属组。

[[email protected] ~]# cd /usr/local

[[email protected] local]# ln -sv mysql-5.6.30-linux-glibc2.5-x86_64 mysql  #创建软链接

`mysql‘ -> `mysql-5.6.30-linux-glibc2.5-x86_64‘

[[email protected] local]# cd mysql

[[email protected] mysql]# ll

total 68

drwxr-xr-x.  2 root root   4096 Apr 16 15:23 bin

-rw-r--r--.  1 7161 wheel 17987 Mar  3  2016 COPYING

drwxr-xr-x.  3 root root   4096 Apr 16 15:24 data

drwxr-xr-x.  2 root root   4096 Apr 16 15:24 docs

drwxr-xr-x.  3 root root   4096 Apr 16 15:23 include

drwxr-xr-x.  3 root root   4096 Apr 16 15:24 lib

drwxr-xr-x.  4 root root   4096 Apr 16 15:24 man

drwxr-xr-x. 10 root root   4096 Apr 16 15:24 mysql-test

-rw-r--r--.  1 7161 wheel  2496 Mar  3  2016 README

drwxr-xr-x.  2 root root   4096 Apr 16 15:24 scripts

drwxr-xr-x. 28 root root   4096 Apr 16 15:24 share

drwxr-xr-x.  4 root root   4096 Apr 16 15:24 sql-bench

drwxr-xr-x.  2 root root   4096 Apr 16 15:24 support-files

[[email protected] mysql]# chown -R root.mysql ./*  #-R递归更改属主和属组

[[email protected] mysql]# ll

total 68

drwxr-xr-x.  2 root mysql  4096 Apr 16 15:23 bin

-rw-r--r--.  1 root mysql 17987 Mar  3  2016 COPYING

drwxr-xr-x.  3 root mysql  4096 Apr 16 15:24 data

drwxr-xr-x.  2 root mysql  4096 Apr 16 15:24 docs

drwxr-xr-x.  3 root mysql  4096 Apr 16 15:23 include

drwxr-xr-x.  3 root mysql  4096 Apr 16 15:24 lib

drwxr-xr-x.  4 root mysql  4096 Apr 16 15:24 man

drwxr-xr-x. 10 root mysql  4096 Apr 16 15:24 mysql-test

-rw-r--r--.  1 root mysql  2496 Mar  3  2016 README

drwxr-xr-x.  2 root mysql  4096 Apr 16 15:24 scripts

drwxr-xr-x. 28 root mysql  4096 Apr 16 15:24 share

drwxr-xr-x.  4 root mysql  4096 Apr 16 15:24 sql-bench

drwxr-xr-x.  2 root mysql  4096 Apr 16 15:24 support-files

[[email protected] mysql]# scripts/mysql_install_db  --user=mysql --datadir=/mydata/data

#初始化数据库,指定数据库用户--user=mysql,指定数据目录--datadir=/mydata/data

Installing MySQL system tables...2017-04-16 16:01:37 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2017-04-16 16:01:37 0 [Note] ./bin/mysqld (mysqld 5.6.30) starting as process 11891 ...

2017-04-16 16:01:37 11891 [Note] InnoDB: Using atomics to ref count buffer pool pages

2017-04-16 16:01:37 11891 [Note] InnoDB: The InnoDB memory heap is disabled

2017-04-16 16:01:37 11891 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

....................................

Filling help tables...2017-04-16 16:01:42 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2017-04-16 16:01:42 0 [Note] ./bin/mysqld (mysqld 5.6.30) starting as process 11913 ...

2017-04-16 16:01:42 11913 [Note] InnoDB: Using atomics to ref count buffer pool pages

2017-04-16 16:01:42 11913 [Note] InnoDB: The InnoDB memory heap is disabled

2017-04-16 16:01:42 11913 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2017-04-16 16:01:42 11913 [Note] InnoDB: Memory barrier is not used

2017-04-16 16:01:42 11913 [Note] InnoDB: Compressed tables use zlib 1.2.3

2017-04-16 16:01:42 11913 [Note] InnoDB: Using Linux native AIO

..........................................

WARNING: Default config file /etc/my.cnf exists on the system

This file will be read by default by the MySQL server

If you do not want to use this, either remove it, or use the

--defaults-file argument to mysqld_safe when starting the server  #初始化完成

[[email protected] mysql]# vim my.cnf #编辑配置文件,在文档最后增加如下红色框内容

[[email protected] mysql]# cp support-files/mysql.server /etc/init.d/mysqld

复制mysqld启动脚本至/etc/init.d路径中

[[email protected] mysql]# chkconfig --add mysqld

[[email protected] mysql]# chkconfig --list mysqld

mysqld         0:off1:off2:off3:off4:off5:off6:off

[[email protected] mysql]# chkconfig mysqld on

[[email protected] mysql]# chkconfig --list mysqld

mysqld         0:off1:off2:on3:on4:on5:on6:off

[[email protected] mysql]# service mysqld start  #启用mysqld服务

Starting MySQL....                             [  OK  ]

[[email protected] mysql]# netstat -tlnp  #查看监听的端口

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address    Foreign Address    State   PID/Program name

tcp   0   0 0.0.0.0:111    0.0.0.0:*       LISTEN      1369/rpcbind

tcp   0   0 0.0.0.0:80     0.0.0.0:*       LISTEN      7277/nginx.conf

tcp   0   0 0.0.0.0:59282   0.0.0.0:*       LISTEN      1436/rpc.statd

tcp   0   0 0.0.0.0:22     0.0.0.0:*       LISTEN      1659/sshd

tcp   0   0 127.0.0.1:631   0.0.0.0:*       LISTEN      1532/cupsd

tcp   0   0 127.0.0.1:25   0.0.0.0:*       LISTEN      1735/master

tcp   0   0 :::3306         :::*       LISTEN      12224/mysqld

tcp   0   0 :::111         :::*        LISTEN     1369/rpcbind

tcp   0   0 :::22         :::*         LISTEN      1659/sshd

tcp   0   0 ::1:631        :::*        LISTEN      1532/cupsd

tcp   0   0 :::35043       :::*         LISTEN      1436/rpc.statd

[[email protected] mysql]# /usr/local/mysql/bin/mysql  #启动mysql客户端

ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘ (2)  #提示mysql.sock出错,解决方法如下图,在配置文档中定义sock文件路径

[[email protected] mysql]# pwd

/usr/local/mysql

[[email protected] mysql]# vim my.cnf

[[email protected] mysql]# service mysqld restart

Shutting down MySQL..                                 [  OK  ]

Starting MySQL.                                     [  OK  ]

[[email protected] mysql]# /usr/local/mysql/bin/mysql #再次启动mysql客户端,正常开启。

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.6.30-log MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

mysql>

mysql> \q

[[email protected] ~]# vim /etc/ld.so.conf.d/mysql.conf #新建mysql库路径文件,使得系统能够识别到

/usr/local/mysql/lib       #新增该行内容

[[email protected] ~]# ldconfig -v   #通知系统重新读取库文件,-v显示重读过程

............

libxklavier.so.15 -> libxklavier.so.15.0.0

liblcms.so.1 -> liblcms.so.1.0.19

/lib64/tls: (hwcap: 0x8000000000000000)

/usr/lib64/sse2: (hwcap: 0x0000000004000000)

/usr/lib64/tls: (hwcap: 0x8000000000000000)

[[email protected] ~]# ln -sv /usr/local/mysql/include /usr/include/mysql #创建mysql的头文件目录链接,

使得可以直接输出头文件

"/usr/include/mysql" -> "/usr/local/mysql/include"

[[email protected] ~]# ls /usr/include/mysql/

decimal.h   my_attribute.h  my_global.h   mysqld_ername.h  my_sys.h

my_alloc.h  my_getopt.h     mysql_com.h   mysql_version.h  sql_common.h

------------------------------------------------------------------------------

至此MySQL已经安装配置完成。

首先下载安装PHP-5.4.13

[[email protected] mysql]# lftp [email protected]

Password:

lftp [email protected]:/> get php-5.4.13.tar.bz2

11545777 bytes transferred

lftp [email protected]:/> quit

[[email protected] ~]# ls

anaconda-ks.cfg  install.log  nginx-1.4.1  Templates

Desktop   install.log.syslog   php-5.4.13.tar.bz2  Videos

[[email protected] ~]# tar xf php-5.4.13.tar.bz2

[[email protected] ~]# cd php-5.4.13

[[email protected] php-5.4.13]# ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-openssl --enable-fpm --enable-sockets --enable-sysvshm --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-libxml-dir=/usr --enable-xml --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2 --with-curl

#编译php,指定php安装目录--prefix=/usr/local/php 关联mysql安装的目录--with-mysql=/usr/local/mysql等支持各种功能。

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for a sed that does not truncate output... /bin/sed

checking build system type... x86_64-unknown-linux-gnu

checking host system type... x86_64-unknown-linux-gnu

checking target system type... x86_64-unknown-linux-gnu

checking for cc... cc

.......................

+--------------------------------------------------------------------+

| License:                                                           |

| This software is subject to the PHP License, available in this     |

| distribution in the file LICENSE.  By continuing this installation |

| process, you are bound by the terms of this license agreement.     |

| If you do not agree with the terms of this license, you must abort |

| the installation process at this point.                            |

+--------------------------------------------------------------------+

Thank you for using PHP.

config.status: creating php5.spec

config.status: creating main/build-defs.h

config.status: creating scripts/phpize

config.status: creating scripts/man1/phpize.1

config.status: creating scripts/php-config

config.status: creating scripts/man1/php-config.1

config.status: creating sapi/cli/php.1

config.status: creating sapi/fpm/php-fpm.conf

config.status: creating sapi/fpm/init.d.php-fpm

config.status: creating sapi/fpm/php-fpm.service

config.status: creating sapi/fpm/php-fpm.8

config.status: creating sapi/fpm/status.html

config.status: creating main/php_config.h

config.status: executing default commands

[[email protected] php-5.4.13]# make && make install  #编译安装

Installing PHP CLI binary:        /usr/local/php/bin/

Installing PHP CLI man page:      /usr/local/php/php/man/man1/

Installing PHP FPM binary:        /usr/local/php/sbin/

Installing PHP FPM config:        /usr/local/php/etc/

Installing PHP FPM man page:      /usr/local/php/php/man/man8/

Installing PHP FPM status page:      /usr/local/php/php/fpm/

Installing PHP CGI binary:        /usr/local/php/bin/

Installing build environment:     /usr/local/php/lib/php/build/

Installing header files:          /usr/local/php/include/php/

Installing helper programs:       /usr/local/php/bin/

program: phpize

program: php-config

Installing man pages:             /usr/local/php/php/man/man1/

page: phpize.1

page: php-config.1

Installing PEAR environment:      /usr/local/php/lib/php/

[PEAR] Archive_Tar    - installed: 1.3.7

[PEAR] Console_Getopt - installed: 1.3.0

[PEAR] Structures_Graph- installed: 1.0.4

[PEAR] XML_Util       - installed: 1.2.1

[PEAR] PEAR           - installed: 1.9.4

Wrote PEAR system config file at: /usr/local/php/etc/pear.conf

You may want to add: /usr/local/php/lib/php to your php.ini include_path

/root/php-5.4.13/build/shtool install -c ext/phar/phar.phar /usr/local/php/bin

ln -s -f /usr/local/php/bin/phar.phar /usr/local/php/bin/phar

Installing PDO headers:          /usr/local/php/include/php/ext/pdo/

[[email protected] php-5.4.13]# cp php.ini-production /etc/php.ini #为php提供配置文件

[[email protected] php-5.4.13]# cd /usr/local/php/etc/

[[email protected] etc]# ls

pear.conf  php-fpm.conf.default

[[email protected] etc]# cp php-fpm.conf.default php-fpm.conf  #为php-fpm提供配置文件

[[email protected] etc]# vim php-fpm.conf  #编辑配置文件,修改内容如图:

[[email protected] etc]# cd -  #进入上一次所在目录

/root/php-5.4.13

[[email protected] php-5.4.13]# pwd

/root/php-5.4.13

[[email protected] php-5.4.13]# cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm  #复制启动脚本

至/etc/init.d路径下

[[email protected] php-5.4.13]# chmod +x /etc/init.d/php-fpm #给执行权限

[[email protected] php-5.4.13]# chkconfig --add php-fpm  #把服务添加至开机启动列表

[[email protected] php-5.4.13]# chkconfig --list php-fpm  #查看php-fpm服务是否开机自动启动

php-fpm         0:off 1:off 2:on 3:on 4:on 5:on 6:off

[[email protected] php-5.4.13]# service php-fpm start  #启动php-fpm服务

Starting php-fpm  done

[[email protected] php-5.4.13]# netstat -tlnp  #查看监听端口

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address   Foreign Address   State     PID/Program name

tcp   0    0 127.0.0.1:9000       0.0.0.0:*     LISTEN    23060/php-fpm.conf)

tcp   0    0 0.0.0.0:111         0.0.0.0:*     LISTEN    1369/rpcbind       tcp   0    0 0.0.0.0:80         0.0.0.0:*     LISTEN     7277/nginx.conf

tcp   0   0 0.0.0.0:59282        0.0.0.0:*     LISTEN      1436/rpc.statd

tcp   0   0 0.0.0.0:22          0.0.0.0:*     LISTEN      1659/sshd

tcp   0   0 :::3306             :::*       LISTEN      13345/mysqld

tcp   0   0 :::22              :::*       LISTEN      1659/sshd

[[email protected] php-5.4.13]# cd /etc/nginx

[[email protected] nginx]# ls

fastcgi.conf   koi-utf    nginx.conf    uwsgi_params

fastcgi.conf.default    koi-win    nginx.conf.default   uwsgi_params.default

fastcgi_params     mime.types     scgi_params      win-utf

fastcgi_params.default  mime.types.default  scgi_params.default

[[email protected] nginx]# ps aux  #查看系统进程,php-fpm是否一启动就开启了8个子进程

(php-fpm配置文档中设置一启动php-fpm进程就启动8个子进程)

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

postfix  23030  0.0  0.1  62052  2680 ? S    08:36   0:00 pickup -l -t fifo -u

root    23060  0.0  0.2 107460  4564 ? Ss   08:45   0:00 php-fpm: master process (/usr/local/php/e

nobody   23061  0.0  0.1 107460  3728 ?  S  08:45   0:00 php-fpm: pool www

nobody   23062  0.0  0.1 107460  3728 ?  S  08:45   0:00 php-fpm: pool www

nobody   23063  0.0  0.1 107460  3728 ?  S  08:45   0:00 php-fpm: pool www

nobody   23064  0.0  0.1 107460  3728 ?  S  08:45   0:00 php-fpm: pool www

nobody   23065  0.0  0.1 107460  3728 ?  S  08:45   0:00 php-fpm: pool www

nobody   23066  0.0  0.1 107460  3728 ?  S  08:45   0:00 php-fpm: pool www

nobody  23067  0.0  0.1 107460  3728 ?  S   08:45   0:00 php-fpm: pool www

nobody   23068  0.0  0.1 107460  3728 ?  S  08:45   0:00 php-fpm: pool www

[[email protected] nginx]# vim nginx.conf  #编辑nginx配置文件,启用php功能,如下图:

[[email protected] nginx]# vim fastcgi_params  #编辑fastcgi配置文档,删除该文档之前的内容

新增以下内容,保存并退出:

fastcgi_param   GATEWAY_INTERFACE     CGI/1.1;

fastcgi_param   SERVER_SOFTWARE      nginx;

fastcgi_param   QUERY_STRING        $query_string;

fastcgi_param   REQUEST_METHOD       $request_method;

fastcgi_param   CONTENT_TYPE        $content_type;

fastcgi_param   CONTENT_LENGTH       $content_length;

fastcgi_param   SCRIPT_FILENAME      $document_root$fastcgi_script_name;

fastcgi_param   SCRIPT_NAME         $fastcgi_script_name;

fastcgi_param   REQUEST_URI         $request_uri;

fastcgi_param   DOCUMENT_URI        $document_uri;

fastcgi_param   DOCUMENT_ROOT      $document_root;

fastcgi_param   SERVER_PROTOCOL      $server_protocol;

fastcgi_param   REMOTE_ADDR         $remote_addr;

fastcgi_param   REMOTE_PORT         $remote_port;

fastcgi_param   SERVER_ADDR         $server_addr;

fastcgi_param   SERVER_PORT         $server_port;

fastcgi_param   SERVER_NAME         $server_name;

[[email protected] nginx]# nginx -t  #检测nginx配置文档是否有语法错误

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

nginx: configuration file /etc/nginx/nginx.conf test is successful

[[email protected] nginx]# service nginx reload  #重新加载nginx服务

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

nginx: configuration file /etc/nginx/nginx.conf test is successful

Reloading nginx:                                [  OK  ]

[[email protected] nginx]# cd /usr/html

[[email protected] html]# ls

50x.html  index.html

[[email protected] html]# mv index.html index.back  #修改默认网页文件名称

[[email protected] html]# vim index.php  #新建.php网页文件,内容如下:

<?php

phpinfo();

?>

[[email protected] html]# vim /etc/nginx/nginx.conf #把index.php默认主页的格式加入到配置文档

在浏览器中输入IP访问测试如下:

必须给nginx安装xcache缓存加速

mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz下载地址:https://pan.baidu.com/s/1skJOITZ

php-5.4.13.tar.bz2下载地址:http://us3.php.net/distributions/php-5.4.13.tar.bz2

时间: 2024-11-08 16:44:26

Linux命令:nginx及php和mysql安装使用的相关文章

linux下nginx、php和mysql安装配置

一.安装nginx 安装nginx yum install -y epel-release yum install nginx -y 查看nginx软件包包括了哪些文件 rpm -ql nginx 启动nginx systemctl start nginx 查看nginx是否启动成功 systemctl status nginx 设置nginx开机自启动 systemctl enable nginx 查看nginx主配置 vim /etc/nginx/nginx.conf 新建一个站点 vim

【Linux 初学】Mongdb、数据库Mysql安装(四)

一.linux下mongdb的安装 1.下载安装包 wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.8.2.tgz 下载完成后解压缩压缩包 tar -zxvf mongodb-linux-i686-1.8.2.tgz 2. 安装准备 将mongodb移动到/usr/local/mongdb文件夹 mv  bin/mongodb-linux-i686-1.8.2/*  mongodb/ 创建数据库文件夹与日志文件(这里是logs文

Linux下Nginx、PHP、MySQL、Redis开机自启动设置

一.Nginx开机启动设置 1.在/etc/init.d/目录下创建脚本 vi /etc/init.d/nginx 2.更改脚本权限 chmod 775 /etc/init.d/nginx 3.编写脚本内容 #! /bin/shset -ePATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binDESC="nginx daemon"NAME=nginxDAEMON=/usr/local/nginx/sbin/$N

linux下 nginx、php-fpm、mysql 开始自启动

1.为每个分别编写shell脚本放入/etc/init.d下,添加service服务 mysql:前面一篇博客已经说明 php-fpm: #!/bin/sh # chkconfig: 2345 10 90 //这两句不写添加启动器失败 # description: php-fpm //这两句不写添加自启动失败 # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /

老男孩教育每日一题:2017年3月13日-如何防止Linux命令行或脚本里MySQL登录密码泄露?

不低于3种方法. 明知山有虎偏向虎山行的方案: 1.1.1 可以通过如下环境变量强制Linux不记录敏感历史命令 在命令行执行HISTCONTROL=ignorespace后,再输入带密码的命令的前面加一个空格登录,登录命令不会被记录到历史记录里. [[email protected]~]# HISTCONTROL=ignorespace #<==这里是临时生效,要想永久生效,请放入/etc/bashrc. [[email protected]~]#  mysql -uroot-p'oldboy

一起学ASP.NET Core 2.0学习笔记(一): CentOS下 .net core2 sdk nginx、supervisor、mysql环境搭建

作为.neter,看到.net core 2.0的正式发布,心里是有点小激动的,迫不及待的体验了一把,发现速度确实是快了很多,其中也遇到一些小问题,所以整理了一些学习笔记: 阅读目录 环境说明 安装CentOS7 安装.NET Core SDK for CentOS7 搭建ftp服务器 安装mysql 部署ASP.NET Core应用程序 配置Nginx 配置守护服务(Supervisor) 环境说明 服务器系统:CentOS 7.3 64位 相关工具:putty.Xftp 服务器软件软件:.n

linux下 php+nginx+mysql安装配置

我主要是用来安装php,以及nginx和php的交互.原文:http://www.cnblogs.com/lost-1987/articles/2642979.html 一 安装插件 可以选择YUM安装或者源码编译安装 gcc gcc-c++ zlib pcre pcre-devel libevent libevent-devel libxml2 libxml2-devel libmcrypt libmcrypt-devel curl-devel libpng-devel libtool-ltd

Linux命令:Mysql系列之二cmake编译安装使用mysqladmin管理工具

MySQL相关概念:MySQL是单进程多线程接收应用的请求. SQL/MySQL 1.事务,隔离,并发控制,锁 2.用户和权限 3.监控 STATUS 4.索引类型:查询 VARIABLES 5.备份和恢复 6.复制功能 7.集群 DML:数据操作语言 INSERT:插入 DELETE:删除 SELECT:挑选,选择,查询 UPDATE:更新,修改 DDL:数据定义语言 CREATE:创建 DROP:删除 ALTER:修改 DCL:数据控制语言 GRANT:授权 REVOKE:取消权限 MySQ

linux下nginx,mysql,php(lnmp)编译安装

关闭SELINUX vi /etc/selinux/config #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq!  #保存退出 setenforce 0 #使配置立即生效 mysql 5.5.28安装 安装路径:/usr/local/mysql数据库路径:/usr/local/mysql/data/ mysql从5.5版本开始,不再使用./configure编译,而是使用cmake编译器,具