資源描述:
《nginxmysqlphpzendweb環(huán)境編譯安裝》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在應(yīng)用文檔-天天文庫。
1、Nginx+MySQL+PHP+ZendWeb環(huán)境編譯安裝1、yum安裝MySQL使用yum來安裝MySQL,首先保證系統(tǒng)已經(jīng)配置了正確的yum源。#安裝系統(tǒng)組件,大都是一些編譯環(huán)境、PHP擴(kuò)展等等,如果這些都使用源代碼安裝,那應(yīng)該是一個(gè)痛苦的過程。shell>yum-yinstallgccgcc-c++autoconfmakeshell>?yum-yinstalllibjpeglibjpeg-devellibpnglibpng-develfreetypefreetype-devellibxml2l
2、ibxml2-develzlibzlib-develglibcglibc-develglib2glib2-develbzip2bzip2-develncursesncurses-develcurlcurl-devele2fsprogse2fsprogs-develkrb5krb5-devellibidnlibidn-developensslopenssl-developenldapopenldap-developenldap-clientsopenldap-serversshell>yum-yins
3、tallmysqlmysql-develmysql-server在安裝過程中,使用了非官方源進(jìn)行更新,通過這種方式安裝的軟件版本分別為:MySQL5.1.50(截止到2010-09-16)。2、MySQL的啟動(dòng)與基本配置系統(tǒng)已經(jīng)安裝好了MySQL數(shù)據(jù)庫,稍作配置后然后啟動(dòng)它,因?yàn)槌醮螁?dòng)會(huì)安裝數(shù)據(jù)庫文件,所以要對my.cnf里的配置進(jìn)行一些修改,尤其是數(shù)據(jù)庫文件存放位置。#復(fù)制一個(gè)樣本,/usr/share/mysql目錄下有好多樣本,請自主選擇。shell>cp/usr/share/mysql/m
4、y-medium.cnf/etc/my.cnf?修改配置文件:#注:是在原有my.cnf基礎(chǔ)上進(jìn)行修改,沒有的選項(xiàng)添加。shell>vi/etc/my.cnf?[client]port=3306socket=/var/lib/mysql/mysql.sockdefault-character-set=utf8[mysqld]user=mysqldatadir=/www/mysqllog-error=/var/log/mysql/mysql_error.loglog-bin=/var/log/mysq
5、l/mysql-bincharacter-set-server=utf8啟動(dòng)MySQL,或者使用servicemysqldstart,系統(tǒng)會(huì)提示安裝數(shù)據(jù)庫,然后啟動(dòng)成功。否則請查看由log-error配置項(xiàng)定義的錯(cuò)誤信息。shell>/etc/init.d/mysqldstartMySQL初始安裝啟動(dòng)后是可以用匿名空密碼登陸的,需要?jiǎng)h除匿名用戶,更改root賬戶密碼。shell>mysqlmysql>UPDATEmysql.userSETpassword=PASSWORD('cmstop')WHER
6、Euser='root';mysql>?DELETEFROM?mysql.userWHEREuser='';mysql>FLUSHPRIVILEGES;#查看MySQL支持插件情況(注:這種方式安裝的MySQL默認(rèn)支持InnoDB,查看該值后面是否為YES)。mysql>SHOWVARIABLESLIKE'%have%';#查看MySQL字符集,應(yīng)該都是utf8。mysql>SHOWVARIABLESLIKE'%char%';3、安裝Nginx接下來采用源代碼的方式安裝Nginx+PHP,首先下載程
7、序所需源碼包:shell>cd~wgethttp://blog.s135.com/soft/linux/nginx_php/nginx/nginx-0.8.46.tar.gzwgethttp://blog.s135.com/soft/linux/nginx_php/php/php-5.2.14.tar.gzwgethttp://blog.s135.com/soft/linux/nginx_php/phpfpm/php-5.2.14-fpm-0.5.14.diff.gzwgethttp://blog.
8、s135.com/soft/linux/nginx_php/libiconv/libiconv-1.13.1.tar.gzwgethttp://blog.s135.com/soft/linux/nginx_php/mcrypt/libmcrypt-2.5.8.tar.gzwgethttp://blog.s135.com/soft/linux/nginx_php/mcrypt/mcrypt-2.6.8.tar.gzwgethttp://blog.s135.com/sof