----------tks Andrew choi
平台:solaris 10u8x86+apache2+mysql5+php5
1。apache2(solaris10已经装了apache2,只要设置下启动即可)
#
cp /etc/apache2/httpd.conf-example /etc/apache2/httpd.conf
#
svcadm enable apache2
或者
/usr/apache2/bin/apachectl start 来启动
/usr/apache2/bin/apachectl
-k stop 来关闭
2。mysql#
/usr/sfw/bin/mysql_install_db
#
groupadd mysql
#
useradd -g mysql mysql
#
chgrp -R mysql /var/mysql
#
chmod -R 770 /var/mysql
#
installf SUNWmysqlr /var/mysql d 770 root mysql
#
cp /usr/sfw/share/mysql/my-medium.cnf /var/mysql/my.cnf
#
/usr/sfw/sbin/mysqld_safe --user=mysql &
#
cd /usr/sfw/bin
#
./mysqladmin -u root password 'new-password'
#
./mysql -u root -p
把mysql服务加入系统管理里:
#
ln /etc/sfw/mysql/mysql.server /etc/rc3.d/S99mysql
#
ln /etc/sfw/mysql/mysql.server /etc/rc0.d/K00mysql
#
ln /etc/sfw/mysql/mysql.server /etc/rc1.d/K00mysql
#
ln /etc/sfw/mysql/mysql.server /etc/rc2.d/K00mysql
#
ln /etc/sfw/mysql/mysql.server /etc/rcS.d/K00mysql3。php(先检测下面各工具软件是否符合再编译PHP。下载网站)- 用 root 身份 login 到 Console mode 中。
- 檢查清楚 PATH 是否包含 /opt/csw/bin 和 /usr/sfw/bin,如果沒有,請自行加上。
# bash
# export PS1='\u:\w#'
root:/# echo $PATH
/opt/csw/bin:/usr/sfw/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin - 检查是否安裝pkgutil wget Autoconf automake sed gcc Make flex Bison M4 Perl zip tar libxml2
- # cp /etc/apache2/httpd.conf-example
/etc/apache2/httpd.conf
5.#
gunzip -cd php-5.1.2.tar.gz | gtar
xvpf - #
cd php-5.1.2
#
./configure
--with-apxs2=/usr/apache2/bin/apxs \
--with-mysql=/usr/sfw/ --enable-dbase
--with-libxml-dir=/usr/slocal \
--with-config-file-path=/etc/apache2
--with-gd-dir=/opt/sfw/bin \
--with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib
--with-zlib --enable-mbstring #
gmake #
gmake install
#
cp php.ini-dist /etc/apache2/php.ini
6。#vi httpd.conf 增加是否有下面的内容,如无则加。
LoadModule php5_module libexec/libphp5.so AddType application/x-httpd-php .php 7。写测试php文件test.php。重新启动APACHE2访问test.php。
#vi /var/apache2/htdoecs/test.php
phpinfo(); ?>
4。该平台扩展:安装discuz BBS。
阅读(1006) | 评论(0) | 转发(0) |