linux9.0+apache+php+mysql安裝與配置是怎么樣的-創(chuàng)新互聯(lián)

今天就跟大家聊聊有關(guān)linux9.0+apache+php+mysql安裝與配置是怎么樣的,可能很多人都不太了解,為了讓大家更加了解,小編給大家總結(jié)了以下內(nèi)容,希望大家根據(jù)這篇文章可以有所收獲。

成都創(chuàng)新互聯(lián)于2013年成立,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目成都網(wǎng)站建設(shè)、網(wǎng)站設(shè)計(jì)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元興山做網(wǎng)站,已為上家服務(wù),為興山各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:18980820575

,  , mysql,apache,php的新


mysql-standard-5.0.1-alpha-snapshot-pc-linux-i686.tar.gz
httpd-2.0.52.tar.gz
-5.0.2.tar.gz

我們先來安裝mysql
cp mysql-standard-5.0.1-alpha-snapshot-pc-linux-i686.tar.gz /usr/local/
tar -zxvf mysql-standard-5.0.1-alpha-snapshot-pc-linux-i686.tar.gz
cd mysql-standard-5.0.1-alpha-pc-linux-i686/
emacs INSTALL-BINARY 獲得安裝信息
groupadd mysql
useradd -g mysql mysql
cd /usr/local/
ln -s mysql-standard-5.0.1-alpha-pc-linux-i686/ mysql 建立軟鏈接
./scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
chgrp -R mysql .
./bin/mysqld_safe --user=mysql & 從后臺(tái)啟動(dòng)mysql,這時(shí)會(huì)看到
[1] 3879
[root--1014--/usr/local/mysql]Starting mysqld daemon with databases from /usr/local/mysql/data
證明已經(jīng)成功,可以用ps -aux │ grep mysql 可以看到。
安裝成功

再來安裝apache
tar -zxvf httpd-2.0.52.tar.gz
cd httpd-2.0.52
emacs INSTALL 獲得一些安裝信息
./configure --enable-so --enable-so
make ; make install
cd /usr/local/apache2/bin
./apachectl start
httpd: Could not determine the servers fully qualified domain name, using 127.0.0.1 for ServerName
這時(shí)打開,輸入127.0.0.1或你的電腦名,我的為tian1118,然后你就可以看到漂亮的羽毛,證明apache安裝成功,而且可以正確顯示出簡(jiǎn)體中文,真爽。
再仔細(xì)看看,好像有點(diǎn)問題。
cd /usr/loca/apache2/conf/
cp httpd.conf beifei 備份一下,免得自己改錯(cuò)了。
emacs httpd.conf
找到#ServerName
把它改為ServerName 127.0.0.1
../bin/apachectl restart 沒有出錯(cuò)提示證明成功

再來安裝php
tar -zxvf php-5.0.2.tar.gz
cd php-5.0.2
emacs INSTALL 獲得一些安裝信息
./configure --with-apxs2=/usr/local/httpd/bin/apxs --with-=/usr/local/mysql
如果出現(xiàn)如下證明快成功了。
+--------------------------------------------------------------------+
│ License: │
│ This software is subject to the PHP License, available in this │

│ distribution in the file LICENSE. By continuing this installation │
│ process, you are bound by the terms of this license agreement. │
│ If you do not agree with the terms of this license, you must abort │
│ the installation process at this point. │
+--------------------------------------------------------------------+

Thank you for using PHP.

make
make install
cp php.ini-dist /usr/local/lib/php.ini
cp:是否覆蓋‘/usr/local/lib/php.ini’? y


php與apache整合
emacs /usr/local/apache2/conf/httpd.conf 找到DirectoryIndex改為如下:
DirectoryIndex index.html index.php index.htm index.html.var
找到
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
在它后面添加
AddType application/x-httpd-php .php
/usr/local/apache2/bin/apachectl restart

測(cè)試php
emacs /usr/local/apache2/htdocs/index.php
添加
打開瀏覽器,輸入

可以看到關(guān)于php的信息,證明php安裝成功。

結(jié)束語:強(qiáng)烈建議大家在安裝軟件時(shí)用源碼安裝,雖然很麻煩,但是你知道你都做了什么,知道你把軟件包安裝到了哪,還有出了問題大家不要著急,先看出錯(cuò)提示,查看出錯(cuò)信息,利用自己所學(xué)linxu知識(shí)判斷是哪出錯(cuò)了,就比如我在安裝php時(shí),我想先安裝apache,然后php,最后mysql,當(dāng)我在安裝php時(shí)加了參數(shù)--with-mysql=/usr/local/mysql,在安裝時(shí)就會(huì)出錯(cuò),還有,在安裝php時(shí)它還提示我的libxm12的版本太低,我的是RD9.0,內(nèi)核2.4.20-8,我用rpm -qa │ grep libxm12時(shí),版本才1.,然后下載了libxml2-2.6.10.tar.gz,安裝后再安裝php就成功了,。


看完上述內(nèi)容,你們對(duì)linux9.0+apache+php+mysql安裝與配置是怎么樣的有進(jìn)一步的了解嗎?如果還想了解更多知識(shí)或者相關(guān)內(nèi)容,請(qǐng)關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝大家的支持。

新聞名稱:linux9.0+apache+php+mysql安裝與配置是怎么樣的-創(chuàng)新互聯(lián)
分享鏈接:http://bm7419.com/article24/hcpje.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供自適應(yīng)網(wǎng)站、Google、App開發(fā)、云服務(wù)器、響應(yīng)式網(wǎng)站、網(wǎng)站改版

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

h5響應(yīng)式網(wǎng)站建設(shè)