liujia 发布的文章

在Debian 8里配置mutt通过远程smtp 465端口发送电子邮件

背景:阿里云专有网络类型的云服务器默认过滤了25端口的通讯,无法向外发送邮件。

环境:Debian 8系统

过程:

  1. dpkg-reconfigure exim4-config 先设置exim4,允许系统往外域发信
  2. vi ~/.muttrc 创建mutt配置文件,内容如下:

    set from = "anqunhe@aliyun.com" # 发信人地址
    set realname = "DongShan" # 发信人名称
    set smtp_url = "smtps://anqunhe@aliyun.com@smtp.aliyun.com:465/" # smtp服务器地址
    set smtp_pass = "password" # 邮箱账户密码
    set ssl_verify_host=no # 不检查邮件服务器证书名称
    set ssl_verify_dates=no # 不检查邮件服务器证书有效期

  3. mutt dongshan3@foxmail.com 发信测试
  4. 发信成功

参考:

  1. https://wiki.debian.org/Exim
  2. http://www.mutt.org/doc/manual
  3. https://superuser.com/questions/387064/mutt-will-not-let-me-save-an-ssl-certificate
  4. https://www.garron.me/en/go2linux/send-mail-gmail-mutt.html
  5. https://mailhelp.aliyun.com/freemail/detail.vm?knoId=5869705

xiuno bbs发帖错误 xhr.responseText; type:error

现象:新安装的 xiuno bbs 发帖不成功,弹出窗口,xhr.responseText; type:error 错误。

xiunobbs_7.png

过程:以为是php环境原因,所以,从php7.0换到php5.6,甚至用xiuno bbs官方推荐的lnmp包环境,也是一样错误。

解决:之前是用git下载的xiuno bbs来安装,改用现成的安装文件(https://bbs.xiuno.com/down/xiunobbs_4.0.beta_005.tar.gz?v=31)就可以了。

参考:https://bbs.xiuno.com/thread-10284.htm

在Debian 8里安装xiuno bbs轻论坛

环境:Debian 8.8 64位,阿里云公共系统镜像;ECS实例配置:1核2GB内存,经典网络;假设已经安装好了nginx + php7.0-fpm + MariaDB

  1. apt-get update 更新
  2. wget http://bbs.xiuno.com/down/xiunobbs_4.0.beta_005.tar.gz?v=31 下载xinuobbs程序文件,解压到站点文件目录
  3. 在浏览器输入网址,进行安装
  4. 填写数据库连接信息
  5. 安装完成,站点前台,后台显示正常

参考:https://bbs.xiuno.com/thread-12945.htm

在Debian 8系统里安装nginx + php7.0-fpm + MariaDB

环境:Debian 8.8 64位,阿里云公共系统镜像,ECS实例配置:1核2GB内存,经典网络

过程:

  1. vi /etc/apt/sources.list 编辑安装源,添加 dotdeb 镜像站点信息,

    deb http://mirror.xtom.com.hk/dotdeb/ jessie all
    deb-src http://mirror.xtom.com.hk/dotdeb/ jessie all

  2. 添加 GnuPG key

    wget https://www.dotdeb.org/dotdeb.gpg
    apt-key add dotdeb.gpg

  3. apt-get update 更新
  4. apt-get install nginx 安装nginx
  5. apt-get install php7.0-fpm php7.0-gd php7.0-mysql php7.0-mbstring 安装php7.0及相关组件
  6. 编辑默认的nginx站点配置文件/etc/nginx/sites-enabled/default,添加 index.php 类型的默认首页文件,及启用php

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

    location ~ .php$ {

             include snippets/fastcgi-php.conf;
             fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
     }
    
  7. systemctl restart nginx 重启 nginx 服务,以让更改生效
  8. apt-get install mariadb-server ,安装 MariaDB (mysql)数据库服务端
  9. 上传一个phpmyadmin测试,正常

参考:

  1. https://www.dotdeb.org/instructions/
  2. https://www.cyberciti.biz/faq/installing-php-7-on-debian-linux-8-jessie-wheezy-using-apt-get/

阿里云公共镜像CentOS 7.3 64位yum安装源文件内容

因为昨晚看到“鬼才”说新创建的ECS实例,运行yum update的命令出错,提示文件未找到。

今天(2017-08-28)新创建的一个网络类型为“经典网络”的1GB ECS实例(未分配公网IP地址),测试结果如下:

a. 内核信息如下:Linux iZbp1e4mchw553gx59aygaZ 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

b. 运行 yum update 命令正常

c. /etc/yum.repos.d 目录下有 CentOS-Base.repo 和 epel.repo 两个安装源文件,分别内容如下:

  [base]
  name=CentOS-$releasever - Base
  failovermethod=priority
  baseurl=http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/
  gpgcheck=1

gpgkey=http://mirrors.aliyuncs.com/centos/RPM-GPG-KEY-CentOS-7

released updates

[updates]
name=CentOS-$releasever - Updates
failovermethod=priority
baseurl=http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyuncs.com/centos/RPM-GPG-KEY-CentOS-7

additional packages that may be useful

[extras]
name=CentOS-$releasever - Extras
failovermethod=priority
baseurl=http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyuncs.com/centos/RPM-GPG-KEY-CentOS-7

additional packages that extend functionality of existing packages

[centosplus]
name=CentOS-$releasever - Plus
failovermethod=priority
baseurl=http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyuncs.com/centos/RPM-GPG-KEY-CentOS-7

contrib - packages by Centos Users

[contrib]
name=CentOS-$releasever - Contrib
failovermethod=priority
baseurl=http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyuncs.com/centos/RPM-GPG-KEY-CentOS-7

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://mirrors.aliyuncs.com/epel/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=http://mirrors.aliyuncs.com/epel/7/$basearch/debug
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=0

[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=http://mirrors.aliyuncs.com/epel/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=0