温馨提示×

温馨提示×

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

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

FreeBSD中的常用操作有哪些

发布时间:2022-02-19 10:13:19 来源:亿速云 阅读:119 作者:小新 栏目:开发技术

这篇文章主要为大家展示了“FreeBSD中的常用操作有哪些”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“FreeBSD中的常用操作有哪些”这篇文章吧。

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