In addition to Perl, the other uses are the source pack installation
The environment is under the freebsd6.0
After loading the FreeBSD, I probably did not compile Perl, so I used Ports's own perl.
Perl is under/usr/ports/lang.
I packed 5.8.
cd/usr/ports/lang/perl5.8
Make
Make Test
Make install
Continue to install MySQL after you finish installing Perl
The download is mysql-5.0.24.tar.gz
Installation
Code:# tar -zxvf mysql-5.0.24.tar.gz
# cd mysql-5.0.24
# ./configure --prefix=/usr/local/mysql
# make
# make install
# make clean
Create a MySQL user
Code:# pw group add mysql
# pw user add mysql -g mysql
Initializing tables
Code:# /usr/local/mysql/bin/mysql_install_db --user=mysql
Set Directory access permissions
Code:# cd /usr/local/mysql
# chown -R root . (设定root可以访问/usr/local/mysql目录)
# chown -R mysql var (设定mysql用户能访问/usr/local/mysql/var目录,该目录中存放mysql的数据库文件)
# chown -R mysql var/. (设定mysql用户能访问/usr/local/mysql/var目录下的所有文件)
# chown -R mysql var/mysql/. (设定mysql用户能访问/usr/local/mysql/var/mysql目录下的所有文件)
# chgrp -R mysql . (设定mysql组能访问/usr/local/mysql目录)
Run
Code:使用命令 # /usr/local/mysql/bin/mysqld_safe --user=mysql & 测试安装是否成功
如果显示
[1]
# Starting mysqld daemon with database from /usr/local/mysql/var
表示安装成功
Start MySQL automatically on boot
Code:在/usr/local/etc/rc.d目录中编辑文件 mysql_start.sh ,内容如下
#! /bin/sh
/usr/local/mysql/bin/mysqld_safe &
设置文件权限为可执行
# chmod +x mysql_start.sh
Installation of Apache2
The download is httpd-2.0.58.tar.gz
Code:# tar -zxvf httpd-2.0.58.tar.gz
# cd httpd-2.0.58
# ./configure --prefix=/usr/local/apache2 --enable-shared=max --enable-module=rewrite --enable-so
# make
# make install
# make clean
Boot automatically load Apache service
Code:在/usr/local/etc/rc.d目录中编辑文件 apache_start.sh
#! /bin/sh
/usr/local/apache2/bin/httpd -k start
设置文件权限
# chmod +x apache_start.sh
Installation of PHP5
Because I want to use the GD library and so on a bunch of things, so the load is more a bit more
LIBXML2 Installation
Source code: LIBXML2-2.6.22.TAR.GZ
Installation
Code:# tar -zxvf libxml2-2.6.22.tar.gz
# cd libxml2-2.6.22
# ./configure
# make
# make install
# make clean