Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3安裝Web服務器的FreeBSD 6.0與Apache 2.2 , MySQL的5.0和PHP 5 -第3部分

Installing Apache 2.2, MySQL 5 and PHP 5 in FreeBSD 6.0 for a Reliable Web Server 安裝的Apache 2.2 , MySQL的第5和PHP 5中的FreeBSD 6.0可靠的Web服務器

Part 3 - Installing MySQL Server 5 with FreeBSD Ports Collection第3部分-安裝M ySQL服務器與F reeBSD第5集港口

  1. Login to the FreeBSD system as root, or su - root to get to super user environment.登錄在FreeBSD系統的根,或者蘇-根進入超級用戶環境。
  2. Enter the following commands at FreeBSD command line interface (CLI) (Wait till each command to finish processing before running the next command):輸入下面的命令在FreeBSD的命令行界面( CLI ) (等待到每個命令完成之前,處理未來運行命令) :

    cd /usr/ports/databases/mysql50-server的CD / usr/ports/databases/mysql50-server
    make install clean使安裝清潔
    mysql_install_db --user=mysql mysql_install_db -M ySQL的用戶=
    chown -R mysql /var/db/mysql/ chown - R的數據庫是/ var /數據庫/數據庫/
    chgrp -R mysql /var/db/mysql/ chgrp - R的數據庫是/ var /數據庫/數據庫/
    /usr/local/bin/mysqld_safe -user=mysql &的/ usr / local /斌/ mysqld_safe用戶=數據庫&

    Note: If you encounter Command not found error, use command rehash to update OS path environment variables.注:如果您遇到命令未發現錯誤,使用命令翻版更新操作系統路徑環境變量。

  3. The port installation will put a script file mysql-server.sh in /usr/local/etc/rc.d which will has capability to start MySQL server.該港口將安裝腳本檔案數據庫, server.sh在/ usr / local的/ etc / rc.d這將有能力以啟動MySQL服務器。 To enable MySQL server to start automatically after every FreeBSD server reboot, enter the following command in CLI:為了使MySQL服務器自動啟動後,每一個FreeBSD的服務器重新開機,輸入下面的命令在引導倡議:

    echo ‘mysql_enable=”YES”‘ >> /etc/ rc.conf迴聲' mysql_enable = “是” “ > ”的/ etc / rc.conf

  4. By default, MySQL default super user account - root - has no password (blank password).默認情況下, MySQL的默認的超級用戶帳戶-根-沒有密碼(空白密碼)。 So it’s important to assign the administrator account password.因此,重要的是要指定管理員帳戶密碼。 To change the password to root user, enter the following command:要更改密碼,以root用戶,輸入以下命令:

    mysqladmin -u root password newpassword mysqladmin聚氯乙烯root密碼newpassword

    Replace newpassword with your own desired password. newpassword替換用自己想要的密碼。

  5. Optionally, copy either my-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf or my-innodb-heavy-4G.cnf (depending on the usage and utilization of MySQL server) as my.cnf to /var/db/mysql which will enable you to tweak and change the configuration of server-specific MySQL server options by editing the file.或者,要么我的副本, huge.cnf ,我國- large.cnf ,我國- medim.cnf ,我,我small.cnf或- InnoDB的,重4G.cnf (取決於使用和利用MySQL服務器)為我。合為是/ var /數據庫/數據庫這將使你能夠調整和更改配置的服務器的具體MySQL服務器選擇編輯文件。
  6. MySQL 5.0 installation done. 5.0 MySQL的安裝工作。

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要說明:這是一台機器翻譯網頁這是“原樣”提供,無保修。 Machine translation may be difficult to understand.機器翻譯可能很難理解。 Please refer to請參閱 original English article英文原文的文章 whenever possible.只要有可能。

Share and contribute or get technical support and help at共享和貢獻或獲得技術支持和幫助 My Digital Life Forums 我的數字生活論壇 .



