2017年10月

在 CentOS 7 通过 Software Collections 源安装 apache2.4 php5.6 mysql5.6

现在不少商家,默认选择 CentOS 7 系统,但里边默认的php版本是5.4的,已经不太适合一些新版本的程序要求了。

过程:

  1. yum install centos-release-scl # 安装 Software Collections 源
  2. yum install httpd24 # 安装 apache 2.4
  3. scl enable httpd24 bash
  4. service httpd24-httpd start # 启动 apache 2.4 服务
  5. yum install rh-php56 rh-php56-php rh-php56-php-gd rh-php56-php-mbstring rh-php56-php-mysqlnd rh-php56-php-pdo rh-php56-php-xml # 安装 php5.6 及相关
  6. scl enable rh-php56 bash
  7. yum install rh-mysql56 # 安装 mysql5.6
  8. scl enable rh-mysql56 bash
  9. service rh-mysql56-mysqld start # 启动 mysql 服务
  10. mysql_secure_installation # 修改mysql的默认空密码
  11. 上传一份 phpmyadmin 到 opt/rh/httpd24/root/var/www/html/ ,测试正常

参考:

“吃鸡”游戏,双排第2名

游戏开始,伙伴挂机。自己看着地图跑白圈(安全区)。小圈时不知道被什么地方打,随意扔一个手雷,之后趴在草地里用绷带。剩2人时,不知道对方在哪,但他时不时扔手雷。最后呢,死在安全圈外了。

20171026122709_1.jpg

为 “护卫神 apache大师”站点添加ssl证书,实现https访问

环境:护卫神 apache大师 2.1.0,Windows 2012

过程:

  1. 安装好 “护卫神 apache大师” 软件,开设站点,如本例 mp.anqun.org
  2. 编辑 C:\HwsApacheMaster\Apache\conf\httpd.conf 文件,搜索 mod_ssl,移除注释符号#(本例第124行); 同理,让 httpd-ssl.conf 配置文件也生效
  3. 编辑 C:\HwsApacheMaster\Apache\conf\extra\httpd-ssl.conf 文件,修改 SSLSessionCache 文件的存储路径,使之有效;之后新建一个https的站点配置内容,如本例的 mp.anqun.org,证书文件保存在 C:\HwsApacheMaster\Apache\conf\ssl 目录内

    #   Inter-Process Session Cache:
    #   Configure the SSL Session Cache: First the mechanism 
    #   to use and second the expiring timeout (in seconds).
    #SSLSessionCache         "dbm:E:/Huweishen.com/HwsApacheMaster/Apache2.2/logs/ssl_scache"
    # SSLSessionCache        "shmcb:E:/Huweishen.com/HwsApacheMaster/Apache2.2/logs/ssl_scache(512000)"
    SSLSessionCache        "shmcb:logs/ssl_scache(512000)"
    SSLSessionCacheTimeout  300
    
    #   Semaphore:
    #   Configure the path to the mutual exclusion semaphore the
    #   SSL engine uses internally for inter-process synchronization. 
    SSLMutex default
    
    ##
    ## SSL Virtual Host Context
    ##
    <VirtualHost *:443>
         SSLEngine on
         SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
         SSLCertificateFile      "conf\ssl\1_mp.anqun.org_bundle.crt"
         SSLCertificateKeyFile   "conf\ssl\2_mp.anqun.org.key"
         ServerName      "mp.anqun.org"
         DocumentRoot    "C:\HwsApacheMaster\wwwroot\mp_f75yPU"
         
    <Directory "C:/HwsApacheMaster/wwwroot/mp_f75yPU">
         Options FollowSymLinks ExecCGI
     #AddHandler fcgid-script .php
     #FcgidWrapper "/php-cgi.exe" .php
         DirectoryIndex index.html index.htm index.php default.php index.jsp
         AllowOverride All
         Order Deny,Allow
         Allow from all
     </Directory>
    </VirtualHost>
  4. 重启apache,在浏览器里测试,https访问有效

参考:http://www.huweishen.com/?apachemaster