FREEBSD5.3架站纪实

2016-01-29 18:09 5 1 收藏

FREEBSD5.3架站纪实,FREEBSD5.3架站纪实

【 tulaoshi.com - Linux 】

文章介绍了在一台服务器上提供最常用的互联网服务为基础,主要介绍了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 []:pcsoldier@vip.sina 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 you@yoursite.com ErrorLog /var/log/httpd-error.log TransferLog /var/log/httpd-access.log DocumentRoot "/var/htdocs" 更改httpd.conf到自己需要的参数 ServerName www.towona.com:80 ServerAdmin webmaster@towona.com DocumentRoot "/var/htdocs" DefaultLanguage zh-cn AddDefaultCharset gb2312 AddType application/x-http-php .php .php3 AddType application/x-http-php-source .phps Di

来源:http://www.tulaoshi.com/n/20160129/1504558.html

延伸阅读
微信5.3有哪些特点?   微信5.3版本跟新将带来5个新特性,分别是: 、约定数字,快速建群 、收藏添加标签,方便搜索 、多选消息,聊天记录也可以收藏 、长按消息,进行翻译 、wifi下消息图片自动加载 1、约定数字,快速建群 建群更方便了,不是吗? 大家为什么要建群,因为共同的行业交...
标签: 电脑入门
出现以下提示就可以进行FTP设置了:User Confirmation Requested Do you want to have anonymous FTP access to this machine? Yes[ No ]选择默认的[ No ] 并按下 Enter 键将仍然可以让在这台机器上有账号的用户访问 FTP。要启用FTP匿名访问,用方向键选择 [ Yes ] 然后按 Enter键。您会看到下面(或类似)的画面: 默认的匿名FTP配置 按 ...
  作者: Niels Kristian Bech Jensen, nkbj@image.dk 译者: 黄则荣 tjhuang@technologist.com v1.4, 23 January 1998 翻译日期: 17 March 1998 -------------------------------------------------------------------------------- 这份文件途述如何在一个系统中使用 Linux 和 FreeBSD. 它介绍 FreeBSD, 并...
标签: 摄影 摄影技巧
选对镜头 决定镜头是街头摄影的重要因素,你可能会想用长焦镜头,但其实长焦镜头弊大于利。我想没人希望走在街上时看到远处有个陌生人拿着“大炮”对准你附近吧。因此拿着的器材愈“亲民”愈好,很多街头摄影师也会转而带无反,优点是小而轻。 相机设置 最简单就是把相机设成光圈优先,手动选择光圈和ISO,这样在需要快拍的情...
FreeBSD 使用手册 http://www.freebsd.org.cn/snap/doc/zh_CN.GB2312/books/handbook/index.html 目前最为权威、内容最全的FreeBSD用户手册,适合各类学习freeBSD阶段的人, 欢迎加入freeBSD学习的行列当中来............... 在chinaunix.net上的手册中心中有更多的不同内容BSD的用户使用手册‘ chinaunix.net的手册中心

经验教程

97

收藏

38

精华推荐

在freebsd上安装linuxigd

在freebsd上安装linuxigd

diaobaoxj

FreeBSD远程操作基础指南

FreeBSD远程操作基础指南

Q11057736

FreeBSD 8.2 安装教程图文详解

FreeBSD 8.2 安装教程图文详解

打的皮裤专卖

微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部