Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2085866
  • 博文数量: 414
  • 博客积分: 10312
  • 博客等级: 上将
  • 技术积分: 4921
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-31 01:49
文章分类

全部博文(414)

文章存档

2011年(1)

2010年(29)

2009年(82)

2008年(301)

2007年(1)

分类:

2008-05-06 03:40:37

软件列表:httpd-2.2.4.tar.gz, mysql-5.0.18.tar.gz, php-5.2.1.tar.gz


  一.linux下安装mysql


  小弟最近搞mysql源码安装,安装过程如下:


  安装步骤:


  1.groupadd mysql

  2.useradd -g mysql mysql

  3.tar zxvf myql-5.0.18.tar.gz

  4.cd mysql-5.0.18.tar.gz

  5../configure= prefix=/usr/local/mysql

  6.make

  7.make install

  8.cp support-files/my-medium.cnf /etc/my.cnf

  9.cd /usr/local/mysql

  10.bin/mysql_install_db --user=mysql

  11.chown -R root .

  12.chown -R mysql var

  13.chgrp -R mysql .

  14.bin/mysqld-safe --user=mysql &


  检查日志:more var/localhost.err:

  070129 15:05:58 mysqld started

  070129 15:05:58 InnoDB: Started; log sequence number 0 43655

  070129 15:05:58 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.

  Version: '5.0.18-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution


  查看进程:ps -aux


  root 17286 0.0 0.4 5144 1096 pts/2 S 15:05 0:00 /bin/sh bin/mysqld_safe --user=mysql

  mysql 17310 0.0 6.0 125272 15104 pts/2 Sl 15:05 0:00 /usr/local/myql/libexec/mysqld --basedir=/usr/local/myql --datadir=/u

  root 17546 0.0 0.8 9280 2200 ? SNs 15:20 0:00 cupsd

  root 17612 0.0 0.3 3876 748 pts/2 R+ 15:21 0:00 ps -aux


  关闭mysql:


  bin/mysqladmin shutdown

  STOPPING server from pid file /usr/local/myql/var/localhost.pid

  070129 15:22:28 mysqld ended

  [1]+ Done bin/mysqld_safe --user=mysql

  [root@localhost myql]# mysql

  Welcome to the MySQL monitor. Commands end with ; or \g.

  Your MySQL connection id is 2 to server version: 5.0.18-log

  Type 'help;' or '\h' for help. Type '\c' to clear the buffer.


  如果不行的话killall mysqld,在重新启动就OK了

二.linux下安装apache


  1.tar -zxvf httpd-2.2.4.tar.gz


  2.cd httpd-2.2.4


  3. ./configure –prefix=/www --enable-so


  4.make clean


  5.make


  6.make install


  三.linux下安装php


  1.tar -zxvf php-5.2.1.tar.gz


  2.cd php-5.2.1


  3. ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/www/bin/apxs


  4.make clean


  5.make


  6.make install


  apache中加载php模块


  7 Setup your php.ini


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


  8.. Edit your httpd.conf to load the module.


  For PHP 4:


  LoadModule php4_module modules/libphp4.so


  For PHP 5:


  LoadModule php5_module modules/libphp5.so


  9. Tell to parse certain extensions as PHP.


  AddType application/x-httpd-php .php .phtml


  AddType application/x-httpd-php-source .phps

阅读(1466) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~