温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

FreeBSD常用操作有哪些

发布时间:2022-02-18 17:23:49 来源:亿速云 阅读:123 作者:iii 栏目:开发技术

这篇“FreeBSD常用操作有哪些”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“FreeBSD常用操作有哪些”文章吧。

FreeBSD常用操作有哪些

1. 网络

重启网络的命令:

/etc/rc.d/netif restart , /etc/netstart restart

网络配置文件:

root@mhxy-compile02:~ # cat /etc/rc.confifconfig_em0="DHCP"sshd_enable="NO"ntpd_enable="YES"# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disabledumpdev="AUTO"zfs_enable="YES"puppet_enable="YES"ipv6_enable="NO"hostname="mhxy-compile02.i.nease.net"nfs_client_enable="YES"rpc_lockd_enable="YES"rpc_statd_enable="YES"

2. SSH

命令:

/etc/rc.d/sshd start , /etc/rc.d/sshd restart

SSH配置文件:

root@mhxy-compile02:~ # cat /etc/ssh/sshd_config# THIS FILE IS AUTOMATICALLY GENERATED BY PUPPET.# DO NOT EDIT THIS FILE.# 1. BasicPort 32200
Protocol 2# 2. AuthenticationHostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key

KeyRegenerationInterval 3600
ServerKeyBits 768
UsePrivilegeSeparation yes
LoginGraceTime 120

PermitRootLogin no
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication no

IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no# 3. FeaturesUseDNS no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*# 4. LoggingSyslogFacility AUTH
LogLevel INFO# 5. x509Subsystem sftp /usr/libexec/sftp-server#CACertificateFile /etc/ssh/ca/ca.cer

3. 防火墙

1)停止ipfw防火墙:
ipfw disable firewall  
/etc/rc.d/ipfw stop

2)开启ipfw防火墙:

ipfw enable firewall  
/etc/rc.d/ipfw start

3)清防火墙
ipf -Fa

4.赋予用户root权限

1)pw groupmod wheel -m
2)pw user mod  -g wheel

5.查看CPU和内存

1)sysctl kern.smp.cpus或dmesg |grep cpu  #查看CPU个数2)dmesg|more或top   #查看内存

以上就是关于“FreeBSD常用操作有哪些”这篇文章的内容,相信大家都有了一定的了解,希望小编分享的内容对大家有帮助,若想了解更多相关的知识内容,请关注亿速云行业资讯频道。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI