LAMP小應用

PhpMyAdmin:php

一、解壓phpMyAdmin
[root@localhost ~]# tar xvf phpMyAdmin-4.0.10.20-all-languages.tar.xz

二、移動到網頁主站點
[root@localhost ~]# mv phpMyAdmin-4.0.10.20-all-languages /var/www/html/pma

三、進入目錄找到配置文件
[root@localhost pma]# cp config.sample.inc.php config.inc.php

四、修改配置文件
[root@localhost pma]# vim config.inc.php
$cfg['blowfish_secret'] = 'qwe123'      #隨機密碼用於加密

五、安裝mbstring擴展
[root@localhost pma]# yum -y install php-mbstring

六、瀏覽器打開網站,輸入帳號密碼登陸web數據庫
http://192.168.2.26/pma/

實現web管理的PowerDNS:html

一、配置好epel源

[epel]
name=EPEL
baseurl=https://mirrors.aliyun.com/epel/7/x86_64/
gpgcheck=0
enabled=1

二、安裝包
[root@localhost html]# yum -y install pdns pdns-backend-mysql

三、準備mariadb中的數據庫,表和用戶
MariaDB [(none)]> grant all on powerdns.* to 'powerdns'@'localhost' identified by '123456';

四、建立powerdns數據庫中的表,參考下面文檔
https://doc.powerdns.com/md/authoritative/backend-generic-mysql/

五、將寫好的建立數據庫表導入數據庫
[root@localhost ~]# mysql -uroot -p < pdns.sql

六、查看導入的表
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| powerdns           |
| ultrax             |
| wordpress          |
+--------------------+

七、配置Power DNS使用mariadb做爲後臺數據存儲
[root@localhost ~]# vim /etc/pdns/pdns.conf
添加
#launch=bind
aunch=gmysql
gmysql-host=localhost
gmysql-port=3306
gmysql-dbname=powerdns
gmysql-user=powerdns
gmysql-password=123456

八、啓動服務
[root@localhost ~]# systemctl start pdns
[root@localhost ~]# systemctl enable pdns

九、安裝httpd和php相關包
[root@localhost ~]# yum -y install httpd php php-devel php-gd php-mcrypt php-imap phpldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-mbstring phpmcrypt php-mhash gettext
[root@localhost ~]# systemctl start httpd
[root@localhost ~]# systemctl enable httpd

十、下載poweradmin程序,並解壓縮到相應目錄
[root@localhost html]# tar xvf poweradmin-2.1.7.tgz 
[root@localhost html]# mv poweradmin-2.1.7 poweradmin

十一、瀏覽器訪問,安裝
http://192.168.2.26/poweradmin/install/

十二、安裝完成刪除
[root@localhost html]# rm -rf /var/www/html/poweradmin/install/

源碼編譯xcache:mysql

一、解壓
[root@localhost ~]# tar xvf xcache-3.2.0.tar.gz 

二、編譯
[root@localhost xcache-3.2.0]# phpize --clean && phpize
[root@localhost xcache-3.2.0]# ./configure --enable-xcache
[root@localhost xcache-3.2.0]# make && make install

三、編譯完成,會在/root/生成xcache.so模塊
Libraries have been installed in:
   /root/xcache-3.2.0/modules

四、將xcache.so模塊copy到php位置
[root@localhost xcache-3.2.0]# cp /root/xcache-3.2.0/modules/xcache.so /usr/lib64/php/modules/

五、調用xcache.so模塊的ini文件
[root@localhost xcache-3.2.0]# cp /root/xcache-3.2.0/xcache.ini /etc/php.d/

六、測試查看加速效果
[root@localhost xcache-3.2.0]# ab -c 10 -n 100 http://192.168.2.26/wordpress/
相關文章
相關標籤/搜索