1、yum出错
[root@wt--1 ~]# yum install -y nginx
Loaded plugins: fastestmirror, langpacks
解决:更新yum源
[root@wt--1 yum.repos.d]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
[root@wt--1 yum.repos.d]# yum clean all
[root@wt--1 yum.repos.d]# yum makecache
2、配置localhost,www.heza.com访问同一个目录,只有localhost访问成功
情况如下:
[root@two conf.d]# curl localhost
trytry
[root@two conf.d]# curl www.heza.com
[root@two conf.d]#
解决:
[root@two conf.d]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.221.135 www.heza.com
重新访问ok:
[root@two conf.d]# curl www.heza.com
trytry
3、切换用户错误
[root@www conf]# su nginx
This account is currently not available.
解决:
[root@www conf]# usermod -s /bin/bash nginx
[root@www conf]# su - nginx
Last login: Thu Jan 18 02:45:49 EST 2018 on pts/0
-bash-4.2$ exit
logout
[root@www conf]# su nginx
bash-4.2$ exit
exit
[root@www conf]#