Linux上安装Apache Php Mysql的过程[1]
文章作者 100test 发表时间 2007:05:02 14:45:56
来源 100Test.Com百考试题网
  操作系统:centos 4.3 
  软件列表: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了