Linux下web服務(wù)器環(huán)境搭建_第1頁
Linux下web服務(wù)器環(huán)境搭建_第2頁
Linux下web服務(wù)器環(huán)境搭建_第3頁
Linux下web服務(wù)器環(huán)境搭建_第4頁
Linux下web服務(wù)器環(huán)境搭建_第5頁
免費預(yù)覽已結(jié)束,剩余1頁可下載查看

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

Linux下web服務(wù)器環(huán)境搭建與zendoptions并支持GD庫下列所有操作請注意是在root賬號權(quán)限下執(zhí)行。一、準(zhǔn)備工作:首先查看系統(tǒng)中是否已經(jīng)安裝了GD環(huán)境:grepzlibgreplibpnggrepfreetypegrepjpeggrepgd[root@localhost?]#rpm-qa[root@localhost?]#rpm-qa[root@localhost?]#rpm-qa[root@localhost~]#rpm-qa[root@localhost~]#rpm-qa假如沒有安裝的話,能夠按照下面的步驟手動安裝:grepzlibgreplibpnggrepfreetypegrepjpeggrepgd安裝zlib[root@[root@localhost?]#./configure[root@localhost~]#make[root@localhost?]#makeinstall安裝libpng[root@localhost?][root@localhost~]#cdscripts/[root@localhost?]#mvmakefile.linux../makefile[root@localhost?]#cd..[root@localhost?]#make[root@localhost?]#makeinstall注意,這里的makefile不是用./configure生成,而是直接從scripts/里復(fù)制一個。安裝freetype[root@localhost?[root@localhost?][root@localhost-]#./configure[root@localhost?]#make[root@localhost~]#makeinstall[/quote].4安裝Jpeg[root@localhost?][root@localhost~]#cdjpeg-6b/[root@localhost-]#./configure-enable-shared[root@localhost~]#make[root@localhost?]#maketest[root@localhost?]#makeinstall注意:這里configure一定要帶--enable-shared參數(shù),不然,不可能生成共享庫1.5安裝GD[root@localhost?][root@localhost?[root@localhost?]#./configure-with-png-with-freetype-with-jpeg[root@localhost?]#makeinstall二、安裝mysql2.1解壓縮[root@localhost?]2.2創(chuàng)建MYSQL用戶與組[root@localhostmysql-5.1.37]#groupaddmysql[root@localhostmysql-5.1.37]#useradd-gmysqlmysql2.3編譯前配置mysqI安裝路徑為/usr/1ocaI/mysqI[root@localhostmysql-5.1.37]#./configure—prefix=/usr/local/mysql2.4開始編譯[root@localhostmysql-5.1.37]#make2.5安裝[root@localhostmysql-5.1.37]#makeinstall2.6數(shù)據(jù)庫初始化有關(guān)操作[root@localhostmysql-5.1.37]#cdscripts/[root@localhostscripts]#./mysql_install_db—user=mysql[root@localhostscripts]#cp../support-files/f/etc/f編輯/ctc/f,加入下面一行內(nèi)容:user=mysql更換部分目錄權(quán)限,增強安全性。[root@localhostscripts]#chown-Rroot/usr/local/mysql/[root@localhostscripts]#chown-Rmysql/usr/local/mysql/var[root@localhostscripts]#chgrp-Rmysql/usr/local/mysql/編輯并加入下列兩行:[root@localhostscripts]#vi/etc/ld.so.conf/usr/local/mysql/lib/mysql/usr/local/lib編輯完后載入庫[root@localhostscripts]#Idconfig-v7啟動數(shù)據(jù)庫[root@localhostscripts]#cd/usr/local/mysql/bin/[root@localhostbin]#./mysqld_safe—user=mysql&.8設(shè)置數(shù)據(jù)庫root密,[root@localhostbin]#mysqladmin-urootpassword'newpassword'注意upassword"與'newpassword'之間務(wù)必有空格。.9測試安裝結(jié)果,可有可無的一步kl*vi*kL*kl*kl*kl*]、[、q、,卜嗎、]、,卜[、W、元、4、4、,j、,j、/卜,j、W、]、[、]、[root@localhostbin]#mysql-uroot-pEnterpassword:WelcometotheMySQLmonitor.Commandsendwith;or\g.Type'help;'or'\h'forhelp.TypeAc*toclearthebuffer.mysql>usemysqlDatabasechangedkl*kL*vl*kl*vL*k.l^kJ**L*kL*kl>kL*vt*kl*k.1*kl*kJ**L*kl*,.、無、〃、,[、,卜,J、[、(、]、,「,J、[、,j、,卜?、rj、〃、q、,「當(dāng)你看到以上內(nèi)容的時候,恭喜你,數(shù)據(jù)庫已經(jīng)安裝成功了。三、安裝apache3.1解壓縮2配置安裝路徑與加載方式,在此選擇動態(tài)加載方式,以便節(jié)約系統(tǒng)資源。編譯安裝

