wamp安裝流程

      在〈wamp安裝流程〉中尚無留言

wamp安裝流程
下載x64版

安裝vc套件 如果有安裝visual studio 2019可以不用

Visual C++套件

WampServer使用 Visual c++ redistributable packs 編譯, 並需要有這些套件才能執行. 如果沒有VC這些套件, 就會出現如MSVCR120.dll, VCRUNTIME140.dll之類的錯誤. 

假如系統有安裝Visual Studio 2017/2019的話, 這些套件都已安裝完成, 所以不會出現上面的錯誤.

但如果沒安裝Visual Studio的話, 請先到如下網站 http://wampserver.aviatechno.net/ 下載最下方的 All VC Redistribuable Packages (x86_x64) (32 & 64bits) , 下載完解開後, 一個一個安裝即可

底下的程式, 可檢查系統欠缺什麼軟体
http://wampserver.aviatechno.net/files/tools/check_vcredist.exe

安裝wamp
mysql選8.0.21
瀏覽器:c:/pragram filex86\google\chrome\chrome.exe
編輯器:c:\pragram file\notepad++\notepad++.exe

啟動Wamp

安裝完後, 點選桌面的WampServer64二下, 即可開始運作, 並於工作列右下角就會出現WAMP的圖示,

使用workbench,別使用php admin

資料庫設定
1.修改資料庫路徑

在右下角綠色圖示按左鍵/apache/httpd.conf, 搜詢DocumentRoot, 修改如下
並將+Indexes刪除, 然後加入 Require all granted

DocumentRoot "c:/thomas/server/web"
<Directory "c:/thomas/server/web/">
    #Options +Indexes +FollowSymLinks +Multiviews
    Options +FollowSymLinks +Multiviews
    AllowOverride all
    #Require local
    Require all granted
</Directory>

apache/httpd-vhosts.conf修改成如下

<VirtualHost *:80>
    ServerName localhost
    ServerAlias localhost
    DocumentRoot "c:/thomas/server/web"
    <Directory "c:/thomas/server/web/">
        #Options +Indexes +Includes +FollowSymLinks +MultiViews
        Options +FollowSymLinks +MultiViews
        AllowOverride All
        #Require local
        Require all granted
    </Directory>
</VirtualHost>


a.stop所有伺服器
b.開啟my.ini
c.修改 datadir的路徑

datadir="c:/thomas/server/mysql";更改目錄
innodb_flush_log_at_trx_commit = 0 #加速效能很有效
max_allowed_packet = 500M #查詢過久斷線解決方式(Lost connection while query)
innodb_buffer_pool_size=2048M #緩衝區, 可大輻減少磁碟負載, 而且可加速查詢效能, 尤其是在select count(*)
[mysql]
default-character-set = utf8
character_set_server = utf8


d. copy 原datadir的資料到新地方
2.設定mysql的path
C:\wamp64\bin\mysql\mysql8.0.21\bin

3.新增資料庫登入帳號及權限
a.進到dos

在Dos模式下輸入

mysql -u root


root登入, 不用密碼, 但僅能在本機登入, 登入後再新增帳號及權限

mysql> use mysql;
Database changed
mysql> create user 'thomas'@'%' identified by '123456';
Query OK, 0 rows affected (0.03 sec)

mysql> grant all privileges on *.* to 'thomas'@'%';
Query OK, 0 rows affected (0.03 sec)
mysql>exit;


e.測試 ipconfig
mysql -u student -h (ip) -p

4.建立資料庫
a 開workbench
b.建立連線
locadhost
帳號
密碼
c. create new schema
名稱:wordpress
字元碼:utf8/utf8-unicode_ci

到windows服務上檢查是否有開啟IIS,要關掉

apache設定
1.apache/httpd.conf
2.
#DocumentRoot “${INSTALL_DIR}/www”
#<Directory “${INSTALL_DIR}/www/”>
>>設定網站資料
DocumentRoot “c:/server/wordpress”
<Directory “c:/server/wordpress/”>

Options +Indexes +FollowSymLinks +Multiviews
>>防網路清單顯示
Options +FollowSymLinks +Multiviews

Require local
>>允許外網連線
Require all granted

3.apache/httpd-vhosts.conf 虛擬網站
修改
DocumentRoot…
Options +Indexes…
Require local

4.c\server\wordpress\info.php
<?php
phpinfo();
?>

安裝wordpress
1. 下載wordpress 中文版
2. 解開後把wordpress內的檔案放到 c:\server\wordpress之下
3. 設定
a. localhost
b.資料庫相關的設定
4.設定
localhost/admin >>進後台
主題:Ribosome

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *