1、安装启动LAMP

安装环境:

  CentOS Linux release 7.5.1804

安装包:

  # yum -y install httpd php php-mysql mariadb-server

启动服务:

  systemctl start mariadb

  systemctl start httpd

2、部署phpMyAdmin

1、配置虚拟主机
# vim /etc/httpd/conf/httpd.conf ,在文件的末尾加上下面配置信息
<VirtualHost *:80>
ServerName pma.ysu.com
DocumentRoot "/var/www/html/pma"
CustomLog logs/pma_log combined
<Directory "/var/www/html/pma">
Require all granted
</Directory>
</VirtualHost>
# systemctl restart httpd
2、上传phpMyAdmin-v4.4.14.1.zip安装包
# unzip phpMyAdmin-v4.4.14.1.zip
# mv phpMyAdmin-4.4.14.1-all-languages /var/www/html/pma
# chown -R apache:apache /var/www/html/pma/
# yum install php-mbstring
# systemctl restart httpd

3、修改phpMyAdmin的配置文件
# cd /var/www/html/pma/
# mv config.sample.inc.php config.inc.php
# vim config.inc.php
$cfg['blowfish_secret'] = 'ky0yK9JwZpVvDspknLUw'; #填入随机字符串,类似加密
$cfg['Servers'][$i]['host'] = '192.168.156.200'; #填入数据库地址 4、访问网站测试
修改windows的hosts文件,添加服务器的解析
  C:\Windows\System32\drivers\etc\hosts
访问http://pma.ysu.com,进行测试

3、部署wordpress(https)

一、创建私有CA
1、生成密钥对儿
# cd /etc/pki/CA
# (umask 077;openssl genrsa -out /etc/pki/CA/private/cakey.pem 2048)
2、生成自签证书:
  # openssl req -new -x509 -key private/cakey.pem -out cacert.pem -days 3655

