http

练习:分别使用CentOS 7和CentOS 6实现以下任务

一、配置三个基于名称的虚拟主机

         (a) discuzX

         (b) wordpress

         (c) https: phpMyAdmin

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

# systemctl start httpd

# systemctl start mariadb

# mysqladmin -u root password rootgm

# vim /etc/httpd/conf/httpd.conf

    #DucomentRoot "…"

# vim /etc/httpd/conf/vhosts.conf

http

# mkidr -p /www/gm{1,2,3}

CA认证

# cd /etc/pki/CA

# touch /etc/pki/CA/{serial,index.txt}

# echo 01 > /etc/pki/CA/serial

# (umask 077; openssl genrsa -out private/cakey.pem 2048)

# openssl req -new -x509 -key private/cakey.pem -out cacert.pem

http

# mkdir /etc/httpd/ssl

# cd /etc/httpd/ssl

# (umask 077; openssl genrsa -out httpd.key pem2048)

# openssl req -new -key httpd.key -out httpd.csr

http

# openssl ca httpd.csr -out /etc/pki/CA/certs/httpd.crt 

http

# cp /etc/pki/CA/certs/httpd.crt /etc/httpd/ssl/


# vim /etc/httpd/conf/ssl.conf

http

http

# vim /etc/hosts

    10.1.252.101    www.gm1.com

    10.1.252.101    www.gm2.com

    10.1.252.101    www.gm3.com

    

获取Discuz、wordpress、phpMyAdmin的程序包

http

# mv Discuz_X3.2_SC_UTF8.zip /www/gm1

# mv wordpress-4.3.1-zh_CN.zip /www/gm2

# mv phpMyAdmin-4.0.5-all-languages.zip /www/gm3

1、安装Discuz

# cd /www/gm1

# unzip Discuz_X3.2_SC_UTF8.zip

# cd upload

# chown apache config data uc_client uc_server

创建所需数据库和管理该数据库的帐号和密码

# mysql -u root -p

>rootgm

>craete database discuz

>grant all on discuz.* to 'hlr'@'localhost' identified by 'hlr423'


在浏览器中访问 www.gm1.com/upload  ;开始安装

http

2、安装wordpress

# cd /www/gm2

# unzip wordpress-4.3.1-zh_CN.zip

# chown apache /www/gm2/wordpress

创建所需数据库和管理该数据库的帐号和密码

# mysql -u root -p

>rootgm

>craete database wordpress

>grant all on wordpress.* to 'gm'@'localhost' identified by 'gm625'


在浏览器中访问 www.gm2.com/wordpress  ;开始安装

http

3、安装phpMyAdmin

# cd /www/gm3

# unzip phpMyAdmin-4.0.5-all-languages.zip

# mv phpMyAdmin-4.0.5-all-languages phpma

# cd phpma

# cp config.sample.inc.php config.inc.php

# openssl rand -base64 8

LwQlqS7DdsY=

# vim config.inc.php

http

# yum -y install php-mbstring php-mcrypt

在浏览器中访问 www.gm3.com/phpma  ;开始安装

http

CentOs6:

yum -y install httpd php php-mysql mysql-server mod_ssl 

其他的步骤同CentOS7

二、对discuzX的主页做压测;

    分别给出并发10, 100, 200, 500等每秒的响应数

http

http

原创文章,作者:megedugao,如若转载,请注明出处:http://www.178linux.com/50388

(0)
megedugaomegedugao
上一篇 2016-10-09 18:54
下一篇 2016-10-10 15:22

相关推荐

  • Linux 第七天: (08月05日) 练习和作业

    Linux 第七天: (08月05日) 练习和作业       1 找出ifconfig命令结果中本机的所有IPv4地址 ifconfig | tr -cs '[0-9].''\n' | sort -ut '.' -k3 -n 或ifconfig | head -2 |…

    Linux干货 2016-08-08
  • 初识正则表达式

    正则表达式是个什么东东? 正则表达式,又称正规表示法、常规表示法(英语:Regular Expression,在代码中常简写为regex、regexp或RE)。在很多文本编辑器里、命令中,通常要使用检索、替换、放行和拒绝那些符合某个模式的文本。而正则表达式就是用于描述这些规则的工具。换句话说,正则表达式就是记录文本规则的代码。  摘自《正则表达式之…

    Linux干货 2015-03-27
  • 第10天:程序包,脚本,sed

    http://note.youdao.com/yws/public/redirect/share?id=b9432a76ff1180b42e01f6eb7c9fc90e&type=false

    Linux干货 2016-08-18
  • vim的简单应用

    vim的简单应用         之前我们学习过Linux的思想,其中有一条就是一切皆文本,所以在这里大部分配置文件都是文本模式存在的,那么使用简单的文字编辑器就可以修改配置了,之前我们学习过nano文本编辑器,但是Vim会比nano使用的更为方便,也更强大。 基本现在所有的Li…

    2017-06-17
  • 双主模型的Nginx高可用负载均衡集群

    实验目的:使用keepalived实现Nginx的双主高可用负载均衡集群 实验环境:两台Nginx proxy(双主Nginx,各需要两块网卡,eth0连接内网,eth1连接外网)、两台web server(请求的负载均衡)、一台client用于验证结果。 注意:为了不影响实验结果,在实验开始前先关闭iptables和selinux 操作步骤: 一、配置IP…

    2017-05-13
  • 网络管理2

    一、知识整理 1、网卡配置文件格式:vim /etc/sysconfig/network-scripts/ifcfg-eth0 TYPE=Ethernet接口类型,常见的类型有Ethernet,Bridge BOOTPROTO=static设置静态还是DHCP获取IP,static和none都为静态,不写此行必须指定。查看配置DHCP之后的信息: cat /…

    Linux干货 2016-09-07