2019年6月

在Debian 8 系统里安装weiphp程序

有客户要求提供一个安装weiphp程序的教程,所以发此帖。

环境:Debian 8 64位,weiphp3.0_20160708_2215.zip

过程:

1.参考这个帖子 ,安装基本的php+mysql运行环境

2.因为weiphp还需要 gd 及 curl 的php组件,所以还需运行以下命令来安装php的组件:
apt-get install php5-gd php5-curl

3.将weiphp的程序文件上传到/var/www/html目录,通过浏览器完成安装
bbs-aliyun-dongshan3-290313-1.png

bbs-aliyun-dongshan3-290313-2.png

bbs-aliyun-dongshan3-290313-3.png

bbs-aliyun-dongshan3-290313-4.png

4.完成安装后,网站前后台测试正常
bbs-aliyun-dongshan3-290313-5.png

bbs-aliyun-dongshan3-290313-6.png

参考:http://www.weiphp.cn/wiki/

在xampp套件中的apache2.4启用Webdav功能

在xampp套件中的apache2.4启用Webdav功能

一用户问,为什么在旧版的xampp里可以很方便使用xampp中的webdav功能来建NAS网络存储,但新版本不行。

经过测试和网上的搜索结果,这可能是因为新版本的apache 2.4中一些默认设置导致的,特别是需要注意关闭webdav目录中的默认首页显示功能。

环境:Windows 2012 64位,xampp-win32-7.0.8-0-VC14-installer.exe(apache2.4)

过程:

1.从xampp官方网站下载最新版本的安装程序,进行安装

2.安装过程中,本例尽可能少安装组件,如mysql等组件不安装。安装过程中,提示apache停止工作,可忽略
bbs-aliyun-dongshan3-290302-1.png

bbs-aliyun-dongshan3-290302-2.png

bbs-aliyun-dongshan3-290302-3.png

3.修改 D:\xampp\apache\conf\httpd.conf 文件里的内容,启用webdav及验证所需要几个模块,如 mod_auth_digest, mod_dav, mod_dav_fs 等
bbs-aliyun-dongshan3-290302-4.png

4.且启用 conf/extra/httpd-dav.conf 里的配置文件
bbs-aliyun-dongshan3-290302-5.png

5.编辑 conf/extra/httpd-dav.conf 配置文件,注释或删除里边关于webdav目录的内容,因为本例将新建一个虚拟站点
bbs-aliyun-dongshan3-290302-6.png

6.编辑 conf/extra/httpd-vhosts.conf 配置文件内容,本例内容如下:

<VirtualHost *:80>
    DocumentRoot "D:/xampp/htdocs/yun.anqun.org"
    ServerName yun.anqun.org
    ErrorLog "logs/yun.anqun.org-error.log"
    CustomLog "logs/yun.anqun.org-access.log" common
    
    <Directory "D:/xampp/htdocs/yun.anqun.org">
    # Disabled default index pages, for example, index.html
    DirectoryIndex disabled
    
    dav on
    AuthType Digest
    AuthName "DAV-upload"
    # You can use the htdigest program to create the password database:
    #   htdigest -c "c:/Apache24/user.passwd" DAV-upload admin
    AuthUserFile "c:/Apache24/user.passwd"
    AuthDigestProvider file
    
    <LimitExcept GET HEAD OPTIONS PROPFIND>
        require user admin
    </LimitExcept>
    
    </Directory>
</VirtualHost>

bbs-aliyun-dongshan3-290302-7.png

7.通过 htdigest -c "c:/Apache24/user.passwd" DAV-upload admin 命令来创建需要验证用户的访问信息
bbs-aliyun-dongshan3-290302-8.png

8.重启apache后,测试可以通过浏览器或cadaver客户端软件浏览webdav目录内容,创建目录里,会提示输入用户名和密码
bbs-aliyun-dongshan3-290302-9.png

bbs-aliyun-dongshan3-290302-10.png

参考:

将Ubuntu 14.04系统升级到 Ubuntu 16.04

云友“没小求“希望能在阿里云的ECS里使用 Ubuntu 16.04 版本,但目前公共系统镜像中最新版本是 Ubuntu 14.04。

阿里云官方不建议用户自行升级系统版本及更换内核。本例仅是测试。

环境:

ECS规格配置:1核心2GB内存(ecs.s1.small),非I/o优化;Ubuntu 14.04 64位系统。

