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

Unix/Linux
linux查看内存的大小
在linux下写的代码,用的是utf-8,结果拿到XP下运行的时候,所有的中文都成乱码
linux su和sudo命令的区别
linux cron 下的定时执行工具使用技巧
linux 查找进程及终止进程操作的相关命令
redhat linux 安装 gcc编译器
Linux Mplayer播放各种格式的电影
一起回顾一下linux常用命令
Linux 网站项目发布要做哪些配置
linux SSH配合SecureCRT的密匙完美使用方法
GD 编译出错解决方法
Facebook Open Platform编译FAQ
Linux 系统硬盘 优化
linux 挂载详解
linux crontab定时命令
Linux 系统中确保访问三级域名畅通的方法
Linux 特权帐号VS普通帐号
确保Linux系统安全的前提条件 漏洞防护
Linux 监视系统资源使用率
Red Hat Linux上使用BIND建立DNS服务器

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 46 ::
收藏到网摘: 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