[root@localhost ~]# systemctl restart network
[root@localhost ~]# ping baidu.com
[root@localhost ~]# systemctl stop firewalld.service
[root@localhost ~]# setenforce 0
檢查yum源
[root@localhost ~]# yum repolist
搭建 LAMP 環境,使用 yum 安裝
[root@localhost ~]# yum -y install httpd php php-mysql mariadb mariadb-server
添加 php 頁面測驗檔案
[root@localhost ~]# cd /var/www/html/
[root@localhost html]# vim index.php
<?php
phpinfo()
?>
啟動 apche,通過行程和埠查看是否成功
[root@localhost html]# systemctl restart httpd
[root@localhost html]# ps -ef |grep httpd
[root@localhost html]# ss -lntp |grep httpd
訪問 php 測驗頁面
[root@localhost html]# firefox 192.168.12.5
安裝 wordpress
[root@localhost html]# cp '/tmp/VMwareDnD/8030946e/wordpress-4.8.1-zh_CN.tar.gz' ./
[root@localhost html]# tar zxvf wordpress-4.8.1-zh_CN.tar.gz
再去訪問
[root@localhost html]# firefox 192.168.12.5/wordpress
去資料庫中授權
[root@localhost ~]# yum install mariadb-server
[root@localhost html]# systemctl start mariadb
[root@localhost html]# mysql
創建資料庫wordpress
MariaDB [(none)]> create database wordpress charset utf8;
MariaDB [(none)]> grant all on wordpress.* to 'aaa'@'localhost' identified by '123';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> quit
再次去訪問,點擊 “現在開始!”
[root@localhost html]# firefox 192.168.12.5/wordpress
用戶名+密碼輸自己剛創建資料庫的
如果報錯,退出去,修改一下屬主屬組就可以了
[root@localhost html]# systemctl start httpd
[root@localhost html]# chown -R apache:apache wordpress
再次訪問頁面
[root@localhost html]# firefox 192.168.12.5/wordpress
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/229510.html
標籤:非技術區
上一篇:如何防止設備被訪問
下一篇:使用imx6ul的keyboard matrix功能配置鍵盤以后,按下按鍵以后,觀察log貌似總是檢測到一整行全都按下了 (文末附有hexdumplog)
