說說我的安裝經(jīng)歷吧,我用的是
虛擬機(jī)Virtual PC。經(jīng)歷無數(shù)次的失敗,重試,終于還是搞定了,是辛苦了一點(diǎn),不過還是蠻有收獲的。下面把我的經(jīng)歷與大家一起分享一下吧。呵呵~~~~~~
1、安裝Solaris 9添加用戶和組:
groupadd -g 101
mysqluseradd -u 1001 -g mysql -d /export/home/mysql -m -s /bin/tcsh -c "MySQL Administrator" mysql
passwd mysql //設(shè)置用戶口令
2、安裝gcc,gcc安裝在/opt/sfw/gcc下,版本是:2.95.3,做了如下的連接:ln -s /opt/sfw/bin/gcc /usr/sbin/gcc
ln -s /opt/sfw/bin/g++ /usr/sbin/g++
如果已經(jīng)安裝了gcc則可以略過這一步。
3、下載MySQL,解壓,安裝。gunzip < mysql-3.23.55.tar.gz | tar xvf -
cd mysql-3.23.55
./configure --prefix=/usr/local/mysql //可以使用./configure -help命令查看幫助選項(xiàng)
make
make install
scripts/mysql_install_db //創(chuàng)建默認(rèn)的許可權(quán)限
chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql
啟動(dòng)MySQL:
/usr/local/mysql/bin/safe_mysqld --user=mysql &
4、安裝php和apache:
apache和php的靜態(tài)模塊交叉編譯,以提高apache中php的效率。
tar zxvf apache_1.3.27.tar.gz
cd apache_1.3.27
./configure
cd ..
tar zxvf php-4.3.0.tar.gz
cd php-4.3.0
./configure --with-mysql --with-apache=../apache_1.3.27 --enable-track-vars
make
make install
cd ../apache_1.3.27
./configure --prefix=/usr/local/apache --activate-module=src/modules/php4/libphp4.a
make
make install
cd ../php-4.3.0
cp php.ini-dist /usr/local/lib/php.ini
確保/usr/local/apache/conf/httpd.conf中有如下的行:
AddType application/x-httpd-php .php