Chinaunix首页 | 论坛 | 博客
  • 博客访问: 92337034
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: Mysql/postgreSQL

2008-05-14 16:07:34

 来自:

本安装过程以linux AS4 为底本.安装linux时选最小安装+xwindows没有装apache,mysql,php.等,安装cacti,nagios2.0 ,fruity,作为web页面管理测试。

一、安装基本系统:mysql5+php5+apache2

安装mysql 

下载了编译版本mysql-max-5.0.18-linux-i686-glibc23.tar.gz

     shell> groupadd mysql

     shell> useradd -g mysql mysql

     shell> cd /usr/local

     shell> gunzip < /PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf -

     shell> ln -s FULL-PATH-TO-MYSQL-VERSION-OS mysql

     shell> cd mysql

     shell> scripts/mysql_install_db --user=mysql

     shell> chown -R root  .

     shell> chown -R mysql data

     shell> chgrp -R mysql .

     shell> bin/mysqld_safe --user=mysql &

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

        shell> cp bin/* /usr/bin/

要开机自动运行mysql

1、  mkdir /usr/local/etc/rc.d

       vi /usr/local/

              #! /bin/sh

              /usr/local/mysql/bin/mysqld_safe &

       chmod 755 /usr/local/etc/rc.d/mysql.sh

       启动其他服务类似。

2vi /etc/rc.local

       /usr/local/mysql/bin/mysqld_safe &

如此操作,可以启动服务.rpm安装每次安装后启动不来,放弃。

启动:mysqld_safe &

停止:mysqladmin shudown

补充:    ldconfig –v

              cp support-files/mysql.server /etc/init.d/mysql

              cd /etc/rc3.d/

              ln -s ../init.d/mysql S85mysql

              ln -s ../init.d/mysql K85mysql

              cd /etc/rc5.d/

              ln -s ../init.d/mysql S85mysql

              ln -s ../init.d/mysql K85mysql

              cd /etc/init.d/

              chmod 755 mysql

 

安装APACHE: aRyLinux联盟
下载httpd-2.2.0.tar.gz

 # tar zxvf httpd-2.2.0.tar.gz

 # cd httpd-2.2.0

 # ./configure --prefix=/usr/local/apache --enable-so

 # make & make install

 # cp /usr/local/apache/bin/*  /usr/bin/

 # cp /usr/local/apache/bin/apachectl /etc/init.d/httpd

安装gd2

   下载 gd-2.0.33.tar.gz

./configure make make install

Libraries have been installed in:

   /usr/local/lib

安装php 

  下载 php-5.1.2.tar.gz

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-mysqli=/usr/local/mysql/bin/mysql_config --with-xmlpc --with-jpeg-dir=/usr/bin --with-zlib-dir=/usr/bin --with-gd 

cp /usr/local/php/bin/*   /usr/bin

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

vi /usr/local/apach/conf/httpd.conf

添加如下2行:

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

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

安装phpmyadmin:

下载:phpMyAdmin-2.7.0-pl2.tar.gz

解压后mv/usr/local/下,然后修改config.default.php 修改相应的用户名和密码即可。

$cfg['Servers'][$i]['auth_type'] = 'http';  // Authentication method (config, http or cookie based)

$cfg['Servers'][$i]['user']     = 'root';  // MySQL user

$cfg['Servers'][$i]['password'] = ' ';    // MySQL password (only needed with 'config' auth_type)

:如红色部分,config作为认证方式,则下面得userpassword都必须添上,安全性较低

http做为认证方式,则弹出用户认证对话框.

至此:所有安装通过测试可以使用。

****************************ALL SUCESSFULLY********************************

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