用lnmp架構部署wordpress網站詳細步驟

用lnmp架構部署wordpress網站php

①.下載和上傳網站代碼 html

用winscp或者xftp, 或者xshell下執行rz命令進行上傳網站的包文件.mysql

②.解壓程序代碼,並將程序代碼保存到站點目錄,並進行受權nginx

chown -R nginx.nginx /app/nginx/html/blog/   (將站點目錄受權給nginx的運行用戶)
ll /app/nginx/html/blog/  (查看站點目錄的權限)sql

③.訪問網站得index.php 文件shell

echo 'alias  mysql=/app/mysql/bin/mysql' >/etc/profile 給mysql設置別名,方便操做mysql數據庫

直接訪問blog網站,進行初始化操做.架構

建立網站數據庫app

create database wordpress;ide

show databases;

建立鏈接數據用戶信息:

grant all on wordpress.* to 'wordpress'@'localhost'  identified by '123456';

select user,host from mysql.user;

至此一個基於php環境架構的wordpress網站搭建完成.

相關文章
相關標籤/搜索