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/
相关文章
相关标签/搜索