首页 文章 精选 留言 我的

精选列表

搜索[Linux版本],共10028篇文章
优秀的个人博客,低调大师

linux网络管理

一.IP 基础知识 ipv4 IP地址长度为二进制32位,4个一组,以10进制数表示 172.25.0.10(IP地址)/255.255.255.0(子网掩码) 子网掩码限制了网络的范围,255对应的IP位是网络位,0对应的IP位是主机位 二.配置IP 1.图形界面修改nm-connection-editor 修改后的ip地址 2.文本化图形修改nmtui 3.命令修改 nmcli connection add type ethern etcon-name 名称 ifname eth0 autoconnect yes 添加动态网络 nmcli connection add type ethernet con-name 名称 ifname eth0 ip4 ip/24 添加静态网络 nmcli connection delete westos 删除westos链接 nmcli connection show 显示所有网络链接 nmcli connection down westos 关闭指定链接 nmcli connection up westos 开启指定链接 nmcli connection modify "westos" ipv4.addresses newip/24 改变wetos的ip nmcli connection modify "westos" ipv4.method <auto|manual> 改变westos的工作方式为动态或者静态 nmcli device connect eth0 开启设备 nmcli device disconnect eth0 关闭设备 nmcli device show 显示设备信息 nmcli device status 显示设备状态 4.修改配置文件 vim /etc/sysconfig/network-scripts/ifcfg-名称 dhcp 动态获取 static|none 静态网络 增加网关和DNS gateway 网关 1.路由器 主要功能是用来作nat的 dnat 目的地地址转换 snat 源地址转换 2.网关 路由器上和自己处在同一个网段的那个ip 3.设定网关 systemctl stop NetwrokManager vim /etc/sysconfig/network 全局网关 GATEWAY=网关ip vim /etc/sysconfig/network-scripts/ifcfg-网卡配置文件 网卡接口网关 GATEWAY=网关ip systemctl restart netwrok route -n 查询网关 Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 (网关)172.25.0.254 0.0.0.0 UG 0 0 0 eth0 172.25.0.0 0.0.0.0 255.255.255.0 U 0 0 dns 1.dns dns是一台服务器 这台服务器提供了回答客户主机名和ip对应关系的功能 2.设定dns vim /etc/resolv.conf nameserver dns服务器ip vim /etc/sysconfig/network-scripts/ifcfg-网卡配置文件 DNS1=dns服务器ip 3.本地解析文件 vim /etc/hosts ip 主机名称 4.本地解析文件和dns读取的优先级调整 /etc/nsswitch.conf 38 #hosts: db files nisplus nis dns 39 hosts: files dns files代表本地解析文件,dns代表dns服务器,那个在前面那个优先

优秀的个人博客,低调大师

linux命令:chgrp

chgrp命令简介: 改变文件属组的命令(该命令只有管理员可以使用) 1.命令格式: chgrp GROUPNAME files 2.命令功能: 用于更改文件夹属组的命令 3.命令参数: -R: 修改目录及其内部文件和子目录的属组(递归修改) --reference=/path/to/somefile file,... 把file文件的属组和属主属组同时改成 /path/to/somefile文件一样,多个文件用逗号隔开。 eg: #chgrp --reference=/etc/passwd /etc/test/100.sh,/etc/test/200.sh 把100.sh和200.sh两个文件的属主属组都改成跟/etc/passwd文件属主属组一致。 4.命令实例: 1、chgrp donggen 100.sh 把100.sh文件的属组变更为donggen [root@xuelinux test]# ls -l -rwxr-xr-x. 1 root root 273 9月 14 19:49 100.sh 变更前属组为root [root@xuelinux test]# chgrp donggen 100.sh [root@xuelinux test]# ls -l -rwxr-xr-x. 1 root donggen 273 9月 14 19:49 100.sh 此文件属组已更改为donggen 2、chgrp donggen /test1 把test1组的属组变更为donggen [root@xuelinux /]# ls -ld /test1 drwxr-xr-x. 2 root root 4096 10月 12 16:36 /test1 变更前属组为root [root@xuelinux /]# chgrp donggen /test1 [root@xuelinux /]# ls -ld /test1 drwxr-xr-x. 2 root donggen 4096 10月 12 16:36 /test1 变更后此目录的属组已更改为donggen 3、chgrp -R donggen /test 把test组及其内部的子目录和文件的属组都修改 [root@xuelinux /]# ls -ld /test drwxr-xr-x. 2 root root 4096 10月 11 09:21 /test 更改前属组为root [root@xuelinux /]# ls -l /test -rwxr-xr-x. 1 root root 273 9月 14 19:49 100.sh 更改前属组为root -rwxr-xr-x. 1 root root 252 9月 14 18:58 hadoop.sh 更改前属组为root -rwxr-xr-x. 1 root root 455 8月 25 18:42 myar.sh 更改前属组为root [root@xuelinux /]# chgrp -R donggen /test [root@xuelinux /]# ls -ld /test drwxr-xr-x. 2rootdonggen4096 10月 11 09:21 /test test目录属组已更改为donggen [root@xuelinux /]# ls -l /test -rwxr-xr-x. 1rootdonggen273 9月 14 19:49 100.sh test目录下的文件属组也改为donggen -rwxr-xr-x. 1rootdonggen252 9月 14 18:58 hadoop.sh test目录下的文件属组也改为donggen -rwxr-xr-x. 1rootdonggen455 8月 25 18:42 myar.sh test目录下的文件属组也改为 本文转自wang650108151CTO博客,原文链接:http://blog.51cto.com/woyaoxuelinux/1861701,如需转载请自行联系原作者

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册
修改密码
忘记密码