apache&&mysql&&php
时间:2007-03-11 来源:lxj821212
apache安装方法
#cd /root
#tar -zxvf httpd-2.2.4.tar.gz
#cd /httpd-2.2.4
#./configure --prefix=/usr/local/apache --enable-module=so --enable-module=rewrite --enable-shared=max && make && make install
mysql安装方法
我选择的是/root/mysql-4.1.19.tar.gz 做法如下
#cd /root
#tar -zxvf mysql-4.1.19.tar.gz
#cd mysql-4.1.19
#./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/var
#make && make install
#./scripts/mysql_install_db
#adduser mysql
#chown -R mysql:mysql /usr/local/mysql
#cd /usr/local/mysql/share/mysql
#chmod 777 mysql.server
#/usr/local/mysql/bin/mysqld_safe --user=mysql &
#/usr/local/mysql/bin/mysqladmin -u root password abcde 这里是设置root,并且密码为 abcde
#/usr/local/mysql/bin/mysql -u root -password -p 之后输入密码 abcde
php安装方法
我选择的是/root/php-4.3.11.tar.gz
#tar -zxvf php-4.3.11.tar.gz
#cd php-4.3.11
#./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs
#make
#make install
#vi /usr/local/apache/conf/httpd.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
#cp ../php-4.3.11/php.ini-dist /usr/local/php/lib/php.ini
修改 register_globals=on
#/usr/local/apache/bin/httpd
#/usr/local/apache/bin/apachect1 restart
#vi /usr/local/apache/htdocs/info.php
<?php
phpinfo();
?>
最后打开网页 http://IP/info.php就可以看到
后记:如果系统安装全的话,可以试一下,
cd php-4.3.4
./configure
--prefix=/usr/local/php
--with-mysql=/usr/local/mysql
--enable-force-cgi-redirect
--with-freetype-dir=/usr
--with-png-dir=/usr
--with-gd --enable-gd-native-ttf
--with-ttf
--with-gdbm
--with-gettext
--with-iconv
--with-jpeg-dir=/usr
--with-png
--with-zlib
--with-xml
--enable-calendar
--with-apxs=/usr/local/apache/bin/apxs
#cd /root
#tar -zxvf httpd-2.2.4.tar.gz
#cd /httpd-2.2.4
#./configure --prefix=/usr/local/apache --enable-module=so --enable-module=rewrite --enable-shared=max && make && make install
mysql安装方法
我选择的是/root/mysql-4.1.19.tar.gz 做法如下
#cd /root
#tar -zxvf mysql-4.1.19.tar.gz
#cd mysql-4.1.19
#./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/var
#make && make install
#./scripts/mysql_install_db
#adduser mysql
#chown -R mysql:mysql /usr/local/mysql
#cd /usr/local/mysql/share/mysql
#chmod 777 mysql.server
#/usr/local/mysql/bin/mysqld_safe --user=mysql &
#/usr/local/mysql/bin/mysqladmin -u root password abcde 这里是设置root,并且密码为 abcde
#/usr/local/mysql/bin/mysql -u root -password -p 之后输入密码 abcde
php安装方法
我选择的是/root/php-4.3.11.tar.gz
#tar -zxvf php-4.3.11.tar.gz
#cd php-4.3.11
#./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs
#make
#make install
#vi /usr/local/apache/conf/httpd.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
#cp ../php-4.3.11/php.ini-dist /usr/local/php/lib/php.ini
修改 register_globals=on
#/usr/local/apache/bin/httpd
#/usr/local/apache/bin/apachect1 restart
#vi /usr/local/apache/htdocs/info.php
<?php
phpinfo();
?>
最后打开网页 http://IP/info.php就可以看到
后记:如果系统安装全的话,可以试一下,
cd php-4.3.4
./configure
--prefix=/usr/local/php
--with-mysql=/usr/local/mysql
--enable-force-cgi-redirect
--with-freetype-dir=/usr
--with-png-dir=/usr
--with-gd --enable-gd-native-ttf
--with-ttf
--with-gdbm
--with-gettext
--with-iconv
--with-jpeg-dir=/usr
--with-png
--with-zlib
--with-xml
--enable-calendar
--with-apxs=/usr/local/apache/bin/apxs
相关阅读 更多 +