通过LAMP部署phpMyAdmin、wordpress(https)、discuz
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的更多相关文章
- Win7下安装Apache+PHP+phpMyAdmin+wordpress+drupal+discuz
[Apache] Listen 90 DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs&q ...
- LAMP——实现phpMyadmin、wordpress及Discuz应用部署
一.环境准备 操作系统:Centos8.3.2011 软件:Apache2.4.37.Mysql8.0.21.PHP7.2.24 二.安装过程 1.安装phpmyadmin 1.1.安装软件包并启动服 ...
- 编译安装基于 fastcgi 模式的多虚拟主机的wordpress和discuz的LAMP架构
目录 实现CentOS 7 编译安装基于 fastcgi 模式的多虚拟主机的wordpress和discuz的LAMP架构 准备环境: 准备软件版本: 主机名修改用以区分 数据库服务器 实现数据库二进 ...
- 架构篇 | LAMP 架构应用案例 - 部署 PHPMyAdmin 系统(二)
作者 | JackTian 微信公众号 | 杰哥的IT之旅(ID:Jake_Internet) 转载请联系授权(微信ID:Hc220066)备注:来自博客园 1.什么是 phpMyadmin 系统? ...
- RHEL6 --部署phpMyAdmin与论坛系统
一.rpm安装LAMP平台部署phpMyAdmin 二.搭建wordpress个人博客系统 三.搭建论坛系统 一.rpm安装LAMP平台及部署phpMyAdmin 1.phpMyAdmin简介及获取方 ...
- 部署个人wordpress 笔记
yum list installed | grep php #检查当前安装的PHP包yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 ... ...
- 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 ...
- CentOS 7 下的LAMP实现以及基于https的虚拟主机
系统环境:CentOS 7Apache 2.4php 5.4MariaDB 5.5 项目需求:创建3个虚拟主机,分别架设phpMyadmin,wordpress,Discuz其中phpMyadmin提 ...
- Httpd服务进阶知识-基于Apache Modele的LAMP架构之WordPress案例
Httpd服务进阶知识-基于Apache Modele的LAMP架构之WordPress案例 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.安装依赖包及数据库授权 博主推荐阅读 ...
随机推荐
- Jarvis OJ - Baby's Crack - Writeup
Jarvis OJ - Baby's Crack - Writeup M4x原创,欢迎转载,转载请表明出处 这是我第一次用爆破的方法做reverse,值得记录一下 题目: 文件下载 分析: 下载后解压 ...
- 解析python 生产/消费者模型实现过程
1.多线程实现 import threadingimport queueimport logginglogging.basicConfig(level = logging.INFO,format = ...
- Abp.core中在应用层获取HttpContext对象
实际IHttpContextAccessor对象已经在底层实现了自动的依赖注入,只需要在应用层引入Microsoft.AspNetCore.Http,然后在构造函数中依赖注入即可. /// <s ...
- navicat导入.csv表格
我本地的navicat不知道啥情况,导入不了表格,然后把表格转为.csv的,然后导入就好了 1.表格另存为.csv格式的 2.打开Navicat,选择要导入的表,然后右键->导入向导,选择.cs ...
- 【笔记】Linux进程间同步和进程绑定至特定cpu
#define _GNU_SOURCE #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> ...
- 面向对象--OO--object-oriented
如何把大象装冰箱? 面向过程:打开冰箱门---把大象装进去---关上冰箱门 面向对象: 1.大象:进入冰箱.离开冰箱 2.冰箱:开门.关门 3.人:检测1.检测2 面向对象三大特性:封装.继承.多态 ...
- 最大m段子段和 Day9 - E - Max Sum Plus Plus HDU - 1024
Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we ...
- js实现上移下移
直接上代码 //上移 var $up = $(".up") $up.click(function () { var $tr = $(this).parents("tr&q ...
- HDU 1237 简单计算器(栈+stringstream)
提供几份代码,这题的输入可以用stringsteam处理,先处理乘除后处理加减,正常思路,但是后面统计加减法的时候,对栈的运用错了,我用的时候相当于给它多加了几个括号就错了. 正确的简单解法就是,加法 ...
- Android学习03
ToggleButton和Switch 状态开关ToggleButton与开关switch也是由button按钮派生出来的,因此他们的本质也是按钮,button支持的各种属性,方法toggleButt ...