FreeBSD

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
第61行: 第61行:
 
  PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
 
  PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
 
  export JAVA_HOME ANT_HOME PATH
 
  export JAVA_HOME ANT_HOME PATH
 +
==GlassFish==
 +
./asadmin start-domain domain1
 +
/libexec/ld-elf.so.1: /usr/local/diablo-jdk1.6.0/jre/lib/i386/libnet.so: Undefined symbol "gethostbyname_r"
 +
 
==BSD发行版==
 
==BSD发行版==
 
*FreeBSD : The Power To Server http://www.freebsd.org
 
*FreeBSD : The Power To Server http://www.freebsd.org

2009年2月15日 (日) 01:05的版本

Freebsd.png

目录

常用命令

/usr/sbin/sysinstall

install rsync

fetch ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.1-release/Latest/rsync.tbz
#pkg_add rsync.tbz
#pkg_add -r rsync
#pkg_info rsync-2.6.6
#pkg_delete rsync-2.6.6
or
cd /usr/ports/net/rsync
#make
#make install
Freebsd-server.png

Network Interface

  • dc0: The first Ethernet interface
  • dc1: The second Ethernet interface
  • lp0: The parallel port interface
  • lo0: The loopback device
  • tun0: The tunnel device used by ppp

IP FireWall

Step1:准备工作

#cd /sys/i386/conf
#cp GENERIC ./kernel_IPFW

Step2:内核规则

vim kernel_IPFW 在该文件的末尾加入以下四行内容:
options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=10
options IPFIREWALL_DEFAULT_TO_ACCEPT

Step3:编译系统内核

#/usr/sbin/config kernel_IPFW
#cd ../compile/kernel_IPFW
#make
#make install

Step4:加载启动项

编辑/etc/rc.conf, 加入
firewall_enable=`YES`
firewall_script=`/etc/rc.firewall`
firewall_type=`/etc/ipfw.conf`
firewall_quiet=`NO`
firewall_logging_enable=`YES`
编辑/etc/syslog.conf文件, 加入
!ipfw*.* /var/log/ipfw.log

以上步骤完成后重启电脑

#ipfw show
#ipfw add 10001 deny all from 218.249.20.135 to any 或保存再/etc/rc.firewall文件里
sh /etc/rc.firewall

参考: 小规模DDoS(拒绝服务)用Freebsd+IPFW搞定 http://bbs.51cto.com/archiver/tid-5376.html

sftp-server

/usr/libexec/sftp-server

Java

cd /usr/ports/java/jdk15

make install clean

or get Java JDK and JRE 6.0 binaries for FreeBSD 6.x and FreeBSD 7.x on the i386 and amd64 architectures from

http://www.freebsdfoundation.org/downloads/java.shtml
vi .cshrc
JAVA_HOME=/usr/local/diablo-jdk1.6.0
ANT_HOME=/usr/local/apache-ant-1.7.1
PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
export JAVA_HOME ANT_HOME PATH

GlassFish

./asadmin start-domain domain1
/libexec/ld-elf.so.1: /usr/local/diablo-jdk1.6.0/jre/lib/i386/libnet.so: Undefined symbol "gethostbyname_r"

BSD发行版

安装指南

Storage

相关链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