LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 3532|回复: 3

fb7.0+apache22+perl5+php5.8.8+mysql51+webmin+phpmyadmin+phpsyinfo安装(原创)

[复制链接]
发表于 2008-3-28 11:57:10 | 显示全部楼层 |阅读模式
自己学习使用FB也有几年了,由于人较懒,一直未写过什么,由于知识都是在网上学的,所以也总结一篇安装文章吧...希望对初学者有点帮助
Freebsd 7.0+apache22+perl5+php5.8.8+mysql51+webmin(usermin)+phpmyadmin+phpsyinfo安装全过程

1,安装freebsd 7.0(一般安装即可,这个步骤就不再在这里多说)
2,更新ports tree,由于7.0自带的csup就有此功效,所以没必要再去安装cvsup之类的了
3,编译内核:
#cd /usr/src/sys/i386/conf
# cp GENERIC MYKERNEL
#vi MYKERNEL
我的内核文件(由于我不需要USB,鼠标,光驱,SCSI等杂设备所以删除了那些...另外:我此次装机没打

算架防火墙,所以没有相关代码,网卡是sk0,所以网卡部分也只保留了必要部分,大家可以查看自己的

/etc/rc.conf文件来决定网卡型号):
cpu I686_CPU
ident ALIAN

# To statically compile in device wiring instead of /boot/device.hints
#hints "GENERIC.hints" # Default places to look for devices.

makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols

options SCHED_4BSD # 4BSD scheduler
options PREEMPTION # Enable kernel thread preemption
options INET # InterNETworking
options INET6 # IPv6 communications protocols !!!!!!!!(这个一定

要加,ipv6与sctp是有关联的)
options SCTP # Stream Control Transmission Protocol
options FFS # Berkeley Fast Filesystem
options SOFTUPDATES # Enable FFS soft updates support
options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big directories
options UFS_GJOURNAL # Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
options NFSCLIENT # Network Filesystem Client
options NFSSERVER # Network Filesystem Server
options NFS_ROOT # NFS usable as /, requires NFSCLIENT
options MSDOSFS # MSDOS Filesystem
options PROCFS # Process filesystem (requires PSEUDOFS)
options PSEUDOFS # Pseudo-filesystem framework
options GEOM_PART_GPT # GUID Partition Tables.
options GEOM_LABEL # Provides labelization
options COMPAT_43TTY # BSD 4.3 TTY compat [KEEP THIS!]
options COMPAT_FREEBSD4 # Compatible with FreeBSD4
options COMPAT_FREEBSD5 # Compatible with FreeBSD5
options COMPAT_FREEBSD6 # Compatible with FreeBSD6
options KTRACE # ktrace(1) support
options SYSVSHM # SYSV-style shared memory
options SYSVMSG # SYSV-style message queues
options SYSVSEM # SYSV-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options ADAPTIVE_GIANT # Giant mutex is adaptive.
options STOP_NMI # Stop CPUS using NMI instead of IPI
options AUDIT # Security event auditing

# To make an SMP kernel, the next two lines are needed
options SMP # Symmetric MultiProcessor Kernel
device apic # I/O APIC

# CPU frequency control
device cpufreq
# Bus support.
device pci


# ATA and ATAPI devices
device ata
device atadisk # ATA disk drives
device atapist # ATAPI tape drives
options ATA_STATIC_ID # Static device numbering


# atkbdc0 controls both the keyboard and the PS/2 mouse
device atkbdc # AT keyboard controller
device atkbd # AT keyboard

device kbdmux # keyboard multiplexer

device vga # VGA video card driver

device splash # Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device sc

device agp # support several AGP chipsets

# Power management support (see NOTES for more options)
#device apm
# Add suspend/resume support for the i8254.
device pmtimer


# Serial (COM) ports
device sio # 8250, 16[45]50 based serial ports
device uart # Generic UART driver

# Parallel port
device ppc
device ppbus # Parallel port bus (required)
device plip # TCP/IP over parallel
device ppi # Parallel port interface device
#device vpo # Requires scbus and da

# If you've got a "dumb" serial or parallel PCI card that is
# supported by the puc(4) glue driver, uncomment the following
# line to enable it (connects to sio, uart and/or ppc drivers):
#device puc

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device miibus # MII bus support
device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet

