LAMP小应用

PhpMyAdmin:

1、解压phpMyAdmin
[[email protected] ~]# tar xvf phpMyAdmin-4.0.10.20-all-languages.tar.xz

2、移动到网页主站点
[[email protected] ~]# mv phpMyAdmin-4.0.10.20-all-languages /var/www/html/pma

3、进入目录找到配置文件
[[email protected] pma]# cp config.sample.inc.php config.inc.php

4、修改配置文件
[[email protected] pma]# vim config.inc.php
$cfg['blowfish_secret'] = 'qwe123'      #随机密码用于加密

5、安装mbstring扩展
[[email protected] pma]# yum -y install php-mbstring

6、浏览器打开网站,输入账号密码登录web数据库
http://192.168.2.26/pma/

实现web管理的PowerDNS:

1、配置好epel源

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

2、安装包
[[email protected] html]# yum -y install pdns pdns-backend-mysql

3、准备mariadb中的数据库,表和用户
MariaDB [(none)]> grant all on powerdns.* to 'powerdns'@'localhost' identified by '123456';

4、创建powerdns数据库中的表,参考下面文档
https://doc.powerdns.com/md/authoritative/backend-generic-mysql/

5、将写好的创建数据库表导入数据库
[[email protected] ~]# mysql -uroot -p < pdns.sql

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

7、配置Power DNS使用mariadb作为后台数据存储
[[email protected] ~]# vim /etc/pdns/pdns.conf
添加
#launch=bind
aunch=gmysql
gmysql-host=localhost
gmysql-port=3306
gmysql-dbname=powerdns
gmysql-user=powerdns
gmysql-password=123456

8、启动服务
[[email protected] ~]# systemctl start pdns
[[email protected] ~]# systemctl enable pdns

9、安装httpd和php相关包
[[email protected] ~]# 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
[[email protected] ~]# systemctl start httpd
[[email protected] ~]# systemctl enable httpd

10、下载poweradmin程序,并解压缩到相应目录
[[email protected] html]# tar xvf poweradmin-2.1.7.tgz 
[[email protected] html]# mv poweradmin-2.1.7 poweradmin

11、浏览器访问,安装
http://192.168.2.26/poweradmin/install/

12、安装完成删除
[[email protected] html]# rm -rf /var/www/html/poweradmin/install/

源码编译xcache:


1、解压
[[email protected] ~]# tar xvf xcache-3.2.0.tar.gz 

2、编译
[[email protected] xcache-3.2.0]# phpize --clean && phpize
[[email protected] xcache-3.2.0]# ./configure --enable-xcache
[[email protected] xcache-3.2.0]# make && make install

3、编译完成,会在/root/生成xcache.so模块
Libraries have been installed in:
   /root/xcache-3.2.0/modules

4、将xcache.so模块copy到php位置
[[email protected] xcache-3.2.0]# cp /root/xcache-3.2.0/modules/xcache.so /usr/lib64/php/modules/

5、调用xcache.so模块的ini文件
[[email protected] xcache-3.2.0]# cp /root/xcache-3.2.0/xcache.ini /etc/php.d/

6、测试查看加速效果
[[email protected] xcache-3.2.0]# ab -c 10 -n 100 http://192.168.2.26/wordpress/

猜你喜欢

转载自blog.51cto.com/14230743/2395323
0条评论
添加一条新回复
  
今日推荐