六 作为Linux的爱好者,我们探究其中的原理,关键在于文件 install.sh,下面是详细步骤介绍 1.利用命令 tar 解压缩软件包 soft.tar.gz tar zxvf soft.tar.gz
2.进入mysql-4.0.26目录,编译并安装mysql,源码软件安装步骤基本如下:./configure -- make -- make install cd soft/mysql-4.0.26 ./configure --prefix=/usr/local/mysql --with-mysqld-ldflags=-all-static --with-linuxthreads make make install #增加用户组 mysql groupadd mysql #增加用户:mysql,参数-g:该用户属于组mysql,参数-s:指定用户登陆后使用的shell,-M:不自动创建该用户的登陆目录 useradd -g mysql -s /sbin/nologin -M mysql #替换mysql数据,增加PHPWind论坛数据库,rm -rf解释:强制删除var目录及其子目录,cp -R解释:复制文件夹及所有子目录文件 rm -rf /usr/local/mysql/var cp -R ../mysql-data /usr/local/mysql/var #变更目录的所属群组和属性 chown -R root /usr/local/mysql chown -fhv -R mysql:mysql /usr/local/mysql/var chmod -R 660 /usr/local/mysql/var/mysql chmod -R 660 /usr/local/mysql/var/phpwind chmod 700 /usr/local/mysql/var/phpwind chmod 700 /usr/local/mysql/var/mysql chmod 700 /usr/local/mysql/var/test chgrp -R mysql /usr/local/mysql #替换my.cnf配置文件,并启动mysql cp ../my.txt /etc/my.cnf /usr/local/mysql/share/mysql/mysql.server start
3.进入httpd-2.0.55目录,编译并安装httpd,安装步骤基本如下:./configure -- make -- make install cd ../httpd-2.0.55 ./configure --prefix=/usr/local/apache --enable-so make make install #安装rewrite模块 cd modules/mappers /usr/local/apache/bin/apxs -a -i -c mod_rewrite.c
4.安装zlib cd ../../../zlib-1.2.3 ./configure --prefix=/usr/local/zlib2 make make install
5.安装jpeg-6b cd ../jpeg-6b ./configure --prefix=/usr/local/jpeg6 make mkdir /usr/local/jpeg6 mkdir /usr/local/jpeg6/include mkdir /usr/local/jpeg6/lib make install-lib mkdir /usr/local/jpeg6/bin mkdir /usr/local/jpeg6/man mkdir /usr/local/jpeg6/man/man1 make install
6.安装libpng cd ../libpng-1.2.8-config ./configure --prefix=/usr/local/libpng2 make make install
7.安装freetype cd ../freetype-2.1.10 ./configure --prefix=/usr/local/freetype2 make make install
8.安装gd cd ../gd-2.0.15gif ./configure --prefix=/usr/local/gd2 --with-png=/usr/local/libpng2 --with-jpeg=/usr/local/jpeg6 make make install