Linux安装rocks集群怎样设置gateway,DNS nameserver等

Linux安装rocks集群怎样设置gateway,DNS nameserver等,第1张

可以手动设置你的ip地址和dns服务器地址,当然也可以使用dhcp自动分配

手动设置ip地址的方法,最简单的当然是输入setup命令进行设置。

第一个解决方法,打开你的Windows系统,查看你的DNS服务器地址设置的是什么,然后进入Linux,输入vi

/etc/resolv.conf,在这个文件里面添加nameserver

<ip_address>

其中<ip_address>为DNS服务器的地址

第二个解决方法,在你的系统上安装DNS服务器。具体方法么就是在你的Linux系统上安装bind,bind-utils,bind-chroot,caching-nameserver这几个软件包(这些软件包在iso安装镜像中都有),安装完后,输入命令/etc/init.d/named

startchkconfig

named

on,然后vi

/etc/resolv.conf,在这个文件里面添加nameserver

127.0.0.1,保存退出就可以了~

如果 a主机 想 ping 通 外网 ,但是没有相应的 route ,那么可以借用 b主机 的 route ,如果 a主机 能 ping 通 b主机 的某个 ip ,那么就能借用 b主机 的 route ,这个 ip 就是 a主机 上的 网关 。(存疑)

网关就相当于路由表,只不过是借用其他主机的路由表

http://blog.csdn.net/hansel/article/details/1785342

试下重新配置网络,也可以看下浏览器的安全设置,还可以直接使用yum/apt安装nginx,以下是官网的安装步骤:

RHEL/CentOS

Install the prerequisites:

sudo yum install yum-utils

To set up the yum repository, create the file named /etc/yum.repos.d/nginx.repo with the following contents:

[nginx-stable]

name=nginx stable repo

baseurl=http://nginx.org/packages/centos/$releasever/$basearch/

gpgcheck=1

enabled=1

gpgkey=https://nginx.org/keys/nginx_signing.key

module_hotfixes=true

[nginx-mainline]

name=nginx mainline repo

baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/

gpgcheck=1

enabled=0

gpgkey=https://nginx.org/keys/nginx_signing.key

module_hotfixes=true

By default, the repository for stable nginx packages is used. If you would like to use mainline nginx packages, run the following command:

sudo yum-config-manager --enable nginx-mainline

To install nginx, run the following command:

sudo yum install nginx

When prompted to accept the GPG key, verify that the fingerprint matches 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62, and if so, accept it.

Debian

Install the prerequisites:

sudo apt install curl gnupg2 ca-certificates lsb-release

To set up the apt repository for stable nginx packages, run the following command:

echo "deb http://nginx.org/packages/debian `lsb_release -cs` nginx" \

| sudo tee /etc/apt/sources.list.d/nginx.list

If you would like to use mainline nginx packages, run the following command instead:

echo "deb http://nginx.org/packages/mainline/debian `lsb_release -cs` nginx" \

| sudo tee /etc/apt/sources.list.d/nginx.list

Next, import an official nginx signing key so apt could verify the packages authenticity:

curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -

Verify that you now have the proper key:

sudo apt-key fingerprint ABF5BD827BD9BF62

The output should contain the full fingerprint 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62 as follows:

pub rsa2048 2011-08-19 [SC] [expires: 2024-06-14]

573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62

uid [ unknown] nginx signing key <signing-key@nginx.com>

To install nginx, run the following commands:

sudo apt update

sudo apt install nginx

Ubuntu

Install the prerequisites:

sudo apt install curl gnupg2 ca-certificates lsb-release

To set up the apt repository for stable nginx packages, run the following command:

echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \

| sudo tee /etc/apt/sources.list.d/nginx.list

If you would like to use mainline nginx packages, run the following command instead:

echo "deb http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \

| sudo tee /etc/apt/sources.list.d/nginx.list

Next, import an official nginx signing key so apt could verify the packages authenticity:

curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -

Verify that you now have the proper key:

sudo apt-key fingerprint ABF5BD827BD9BF62

The output should contain the full fingerprint 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62 as follows:

pub rsa2048 2011-08-19 [SC] [expires: 2024-06-14]

573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62

uid [ unknown] nginx signing key <signing-key@nginx.com>

To install nginx, run the following commands:

sudo apt update

sudo apt install nginx


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/7340449.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-04
下一篇 2023-04-04

发表评论

登录后才能评论

评论列表(0条)

保存