FreeBSD的一些服务器端配置

# 挂载光驱
$mount - tcd9660 / dev / acd0 / cdrom


# 网络设置
#
######################
设置ip:ee / etc / rc . conf在里面添加以下格式的内容
# 网关
defaultrouter = " 192.168.1.1 "
gateway_enable
= " YES "
# 主机名
hostname = " servername "
# IP和子网掩码
ifconfig_lnc0 = " inet192.168.1.70netmask255.255.255.0 "
# 是否支持超级守护进程
inetd_enable = " YES "
# 当前内核等级设置,2=非常安全
kern_securelevel = " 2 "
kern_securelevel_enable
= " YES "
# 是否支持nfs
nfs_server_enable = " NO "
# 是否支持sendmail
sendmail_enable = " none "
# 是否支持ssh
sshd_enable = " NO "
# 是否支持usb
usbd_enable = " YES "
# ######################
#
设置dns/etc/resolv.conf
nameserver 202.103 . 44.150
# 修改完网络设置后,可以用sh/etc/netstart启动网络
#
######################


# 设置环境变量
#
######################
/ etc / rc . conf里的设置
exportJAVA_HOME
= " /usr/local/diablo-jdk1.5.0 "
exportCATALINA_HOME
=/ usr / local / tomcat5 . 5
exportCLASSPATH
=.: $JAVA_HOME / jre / lib / rt . jar : $JAVA_HOME / lib / dt . jar : $JAVA_HOME / lib / tools . jar
tomcat55_enable
= " YES "

# CShell的环境变量请写入.cshrc文件
#
设定JAVA_HOME目录代码:
setenvJAVA_HOME / usr / local / diablo - jdk1 . 5.0
# 设定CLASSPATH目录代码:
setenvCLASSPATH .: $JAVA_HOME / jre / lib / rt . jar : $JAVA_HOME / lib / dt . jar : $JAVA_HOME / lib / tools . jar
# 请确认PATH环境变量中包含了$JAVA_HOME/bin
#
#######################


MySQL
# #######################
#
#以下两行是用来初始化数据库
#
/usr/local/bin//mysql_install_db--user=mysql
#
/usr/local/bin/mysqld_safe--user=mysql&

# #发行包安装过程##
shell > groupadd mysql
shell
> useradd - g mysql mysql
shell
> cd / usr / local
shell
> gunzip < / path / to / mysql - VERSION - OS . tar . gz | tarxvf -
shell
> ln - sfull - path - to - mysql - VERSION - OS mysql
shell
> cd mysql
shell
> scripts / mysql_install_db -- user = mysql
shell
> chown - Rroot .
shell
> chown - R mysql data
shell
> chgrp - R mysql .
shell
> bin / mysqld_safe -- user = mysql &
\\\\\\\\\\\\
# #自动启动
$cp mysql / supportedfiles / mysql . server / usr / local / etc / rc . d / mysqld . sh
# 然后在/etc/rc.conf中加入一行
mysqld_enable = YES
# #######################

你可能感兴趣的:(java,mysql,ssh,OS,FreeBSD)