Home - bestliutao/freebsd GitHub Wiki

、安装时选择上SSH,或者源码安装SSH 2、使用root登陆系统 3、使用ee编辑器编辑/etc/inetd.conf,去掉ssh前的#,按ctrl+c,再输入exit保存退出 4、编辑/etc/rc.conf,添加一行sshd_enable="YES" 5、编辑/etc/ssh/sshd_config,将 #PermitRootLogin no改为PermitRootLogin yes //允许root登陆 #PasswordAuthentication no改为PasswordAuthenticationyes//使用系统PAM认证 #PermitEmptyPasswords no改为PermitEmptyPasswords no//不允许空密码

修改端口号:/etc/ssh/sshd_config

#port=22改为 Port=number(你想修改的数字)

保存退出 6、启动SSHD服务,/etc/rc.d/sshd start 7、查看服务是否启动,netstat -an,如果看到22端口有监听,恭喜!!!

PKG cd /usr/ports/ports-mgmt/pkg make make install clean webmin 用户名 密码都是admin

https://ywnz.com/linuxjc/4453.html

                              三换源

修改 pkg 源 mkdir -p /usr/local/etc/pkg/repos vim /usr/local/etc/pkg/repos/FreeBSD.conf

content of FreeBSD.conf

FreeBSD: { url: "pkg+http://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/quarterly", #中科大源,快,推荐;latest表示软件最新版;如latest换成quarterly表示软件稳定版; } 禁用系统级 pkg 源(推荐): mv /etc/pkg/FreeBSD.conf /etc/pkg/FreeBSD.conf.back 然后运行 pkg update -f 更新索引以生效。

#完成后,可以pkg install axel试试效果

修改 ports 源 vim /etc/make.conf

content of make.conf

FETCH_CMD=axel -n 10 -a DISABLE_SIZE=yes MASTER_SITE_OVERRIDE?=http://mirrors.ustc.edu.cn/freebsd-ports/distfiles/${DIST_SUBDIR}/ 修改 portsnap 源 vim /etc/portsnap.conf

content of porsnap.conf

SERVERNAME=porsnap.hshh.org

安装PHP

pkg install -y expect proftpd nginx-full bash php74 php74-bz2 php74-calendar php74-curl php74-dba php74-exif php74-gd php74-gettext php74-hash php74-iconv php74-imap php74-json php74-mbstring php74-mysqli php74-odbc php74-opcache php74-openssl php74-pspell php74-readline php74-session php74-sockets php74-sqlite3 php74-tidy php74-xml php74-xmlrpc php74-xsl php74-zip php74-zlib php74-filter

pkg install bpytop 和thefuck