十二月個人考覈

一、綜合前面的經驗,以wordpress爲主題的搭建個人學習筆記博客,使用域名進行訪問。

環境:服務器centos6.5 64 IP:192.168.0.100

一、搭建wordpress個人博客。

1-1、在https://cn.wordpress.org/download下載安裝包。

image



1-2、安裝apache和mysql。

yum -y install httpd

service httpd restart

image



yum -y install mysql mysql-server mysql-devel

service mysqld restart

image


1-3、安裝php服務以及一些組件:

yum -y install httpd php php-gd php-mysql php-devel php-mbstring

image


在/var/www/html/目錄下創建一個index.php的文件(/var/www/html 是apache默認提供服務的目錄)。再重啓httpd。

echo "<?php phpinfo(); ?>" > /var/www/html/index.php

service httpd restart

image

在瀏覽器打開服務器IP,如果出現下面頁面就說明成功了

image


1-4、如果沒能出現上面的頁面,先關閉防火牆再測試。

service iptables stop

service iptables save

image



1-5、設置mysl密碼爲rootroot後登錄mysql,創建名爲wordpress的數據庫。

設置密碼爲rootroot。

/usr/bin/mysqladmin -u root password 'rootroot'

image



登錄mysql

mysql -u root –p

image


1.查詢當前的庫

show databases;

2.創建一個新庫

create database wordpress;

image


1-6、上傳下載好的wordpress的安裝包到/var/www。解壓到/var/www/html。

cd /var/www

image


刪除html下的index.php文件。

rm -fr html/index.php

image


解壓wordpress-5.0-zh_CN到當前目錄(/var/www)

unzip wordpress-5.0-zh_CN.zip

image

image


複製wordpress文件夾的所有內容到html下

ls html

cp -fr wordpress/* html

image



1-7、/var/www/html所有者修改稱apache。

chown -R apache:apache /var/www/html


image


1-8、進行安裝wordpress。在瀏覽器打開服務器IP:192.168.0.100

image

輸入數據庫的數據庫用戶的密碼。

image

開始安裝

image

輸入標題和用戶,密碼,在這裏有隨機密碼一定要記住密碼。一定要有電子郵件纔可以安裝,在這裏可以隨便寫一個,安裝好可以修改的。

image

安裝好的界面

image


輸入用戶的密碼登錄,在這裏登錄進去的是後臺管理界面。

image

登錄後臺管理界面。

image

在瀏覽器打開本地IP:192.168.0.100。這個就是wordpress安裝的好測試頁面。到這裏就安裝好了。

image


1-9、如果想用域名登錄,先要有公網IP的機器去安裝。配置好域名解析後,在設置哪裏輸入域名保存。就可以了。

image

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章