Nginx优化和防盗链一、在Centos01上安装Nginx,设置根目录/www/使用域名www.stz.con访问1、在Centos01上安装Nginx依赖程序1)挂载系统光盘配置本地yum仓库[root@centos01~]#mount/dev/cdrom/mnt/mount:/dev/sr0写保护,将以只读方式挂载[root@centos01~]#rm-rf/etc/yum.repos.d/CentOS-*[root@centos01~]#ls/etc/yum.repos.d/local.repo2)安装依赖程序[root@centos01~]#yum-yinstallpcre
一、在Centos01安装Nginx服务,配置网站主页,使用www.szt.com访问Nginx1、在Centos01上安装Nginx依赖1)挂载光盘配置本地yum仓库[root@centos01~]#mount/dev/cdrom/mnt/mount:/dev/sr0写保护,将以只读方式挂载[root@centos01~]#rm-rf/etc/yum.repos.d/CentOS-*2)安装依赖[root@centos01~]#yum-yinstallpcre-develzlib-devel3)创建管理Nginx用户[root@centos01~]#useradd-M-s/sbin/nolo
Nginx优化和防盗链一、在Centos01上安装Nginx,设置根目录/www/使用域名www.stz.con访问1、在Centos01上安装Nginx依赖程序1)挂载系统光盘配置本地yum仓库[root@centos01~]#mount/dev/cdrom/mnt/mount:/dev/sr0写保护,将以只读方式挂载[root@centos01~]#rm-rf/etc/yum.repos.d/CentOS-*[root@centos01~]#ls/etc/yum.repos.d/local.repo2)安装依赖程序[root@centos01~]#yum-yinstallpcre
一、在Centos01安装Nginx服务,配置网站主页,使用www.szt.com访问Nginx1、在Centos01上安装Nginx依赖1)挂载光盘配置本地yum仓库[root@centos01~]#mount/dev/cdrom/mnt/mount:/dev/sr0写保护,将以只读方式挂载[root@centos01~]#rm-rf/etc/yum.repos.d/CentOS-*2)安装依赖[root@centos01~]#yum-yinstallpcre-develzlib-devel3)创建管理Nginx用户[root@centos01~]#useradd-M-s/sbin/nolo