• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 用最新穩定版的apache+mysql+php編譯安裝(REDHAT9)

    發表于:2007-07-04來源:作者:點擊數: 標簽:
    呵呵,昨天用RPM包完成了該環境,下午偶就用源文件編譯了一邊,體驗一下安裝的樂趣 詳細環境為redhat9+mysql4.1.11(binary)+apache1.3.33+php4.3.11 下面為詳細步驟... 我的安裝是以下面這篇文章為參考.但是安裝中遇到了許多與該作者不同的情況. http://blog.csd
    呵呵,昨天用RPM包完成了該環境,下午偶就用源文件編譯了一邊,體驗一下安裝的樂趣
    詳細環境為redhat9+mysql4.1.11(binary)+apache1.3.33+php4.3.11
    下面為詳細步驟...

    我的安裝是以下面這篇文章為參考.但是安裝中遇到了許多與該作者不同的情況.
    http://blog.csdn.net/jinetsunday/archive/2004/07/28/54214.aspx
    該文為
    Linux+Apache+Mysql+PHP典型配置

    調試環境:Redhat9.0 Apache1.3.29 Mysql3.23.58 PHP4.3.4........

    先安裝MYSQL,作者說的是源碼版的.我在我們學校的FTP上沒找到那個版本,只找到好像是3.23.48版,結果編譯出錯.然后索性到官方網站
    www.mysql.com上下了一個最新穩定版4.1.11下載下來以后./CONFIGURE時發現是已經編譯好的了.按照上面的英文介紹弄了半天沒弄出來.在BAIDU上搜了好半天,找到一篇臺灣人寫的文章,呵呵,正合適.主要內容如下:
    http://webbs.kyit.edu.tw/viewtopic.php?p=30316
    mysql從.56版本開始,因為GCC編譯的問題,所以官方后來釋出的都是編譯過的版本(不需要make;make install),直接弄到自己的程序放置區就可以了,在此我把mysql放到/usr/local/mysql 
    ( /usr/local/是我的程序放置區,也是一般程序愛用的預設安裝區域 ) 
    底下首先我們得先把" 陋陋長 " 的數據夾名稱改短一點,當然您也可以直接用連結方式 ln -s /home/project/mysql-3.23.58-pc-linux-i686 /usr/local/mysql 我的工作區域是/home,而這次的Apache,PHP和MySQL放在/home/project目錄里頭,用ln的話,/home/project/mysql-3.23.58-pc-linux-i686就絕對不能動到喔(當然如果你怕不小心刪除,也可以搬移到別的地方去放),不然影響到的就是/usr/local/mysql喔 , 大家把他當成Win的快捷方式看待時,是不是感覺到很熟悉呢 ^^) 
     
    回到主題,我使用的是乾坤大挪移喔 ^^ ,首先我先把他一長串的目錄名稱改成短短的mysql就好... 
    [root@fily project]# mv mysql-3.23.58-pc-linux-i686 mysql 
    [root@fily project]# 
     
    接著我要把他放到心中的程序區/usr/local下 
    [root@fily project]# mv mysql /usr/local 
    [root@fily project]# 
    這樣子mysql就乖乖的從/home/project/mysql跑去/usr/local/mysql嘍 
     
    官方說明為了待會的mysql_install_db得先新增并設定數據庫存放區域的權限 
    [root@fily project]# mkdir -p /var/lib/mysql 
    [root@fily project]# chown -R mysql:mysql /var/lib/mysql 
    [root@fily project]# chown -R root:mysql /usr/local/mysql 
    [root@fily project]# chown -R mysql:mysql /usr/local/mysql/data 
     
     
     
    再來的步驟非常重要,所以我們先轉換目錄到/usr/local/mysql的目錄下動作 ( cd /usr/local/mysql ) , mysql一切就緒了,再來的步驟就是初始化MySQL的數據庫嘍,初始化的程序在 ( scripts/mysql_install_db ),此時我們得先轉換成mysql的使用者來做初始化動作 
     
    [root@fily mysql]# su mysql 
    [mysql@fily mysql]$ scripts/mysql_install_db 
    Preparing db table 
    Preparing host table 
    Preparing user table 
    Preparing func table 
    Preparing tables_priv table 
    Preparing columns_priv table 
    Installing all prepared tables 
    030928 13:50:13 ./bin/mysqld: Shutdown Complete 
     
     
    To start mysqld at boot time you have to copy support-files/mysql.server 
    to the right place for your system 
     
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! 
    This is done with: 
    ./bin/mysqladmin -u root password 'new-password' 
    ./bin/mysqladmin -u root -h fily.dyndns.org password 'new-password' 
    See the manual for more instructions. 
     
    You can start the MySQL daemon with: 
    cd . ; ./bin/safe_mysqld & 
     
    You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: 
    cd sql-bench ; run-all-tests 
     
    Please report any problems with the ./bin/mysqlbug script! 
     
    The latest information about MySQL is available on the web at 
    http://www.mysql.com 
    Support MySQL by buying support/licenses at https://order.mysql.com&#160;
     
    [mysql@fily mysql]$ 
     
    到這里,我們初始化步驟就完成嘍 ! 接著我們把權限換回root 
     
    [mysql@fily mysql]$ exit 
    exit 
    [root@fily mysql]# 
    接著根據官方的manual.html所示,得改一下mysql下的目錄與檔案的權限 
     
    [root@fily mysql]# chown -R root . 
    [root@fily mysql]# chown -R mysql data 
    [root@fily mysql]# chgrp -R mysql . 
    [root@fily mysql]# 
     
    這樣就完成嘍 ... 還等什么,一起啟動MySQL吧 ... ^^ 
    [root@fily mysql]# bin/safe_mysqld --user=mysql & 
    [root@fily mysql]# Starting mysqld daemon with databases from /usr/local/mysql/data 
     
    MySQL這樣就啟動成功嘍 ^^ ... 接著別忘了設定root的密碼 
    [root@fily mysql]# bin/mysqladmin -u root password '你要設定的密碼' 
    [root@fily mysql]# 
     
    開始登入測試,建立數據庫后測試并離開 
    [root@fily mysql]# bin/mysql -u root -p不需空格直接于-p后加上你的密碼 
    Welcome to the MySQL monitor. Commands end with ; or \g. 
    Your MySQL connection id is 6 to server version: 3.23.58 
     
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 
     
    mysql> create database Filytest; 
    Query OK, 1 row affected (0.00 sec) 
     
    mysql> connect Filytest 
    Connection id: 9 
    Current database: Filytest 
     
    mysql> quit 
    Bye 
    [root@fily mysql]# 
     
    MySQL這樣就完完全全OK嘍 ... 
    接著你可以把 /usr/local/mysql/bin/safe_mysqld --user=mysql & 寫入 /etc/rc.d/rc.local 讓MySQL可以在開機的時候啟動 ^^

    呵呵,按他的步驟一次性搞定了!可惜11點宿舍要熄燈了.
    第二天早晨起來編譯APACHE一次成功.
    接下來是PHP了.在配置安裝過程中錯誤,找不到libjpeg.(so|a),然后下了個庫文件.然后還沒配置成.檢查配置參數發現我可能不需要GD庫吧,(閑雜我還不知道什么是GD呢),然后把配置參數改成如下:
    ./configure \
    --prefix=/usr/local/php \
    --with-mysql=/usr/local/mysql \
    --enable-force-cgi-redirect \
    --with-freetype-dir=/usr \
    --with-ttf \
    --with-gettext \
    --with-iconv \
    --with-zlib \
    --with-xml \
    --enable-calendar \
    --with-apxs=/usr/local/apache/bin/apxs
    然后過去了.HOHO~~~~
    下來就沒什么大問題了.花了半個小時裝了個PHPWIND2,呵呵,能夠使用.至此整個環境配置完成.

    前幾天在CHENGUANG上看見幾個同學想建WIKI,呵呵,我也挺有興趣的.可惜那個CHENGUANG管理員總不通過我的帳號認證,失去了一個交朋友的機會....算了,偶自己先試著做一下吧...
    那些人估計都是研究生了,呵呵.......

    大功已經告成,下來偶就要認真學習我的主課模擬電路了,HOHO.又是一個更大的挑戰......

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>