7,7,KX*7,sf>Kl>KX>xX>k1^^1#ki>k£>k1>Kl>Kl^KJ>KI>7,Kl>7,*.t>KJ>kL*Kl*7,KI>KI>Kl>k1>]、4、q、*T^*|*〃、[、*7^*7>*T^〃、*7^〃、*1>[、*1^^|*]、[、[、<T^〃、[、*7^*7>*7^*1^*1>k|>k!>kJ>*1>k|>k|>*J>^!>k!>k|>*1>k|>*1>*1>*1>k!>*X**1>k!>yj*安裝apache是整個過程中最簡單的,當(dāng)你看到以上內(nèi)容的時候說明你的apache已經(jīng)安裝成功了,。下面繼續(xù)安裝PHP,安裝完php后再配置叩ache。U!、安裝PHP4.1U!、安裝PHP[root@localhost?]#2配置PHP安裝路徑apache路徑與mysqI路徑,其他內(nèi)容為支持GD庫的配置,假如還需要擴展其他功能的話能夠繼續(xù)添加,不是必要的功能盡量不要安裝,減少出現(xiàn)安全漏洞的機會。[root@localhost?]#[root@localhostphp-5.3.0]#./configure—prefix=/usr/local/php-with-mysql=/usr/local/mysql—with-apxs2=/usr/local/apache/bin/apxs-with-gd—enable-gd-native-ttf-enable-gd-jis-conv—with-freetype-dir—with-jpeg-dir—with-png-dir—with-zlib-enable-xml—enable-mbstring注意:一行寫不開時,請在行尾加上''換行,不想一點點敲入,復(fù)制粘貼時請先粘貼到記事本中去掉格式。假如沒錯誤的話,你將會看到下列內(nèi)容。*:!**1**1**4**A**.1*k1**A**1*k1*k!>*.1*k|>k!>*A**1*kI**£**1**.1*%1>kI**A**A*kL**£**£*kL*kL*kL*rT^rT**r**Twrr^++|License:||ThissoftwareissubjecttothePHPLicense,availableinthis||distributioninthefileLICENSE.Bycontinuingthisinstallation||process,youareboundbythetermsofthislicenseagreement.||Ifyoudonotagreewiththetermsofthislicense,youmustabort||theinstallationprocessatthispoint.|++ThankyouforusingPHP.7,7,7,<?>7,7,<!>、!,7,7,<1>、!?、!,k!>k!>.£>%>t><f><1><1>、!>k1>■£>?!”7,k!>k|><?>\£>7**1*7,7,7,rj.rj.?[、?[、?[、?卜?.、?;、V、?卜.[、?;、■,、?;??、■卜[、[、rr>q.rT>rj、q.<T>?、rj.?卜<T>?[、,[、?卜?.、<T>?[、?卜.[、?.、?;?3編譯[root@localhostphp-5.3.0]#make編譯完成后能夠運行一下maketest看看是否有被忽略的錯誤。[root@localhostphp-5.3.0]#maketest[root@localhostphp-5.3.0]#makeinstall五、安裝完php后開始配置apache5.1加上2找到DirectoryIndex一行修改為:DirectoryIndexindex.htmindex.phpindex.html3找到OptionsIndexFoIIowSymLinks一行修改為:OptionsFollowSymLinks〃出于安全性考慮,通常不顯示目錄文件列表。4找到下列兩行,修改默認文檔存放的位置:DocumentRootn/var/www/htmr!<Directory,7var/www/htmln>配置文檔。配置文檔。配置文檔。5其他設(shè)置,如:修改默認服務(wù)端口、綁定IP等請參閱apache全重啟mysql、apache配置文檔。在/var/www/html下建一個phpinfo.php文件輸入<?phpinfo();?>六、安裝zendoptions注意:本次安裝使用的PHP5.3為較新版本,zendOptimizer-333并不支持,因此在安裝完后,看不到zendOptimize安裝成功信息,下列只是演示安裝過程。[root@localhost~]#[root@localhostZendOptimizer-3.3.3-linux-glibc23-i386]#[root@localhostZendOptimizer-3.3.3-linux-glibc23-i386J#./install.sh按照提示一路yes就行了,zendoptions安裝界面做的很友好。到此安裝過程已基本上結(jié)束,當(dāng)然還有許多后續(xù)的優(yōu)化工作需要做,在此暫不詳述了。[原創(chuàng)]fc6+apache+mysql+php+gd環(huán)境安裝shotQApplicationsPlacesSystem@12:04PM。phpinfof)-MozillaFirefoxFileEditViewHistoryBookmarksToolsHelpndex.phpFedoraWeeklyNewsForum-Northunion紅聯(lián)Linux論壇Unux/U...Disable^Cookies_ICSS□Forms!■Images?InformationMiscellaneousOutline::ResizeToolsMViewSource/Options□phpinfo()O八[原創(chuàng)]fc6+apache+mysql+php4■…,LLinux伊甸園----Unuxedencom...一SystemLinuxlinuxstudy.linuxdomain2.6.18-1^798.fc6#1SMPMonOct1614:37:32EDT2006i686BuildDateJun17200700:5527ConfigureCommand"configure''-prefix=.'usr/local/php"--with-apxs2=Ajsr/local/apache/bin/apx

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論