当前位置: 首页 > wzjs >正文

房产律师网站模板seo怎么做关键词排名

房产律师网站模板,seo怎么做关键词排名,做网站美工的前途怎么样,山东德州网站建设哪家最专业任务需求:客户端通过访问 www.nihao.com 后,能够通过 dns 域名解析,访问到 nginx 服务中由 nfs 共享的首页文件,内容为:Very good, you have successfully set up the system. 各个主机能够实现时间同步,并…

任务需求:客户端通过访问 www.nihao.com 后,能够通过 dns 域名解析,访问到 nginx 服务中由 nfs 共享的首页文件,内容为:Very good, you have successfully set up the system. 各个主机能够实现时间同步,并且都开启防火墙来保证服务安装。

作用系统IP主机名软件
web 服务器redhat9.5192.168.121.8webnginx,nfs-utils
nfs 服务器redhat9.5192.168.121.9nfsnfs-utils
DNS 主服务器redhat9.5192.168.121.18dns1bind
DNS 从服务器redhat9.5192.168.121.28dns2bind
客户端redhat9.5192.168.121.7clientbind-utils

1.环境准备

web

[root@localhost ~]# hostnamectl hostname web
[root@localhost ~]# nmcli c modify ens160 ipv4.method manual ipv4.addresses 192.168.121.8/24 ipv4.gateway 192.168.121.2 ipv4.dns 223.5.5.5 connection.autoconnect yes
[root@localhost ~]# nmcli c up ens160

nfs

[root@localhost ~]# hostnamectl hostname nfs
[root@localhost ~]# nmcli c modify ens160 ipv4.method manual ipv4.addresses 192.168.121.9/24 ipv4.gateway 192.168.121.2 ipv4.dns 223.5.5.5 connection.autoconnect yes
[root@localhost ~]# nmcli c up ens160

dns1

[root@localhost ~]# hostnamectl hostname dns1
[root@localhost ~]# nmcli c modify ens160 ipv4.method manual ipv4.addresses 192.168.121.18/24 ipv4.gateway 192.168.121.2 ipv4.dns 223.5.5.5 connection.autoconnect yes
[root@localhost ~]# nmcli c up ens160

dns2

[root@localhost ~]# hostnamectl hostname dns2
[root@localhost ~]# nmcli c modify ens160 ipv4.method manual ipv4.addresses 192.168.121.28/24 ipv4.gateway 192.168.121.2 ipv4.dns 223.5.5.5 connection.autoconnect yes
[root@localhost ~]# nmcli c up ens160

client

[root@localhost ~]# hostnamectl hostname client
[root@localhost ~]# nmcli c modify ens160 ipv4.method manual ipv4.addresses 192.168.121.7/24 ipv4.gateway 192.168.121.2 ipv4.dns "192.168.121.18 192.168.121.28" connection.autoconnect yes
[root@localhost ~]# nmcli c up ens160

关闭几台服务器的selinux:

sed -i 's/SELINUX=enforcing/SELINUX=Permissive/g' /etc/selinux/config
 setenforce 0

2.时间同步

安装chrony

dnf install chrony -y

启动并设置开机自启动
systemctl start chronyd
systemctl enable chronyd
 

3.NFS服务器配置

3.1安装NFS服务(192.168.121.9,主机名:nfs)

[root@nfs ~]# dnf install nfs-utils -y

3.2创建共享文件夹并设置权限

[root@nfs ~]# mkdir /nfs/data -p
[root@nfs ~]# cat > /etc/exports <<EOF
> /nfs/data 192.168.121.0/24(rw,sync)
> EOF

3.3创建首页文件

[root@nfs ~]# echo Very good, you have successfully set up the system. > /nfs/data/index.html

3.4启动NFS服务并放开防火墙端口 

[root@nfs ~]# systemctl start nfs-server
[root@nfs ~]# systemctl enabel nfs-server

[root@nfs ~]# firewall-cmd --permanent --add-service=nfs
[root@nfs ~]# firewall-cmd --reload

4.Web服务器配置 (192.168.121.8,主机名:web)

4.1安装nginx和NFS客户端

[root@web ~]# dnf install nginx -y
[root@web ~]# dnf install nfs-utils -y

4.2挂载NFS共享

[root@web ~]# mkdir -p /usr/share/nginx/html
[root@web ~]# mount 192.168.121.9:/nfs/data /usr/share/nginx/html

4.3配置nginx 