# Pseudo devices.
device loop # Network loopback
device random # Entropy device
device ether # Ethernet support
device pty # Pseudo-ttys (telnet etc)
device gif # IPv6 and IPv4 tunneling
device faith # IPv6-to-IPv4 relaying (translation)
device firmware # firmware assist module

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device bpf # Berkeley packet filter

进入/usr/src目录编译(如果出错请仔细查看提示并进行适当内核修改)
# cd /usr/src
# make kernel KERNCONF=MYKERNEL

4,安装apache22(一般性安装即可):
# cd /usr/ports/www/apache22
# make install clean

5,安装php(在一般选项基础上加上APACHE选项)
# cd /usr/ports/lang/php5
# make install clean
印象中记得这时出现过一次提示错误,好像是要我安装libxml2(如果你也遇上这个错误就去

/usr/ports/textproc/libxml2那里安装一下libxml2后再来这个安装吧)

# cd /usr/ports/lang/php5-extensions/
# make install clean (记得选上mysql的支持,不然后面装好phpmyadmin以后无法打开mysql管理界

面)

让apache支持php:
# vi /usr/local/etc/apache22/httpd.conf
更加"DirectoryIndex index.html"为"DirectoryIndex index.php index.html"

再添加如下内容:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

测试apache;
# vi /usr/local/www/apache22/data/index.php
<phpinfo>

# apachectl stop
# apachectl start
在浏览器中输入:http://ip试下看有无php信息出来

6,此时可以将apache加入随系统启动了.
# vi /etc/rc.conf
添加如下:
apache22_enable="YES"

7, 安装与配置phpsysinfo
# cd /usr/ports/www/phpSysInfo/
# make install clean
将phpSyinfo目录移到网页目录(系统默认是/usr/local/www/apache22/www/data/)
# cd /usr/local/www
# cp -r phpSysInfo apache22/data/sysinfo
此时你可以在浏览器输入: http://ip/sysinfo测试下

8,安装webmin,usermin
# cd /usr/ports/sysutils/webmin
# make install clean
由于这样安装其实就是将webmin的二进制包下载下来然后解压到/usr/local/lib/这个目录,所以接下来

如下操作
# cd /usr/local/lib/webmin
# ./setup.sh
然后根据提示敲回车及按下Y即可

同样安装usermin
# cd /usr/ports/sysutils/usermin
# make install clean
# cd /usr/local/lib/usermin
# ./setup.sh

打开浏览器输入: https://ip:10000 进行测试

9.安装mysql-server
由于使用ports安装mysql很慢,我是用的电信2M光纤,需时4小时左右,所以我用的另类ports安装,大概需

时10分钟左右,详细如下:
http://ftp.ntu.edu.tw/pub/MySQL/ ... dows的迅雷下的

mysql-5.1.23-rc.tar.gz然后用winscp2工具传到FB电脑内的),然后将该文件放入

/usr/ports/distfiles,然后进入ports目录进行安装,此时就不会再下载.从而达到节约时间的目的
# mv /tmp/mysq* /usr/ports/distfiles/
# cd /usr/ports/databases/mysql51-server
# make install clean

启动mysql:
# /usr/local/share/mysql/mysql.server start

将mysql加入系统启动项
# vi /etc/rc.conf (加入mysql_enable="YES")

10.安装phpmyadmin
# cd /usr/ports/databases/phpmyadmin
# make install clean
然后像安装phpsysinfo时一样,将phpmyadmin这个目录移至/usr/local/www/apache22/data/下

打开浏览器输入: http://ip/phpmyadmin
此时应该弹出mysql管理界面了
发表于 2008-4-1 17:25:36 | 显示全部楼层
我用ports安装apache22和php5,还有php的扩展,无论如何修改httpd.conf,apache都无法跑php,无奈用apache20替代,搞定。
楼主说的关于httpd.conf的改动我也都試过了,未果,楼主就没有遇到这个问题吗?
回复 支持 反对

使用道具 举报

发表于 2008-4-8 22:58:05 | 显示全部楼层
我郁闷啊,用ports装了10来个软件,只有grub装成功了,其他的都是半路返回几个ERORR CODE然后Stop,我可是天天升级ports,哎。无奈只有用sysinstall到官网ftp去装MAP
回复 支持 反对

使用道具 举报

发表于 2008-9-25 11:31:05 | 显示全部楼层
这个看起来怎么这么高难度呢
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表