Solaris修改主机名和ip

news/2024/5/19 16:04:25

 

目的:
 主机名称:cjh1 ,
     IP地址:192.168.1.2 ,
    子网掩码:255.255.255.0,
     默认路由:192.168.1.1。
    我们准备把它修改为:
     主机名称:suncjh ,
     IP地址:10.1.1.8 ,
     子网掩码:255.0.0.0,
     默认路由:10.0.0.0。

步骤:
 
1,首先必须获得管理员的权限或者是授权角色用户

2,进入etc目录下

3,使用vi或者是其他的编辑打开文件:/etc/nodename 将主机名修改cjh1->suncjh

4,编辑网络端口配置文件:hostname.eri0,将主机名称:cjh1->suncjh,同时修改ip

5,编辑/etc/inet/hosts,删除包括原主机名的一行,加入一行

 10.2.2.8 suncjh suncjh.deserts.worldwid.com
 其中deserts.world.com是主机的域名

6,在文件/etc/defaultdomain加入域名
 deserts.worldwide.com

7,编辑文件/etc/defaulttrouter
 192.168.1.1 ->10.0.0.0

8,修改子网掩码数据库文件/etc/inet/netmasks

 删除192.168.1.1 255.255.255.0
 添加10.0.0.0  255.0.0.0

9,重新引导,使用
 reboot -- -r

10,查看
 ifconfig -a

  一块网卡配置多个ip

 ifconfig e1000g0:1 plumb
 ifconfig e1000g0:1 ip/24 up
 
 编辑/etc/hosts /etc/hostname方式配置ip
 例如:
  127.0.0.1       localhost      
  192.168.0.21    my1  
  192.168.0.22 my2
 编辑/etc/hostname.e1000g0:1
 

 

修改主机名
 需要修改
  /etc/nodename,/etc/hostname,/etc/hosts,/etc/inet/ipnodes

 


http://www.niftyadmin.cn/n/2124333.html

相关文章

greenplum 5.7 + gpcheck

gpcheck 查看帮助 [gpadminnode1 bin]$ gpcheck --help COMMAND NAME: gpcheckVerifies and validates Greenplum Database platform settings.***************************************************** SYNOPSIS *****************************************************gpche…

CentOS7下安装JDK1.8详细过程

3. 解压安装JDK 键入命令 cd /usr 来到刚才的复制文件处,键入命令tar -zxvf java1.8 进行解压 解压效果如下 4. 配置JDK环境变量 键入命令 vim /etc/profile 修改配置文件,记得要在root权限下修改 输入i进入编辑状态,然后将光标移到最后一…

greenplum 5.7 + gpcheckcat

gpcheckcat 查看帮助 $ gpcheckcat -?Usage: gpcheckcat [<option>] [dbname]-?-B parallel: number of worker threads-g dir : generate SQL to rectify catalog corruption, put it in dir-p port : DB port number-P passwd : DB password-U uname : D…

数据库,Unix

Solaris安装Oracle需要安装的包是&#xff1a;SUNWi1cs&#xff0c; SUNWi15cs进入到/cdrom/solaris,.../Sorl./Product下 pkgadd -d . SUNWi1cs 内核参数&#xff1a; set shmsys:shminfo_shmmax4294967295set shmsys:shminfo_shmmni100set semsys:seminfo_semmni100set sem…

CentOS 7安装Elasticsearch 7.2

一 安装jdk elasticsearch7.2 要求JDK版本是jdk11 &#xff0c;我一不小心装JDK8,最后发现不装JDK也可以 。 elasticsearch7.2中包含JDK,只要做一些配置就可以 。详见下边 三 二、Elasticsearch安装配置 &#xff08;1&#xff09;Elasticsearch安装 Elasticsearch的下载…

iSCSI配置

openfiler的配置1&#xff0c;用户名是&#xff1a;openfiler 密码是&#xff1a;password 2&#xff0c;将openfiler用作iSCSI存储服务器&#xff0c;我们需要执行六个主要的任务&#xff1a;设置iSCSI的服务&#xff0c;配置网络访问&#xff0c;制定物理存储并对其分区&am…

fdw postgres_fdw

os:centos 6.8 db:postgresql 9.6 fdw&#xff1a;foreign data wrapper&#xff0c;postgresql的外部数据包装器。 postgres_fdw 是用于postgresql的数据库之间连接&#xff0c;原因是postgresql不能直接跨库访问&#xff0c;被设计用来替代dblink。 这么口语化的描述&#x…

elasticsearch启动常见问题

elasticsearch启动常见问题 原文&#xff1a;https://blog.csdn.net/qq_22211217/article/details/80740873 一、Exception in thread "main" SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: ElasticsearchParseException[malform…