安装完magisk后 adb shell 授权 su 权限
开启zygisk重启之后开不了机
1 | magisk --stop zygisk |
安装模块后开不了机
1 | magisk --remove-modules |
// 复制默认的配置文件以创建新的配置
cp /etc/redis.conf /etc/redis_6380.conf
cp /etc/redis.conf /etc/redis_6381.conf
cp /etc/redis.conf /etc/redis_6382.conf
// 打开新的配置文件进行编辑(对应修改)
vim /etc/redis_6380.conf1
2
3
4
5
6
7
8# 修改以下几处:
port 6380
pidfile /var/run/redis_6380.pid
daemonize yes
logfile /var/log/redis/redis_6380.log
dbfilename dump_6380.rdb
dir /var/lib/redis
requirepass "xxxxxx"
// 启动 redis 实例
/usr/bin/redis-server /etc/redis_6380.conf –supervised systemd
/usr/bin/redis-server /etc/redis_6381.conf –supervised systemd
/usr/bin/redis-server /etc/redis_6382.conf –supervised systemd
// 关闭 redis 实例
/usr/bin/redis-cli -p 6380 -a gp123456 shutdown
/usr/bin/redis-cli -p 6381 -a gp123456 shutdown
/usr/bin/redis-cli -p 6382 -a gp123456 shutdown
// 创建每个实例对应的目录
mkdir -p /data/mysql/3307
mkdir -p /data/mysql/3308
mkdir -p /data/mysql/3309
// 目录所属修改到 MariaDB 用户与用户组
chown -R mysql:mysql /data/mysql/3307
chown -R mysql:mysql /data/mysql/3308
chown -R mysql:mysql /data/mysql/3309
// 初始化数据目录
mysql_install_db –datadir=/data/mysql/3307/data –basedir=/usr –user=mysql
mysql_install_db –datadir=/data/mysql/3308/data –basedir=/usr –user=mysql
mysql_install_db –datadir=/data/mysql/3309/data –basedir=/usr –user=mysql
// MariaDB 配置文件
vim /etc/my.cnf1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27# 添加一下配置
[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
user = root
pass = password
[mysqld3307]
socket = /data/mysql/3307/mariadb.sock
port = 3307
pid-file = /data/mysql/3307/mariadb.pid
datadir = /data/mysql/3307/data
user = mysql
[mysqld3308]
socket = /data/mysql/3308/mariadb.sock
port = 3308
pid-file = /data/mysql/3308/mariadb.pid
datadir = /data/mysql/3308/data
user = mysql
[mysqld3309]
socket = /data/mysql/3309/mariadb.sock
port = 3309
pid-file = /data/mysql/3309/mariadb.pid
datadir = /data/mysql/3309/data
user = mysql
// 启动
mysqld_multi start 3307-3309
// 初始化配置 密码设置成 password
mysql_secure_installation -S /data/mysql/3307/mariadb.sock
mysql_secure_installation -S /data/mysql/3308/mariadb.sock
mysql_secure_installation -S /data/mysql/3309/mariadb.sock
// 停止
mysqld_multi stop 3307-3309
1.安装epel:1
2
3
4// 查看已安装的PHP,查到后rpm -e 卸载
yum list installed | grep php
yum repolist all | grep php
yum install epel-release -y
2.安装REMI源:1
rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-7.rpm
3.查看可以安装的PHP版本:(54-80版本都有)1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16yum repolist all | grep php
// 安裝 php56 版本
yum install php56 php56-php-fpm php56-php-cli php56-php-bcmath php56-php-gd php56-php-json php56-php-mbstring php56-php-mcrypt php56-php-mysqlnd php56-php-opcache php56-php-pdo php56-php-pecl-crypto php56-php-pecl-mcrypt php56-php-soap php56-php-pecl-zip php56-php-process php56-php-pecl-yaf php56-php-xml php56-php-pecl-swoole4 php56-php-ldap php56-php-pear php56-php-xml php56-php-pecl-imagick php56-php-pecl-wddx php56-php-intl php56-php-sodium
// 安裝 php73 版本
yum install php73 php73-php-fpm php73-php-cli php73-php-bcmath php73-php-gd php73-php-json php73-php-mbstring php73-php-mcrypt php73-php-mysqlnd php73-php-opcache php73-php-pdo php73-php-pecl-crypto php73-php-pecl-mcrypt php73-php-soap php73-php-pecl-zip php73-php-process php73-php-pecl-yaf php73-php-xml php73-php-pecl-swoole4 php73-php-ldap php73-php-pear php73-php-xml php73-php-pecl-imagick php73-php-pecl-wddx php73-php-intl php73-php-sodium
// 安裝 php74 版本
yum install php74 php74-php-fpm php74-php-cli php74-php-bcmath php74-php-gd php74-php-json php74-php-mbstring php74-php-mcrypt php74-php-mysqlnd php74-php-opcache php74-php-pdo php74-php-pecl-crypto php74-php-pecl-mcrypt php74-php-soap php74-php-pecl-zip php74-php-process php74-php-pecl-yaf php74-php-xml php74-php-pecl-swoole4 php74-php-ldap php74-php-pear php74-php-xml php74-php-pecl-imagick php74-php-pecl-wddx php74-php-intl php74-php-sodium
// 安裝 php80 版本
yum install php80 php80-php-fpm php80-php-cli php80-php-bcmath php80-php-gd php80-php-json php80-php-mbstring php80-php-mcrypt php80-php-mysqlnd php80-php-opcache php80-php-pdo php80-php-pecl-crypto php80-php-pecl-mcrypt php80-php-soap php80-php-pecl-zip php80-php-process php80-php-pecl-yaf php80-php-xml php80-php-pecl-swoole4 php80-php-ldap php80-php-pear php80-php-xml php80-php-pecl-imagick php80-php-pecl-wddx php80-php-intl php80-php-sodium
// 安裝 php81 版本
yum install php81 php81-php-fpm php81-php-cli php81-php-bcmath php81-php-gd php81-php-json php81-php-mbstring php81-php-mcrypt php81-php-mysqlnd php81-php-opcache php81-php-pdo php81-php-pecl-crypto php81-php-pecl-mcrypt php81-php-soap php81-php-pecl-zip php81-php-process php81-php-pecl-yaf php81-php-xml php81-php-pecl-swoole4 php81-php-ldap php81-php-pear php81-php-xml php81-php-pecl-imagick php81-php-pecl-wddx php81-php-intl php81-php-sodium
3-1.卸载PHP版本1
2
3
4
5
6
7
8
9
10// 卸载安装包5.6
yum remove php56 php56-php-fpm php56-php-cli php56-php-bcmath php56-php-gd php56-php-json php56-php-mbstring php56-php-mcrypt php56-php-mysqlnd php56-php-opcache php56-php-pdo php56-php-pecl-crypto php56-php-pecl-mcrypt php56-php-soap php56-php-pecl-zip php56-php-process php56-php-pecl-yaf php56-php-xml php56-php-pecl-swoole4 php56-php-ldap php56-php-pear php56-php-xml php56-php-pecl-imagick php56-php-pecl-wddx php56-php-intl php56-php-sodium
// 查看rpm包
rpm -qa|grep php56
// 删除rpm包
rpm -e php56-runtime-5.6-1.el7.remi.x86_64
ls -al /opt/remi/
ls -al /etc/opt/remi/
// 在路徑下能夠找到相應的版本1
ls /etc/opt/remi/
// 修改 php.ini 配置
vim /etc/opt/remi/php73/php.ini
# 开启整站 zlib 压缩输出
zlib.output_compression = Off
# 修改 zlib 压缩比
zlib.output_compression_level = 5
# 关闭 PATH_INFO
cgi.fix_pathinfo = 0
# 设置时区
date.timezone = Asia/Shanghai
vim /etc/opt/remi/php74/php.ini
# 开启整站 zlib 压缩输出
zlib.output_compression = Off
# 修改 zlib 压缩比
zlib.output_compression_level = 5
# 关闭 PATH_INFO
cgi.fix_pathinfo = 0
# 设置时区
date.timezone = Asia/Shanghai
vim /etc/opt/remi/php80/php.ini
# 开启整站 zlib 压缩输出
zlib.output_compression = Off
# 修改 zlib 压缩比
zlib.output_compression_level = 5
# 关闭 PATH_INFO
cgi.fix_pathinfo = 0
# 设置时区
date.timezone = Asia/Shanghai
vim /etc/opt/remi/php81/php.ini
# 开启整站 zlib 压缩输出
zlib.output_compression = Off
# 修改 zlib 压缩比
zlib.output_compression_level = 5
# 关闭 PATH_INFO
cgi.fix_pathinfo = 0
# 设置时区
date.timezone = Asia/Shanghai
1 |
|
// 修改相关文件的所属1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19chown themismin:nginx /var/opt/remi/php73/lib/php/opcache
chown themismin:nginx /var/opt/remi/php73/lib/php/session
chown themismin:nginx /var/opt/remi/php73/lib/php/wsdlcache
chown themismin:nginx /var/opt/remi/php73/log/php-fpm
chown themismin:nginx /var/opt/remi/php74/lib/php/opcache
chown themismin:nginx /var/opt/remi/php74/lib/php/session
chown themismin:nginx /var/opt/remi/php74/lib/php/wsdlcache
chown themismin:nginx /var/opt/remi/php74/log/php-fpm
chown themismin:nginx /var/opt/remi/php80/lib/php/opcache
chown themismin:nginx /var/opt/remi/php80/lib/php/session
chown themismin:nginx /var/opt/remi/php80/lib/php/wsdlcache
chown themismin:nginx /var/opt/remi/php80/log/php-fpm
chown themismin:nginx /var/opt/remi/php81/lib/php/opcache
chown themismin:nginx /var/opt/remi/php81/lib/php/session
chown themismin:nginx /var/opt/remi/php81/lib/php/wsdlcache
chown themismin:nginx /var/opt/remi/php81/log/php-fpm
// 启动服务1
2
3
4
5
6
7
8
9
10
11systemctl restart php73-php-fpm
systemctl enable php73-php-fpm
systemctl restart php74-php-fpm
systemctl enable php74-php-fpm
systemctl restart php80-php-fpm
systemctl enable php80-php-fpm
systemctl restart php81-php-fpm
systemctl enable php81-php-fpm
1 | yum-config-manager --disable 'remi-php*' |
1 | ## OBS下载地址 |
1 | yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine |
1 | ### 直接安装 |
查看容器的挂载目录
1 | docker inspect 6a11b0b8291a | grep Mounts -A 20 |
阿里云 docker 镜像加速器
1 | https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors |
启动/关闭容器
1 | docker-composer up -d |
此中文(简体)语言包为 VS Code 提供本地化界面。
导入Sublime Text设置和按键绑定到VS Code中。
PHP 的代码提示、补全、跳转定义、格式化插件,功能强大,无需配置
注释自动生成器
快捷代码片段
对齐代码
Code > 首选项 > 键盘快捷方式 > 打开键盘快捷方式(JSON)
// 将键绑定放在此文件中以覆盖默认值
[
{
“key” : “shift+alt+d”,
“command”: “wwm.aligncode”,
“when” : “editorTextFocus && !editorReadonly”
}
]
1 | shift+alt+d: 光标移动到等号行,等号对齐 |
opencache 影响在线部署调试问题
mysql.default_socket 导致数据库无法连接问题
short_open_tag 导致php对短标签无法解析问题
nginx try_files 单入口文件设置问题