中web服務(wù)器搭建_第1頁(yè)
中web服務(wù)器搭建_第2頁(yè)
中web服務(wù)器搭建_第3頁(yè)
中web服務(wù)器搭建_第4頁(yè)
中web服務(wù)器搭建_第5頁(yè)
已閱讀5頁(yè),還剩4頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、完成mysql的安裝。然后我們需要?jiǎng)?chuàng)建MySQL系統(tǒng)的啟動(dòng)鍵鏈接啟動(dòng)MySQL服務(wù)器,這樣以便于MySQL在系統(tǒng)啟動(dòng)時(shí)自動(dòng)啟動(dòng)。.為mysql root賬戶設(shè)置密碼:Mysql_secure_installationrootlocalhost lx# mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!In order to log into M

2、ySQL to secure it, we'll need the currentpassword for the root user. If you've just installed MySQL, andyou haven't set the root password yet, the password will be blank,so you should just press enter here.Enter current password for root (enter for none): OK, successfully used password,

3、moving on.Setting the root password ensures that nobody can log into the MySQLroot user without the proper authorisation.Set root password? Y/n yNew password: Re-enter new password: Password updated successfully!Reloading privilege tables. . Success!By default, a MySQL installation has an anonymous

4、user, allowing anyoneto log into MySQL without having to have a user account created forthem. This is intended only for testing, and to make the installationgo a bit smoother. You should remove them before moving into aproduction environment.Remove anonymous users? Y/n . Success!Normally, root shoul

5、d only be allowed to connect from 'localhost'. Thisensures that someone cannot guess at the root password from the network.Disallow root login remotely? Y/n . Success!By default, MySQL comes with a database named 'test' that anyone canaccess. This is also intended only for testing, a

6、nd should be removedbefore moving into a production environment.Remove test database and access to it? Y/n - Dropping test database. . Success! - Removing privileges on test database. . Success!Reloading the privilege tables will ensure that all changes made so farwill take effect immediately.Reload

7、 privilege tables now? Y/n . Success!Cleaning up.All done! If you've completed all of the above steps, your MySQLinstallation should now be secure.Thanks for using MySQL!創(chuàng)建成功。Apache2的是作為一個(gè)CentOS的軟件包,因此我們可以直接用下面命令安裝它:安裝成功?,F(xiàn)在配置系統(tǒng)在引導(dǎo)時(shí)啟動(dòng)apache,第二步 啟動(dòng)apache查看本地IP現(xiàn)在,在瀏覽器中輸入本地IP地址,可以看到apache2的測(cè)試頁(yè),如下圖:A

8、pache的默認(rèn)文檔根目錄是在CentOS上的/var/www/html 目錄 ,配置文件是/etc/httpd/conf/httpd.conf。配置存儲(chǔ)在的/etc/httpd/conf.d/目錄。3、安裝php用下列命令安裝php:yum install php安裝完需要重新啟動(dòng):rootlocalhost lx# chkconfig httpd on 添加apache開機(jī)自動(dòng)啟動(dòng)4.我們可以安裝php和apache的php模塊如下:默認(rèn)網(wǎng)站的文件根目錄是在/srv/www/html中。現(xiàn)在我們將在該目錄中創(chuàng)建一個(gè)小型PHP文件(info.php的)在瀏覽器中調(diào)用它。該文件將顯示很多關(guān)于我

9、們的PHP安裝,如安裝的PHP版本和有用的一些細(xì)節(jié)。進(jìn)入后輸入下圖內(nèi)容:現(xiàn)在,用瀏覽器訪問(wèn):正如你所看到的,PHP的工作,它通過(guò)Apache 2.0的處理程序,在服務(wù)器API線。如果你繼續(xù)向下滾動(dòng),你會(huì)看到所有在PHP5中已經(jīng)啟用的模塊。MySQL是沒有列出,這意味著我們沒有在PHP支持MySQL。5Php獲得mysql的支持讓PHP在MySQL中獲得支持,我們可以安裝的php-mysql軟件包。安裝一些其他的PHP5模塊,以及您可能需要的應(yīng)用程序yum search php.還需要安裝所需要的:yum install php-mysql php-gd php-imap php-ldap ph

10、p-mbstring php-odbc php-pear php-xml php-xmlrpc.現(xiàn)在重新啟動(dòng)apache:/etc/init/httpd restart現(xiàn)在,重載http:/34/info.php在您的瀏覽器,并再次向下滾動(dòng)到模塊部分?,F(xiàn)在,你應(yīng)該找到許多新的模塊,包括MySQL模塊:6.安裝phpmyadminphpMyAdmin是一個(gè)網(wǎng)絡(luò)接口,通過(guò)它可以管理你的MySQL數(shù)據(jù)庫(kù)。首先,我們使我們的CentOS系統(tǒng)的RPMForge軟件庫(kù)phpMyAdmin,不是官方的CentOS 6.0庫(kù),導(dǎo)入rpmforge的GPG密鑰:rpm import i386 系統(tǒng)安裝命令:l6.rf.i686.rpm 安裝phpmyadmin:yum install phpmyadmin.現(xiàn)在我們可以設(shè)置phpMyAdmin了,我們可以改變Apache的配置來(lái)讓phpMyAdmin不僅僅只能從localhost登錄。輸入命令:里面輸入以下內(nèi)容:下一步,我們從H

溫馨提示

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

最新文檔

評(píng)論

0/150

提交評(píng)論