FreeBSD上建立一个功能完整的邮件服务器(POSTFIX)(2)

3、freebsd ports的更新
使用sysinstall 安装CVSup
使用ROOT帐户登录

输入 sysinstall
选择 Configure Do post-install Configuration
选择 Packages Install pre-packaged softeare for FreeBSD
选择 FTP Install form an FTP server
选择 URL Specify some other ftp site by URL
输入自定ftp站点位置
URL: ftp://ftp.freebsd.org/pub/FreeBSD/ports/
当从站点下载目录后
选择 net Networking Utilities
选择 cvsup-without-gui-16.1h
然后选择OK install 安装.
Port Tree更新
完成安装了cvsup,现在更新port tree
cp /usr/share/examples/cvsup/ports-supfile /usr
vi /usr/ports-supfile
修改
*default host=freebsd.csie.nctu.edu.tw
Note:补充,备用一个host: cvsup.FreeBSDChina.org
保存后
开始更新port
cvsup -g -L 2 /usr/ports-supfile
更新完就OK了

4、安装MySQL
cd /usr/ports/databases/mysql51-server/
make WITH_CHARSET=gbk WITH_XCHARSET=all WITH_PROC_SCOPE_PTH=yes BUILD_OPTIMIZED=yes BUILD_STATIC=yes SKIP_DNS_CHECK=yes WITHOUT_INNODB=yes install clean
rehash
ee /etc/rc.conf
----------------------
mysql_enable="YES"
----------------------
/usr/local/etc/rc.d/mysql-server start
mysql showdatabases;测试一下
mysql -u root mysql
create database discuz;
GRANT ALL PRIVILEGES ON discuz.* TO www@localhost IDENTIFIED BY "1234";

5、用ports安装gd库
cd /usr/ports/graphics/gd
make install

6、安装APACHE
#cd /usr/ports/www/apache22
#make WITH_MPM=worker WITHOUT_IPV6=yes WITH_THREADS=yes WITHOUT_SSL=yes install clean
cd /usr/local/etc/apache22/
cp httpd.conf httpd.conf.bak
ee httpd.conf
----------------------
SeverAdmin yourname@example.com
SeverName :80

Options Indexes FollowSymLinks 更改为Options FollowSymLinks
DirectoryIndex index.html index.php

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
----------------------
ee /etc/rc.conf
----------------------
apache22_enable="YES"
----------------------
/usr/local/etc/rc.d/apache22 start
netstat -an
浏览一下,显示:

It works!
7、安装PHP
#cd /usr/ports/lang/php5
#make WITH_APACHE22=yes install clean
make config时要选择APACHE
#cp /usr/local/etc/php.ini-dist   /usr/local/etc/php.ini


安装php5-extensions
cd /usr/ports/lang/php5-extensions
make config要选中mysql
make install clean

default_charset = "GB2312"
8、安装DISCUZ6
fetch "http://download.discuz.net/6.0.0/Discuz\!_6.0.0_SC_GBK.zip"
tar zxvf Discuz\!_6.0.0_SC_GBK.zip

chmod -R 777 *

按月份存入不同目录 PHP配置中的 Safe_Mode设置为Off就可以了

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wygfgf.html