引用 | 编辑
f1eric
2005-07-23 15:57 |
楼主
▼ |
||
![]() 【版本】通 用 安装MYSQL 如果是Linux用户,先确定是否已安装MySQL RPM,如果有,请将它移除: Shell# rpm -qa|grep mysql Shell# rpm -e mysql套件名称 注:若有资料库请先将它备份 取回来的软体通常是压缩档,先以root身份将软体解压 Shell# cd /root Shell# gunzip < mysql-3.23.36.tar.gz | tar xvf - ( Shell# tar -zxvf mysql-3.23.36.tar.gz) 设定安装组态 Shell# cd mysql-3.23.36 Shell# ./configure --prefix=/usr/local/mysql -with-charset=big5 (如果有其他设定方面的问题可输入configure --help显示设定说明。) 编译及安装 Shell# make Shell# make install 建立MySQL初始化Table Shell# scripts/mysql_install_db 说明:建立MySQL Grant Table,第一次安装MySQL都必须执行这个指令 复制my.cnf (my.cnf为mysql daemon起动设定档) Shell# cp support-files/my-medium.cnf /etc/my.cnf 建立mysql群组以及使用者,并以mysql的身份起动server Shell# groupadd mysql Shell# useradd mysql -g mysql shell# chown -R root /usr/local/mysql Shell# chown -R mysql /usr/local/mysql/var Shell# chgrp -R mysql /usr/local/mysql Shell# /usr/local/mysql/bin/safe_mysqld --user=mysql & 测试MySQL Server是不是有正常运作 Shell# /usr/local/mysql/bin/mysqladmin version Shell# /usr/local/mysql/bin/mysqladmin variables 8. 开机自动执行MySQL Server :修改 /etc/rc.d/rc.local,加入 /bin/sh -c 'cd /usr/local/mysql ; ./bin/safe_mysqld --user=mysql &' ============================ 安装APACHE+PHP 安装延伸软体(若要PHP能使用GD、Freetype等函式库,须先它们将编译或安装好) 一、GD(原始档编译安装) # tar -zxvf gd.1.3.tar.gz # cd gd.1.3 # make 二、Freetype(用rpm安装之) # rpm -ivh freetype-2.0.1.CLE.rpm # rpm -ivh freetype-devel-2.0.1.CLE.rpm 注意:若系统已有上述RPM档,可先将它们移除 如果是Linux用户,先查看是否有安装Apache 或PHP RPM,如果有,请将它们移除 Shell# rpm -qa|grep apache Shell# rpm -e apache套件名称 Shell# rpm -qa|grep php Shell# rpm -e php套件名称 注意:若系统有正在运作的APACHE SERVER,请先将httpd.conf备份起来 2.先将软体解压缩 Shell# cd /root Shell# gunzip < php-4.0.5.tar.gz | tar xvf - Shell# gunzip < apache_1.3.19.tar.gz | tar xvf - 3. 设定apache安装目录 Shell# cd apache_1.3.19 Shell# ./configure --prefix=/home/www 4. 设定PHP安装选项 Shell# cd ../php-4.0.5 Shell# ./configure \ --with-apache=../apache_1.3.19 \ --with-mysql=/usr/local/mysql \ --with-openssl --with-gd=../gd1.3 --with-ttf \ ------------------------------------------------ ◎ 选项--with-apache=../apache_1.3.19表示apache原始目录 ◎ --with-mysql=/usr/local/mysql表示使用mysql ◎ --with-gd=../gd1.3表示使用gd函式库(gd1.3为gd安装目录) ◎ --with-openssl支援OpenSSL(需有openssl套件) ◎ --with-ttf支援freetype 5. 编译及安装PHP Shell# make Shell# make install 6. 编译Apache Shell# cd ../apache_1.3.19 Shell# ./configure --activate-module=src/modules/php4/libphp4.a Shell# make Shell# make install 7. 复制PHP设定档 Shell# cp /root/php-4.0.5/php.ini.dist /usr/local/lib/php.ini 8. 修改Apache设定档httpd.conf,加入或修改下列设定: AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps 9. 重新启动Apache Shell# /home/www/bin/apachectl restart 10. 测试 在WWW的网页目录下,写一测试档 test.php,内容为 <?php phpinfo() ? > 如可显示php的环境内容表示 php的安装成功了 ![]()
|
引用 | 编辑
lulumi168
2005-07-24 14:43 |
1楼
▲ ▼ |
听说用Liunx架站比Windows稳...
但很像Linux架站相对的也比Windows难... 毕竟还是用Windows的多.... ![]() 希望这个教学对我有用^^" (赶快去灌Linux,来架站噜 ![]() ![]() |