当前位置:Gxlcms > PHP教程 > apachemysqlphp源码编译使用

apachemysqlphp源码编译使用

时间:2021-07-01 10:21:17 帮助过:24人阅读

linux 版本 : ubuntu 12.04

今天完成了 php mysql 和apache 的配置 主要是源码配置, apache 主要是 2.4.2 版本 php 主要是 5.3.11 版本 mysql 主要是 5.1.62 版本 前几天试了好几次,出现了软件的源冲突,我放了两个源在同一个source里,后修改后,安装没出现大的问题。 总的情况如下. 我完成的过程如下 : apache 配置: ./configure --prefix=/usr/local/apache/ --with-libxml2 --enable-modules =most --enable-mods-shared=all 看这apache 经典实例写的。 在ubuntu上加上libxml2最新的版本,然后一切ok make make install 然后 输入127.0.0.1 可以看见it‘s work! mysql配置: cd mysql sudo ./configure –prefix=/usr/local/mysql –with-mysqld-user=mysql –with-extra-charsets=all –enable-thread-safe-client 在./configure 配置中小心点,并且小心其中的提示 我便是在小中度过那个./configure 的,然后就是顺利的 make make install 由于要配置文件复制到etc目录下 sudo cp /mypath/mysql /etc/my.cnf [mysqld]# 设置默认为INNODB表,支持事务:default-storage-engine=INNODB # 设置默认的字符集UTF-8: character-set-server=utf8 collation-server=utf8_general_ci default-character-set=utf8 # mysql启动用户 user=mysql [client] default-character-set=utf8 为了让普通的用户启动mysql 赋予mysql目录如下权限 sudo chown -R mysql:mysql /usr/local/mysql 然后,切换到mysql的用户下,发现mysql启动了 ps aux | grep mysqld 如果有 /usr/local/mysql/bin/ 。。。 说明启动了mysql,mysql配置ok 在 Php 配置: 最复杂的属php的配置,关键在于那个模块有点多 配置和安装的时间有点长,有时候 我还认为是死机呢? ./configure --prefix=/usr/local/php \ --with-apxs2=/usr/local/apache/bin/apxs \ --with-mysql-dir=/usr/local/mysql \ --with-mysql-sock=/tmp/mysql.sock \ --with-pdo-mysql=/usr/local/mysql \ --with-mysqli=/usr/local/mysql/bin/mysql_config \ --enable-mod-charset \ --enable-bcmath \ --with-bz2 \ --enable-calendar \ --with-curl \ --with-curlwrappers \ --enable-exif \ --enable-ftp \ --with-gdbm \ --with-gd=shared \ --with-ttf \ --enable-gd-native-ttf \ --with-gettext \ --with-gmp \ --enable-mbstring=all \ --enable-zend-multibyte \ --with-ming=shared \ --enable-sqlite-utf8 \

1 2 下一页

人气教程排行