freebsd网站服务(1)

2009-05-13 09:59:50来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

1.安装mysql
  
#mkdir /usr/local/mysql
#pw groupadd mysql
#pw useradd mysql -g mysql
#tar zxvf mysql-3.23.55.tar.gz
#cd mysql-3.23.55
#./configure --prefix=/usr/local/mysql
#make && make install
#cd scripts
#./mysql_install_db
# 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目录)
#ee /etc/rc.local
添加/usr/local/mysql/bin/mysqld_safe --user=mysql &
起动mysql
#cd /usr/local/mysql/bin
#./mysqld_safe --user=mysql &
2.Apache2 的安装
下载的是httpd-2.0.58.tar.gz
代码:
# 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
开机自动加载apache服务
---------------
代码:
在/usr/local/etc/rc.d目录中编辑文件 apache_start.sh
#! /bin/sh
/usr/local/apache2/bin/httpd -k start
设置文件权限
# chmod +x apache_start.sh
-------------
#ee /etc/rc.local
添加 /usr/local/apache2/bin/apachectl start
3.PHP5 的安装
因为我要用到GD库等一堆东西,所以加载的比较多一点
libxml2安装
源代码:libxml2-2.6.22.tar.gz
安装
代码:
# tar -zxvf libxml2-2.6.22.tar.gz
# cd libxml2-2.6.22
# ./configure
# make
# make install
# make clean
zlib安装
源代码:zlib-1.2.3.tar.gz
安装
代码:
# tar -zxvf zlib-1.2.3.tar.gz
# cd zlib-1.2.3
# ./configure
# make
# make install
# make clean
libpng安装
源代码:libpng-1.2.9.tar.gz
安装
代码:
# tar -zxvf libpng-1.2.9.tar.gz
# cd libpng-1.2.9
# cp scripts/makefile.std makefile
编辑 makefile 将 prefix 改为 prefix=/usr/local/libpng2
# make
# mkdir /usr/local/libpng2
# make install
# make clean
jpeg安装
源代码:jpegsrc.v6b.tar.gz
安装
代码:
# tar -zxvf jpegsrc.v6b.tar.gz
# cd jpeg-6b
# ./configure --prefix=/usr/local/jpeg6 --enable-shared
# make
# mkdir /usr/local/jpeg6
# mkdir /usr/local/jpeg6/include
# mkdir /usr/local/jpeg6/lib
# mkdir /usr/local/jpeg6/bin
# mkdir /usr/local/jpeg6/man
# mkdir /usr/local/jpeg6/man/man1
# make install-lib
# make install
# make clean
GD安装
源代码:gd-2.0.33.tar.gz
安装
代码:
# tar -zxvf gd-2.0.33.tar.gz
# cd gd-2.0.33
# ./configure --prefix=/usr/local/gd2 --with-zlib --with-png=/usr/local/libpng2 --with-jpeg=/usr/local/jpeg6

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:第一篇喔。

下一篇:Proftpd1.2.7+proftpd-mod-quotatab-1.2.4+mysql