PyQt5 Anaconda3 Eric6开发环境

首先下载anaconda3并安装,如果在此之前安装了其他python解析器,先将他们卸载。

Downloads

anaconda安装完之后,打开Anaconda Prompt,安装qscintilla(eric6需求):

pip install qscintilla

 

中间如出现权限问题而无法安装qscintilla,检查一下是否有其他python进程在运行,终止所有python进程后重试。

在安装完anaconda和qscintilla之后,就可以开始eric6了,打开解压后的eric6目录中install.py开始安装eric6 ide。

https://eric-ide.python-projects.org/eric-download.html

eric6中打开qtdesigner文件是提示无法找到qtdesigner的问题, 打开anaconda promot,安装pyqt5-tools:

pip install pyqt5-tools

 

在控制台中重置OpenMediaVault webui管理员密码

通过ssh登录在openmediavault所在的服务器上,运行omv-firstaid,选中第三项 Change control panel administrator password,然后输入两次密码即可。还有如果你的账号因多次登录失败,有可能被禁用状态,也可以通过omv-firstaid来重置(reset failed login attemp counter)

Linux中ipv4优先

默认不修改情况下,如linux主机中有ipv6地址, 会优先走ipv6通道,例如debian的源dns解析会默认返回AAAA记录(ipv6),要使用ipv4 连接优先而不必禁用ipv6,需要修改gai.conf配置文件使其生效。

debian系:修改/etc/gai.conf,取消下面这一行的注释

precedence ::ffff:0:0/96  100

redhat系:修改/etc/gai.conf,添加如下内容

label       ::1/128        0
label       ::/0           1
label       2002::/16      2
label       ::/96          3
label       ::ffff:0:0/96  4
precedence  ::1/128        50
precedence  ::/0           40
precedence  2002::/16      30
precedence  ::/96          20
precedence  ::ffff:0:0/96  100

 

使用rutorrent插件httprpc远程控制rtorrent

rutorrent是一款不错的rtorrent web前端,不常不错,但是手机上管理的使用由于屏幕太小显得有些不便, 在android上可通过transdrone来使用httprpc来控制,完成进本的种子添加移除之类的操作。

通常情况httptpc插件目录位于web根目录下/rutorrent/plusgins/httprpc,在android上打开transdrone, 添加一个远程服务器:

选择Add normal , custom server
Server Type 选择rtorrent
IP or host name 填写自己的服务商ip或域名,以及设定好的Username和password。

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

最关键的地方, 在Advanced settings中scgi mount point将httprpc信息写入:/rutorrent/plugins/httprpc/action.php。
如果使用了https链接,再把Use SSL 选中,及Accept all SSL certificates。

Cent os 5 可用的备用源(5.11)

修改/etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/5.11/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/5.11/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://vault.centos.org/5.11/extras/$basearch/

gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

 

Nextcloud issues

The test with getenv(“PATH”) only returns an empty response

修改php-fpm中www.conf,将下面行的内容注释取消,重启php

;env[HOSTNAME] = $HOSTNAME
;env[PATH] = /usr/local/bin:/usr/bin:/bin
;env[TMP] = /tmp
;env[TMPDIR] = /tmp
;env[TEMP] = /tmp

nextcloud在nginx中的伪静态规则,在站点配置中添加一下内容:

location
~ ^/(data|config|\.ht|db_structure\.xml|README) {
deny all;
}

The “Strict-Transport-Security” HTTP header is not configured to least “15552000” seconds. For enhanced security we recommend enabling HSTS as described in our security tips.

在站点SSL配置文件添加一下内容(apache2: a2enmod headers)

NGINX:

add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";

APACHE:

 Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"

 

Something wordpress

php:
/etc/php5/fpm/pool.d/www.conf >>
listen = 127.0.0.1:9000 (#listen = /var/run/php5-fpm.sock)
listen.allowed_clients = 127.0.0.1

Nginx Site Config


location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;

 

# NOTE: You should have “cgi.fix_pathinfo = 0;” in php.ini

# With php5-cgi alone:
fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
#fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

WordPress Rewrite

add content to

location /{
if (!-e $request_filename) {
rewrite (.*) /index.php;
}
}

 

DataBase

CREATE DATABASE wp;

GRANT ALL PRIVILEGES ON wp.* TO "wpuser"@"localhost" IDENTIFIED BY "password";