22 Responses to “Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3” 22日回應“安裝Web服務器的FreeBSD 6.0與Apache 2.2 , MySQL的5.0和PHP 5 -第3部分”

  1. Drache
    May 21st, 2006 13:12 2006年5月21日13:12
    1

    mysql_enable = mysql_enable =

  2. Administrator署長
    May 21st, 2006 14:07 2006年5月21日14:07
    2

    Thanks for pointing out, will update.謝謝指出,將更新。

  3. jan一月
    June 6th, 2006 11:08 2006年6月六號11:08
    3

    i’m stucked with the mysql part of your howto, after issuing # mysqladmin -u root password newpassword, i issued # mysql -u root -p newpassword, i always get the access denied error.我stucked與數據庫的一部分,您如何後,簽發# mysqladmin聚氯乙烯root密碼newpassword ,我發表#數據庫聚氯乙烯根一p newpassword ,我總是得到拒絕訪問的錯誤。 what did i miss?什麼是我想念?

    thanks謝謝

  4. Administrator署長
    June 6th, 2006 11:49 2006年6月六號11:49
    4

    jan, may be you have set the password for root. 1月,可能是您設置的密碼根源。 Try to access mysql with -u userid and -p password option.嘗試訪問MySQL與聚氯乙烯帳號和一p 密碼選項。 Or you can follow instruction或者,您也可以按照指令 here這裡 on how to change and reset your root password.關於如何改變和重設您的root密碼。

  5. jan一月
    June 6th, 2006 14:32 2006年6月六號14:32
    5

    i’ve tried all the options mentioned but none of them worked, so i did a fresh install again, before creating a password for mysql root user, i logged in as root and it worked fine, i was able to get a mysql shell but when i issue the command mysqladmin to create a password for root, i got an error, i tried to log in as root and wtf i’m back with the same problem.我試過所有的選項提到但它們都沒有工作,所以我也重新安裝一次,然後創建一個密碼為MySQL root用戶,我登錄的根源,它的工作很好,我能夠獲得MySQL的殼,但當我發出命令mysqladmin創建一個密碼為根,我收到一個錯誤,我嘗試登入根和跆拳道我回來了同樣的問題。 do u think i would be better off if i install phpmyadmin and change the root password from there?這樣ü想我會更好,如果我安裝phpmyadmin ,改變了root密碼從那裡?

  6. Administrator署長
    June 6th, 2006 16:56二零零六年6月6日16時56分
    6 6日

    Did you flush privileges after changing the password?你沖水特權後,改變了密碼? The problem may be due to hashing of MySQL password.這個問題可能是由於散列的MySQL密碼。 May be you can try the following commands after resetting your root password if it cannot works:可能是您可以嘗試下面的命令後,重設您的root密碼,如果它不能工作:

    mysql -u root mysql MySQL的聚氯乙烯根數據庫
    > UPDATE user SET password=password(’secret’) WHERE user=’root’; “更新用戶設置密碼=密碼( '秘密' )凡用戶= '根' ;
    > flush privileges; “沖水特權;

    You may try phpmyadmin too, but I remembered I used to have exactly this same problem while phpMyAdmin didn’t help much.您可以嘗試phpmyadmin太多,但我記得我曾經有正是這種相同的問題,而phpMyAdmin沒有幫助很大。 Do let me know how you solve it.不要讓我知道你如何解決這個問題。

  7. jan一月
    June 7th, 2006 13:14 2006年6月7日13:14
    7 7日

    you’re right changing it via phpmyadmin gave me the same result, so what i did was change some settings in the config.inc.php of phpmyadmin, change the auth_type = cookie and blowfish = mypassphrase and everything were fine.你有權改變它通過phpmyadmin給了我同樣的結果,所以我就是這樣做的是改變一些設置config.inc.php的phpmyadmin ,改變auth_type = cookie和河豚= mypassphrase和一切被罰款。

  8. rich豐富
    August 18th, 2006 00:57 2006年8月18日00:57
    8 8日

    The problem is that mysql (version 5.x) is not starting with mysql_enable=”YES” in /etc/rc.conf.問題是,數據庫( 5.x版)是不是開始mysql_enable = “是”在/ etc / rc.conf 。
    Im using FreeBSD v6.1.x.進出口使用的FreeBSD v6.1.x. I do not have the space problem between enable and the “=”.我沒有空間之間的問題能夠和“ = ” 。 The message I receive on bootup is “YES: notfound”.郵件我收到關於啟動“是: notfound ” 。

    Any suggestions welcome.任何建議表示歡迎。

  9. Dom大教堂
    August 19th, 2006 10:45 06年八月19日10:45
    9 9日

    Ive followed this guide but when i run “mysql-server.sh start” it returns starting mysql and does nothing else.伊夫遵循了這一指導但是當我運行“數據庫, server.sh啟動”返回啟動MySQL並沒有別的。 i ran “mysql-server.sh status” and it returned “mysql is not running”我跑“數據庫, server.sh地位” ,並返回“數據庫沒有運行”

    mysql_enable=”YES” is in rc.conf but is not starting. mysql_enable = “是”在rc.conf但沒有啟動。 any help?任何幫助嗎?

  10. Administrator署長
    August 19th, 2006 11:25 06年八月19日11:25
    10 10個

    Check if you can run mysqladmin or other mysql tools.檢查是否可以運行mysqladmin或其他數據庫工具。 Also make sure your “YES” in rc.conf is using proper “, as the ” in the article has been changed.還請確保您“是”在rc.conf使用適當的“ ,因為”在文章中已變更。

  11. Dom大教堂
    August 19th, 2006 15:10 06年八月19日15:10
    11 11日

    rc.conf contains rc.conf載
    mysql_enable=”YES” mysql_enable = “是”
    apache22_enable=”YES” apache22_enable = “是”

    here is results from mysqladmin -user admin這裡的結果mysqladmin用戶管理

    mysqladmin: connect to server at ‘localhost’ failed mysqladmin :連接到服務器上的'本地'失敗
    error: ‘Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)’錯誤: '無法連接到本地MySQL服務器通過插座' / tmp的/ mysql.sock ' ( 2 )
    Check that mysqld is running and that the socket: ‘/tmp/mysql.sock’ exists!檢查mysqld正在運行的插座: ' / tmp的/ mysql.sock '存在!

  12. Jani Syed賈尼賽
    September 12th, 2006 21:43二零零六年九月12日21:43
    12 12日

    just delete刪除

  13. Younah
    January 27th, 2007 02:06 07年1月27日02:06
    13

    Hi,嗨,
    I have installed freebsd 5.5 and now with your guideline instructions I have install mysql, php5 and apache2.2.But i do not know how to configure a website so I can test that if it works.Please help me with a link who can provide step by step instuctions or refer me some good basic book.我已經安裝的FreeBSD 5.5 ,現在與您的指導方針的指示我已經安裝數據庫, php5和apache2.2.But我不知道如何設定一個網站,這樣我就可以測試,如果它works.Please幫助我聯繫誰可以提供一步一步instuctions或提及我一些良好的基本書籍。
    Thanks.謝謝。

  14. berry__
    March 5th, 2007 21:24 2007年3月5號21:24
    14

    If you’re getting “mysql_install_db: Command not found.” after punching in “mysql_install_db”, you should try to cd to /usr/local/bin/ and then run “mysql_install_db”.如果您收到“ mysql_install_db :命令沒有找到。 ”沖壓後在“ mysql_install_db ” ,你應該嘗試的CD為/ usr / local /斌/然後運行“ mysql_install_db ” 。

    Cheers.乾杯。

  15. berry__
    March 5th, 2007 21:25 2007年3月5號21:25
    15

    Oh; and thanks for the great article!噢;並感謝偉大的文章!

  16. bramz4ever
    November 12th, 2007 13:32 07年11月12號13:32
    16

    i ecountered the not found error while installing mysql, what should i do?字母i ecountered沒有發現的錯誤,而安裝MySQL ,我應該怎麼辦? and what is the command rehash actually is?什麼是重複的命令實際上是什麼? thank you so much.感謝你這麼多。

  17. admin管理員
    November 12th, 2007 16:33 07年11月12號16:33
    17

    rehash is a command to ‘refresh’ the system.翻版是一個命令'刷新'的制度。 Did it work after rehash.沒有工作後的翻版。

  18. nicky6
    January 11th, 2008 10:32 2008年1月11號10:32
    18

    great tutorial!偉大的教程! thanks!謝謝!

  19. Matt馬特
    January 23rd, 2008 00:43 2008年1月23日0點43分
    19

    Where can I find these files on a MySql 5.1 install on FreeBSD 6.2?我在哪裡可以找到這些檔案對一個MySQL 5.1安裝在FreeBSD 6.2 ?

    my-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf or my-innodb-heavy-4G.cnf我- huge.cnf ,我國- large.cnf ,我國- medim.cnf ,我,我small.cnf或- InnoDB的,重4G.cnf

  20. Tyler泰勒
    March 23rd, 2008 02:39 2008年3月23號02:39
    20

    the my-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf or my-innodb-heavy-4G.cnf are found in /usr/local/share/mysql/在我國, huge.cnf ,我國- large.cnf ,我國- medim.cnf ,我,我small.cnf或- InnoDB的,重4G.cnf被發現在/ usr / local /共享/數據庫/

  21. DrTebi
    August 2nd, 2008 07:21 2008年8月2號07:21
    21

    On FreeBSD 7.0 you don’t need to manually install the databases and set permissions, that is done in the startup script the first time it is run.在FreeBSD 7.0就不需要手動安裝數據庫,並設置權限,這樣做的啟動腳本第一次運行。

    Just make sure you have您只要確定有
    mysql_enable=”YES” mysql_enable = “是”
    in /etc/rc.conf before you run mysql-server.在/ etc / rc.conf然後再運行數據庫服務器。

    You could hence rewrite the install instructions to this:你可以因此改寫安裝此:

    cd /usr/ports/databases/mysql50-server的CD / usr/ports/databases/mysql50-server
    make install clean使安裝清潔
    echo ‘mysql_enable=”YES”‘ >> /etc/rc.conf迴聲' mysql_enable = “是” “ > ”的/ etc / rc.conf
    /usr/local/etc/rc.d/mysql-server start的/ usr / local的/ etc / rc.d /數據庫服務器啟動

  22. Leighland
    August 21st, 2008 13:06 2008年8月21號13:06
    22

    Hey there.嘿存在。 I was having trouble with the “mysql_install_db: command not found” when installing FreeBSD 7.我是有問題的“ mysql_install_db :命令未找到”當安裝的FreeBSD 7 。 I ran the rehash command and then entered mysql_install_db again and it worked fine.我跑的翻版命令,然後再次進入mysql_install_db和它的罰款。