[root@web ~]# cat /etc/nginx/nginx.conf

    server {
        listen       80;
        listen       [::]:80;
        server_name  _;
        root         /usr/share/nginx/html;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        error_page 404 /404.html;
        location = /404.html {
        }

4.4启动nginx并开放防火墙端口

[root@web ~]# systemctl start nginx
[root@web ~]# systemctl enable nginx
[root@web ~]# firewall-cmd --permanent --add-serverice=http
[root@web ~]# firewall-cmd --reload

5.DNS主服务器配置(192.168.121.18,主机名:dns1) 

5.1安装bind

[root@dns1 ~]# dnf install bind -y

5.2配置主配置文件

[root@dns1 ~]# vi /etc/named.conf 

options {
        listen-on port 53 { 192.168.121.18; };
        directory       "/var/named";
};

zone "nihao.com" IN{
        type master;
        file "nihao.com";
}

5.3创建区域文件 

[root@dns1 ~]# vi /var/named/nihao.com 

$TTL    1D
@       IN      SOA     @       admin.nihao.com.(
                                                0
                                                1D
                                                2H
                                                3W
                                                2D
                                                )
@       IN      NS      dns1.nihao.com.
@       IN      NS      dns2.nihao.com.
www     IN      A       192.168.121.8

5.4启动bind并放通防火墙端口

[root@dns1 ~]# systemctl start named
[root@dns1 ~]# systemctl enable named
[root@dns1 ~]# firewall-cmd --permanent --add-service=dns
[root@dns1 ~]# firewall-cmd --reload

6 DNS从服务器配置(192.168.121.28,主机名:dns2)

6.1安装Bind

[root@dns2~]# dnf install bind -y

6.2配置主配置文件

[root@dns2 ~]# vi /etc/named.conf 

options {
        listen-on port 53 { 192.168.121.28; };
        directory       "/var/named";
};

zone "nihao.com" IN{
        type slave;
        file "slaves/nihao.com";

        master {192.168.121.28; };
}

6.3启动Bind并开放防火墙端口

[root@dns2 ~]# systemctl start named
[root@dns2 ~]# systemctl enable named
[root@dns2 ~]# firewall-cmd --permanent --add-service=dns
[root@dns2 ~]# firewall-cmd --reload

7.客户端配置(192.168.121.7,主机名:client) 

7.1安装bind工具

[root@client~]# dnf install bind -y

7.2查看DNS

[root@client ~]# cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 192.168.121.18
nameserver 192.168.121.28

7.3测试访问

[root@client ~]# curl http://www.nihao.com
Very good, you have successfully set up the system.

配置完成

 

http://www.dtcms.com/wzjs/383797.html

相关文章:

  • 建立主题网站的一般步骤企业营销策划有限公司
  • 网站开发分销系统海外黄冈网站推广
  • 国内做五金加工的订单网站seo优化网站的注意事项
  • 猪八戒网做网站被骗近期出现的病毒叫什么
  • 中国纪检监察报手机版免费测试seo
  • 武汉公司网站建设app开发公司哪家好
  • 网站功能框架今日头条新闻消息
  • 苏州园区网站建设公司上海今天刚刚发生的新闻
  • 如何在已建设好的网站做修改网站优化推广方法
  • 电商网站的费用怎么做帐软文广告平台
  • 道滘仿做网站百度指数怎么用
  • 福建远方建设有限公司网站今日军事新闻头条最新
  • 合肥建设云app重庆seo标准
  • 域名被锁定网站打不开百度云
  • 网站特效代码上那找好百度推广官网登录
  • 网站图片等比缩小沙洋县seo优化排名价格
  • 合肥建站优化怎么免费注册域名
  • 网站的销售怎么做app拉新推广平台渠道商
  • 中信建设有限责任公司陈晓佳简历厦门谷歌seo公司有哪些
  • 网站续费协议seo关键词优化技巧
  • 做游戏网站的目地武汉百度网站优化公司
  • 加强政府网站建设的通知seo资料
  • 网站开发维护花费腾讯企点官网下载
  • 有关网站排名的论文网页设计作品集
  • 万网站建设优化教程网
  • 网站开发哪家公司好网站软文代写
  • 自贡建设能源开发有限公司网站站长统计代码
  • 哪个视频网站做视频赚钱seo怎么发文章 seo发布工具
  • 郑州网站设计见效快seo权重是什么意思
  • 淮安市哪里可以做网站如何用html制作一个网页