当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > FREEBSD5.3架站纪实

Unix/Linux
Linux 备份 恢复方法
Linux玩CS反恐精英的方法
在一个ISO镜像中集成多个不同的linux发行版,可刻盘,可引导
Linux 快捷键使用
Linux DHCP 服务器配置方法介绍
Linux 22端口的修改方法
Linux 记录会话过程的命令
Linux 后台执行程序如何操作?
linux Wget命令来浏览网页的方法
Linux tail命令的巧妙应用
Wine 中文存在很多的乱码怎么解决方法
linux 新手教程之创建锁文件的方法
配置Linux 保证其系统的安全
Linux DHCP协议实现过程
Linux系统下破解SAM密码
linux/unix vi 编辑器用法详解
Linux 误删文件的解决方法
Linux系统下的历史记录删除方法
Red Hat Linux 安全设置指南
Linux基本命令-注销、关机、重启

Unix/Linux 中的 FREEBSD5.3架站纪实


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 42 ::
收藏到网摘: n/a

文章介绍了在一台服务器上提供最常用的互联网服务为基础,主要介绍了APACHE+MYSQL+QMAIL+JAVA+BIND
这篇文章采用了FREEBSD5.3 RELEASE,如果你想使用权用STABLE的FREEBSD的话,把STABLE-SUPFILE里的tag=RELENG_5_3 改成tag=RELENG_5文章介绍了在一台服务器上提供最常用的互联网服务为基础,主要介绍了APACHE+MYSQL+QMAIL+JAVA+BINDFREECHOICE原创安装系统我就不多说了,我选的是STANDARD,并支持LINUXCOMPAT 在安装之前,首先要安装PORTS,如果没有的话 运行 #/stand/sysinstall configure->distributions->ports server# cd /usr/ports/net/cvsup-without-gui 如果你没有装PORTS的话,请运行/stand/sysinstall 选configure-->distributions-->ports,然后选OK,系统会自动完成安装 server# make install clean 安装完之后 server# cp /usr/share/examples/cvsup/ports-supfile /etc server# cp /usr/share/examples/cvsup/stable-supfile /etc server# chmod 755 /etc/ports-supfile server# chmod 755 /etc/stable-supfile 注:chmod 数字前加0代表目录,不加0代表文件 server# vi /etc/ports-supfile 修改其中的*default host=CHANG_THIS.FreeBSD.org 为*default host=cvsup.freebsdchina.org server# vi /etc/stable-supfile 修改其中的*default host=CHANG_THIS.FreeBSD.org 为*default host=cvsup.freebsdchina.org 修改*default release=cvs tag=RELENG_4 为 *default release=cvs tag=RELENG_5_3 server# /usr/local/bin/cvsup -g -L 2 /etc/ports-supfile server# /usr/local/bin/cvsup -g -L 2 /etc/stable-supfile 完了之后 cd /usr/src 我的CPU频率较高,内存较大,所以执行的是 server# make -j 80 buildworld server# make -j 80 buildkernel server# make -j 80 installkernel server# make -j 80 installworld 第一部分,安装MYSQL服务器 server# cd mysql50-server/ server# make install clean 第二部分,安装APACHE2服务器 安装APACHE2服务器 倚赖的软件包 server# cd /usr/ports/textproc/libxml2 server# make install clean 安装openssl,在安装apache时用的着 server# cd /usr/ports/security/openssl server# make install clean server# cd /usr/ports/www/apache2 server# ls Makefile Makefile.modules.3rd files pkg-message Makefile.doc README.html pkg-descr pkg-plist Makefile.modules distinfo pkg-install server# make install clean 在安装的过程中会出现expat版本冲突,再执行make reinstall就行了 安装php5 server# cd /usr/ports/databases/php5-mysql server# make install clean server# cd /usr/ports/lang/php5-extensions 选择自己需要的模块后 推荐安装的插件在以前发的贴子中已经提到过,这里就不说了 server# make install clean 设定/etc/rc.conf,添加如下几行 apache2_enable=yes apache2ssl_enable=yes mysql_enable=yes 产生apache使用的ssl密钥和证书 server# cd /usr/local/etc/apache2/ server# mkdir ssl.crt ssl.key server# openssl genrsa -des3 -out server.key 1024 Generating RSA private key, 1024 bit long modulus .........................++++++ ......++++++ e is 65537 (0x10001) Enter pass phrase for server.key: Verifying - Enter pass phrase for server.key: server# openssl req -new -x509 -days 30 -key server.key -out server.crt Enter pass phrase for server.key: You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:CN State or Province Name (full name) [Some-State]:FuJian Province Locality Name (eg, city) []:Xia Men city Organization Name (eg, company) [Internet Widgits Pty Ltd]:City Towona T channel Organizational Unit Name (eg, section) []:NetWork Dept Common Name (eg, YOUR name) []:Johnathan Chiang Email Address []:[email protected] server# mv server.key ssl.key/ server# mv server.crt ssl.crt/ server#vi ssl.conf 更改ssl.conf,到你自己所需要的参数 DocumentRoot "/var/htdocs" ServerName www.server.com:443 ServerAdmin [email protected] ErrorLog /var/log/httpd-error.log TransferLog /var/log/httpd-access.log DocumentRoot "/var/htdocs" 更改httpd.conf到自己需要的参数 ServerName www.towona.com:80 ServerAdmin [email protected] DocumentRoot "/var/htdocs" DefaultLanguage zh-cn AddDefaultCharset gb2312 AddType application/x-http-php .php .php3 AddType application/x-http-php-source .phps Di