首页 > 代码库 > 装mysql + nginx

装mysql + nginx

                 

[root@host ~]# yum -y install mysql-server mysql

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

[root@host ~]# rpm -q mysql-server  (查看是否安装和版本号)


[root@host ~]# yum list |grep mysql-server 

mysql-server.x86_64                    5.1.73-5.el6_6                    @abc  

[root@host ~]# service  mysqld start  

初始化 MySQL 数据库: WARNING: The host ‘host.tedu.cn‘ could not be looked up with resolveip.


[root@host ~]# service mysqld status

mysqld (pid  21119) 正在运行...

[root@host ~]# chkconfig mysqld on

[root@host ~]# chkconfig --list  mysqld 

mysqld          0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭


[root@host ~]# grep mysql /etc/passwd 

mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash


(自己连:)mysql -hlocalhost  -uroot -p (本机登也可 mysql)






wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm



yum install nginx-release-centos-6-0.el6.ngx.noarch.rpm


yum install nginx

nginx 

[root@localhost ~]# netstat -anptu |grep :80 

tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      5198/nginx     


本文出自 “12336621” 博客,请务必保留此出处http://12346621.blog.51cto.com/12336621/1917149

装mysql + nginx