Leave a Reply留下一個回复

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> 您可以使用這些標籤: href="" title="">的<a <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> “刪除日期時間= “ ” “的<em> <i> <q cite=""> <strike>的<strong>

Subscribe without commenting訂閱沒有評論


Custom Search

New Articles新文章

Incoming Search Terms for the Article收到的搜索字詞的文章

mysql freebsd 數據庫的FreeBSD - - freebsd mysql FreeBSD的數據庫 - - freebsd phpmyadmin FreeBSD的phpmyadmin - - freebsd install mysql FreeBSD的安裝數據庫 - - freebsd mysql install FreeBSD的MySQL的安裝 - - freebsd apache mysql php howto FreeBSD的阿帕奇數據庫的PHP如何 - - freebsd mysql 5 FreeBSD的數據庫五日 - - freebsd mysql config FreeBSD的數據庫配置 - - freebsd rc.conf mysql FreeBSD的rc.conf數據庫 - - install mysql freebsd FreeBSD的安裝數據庫 - - freebsd restart mysql FreeBSD的重新啟動數據庫 - - always get in mysql without password 總是MySQL中沒有密碼 - - apache2 bsd install BSD的安裝的Apache2 - - apache mysql freebsd 阿帕奇數據庫的FreeBSD - - apache 2.2 is not starting 阿帕奇2.2沒有開始 - - create a web page in apache server freeBSD 創建網頁,在Apache服務器的FreeBSD - - freebsd set up mysql FreeBSD上建立數據庫 - - freebsd 7.0 installing apache FreeBSD的安裝阿帕奇7.0 - - freebsd mysql enable FreeBSD的數據庫啟用 - - freebsd webserver installation FreeBSD的網絡服務器安裝 - - freebsd starting mysql FreeBSD的啟動MySQL - - howto php apache freebsd 如何PHP的阿帕奇的FreeBSD - - how to install mysql in freebsd 如何安裝數據庫中的FreeBSD - - how to install mysql in freebsd 7 如何安裝數據庫中的FreeBSD 7日 - - install mysql on freebsd 安裝數據庫在FreeBSD - - install apache freebsd 安裝Apache的FreeBSD - - mysql on freebsd 數據庫在FreeBSD - - mysql-server freebsd 數據庫服務器的FreeBSD - - mysql_enable mysql_enable - - starting mysql freebsd FreeBSD的啟動MySQL - - apache2+php in freebsd 7 的Apache2 + PHP在FreeBSD的第7 - - apache22 "freebsd 5.5" apache22 “的FreeBSD 5.5 ” - - apache server start result 137 Apache服務器開始137個結果 - - freebsd apache shell environment variables FreeBSD的阿帕奇外殼環境變量 - - freebsd mysql5 FreeBSD的mysql5 - - freebsd apache php howto FreeBSD的阿帕奇的PHP如何 - - freebsd setting up mysql socket FreeBSD上建立數據庫插座 - - freebsd phpmyadmin howto FreeBSD的phpmyadmin如何 - - freebsd apache passwords FreeBSD的阿帕奇密碼 - - freebsd mysql configuration file FreeBSD的數據庫配置文件 - - Installing Apache 2.2, MySQL 5 and PHP 5 in FreeBSD 6.0 安裝的Apache 2.2 , MySQL的第5和PHP 5中的FreeBSD 6.0 - - Installing Apache Mysql and PHP on FreeBSD 安裝Apache的數據庫和PHP在FreeBSD - - install web server freebsd 安裝網絡服務器的FreeBSD - - installera mysql freebsd installera數據庫的FreeBSD - - instalar mysql + bsd instalar數據庫+ BSD的 - - install webserver on freebsd 安裝網絡服務器在FreeBSD - - kaspersky local apache not running 卡巴斯基地方阿帕奇沒有運行 - - mysql freebsd install 數據庫的FreeBSD安裝 - - MySQL in freeBSD 在FreeBSD的MySQL的 - - mysql config freebsd 數據庫配置的FreeBSD - -