您的位置:首页 > 其它

LAMP小应用

2019-05-15 22:12 435 查看

PhpMyAdmin:

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

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

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

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

5、安装mbstring扩展
[root@localhost 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、安装包
[root@localhost 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、将写好的创建数据库表导入数据库
[root@localhost ~]# mysql -uroot -p < pdns.sql

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

7、配置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

8、启动服务
[root@localhost ~]# systemctl start pdns
[root@localhost ~]# systemctl enable pdns

9、安装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

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

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

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

源码编译xcache:

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

2、编译
[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

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

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

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

6、测试查看加速效果
[root@localhost xcache-3.2.0]# ab -c 10 -n 100 http://192.168.2.26/wordpress/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: