Apache+PHP+MySQL+phpMyAdmin+WordPress搭建

來源:互聯網
上載者:User

標籤:.dll   安裝外掛程式   bsp   class   效果   網站目錄   pre   pen   https   

一 .安裝Apache

:http://www.apachelounge.com/download/,選擇Apache 2.4.25 Win64,解壓縮,修改設定檔中如下地方:

1.ServerRoot

Can’t load module之類的就是沒配置好ServerRoot.貌似不識別”..”的上一級表示,只能暫時用絕對路徑了

ServerRoot “D:\Program Files\Apache24”

2.DocumentRoot

DocumentRoot “H:\wwwroot”,表示網站路徑
<Directory “H:\wwwroot”>,配置網站目錄的一些屬性,上面<Directory />的表示全域配置.

3.ServerName

ServerName  www.example.com:80 serverName該為localhost:80,因為自己本地測試用.vps的暫時沒考慮

4.index.php

<Directory />

AllowOverride none

Require all denied

DirectoryIndex index.php default.php index.html

</Directory>

設定預設值首頁,也就是127.0.0.1會跳到127.0.0.1/index.php

二 安裝PHP

1.下載thread safe的版本

三 安裝MySQL

1. 5.7版本沒有data檔案夾,運行

mysqld –initialize-insecure –user=MySQL 產生data檔案夾

2.mysql –uroot -p 登陸,預設使用者名root,密碼空

3.show databases;查詢資料庫,測試是否安裝成功

4.停止並禁用world wide web*名字的服務來停止iis服務,同時讓apache和mysql服務自啟

四 安裝phpMyAdmin

1.The mbstring extension is missing.

改php.ini中的extension_dir = “D:\Program Files\php-5.6.30-Win32-VC11-x64\ext”,暫時沒找到相對路徑的改法,

2.預設phpmyadmin空密碼登入是被禁止的,這一行為主要通過設定檔libraries/config.default.php中的兩個全域變數控制,即
$cfg[‘Servers’][$i][‘nopassword’] = false;

$cfg[‘Servers’][$i][‘AllowNoPassword’] = false;

設定為true可以使用空密碼

五 安裝WordPress

1.安裝外掛程式出現No working transports found,到;extension=php_openssl.dll,把前面 ; 去掉,重啟

2,最大上傳xml為2m限制,更改php.ini

post_max_size=8M     //上傳檔案大小上限
upload_max_filesize=2M  //預設上傳檔案大小,這個就是2M的限制

六 總結

1.修改完php和apache的配置,要重啟查看效果

2.可以通過運行apache和php中的exe檔案,根據控制台給出的資訊找解決方案

3.可以通過phpinfo中的資訊來查看php載入以及各種情況

4.通過事件檢視器查看apache各種錯誤原因.

Apache+PHP+MySQL+phpMyAdmin+WordPress搭建

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.