中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 操作系统 > Solairs
Solaris9_x86+Apache2+Mysql
作者:风轻扬 时间:2006-11-24 18:21 出处:互连网 责编:月夜寒箫
              摘要:Solaris9_x86+Apache2+Mysql
Software packages needed:

1. GCC 3.2.3 compiled package for x86 platform:
gcc-3.2.3-sol9-intel-local.gz

2. MySQL 3.23.55 source code package:
mysql-3.23.55.tar.gz

3. Apache 2.0.44 source code package:
httpd-2.0.44.tar.gz

4. PHP 4.3.1 source code package:
php-4.3.1.tar.gz


Install GCC 3.2.3:
# gzip -d gcc-3.2.3-sol9-intel-local.gz
# pkgadd -d ./gcc-3.2.3-sol9-intel-local
# PATH=/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin:$PATH
# export PATH
# which gcc
# which make


Install MySQL 3.23.55:
# groupadd -g 1002 mysql
# useradd -u 1002 -g mysql -d / -s /usr/bin/false -c "MySQL DB User" mysql
# gtar zxvf mysql-3.23.55.tar.gz
# cd mysql-3.23.55
# ./configure --prefix=/usr/local/mysql --with-low-memory --with-extra-charsets=gb2312,gbk --with-mysqld-user=mysql
# make
# make install
# cd /usr/local/mysql
# cd bin
# ./mysql_install_db
# chown -R mysql:mysql /usr/local/mysql/var
# cd /usr/local/mysql/share/mysql
# ./mysql.server start


Install Apache 2.0.44:
# gtar zxvf httpd-2.0.44.tar.gz
#./configure --enable-mods-shared=all --with-egd --with-devrandom --enable-so
# make
# make install


Install PHP 4.3.1:
# gtar zxvf php-4.3.1.tar.gz
# ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --enable-ftp --with-enable-track-vars
# make
# make install


Configure PHP working for apache:
Using vi command change the following setting in /usr/local/apache2/conf/httpd.conf:
DocumentRoot
ServerName
ServerAdmin
User nobody
Group nobody
# Add this line for PHP module
LoadModule php4_module modules/libphp4.so
# Add index.php to DirectoryIndex

DirectoryIndex index.html index.php index.php3 index.phtml

# Add PHP as a application type
AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps


Create system startup/shutdown scripts:
# cd /etc/init.d
# mv apache apache.bak
# vi apache

#!/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib;export LD_LIBRARY_PATH
case "$1" in
'start')
echo "Starting Apache Http Server 2.0.44 ...\c"
/usr/local/apache2/bin/apachectl start
if [ $? = 0 ]
then
echo " done!"
exit 0
else
echo " FAILED!"
exit 1
fi
;;
'stop')
echo "Stopping Apache Http Server 2.0.44 ...\c"
/usr/local/apache2/bin/apachectl stop
if [ $? = 0 ]
then
echo " done!"
exit 0
else
echo " FAILED!"
exit 1
fi
;;
'restart')
$0 stop
$0 start
;;
*)
echo "Usage: `basename $0` { start | stop | restart }"
exit 1
esac
exit 0
:wq!
# chmod 0744 apache
# ./apache start
# ./apache stop
# ./apache restart


# vi mysql

#!/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib;export LD_LIBRARY_PATH
case "$1" in
'start')
echo "Starting MySQL Database Server 3.23.55 ...\c"
/usr/local/mysql/share/mysql/mysql.server start
if [ $? = 0 ]
then
echo " done!"
exit 0
else
echo " FAILED!"
exit 1
fi
;;
'stop')
echo "Stopping MySQL Database Server 3.23.55 ...\c"
/usr/local/mysql/share/mysql/mysql.server stop
if [ $? = 0 ]
then
echo " done!"
exit 0
else
echo " FAILED!"
exit 1
fi
;;
'restart')
$0 stop
$0 start
;;
*)
echo "Usage: `basename $0` { start | stop | restart }"
exit 1
esac
exit 0

# chmod 0744 mysql
# ./mysql start
# ./mysql stop
# ./mysql restart
# ln -s /etc/init.d/mysql /etc/rc2.d/S96mysql
# ln -s /etc/init.d/mysql /etc/rc0.d/K03mysql
# ln -s /etc/init.d/mysql /etc/rc1.d/K03mysql
# ln -s /etc/init.d/mysql /etc/rcS.d/K03mysql
# ln -s /etc/init.d/apache /etc/rc2.d/S97apache
# ln -s /etc/init.d/apache /etc/rc0.d/K02apache
# ln -s /etc/init.d/apache /etc/rc1.d/K02apache
# ln -s /etc/init.d/apache /etc/rcS.d/K02apache

关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有