您好,登錄后才能下訂單哦!
實(shí)驗(yàn):LAMP的php模塊方式應(yīng)用phpmyadm和wordpress
兩臺(tái)主機(jī)
一臺(tái)A:httpd,php
一臺(tái)B:mariadb server
1 A:
yum httpd php php-mysql
vim /etc/php.ini
date.timezone = Asia/Shanghai
vim /etc/httpd/conf/httpd.conf
DirectoryIndex index.php index.html
systemctl restart httpd
vim /var/www/html/index.php
2 B
yum install mariadb-server
systemctl start mariadb
mysql_secure_installation
mysql -uroot -pcentos
>grant all on *.* to root@'192.168.37.%' identified by 'centos';
vim /var/www/html/index2.php
close();
測試 http://websrv/
3 實(shí)現(xiàn)phpmyadmin
yum install php-mbstring
unzip phpMyAdmin-4.0.10.20-all-languages.zip
cp -r phpMyAdmin-4.0.10.20-all-languages /var/www/html/pma
cd /var/www/html/pma
cp config.sample.inc.php config.inc.php
vim config.inc.php
$cfg['Servers'][$i]['host'] = 'mysqlserverip';
測試 http://websrv/pma/
root,centos
4 A上部署wordpress
mysql -uroot -pcentos
> create database wpdb;
> grant all wpdb.* to wpuser@'192.168.37.%' identified by 'centos';
> flush privileges;
tar xvf wordpress-4.8.1-zh_CN.tar.gz
cp -r wordpress /var/www/html/blog
cd /var/www/html/blog
cp wp-config-sample.php wp-config.php
vim wp-config.php
define('DB_NAME', 'wpdb');
define('DB_USER', 'wpuser');
define('DB_PASSWORD', 'centos');
define('DB_HOST', '192.168.37.107');
測試http://websrv/blog
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。