过程:

  1. 查看当前内核及系统版本(内核 3.13):
    bbs-aliyun-dongshan3-289870-1.png
  2. 更新软件列表:
    apt-get update
  3. 升级软件:
    apt-get upgrade
    bbs-aliyun-dongshan3-289870-2.png
  4. 升级当前系统版本:
    apt-get dist-upgrade
    bbs-aliyun-dongshan3-289870-3.png
  5. 升级到新系统版本:
    do-release-upgrade -d
    bbs-aliyun-dongshan3-289870-4.png

5.更新软件源
bbs-aliyun-dongshan3-289870-5.png

6.开始升级
bbs-aliyun-dongshan3-289870-6.png

7.软件配置,一般选择“Yes”完成升级
bbs-aliyun-dongshan3-289870-7.png

bbs-aliyun-dongshan3-289870-8.png

bbs-aliyun-dongshan3-289870-9.png

8.重启系统,完成升级
bbs-aliyun-dongshan3-289870-10.png

9.查看升级后的内核及系统版本(内核 4.4)。在系统及ECS控制台进行,重启、关闭的动作,测试正常
bbs-aliyun-dongshan3-289870-11.png

参考:https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-ubuntu-16-04-lts

在Debian 8系统里安装pocketmine - MCPE

放暑假了,或许有更多的小朋友玩《我的世界》游戏了。

环境:Debian 8 64位,安装 PocketMine-MP。

过程:

  1. 新建(或编辑) 文件 /etc/apt/sources.list,方便安装软件,如阿里云内网的debian镜像:

    deb http://mirrors.aliyuncs.com/debian/ jessie main non-free contrib 
    deb http://mirrors.aliyuncs.com/debian/ jessie-proposed-updates main non-free contrib 
    deb-src http://mirrors.aliyuncs.com/debian/ jessie main non-free contrib 
    deb-src http://mirrors.aliyuncs.com/debian/ jessie-proposed-updates main non-free contrib
  2. 更新软件安装源:
    apt-get update
  3. 安装 screen 软件:
    apt-get install screen
  4. 添加一个新用户,如 liujia
    adduser liujia
  5. 以新用户登录到系统,创建一个mcpe目录:
    mkdir mcpe

6.转到mcpe目录,安装 PocketMine-MP:
cd mcpe
wget -q -O - http://get.pocketmine.net/ | bash

7.提示安装成功后,编辑 start.sh 文件,将里边的 php7 换成 php5

8.启动PocketMine-MP:
screen ./start.sh

参考:https://forums.pocketmine.net/threads/installation-problem.15479/page-2

在Debian 8系统安装 nginx + php + mysql(MariaDB) 基本Web环境

阿里云的ECS公共系统镜像里有“Debian 8.0 64位”的选择项,下边以安装wordpress为例,简单记录一下安装环境的过程。

环境:Debian 8 64位, nginx-1.6.2,php-5.6,MariaDB-10.0

过程:

1.创建文件 /etc/apt/sources.list,因为当前Debian 8的镜像系统中没有该文件,内容如下:

deb http://httpredir.debian.org/debian jessie main contrib non-free
deb-src http://httpredir.debian.org/debian jessie main contrib non-free
deb http://httpredir.debian.org/debian jessie-updates main contrib non-free
deb-src http://httpredir.debian.org/debian jessie-updates main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free

2.运行 apt-get update 的命令,更新软件包安装源

3.运行 apt-get install nginx 命令,安装 nginx web

4.运行 apt-get install php5-fpm php5-mysqlnd 命令,安装 php-fpm 及相应组件

5.编辑默认的nginx站点配置文件/etc/nginx/sites-enabled/default,添加 index.php 类型的默认首页文件,及启用php

index index.html index.htm index.nginx-debian.html;

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
        #
        #       # With php5-cgi alone:
        #       fastcgi_pass 127.0.0.1:9000;
        #       # With php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;
        }
 

6.之后需要通过 systemctl restart nginx 命令重启 nginx 服务,以让更改生效

7.运行 apt-get install mariadb-server 命令,安装 MariaDB (mysql)数据库服务端

8.将wordpress的程序文件放在 /var/www/html 目录里,根据提示完成wordpress安装
bbs-aliyun-dongshan3-288162-1.png

参考:
https://wiki.debian.org/SourcesList
https://www.vultr.com/docs/setup-up-nginx-php-fpm-and-mariadb-on-debian-8