[[email protected] ~]# yum -y install mysql-server mysql
..........................
[[email protected] ~]# rpm -q mysql-server (查看是否安装和版本号)
[[email protected] ~]# yum list |grep mysql-server
mysql-server.x86_64 5.1.73-5.el6_6 @abc
[[email protected] ~]# service mysqld start
初始化 MySQL 数据库: WARNING: The host ‘host.tedu.cn‘ could not be looked up with resolveip.
[[email protected] ~]# service mysqld status
mysqld (pid 21119) 正在运行...
[[email protected] ~]# chkconfig mysqld on
[[email protected] ~]# chkconfig --list mysqld
mysqld 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
[[email protected] ~]# 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
[[email protected] ~]# netstat -anptu |grep :80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 5198/nginx