当前位置:操作系统 > Unix/Linux >>

WEB开发之网站服务器端标准安装指南

网站服务器端标准安装指南(v 0.1;linux apache2 mysql php4)

  Web Server standard install guide(v 0.1)

  Install apache2 mysql php4 on linux

  shell> groupadd mysql

  shell> useradd -g mysql mysql

  shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -

  shell> cd mysql-VERSION

  shell> ./configure --prefix=/usr/local/mysql

  shell> make

  shell> make install

  shell> scripts/mysql_install_db

  shell> chown -R root /usr/local/mysql

  shell> chown -R mysql /usr/local/mysql/var

  shell> chgrp -R mysql /usr/local/mysql

  shell> cp support-files/my-medium.cnf /etc/my.cnf

  shell> /usr/local/mysql/bin/safe_mysqld --user=mysql &

  or

  shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &

  启动mysql服务

  shell> groupadd nobody

  shell> useradd -g nobody nobody

  shell> gzip -d httpd-2_0_NN.tar.gz

  shell> tar xvf httpd-2_0_NN.tar

  shell> gunzip php-NN.tar.gz

  shell> tar -xvf php-NN.tar

  shell> cd httpd-2_0_NN

  shell> ./configure --enable-so

  shell> make

  shell> cd ../php4-NN

  shell> ./configure --with-mysql --with-apxs2=/usr/local/apache2/bin/apxs

  shell> make

  shell> make install

  shell> cp php.ini-dist /usr/local/lib/php.ini

  编辑php.ini适合您的使用,可以在php的configure配置命令中加上--with-config-file-path=/path参数指定php.ini存放的位置.

  shell> 编辑httpd.conf

  如果里面没有,加入:

  LoadModule php4_module modules/libphp4.so

  AddType application/x-httpd-php .php

  shell> /usr/local/apache2/bin/apachectl start

  启动apachectl服务.

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,