填写证书信息
Country Name (2 letter code) [XX]:cn
State or Province Name (full name) []:Beijing
Locality Name (eg, city) [Default City]:Beijing
Organization Name (eg, company) [Default Company Ltd]: #不填直接回车
Organizational Unit Name (eg, section) []:#不填直接回车
Common Name (eg, your name or your server's hostname) []:ca.ysu.com
Email Address []:#不填直接回车
3、/etc/pki/CA目录下创建需要的文件:
# touch index.txt serial crlnumber
# echo 01 > serial 二、客户端用openssl实现证书的申请:
1、在客户服务器上生成密钥,保存至应用此证书的服务的配置文件目录下:
# mkdir /etc/httpd/ssl
# cd /etc/httpd/ssl
# (umask 077; openssl genrsa -out httpd.key 1024) 2、生成证书签署请求:
# openssl req -new -key httpd.key -out httpd.csr 填写申请信息
Country Name (2 letter code) [XX]:cn
State or Province Name (full name) []:Beijing
Locality Name (eg, city) [Default City]:Beijing
Organization Name (eg, company) [Default Company Ltd]: #不填直接回车
Organizational Unit Name (eg, section) []:#不填直接回车
Common Name (eg, your name or your server's hostname) []:wp.ysu.com #此处必须和访问网址域名一致
Email Address []:#不填直接回车
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:#不填直接回车
An optional company name []:#不填直接回车
3、将csr发送到CA服务器,因为这里客户端是CA服务器是同一个机器,省略此步骤 三、CA签署证书:
1、服务器上签署:
openssl ca -in /etc/httpd/ssl/httpd.csr -out /etc/httpd/ssl/httpd.crt -days 365
四、配置虚拟主机

# vim /etc/httpd/conf/httpd.conf ,在文件的末尾加上下面配置信息
Listen 443
<VirtualHost *:443>
ServerName wp.ysu.com
DocumentRoot "/var/www/html/wordpress"
CustomLog logs/wp_log combined
<Directory "/var/www/html/wordpress">
Require all granted
</Directory>
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite DEFAULT:!EXP:!SSLv2:!DES:!IDEA:!SEED:+3DES
SSLCertificateFile /etc/httpd/ssl/httpd.crt
SSLCertificateKeyFile /etc/httpd/ssl/httpd.key
</VirtualHost>
# systemctl restart httpd 五、配置wordpress 上传wordpress-4.9.4-zh_CN.zip
# unzip wordpress-4.9.4-zh_CN.zip
# mv wordpress /var/www/html/
# chow -R apache:apache /var/www/html/wordpress 创建数据库
mysql > CREATE DATABASE wp CHARACTER SET = utf8; 创建管理wp数据库的用户
mysql > GRANT ALL ON wp.* TO wp@localhost IDENTIFIED BY '111111'; 修改wordpress配置文件
# cd /var/www/html/wordpress
# mv wp-config-sample.php wp-config.php
# vim wp-config.php
修改如下字段
define('DB_NAME', 'wp');
define('DB_USER', 'wp');
define('DB_PASSWORD', '');
六、访问网站测试 
修改windows的hosts文件,添加服务器的解析
  C:\Windows\System32\drivers\etc\hosts
访问https://wp.ysu.com,进行测试

4、部署discuz

1、配置虚拟主机
# vim /etc/httpd/conf/httpd.conf ,在文件的末尾加上下面配置信息
<VirtualHost *:80>
ServerName dz.ysu.com
DocumentRoot "/var/www/html/dz/upload"
CustomLog logs/dz_log combined
<Directory "/var/www/html/dz/upload">
Require all granted
</Directory>
</VirtualHost>
# systemctl restart httpd
2、上传程序文件ComsenzDiscuz-DiscuzX-master.zip
# unzip ComsenzDiscuz-DiscuzX-master.zip
# mv DiscuzX /var/www/html/dz
# chown -R apache:apache /var/www/html/dz 3、创建数据库
mysql > CREATE DATABASE dz;
mysql > CREATE USER 'dz'@'localhost';
mysql > GRANT ALL PRIVILEGES ON dz.* TO 'dz'@'localhost' IDENTIFIED BY '123456'; 4、访问网站测试
修改windows的hosts文件,添加服务器的解析
  C:\Windows\System32\drivers\etc\hosts
访问http://dz.ysu.com,进行测试

通过LAMP部署phpMyAdmin、wordpress(https)、discuz的更多相关文章

  1. Win7下安装Apache+PHP+phpMyAdmin+wordpress+drupal+discuz

    [Apache] Listen 90 DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs&q ...

  2. LAMP——实现phpMyadmin、wordpress及Discuz应用部署

    一.环境准备 操作系统:Centos8.3.2011 软件:Apache2.4.37.Mysql8.0.21.PHP7.2.24 二.安装过程 1.安装phpmyadmin 1.1.安装软件包并启动服 ...

  3. 编译安装基于 fastcgi 模式的多虚拟主机的wordpress和discuz的LAMP架构

    目录 实现CentOS 7 编译安装基于 fastcgi 模式的多虚拟主机的wordpress和discuz的LAMP架构 准备环境: 准备软件版本: 主机名修改用以区分 数据库服务器 实现数据库二进 ...

  4. 架构篇 | LAMP 架构应用案例 - 部署 PHPMyAdmin 系统(二)

    作者 | JackTian 微信公众号 | 杰哥的IT之旅(ID:Jake_Internet) 转载请联系授权(微信ID:Hc220066)备注:来自博客园 1.什么是 phpMyadmin 系统? ...

  5. RHEL6 --部署phpMyAdmin与论坛系统

    一.rpm安装LAMP平台部署phpMyAdmin 二.搭建wordpress个人博客系统 三.搭建论坛系统 一.rpm安装LAMP平台及部署phpMyAdmin 1.phpMyAdmin简介及获取方 ...

  6. 部署个人wordpress 笔记

    yum list installed | grep php #检查当前安装的PHP包yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 ... ...

  7. LVS-NAT负载均衡PHP应用(Wordpress、Discuz)

    1 实验拓扑 2 需求 RS-01和RS-02对外提供WEB服务. RS-01搭建LAMP,PHP通过http模块方式提供. RS-02搭建LAMP,PHP通过fpm方式提供. RS-01和RS-02 ...

  8. CentOS 7 下的LAMP实现以及基于https的虚拟主机

    系统环境:CentOS 7Apache 2.4php 5.4MariaDB 5.5 项目需求:创建3个虚拟主机,分别架设phpMyadmin,wordpress,Discuz其中phpMyadmin提 ...

  9. Httpd服务进阶知识-基于Apache Modele的LAMP架构之WordPress案例

    Httpd服务进阶知识-基于Apache Modele的LAMP架构之WordPress案例 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.安装依赖包及数据库授权 博主推荐阅读 ...

随机推荐

  1. noobSTL-1-配置器-0

    noobSTL-1-配置器-0 0.前言 STL的配置器(allocator),也叫内存分配器,负责空间配置与管理,简单地说,就是负责管理内存的. 从实现的角度来看,配置器是一个实现了动态空间配置.空 ...

  2. 6_13古代象形符号(UVa1103)<图的连通块的应用>

    给出一幅黑白图像,每行相邻的四个点压缩成一个十六进制的字符.然后还有题中图示的6中古老的字符,按字母表顺序输出这些字符的标号. 输出说明:For each test case, display its ...

  3. bugku 域名解析题 50

    什么是域名解析???? 首先我们在Windows上找到文件“C:\Windows\System32\drivers\etc\hosts” 然后找到host 双击用记事本打开然后填写上黄色区域上的东西 ...

  4. 一起学Netty(一)之HelloWorld,可以聊天的小程序哦

    转自于:http://blog.csdn.net/linuu/article/details/51306480

  5. github,gitlab的区别

    链接:https://blog.csdn.net/Xiamen_XiaoHong/article/details/83655447 总而言之:gitlab最优

  6. input的number类型只能输入正数,禁止负数输入

    <input type="number" max="10" min='1' id='number'> <script> document ...

  7. 快递查询API

    https://market.aliyun.com/products/56928004/cmapi014394.html#sku=yuncode839400000

  8. 微信小程序UDP通信

    前言 UDP通信分为单播 广播 组播,基础库2.7.0之后,小程序开始支持UDP通信,目前小程序只支持单播. 小程序API 小程序UDP通信这一块可以说是很简单了就一个UDPSocket实例.然后bi ...

  9. 记一道简单的re--BUUctf reverse1

    1.首先拖进ida里,看到了左面一百多function...还是shift+f12 查看敏感字符串吧 2.发现了这两个比较可疑的字符串,然后双击this is the right flag 进入到了他 ...

  10. 修改eclipse工程jdk版本

    在eclipse中项目jdk版本不匹配的时候需要修改项目工程的jdk版本,但是网上的一些版本修改不是很完全,经过一些摸索之后,参考总结了我在项目中的具体配置实践 问题: 修改eclipse中的项目jd ...