#安装nginx,因为我本地有nginx的rpm包,所以直接安装的是本地的包
[iyunv@localhost ~]# ls
anaconda-ks.cfg Documents f1 ha issue.out Music nginx-1.10.0-1.el7.ngx.x86_64.rpm out phone Public s1 Templates Videos
Desktop Downloads g1 haha mail mysh.sh num passwd Pictures qq shenfen test
[iyunv@localhost ~]# yum install ./nginx-1.10.0-1.el7.ngx.x86_64.rpm
Loaded plugins: fastestmirror, langpacks
Examining ./nginx-1.10.0-1.el7.ngx.x86_64.rpm: 1:nginx-1.10.0-1.el7.ngx.x86_64
./nginx-1.10.0-1.el7.ngx.x86_64.rpm: does not update installed package.
Error: Nothing to do
#配置主页信息
[iyunv@localhost ~]# rm /usr/share/nginx/html/index.html
rm: remove regular file ‘/usr/share/nginx/html/index.html’? y
[iyunv@localhost ~]# vim /usr/share/nginx/html/index.html
#yum安装httpd和php
[iyunv@localhost ~]# yum install httpd php
Loaded plugins: fastestmirror, langpacks
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
base | 3.6 kB 00:00:00
Determining fastest mirrors
Package httpd-2.4.6-40.el7.centos.x86_64 already installed and latest version
Package php-5.4.16-36.el7_1.x86_64 already installed and latest version
Nothing to do
#提供php测试页
[iyunv@localhost ~]# vim /var/www/html/index.php