小敏的博客


  • 首页

  • 分类

  • 标签

  • 归档

  • 关于

运维-swoole安装

发表于 2020-09-04 | 分类于 IT , 运维 | | 阅读次数:
1
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
https://github.com/nghttp2/nghttp2


yum install libev-devel libevent-devel c-ares-devel jemalloc-devel jansson-devel python-devel zlib-devel

./configure
make
make install

echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf
ldconfig


yum install hiredis-devel


pecl install https://pecl.php.net/get/swoole-2.2.0.tgz



### 异常处理
yum install centos-release-scl
yum install devtoolset-7
scl enable devtoolset-7 bash



apt-get install libwebp-dev libjpeg-dev libpng-dev libxpm-dev libfreetype6-dev libvpx-dev


apt-get install libpcap-dev libnet-dev libnids-dev libedit-dev libsodium-dev


sudo update-alternatives --config php

cd /opt/php-7.3.1

sudo ./configure --prefix=/usr/local/php7.3.1 --enable-bcmath --enable-exif --enable-fpm --enable-intl --enable-mbstring --enable-mysqlnd --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-zip --with-curl --with-gd --with-mysql-sock --with-openssl --with-pdo-mysql --with-zlib

sudo ./configure --enable-bcmath --enable-exif --enable-fpm --enable-intl --enable-mbstring --enable-mysqlnd --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-zip --with-curl --with-gd --with-mysql-sock --with-openssl --with-pdo-mysql --with-zlib

make clean
make
make install


cd /opt/php-7.3.1/ext/zlib
mv config0.4 config.m4
./configure
make
make install


cd /opt/swoole-2.2.0/
sudo ./configure --enable-sockets --enable-async-redis --enable-openssl --enable-http2 --enable-mysqlnd
1
2
3
4
--configure-options [--includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --disable-silent-rules --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-cli --disable-cgi --disable-phpdbg --with-config-file-path=/etc/php/7.3/cli --with-config-file-scan-dir=/etc/php/7.3/cli/conf.d --build=x86_64-linux-gnu --host=x86_64-linux-gnu --config-cache --cache-file=/build/php7.3-R8bPLl/php7.3-7.3.21/config.cache --libdir=${prefix}/lib/php --libexecdir=${prefix}/lib/php --datadir=${prefix}/share/php/7.3 --program-suffix=7.3 --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --disable-all --disable-debug --disable-rpath --disable-static --with-pic --with-layout=GNU --without-pear --enable-filter --with-openssl=yes --with-password-argon2=/usr --with-pcre-regex=/usr --enable-hash --with-mhash=/usr --enable-libxml --enable-session --with-sodium --with-system-tzdata --with-zlib=/usr --with-zlib-dir=/usr --enable-dtrace --enable-pcntl --with-libedit=shared,/usr build_alias=x86_64-linux-gnu host_alias=x86_64-linux-gnu CFLAGS=-g -O2 -fdebug-prefix-map=/build/php7.3-R8bPLl/php7.3-7.3.21=. -fstack-protector-strong -Wformat -Werror=format-security -O2 -Wall -pedantic -fsigned-char -fno-strict-aliasing -g]


--includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --disable-silent-rules --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-cli --disable-cgi --disable-phpdbg --with-config-file-path=/etc/php/7.3/cli --with-config-file-scan-dir=/etc/php/7.3/cli/conf.d --build=x86_64-linux-gnu --host=x86_64-linux-gnu --config-cache --cache-file=/build/php7.3-R8bPLl/php7.3-7.3.21/config.cache --libdir=${prefix}/lib/php --libexecdir=${prefix}/lib/php --datadir=${prefix}/share/php/7.3 --program-suffix=7.3 --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --disable-all --disable-debug --disable-rpath --disable-static --with-pic --with-layout=GNU --without-pear --enable-filter --with-openssl=yes --with-password-argon2=/usr --with-pcre-regex=/usr --enable-hash --with-mhash=/usr --enable-libxml --enable-session --with-sodium --with-system-tzdata --with-zlib=/usr --with-zlib-dir=/usr --enable-pcntl --with-libedit=shared
1
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
28
29
30
31
32
/bin/bash /opt/php-7.3.1/libtool --silent --preserve-dup-deps --mode=install cp ext/opcache/opcache.la /opt/php-7.3.1/modules
Installing shared extensions: /usr/local/php7.3.1/lib/php/extensions/no-debug-non-zts-20180731/
Installing PHP CLI binary: /usr/local/php7.3.1/bin/
Installing PHP CLI man page: /usr/local/php7.3.1/php/man/man1/
Installing PHP FPM binary: /usr/local/php7.3.1/sbin/
Installing PHP FPM defconfig: /usr/local/php7.3.1/etc/
Installing PHP FPM man page: /usr/local/php7.3.1/php/man/man8/
Installing PHP FPM status page: /usr/local/php7.3.1/php/php/fpm/
Installing phpdbg binary: /usr/local/php7.3.1/bin/
Installing phpdbg man page: /usr/local/php7.3.1/php/man/man1/
Installing PHP CGI binary: /usr/local/php7.3.1/bin/
Installing PHP CGI man page: /usr/local/php7.3.1/php/man/man1/
Installing build environment: /usr/local/php7.3.1/lib/php/build/
Installing header files: /usr/local/php7.3.1/include/php/
Installing helper programs: /usr/local/php7.3.1/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php7.3.1/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/php7.3.1/lib/php/
[PEAR] Archive_Tar - already installed: 1.4.4
[PEAR] Console_Getopt - already installed: 1.4.1
[PEAR] Structures_Graph- already installed: 1.1.1
[PEAR] XML_Util - already installed: 1.4.3
[PEAR] PEAR - already installed: 1.10.7
Warning! a PEAR user config file already exists from a previous PEAR installation at '/home/vagrant/.pearrc'. You may probably want to remove it.
Wrote PEAR system config file at: /usr/local/php7.3.1/etc/pear.conf
You may want to add: /usr/local/php7.3.1/lib/php to your php.ini include_path
/opt/php-7.3.1/build/shtool install -c ext/phar/phar.phar /usr/local/php7.3.1/bin
ln -s -f phar.phar /usr/local/php7.3.1/bin/phar
Installing PDO headers: /usr/local/php7.3.1/include/php/ext/pdo/
1
sudo ./configure --enable-fpm --enable-bcmath --enable-exif --enable-intl --enable-mbstring --enable-embedded-mysqli --enable-sockets --enable-soap --enable-mysqlnd --enable-zip --with-openssl --with-curl --with-gd --with-pdo-mysql --with-mysql-sock --enable-cli --disable-cgi --disable-phpdbg --build=x86_64-linux-gnu --host=x86_64-linux-gnu --config-cache --program-suffix=7.3 --disable-all --disable-debug --disable-rpath --disable-static --with-pic --with-layout=GNU --without-pear --enable-filter --with-openssl=yes --enable-hash --enable-libxml --enable-session --with-sodium --enable-pcntl --with-libedit=shared --enable-pdo
1
sudo ./configure --includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu  --prefix=/usr --enable-cli --disable-cgi --disable-phpdbg --with-config-file-path=/etc/php/7.3/cli --with-config-file-scan-dir=/etc/php/7.3/cli/conf.d --build=x86_64-linux-gnu --host=x86_64-linux-gnu --config-cache --cache-file=/build/php7.3-R8bPLl/php7.3-7.3.21/config.cache --libdir=${prefix}/lib/php --libexecdir=${prefix}/lib/php --datadir=${prefix}/share/php/7.3 --program-suffix=7.3 --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --disable-all --disable-debug --disable-rpath --disable-static --with-pic --with-layout=GNU --without-pear --enable-filter --with-openssl=yes  --with-pcre-regex=/usr --enable-hash --with-mhash=/usr --enable-libxml --enable-session --with-sodium --with-zlib=/usr --with-zlib-dir=/usr  --enable-pcntl
1
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
28
29
30
31
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20180731/
Installing PHP CLI binary: /usr/local/bin/
Installing PHP CLI man page: /usr/local/php/man/man1/
Installing PHP FPM binary: /usr/local/sbin/
Installing PHP FPM defconfig: /usr/local/etc/
Installing PHP FPM man page: /usr/local/php/man/man8/
Installing PHP FPM status page: /usr/local/php/php/fpm/
Installing phpdbg binary: /usr/local/bin/
Installing phpdbg man page: /usr/local/php/man/man1/
Installing PHP CGI binary: /usr/local/bin/
Installing PHP CGI man page: /usr/local/php/man/man1/
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/lib/php/
[PEAR] Archive_Tar - installed: 1.4.4
[PEAR] Console_Getopt - installed: 1.4.1
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util - installed: 1.4.3
[PEAR] PEAR - installed: 1.10.7
Warning! a PEAR user config file already exists from a previous PEAR installation at '/home/vagrant/.pearrc'. You may probably want to remove it.
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
/opt/php-7.3.1/build/shtool install -c ext/phar/phar.phar /usr/local/bin
ln -s -f phar.phar /usr/local/bin/phar
Installing PDO headers: /usr/local/include/php/ext/pdo/

Hacker-灌篮高手手游插件开发

发表于 2020-09-04 | | 阅读次数:
1

运维-FFMPEG安装

发表于 2020-07-20 | 分类于 IT , 运维 | | 阅读次数:

FFmpeg 是一个开放源代码的自由软件,可以运行音频和视频多种格式的录影、转换、流功能,包含了libavcodec——这是一个用于多个项目中音频和视频的解码器库,以及libavformat——一个音频与视频格式转换库

阅读全文 »

运维-nginx配置优化

发表于 2020-06-30 | | 阅读次数:
1
2
3
4
5
6
7
8
9
10
11
12
zcat zhenyouhaofang-api_access.log-20200630.gz | awk -F ' ' '{count[$1]++;} END {for(i in count) {print i, count[i]}}' | sort -nk2
zcat zhenyouhaofang-api_access.log-20200630.gz | awk -F ' ' '{count[$1$4]++;} END {for(i in count) {print i, count[i]}}' | sort -nk2


limit_conn_zone $binary_remote_addr zone=perip:10m;
limit_conn_zone $server_name zone=perserver:10m;




limit_conn perip 10;
limit_conn perserver 100;

开发-git删除操作

发表于 2020-05-25 | | 阅读次数:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
## 删除本地分支 (除了master)
git branch -a | grep -v -E 'master' | xargs git branch -d
## 删除远程分支 (除了master)
git branch -r | grep -v -E 'master' | sed 's/origin\///g'| xargs -I {} git push origin :{}

## 查看远程tag查看远程仓库所有标签
git ls-remote --tags origin

## 删除本地tag
git tag | xargs git tag -d
## 删除本地tag (除了20241212.1)
git tag | grep -v -E '20241212.1' | xargs -I {} git tag -d {}
## 删除远程tag (除了20241212.1)
git tag | grep -v -E '20241212.1' | xargs -I {} git push origin :refs/tags/{}

## 删除远程分支 (除了master)
git pull -r

推荐文章

  • 开发-git推送到不同远程master
  • 运维-宝塔系统安装gogs
  • PHP-将Laravel部署到服务器
  • 全民Git

运维-python开发加密安装

发表于 2020-05-14 | 分类于 IT , 运维 | | 阅读次数:

安装配置

1
2
3
4
5
6
7
yum -y install wget vim gcc yum-utils git net-tools lrzsz libsodium

yum install m2crypto python-setuptools && easy_install pip

git clone -b manyuser https://github.com/shadowsocksr-backup/shadowsocksr.git

pip install shadowsocks

推荐文章

  • Python-简单版爬虫实现
  • Python-WingIDE安装破解
  • Python-wxPython开发学习

Hadoop-基础教程

发表于 2020-03-23 | 分类于 IT , 开发 | | 阅读次数:
1
2
3
4
5
6
7
8
centos7下载 http://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-2002_01.VirtualBox.box

jdk下载 https://www.oracle.com/java/technologies/javase-jdk8-downloads.html

hadoop下载 https://archive.cloudera.com/cdh5/cdh/5/hadoop-2.6.0-cdh5.16.2.tar.gz

hive下载 https://archive.cloudera.com/cdh5/cdh/5/hive-1.1.0-cdh5.16.2.tar.gz

1
2
3
4
vagrant box add centos7 CentOS-7-x86_64-Vagrant-2002_01.VirtualBox.box
vagrant box list
vagrant init centos7
vargrant ssh
1
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
tar zxvf ~/software/jdk-8u241-linux-x64.tar.gz -C ~/app/
tar zxvf ~/software/hadoop-2.6.0-cdh5.16.2.tar.gz -C ~/app/
tar zxvf ~/software/hive-1.1.0-cdh5.16.2.tar.gz -C ~/app/

### 配置ssh
ssh-keygen
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

### 配置 ~/.bash_profile
#### java环境变量
export JAVA_HOME=~/app/jdk1.8.0_241
export PATH=$JAVA_HOME/bin:$PATH

### 验证
java -version

### haddop环境变量
export HADOOP_HOME=~/app/hadoop-2.6.0-cdh5.16.2
export PATH=$HADOOP_HOME/bin:$PATH

### 配置 etc/hadoop/hadoop-env.sh
export JAVA_HOME=~/app/jdk1.8.0_241

### 配置 etc/hadoop/core-site.xml:
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop001:8020</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/vagrant/app/tmp</value>
</property>
</configuration>

### 配置 etc/hadoop/hdfs-site.xml:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>

### 第一个格式化tmp
hdfs namenode -format

### 启动服务
sbin/start-dfs.sh

### 查看服务
jps

### 查看运行状态
http://localhost:50070/

### hadoop 常用命令
hadoopfs -ls /
hadoopfs -put
hadoopfs -copyFromLocal
hadoopfs -moveFromLocal
hadoopfs -cat
hadoopfs -text
hadoopfs -get
hadoopfs -mkdir
hadoopfs -mv
hadoopfs -getmerge
hadoopfs -rm
hadoopfs -rmdir
hadoopfs -rm -r

推送数据到hdfs

1
2
hadoop fs -mkdir -p /wordcount/input
hadoop fs -put data/test.txt /wordcount/input

代码

1

Hecker-小米8安装twrp及刷入magisk xposed

发表于 2019-09-10 | 分类于 IT , Hecker | | 阅读次数:

教程

  1. 开发版 + root
1
2
3
4
5
6
7
8
1. 卡刷 miui 开发版
2. 进入安全中心开启 root 权限
3. 解锁 system 分区

adb root
adb disable-verity
adb reboot

  1. 安装 twrp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 下载 recovery TWRP 包
https://twrp.me/lg/lgnexus5.html

# 进入 bootloader 模式
adb reboot bootloader

# 解锁 - 小米手机需要官方申请解锁
fastboot oem unlock

# 刷入刚下载的 TWRP 包
fastboot devices
fastboot flash recovery twrp.img
# 小米手机不要直接重启,会被原厂覆盖,可直接进入recovery模式 关机键+音量加
fastboot reboot
  1. 下载google ota
1
2
3
4
5
6
7
# 下载 - google ota 不想刷 ota 可跳过
https://developers.google.com/android/images
Factory Images(线刷包)
Full OTA Images(卡刷包)

# 将 nexus 5 Full OTA Images 放入 sd 卡 - google ota 不想刷 ota 可跳过
adb push ./hammerhead-m4b30x-factory-10cfaa5c.zip /sdcard/downloaded_rom
  1. 卡刷 magisk 安装 xposed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 进入 recovery 模式刷入卡刷包
adb reboot recovery

# 推送 Magisk.zip Magisk-uninstaller.zip
adb push ./Magisk.zip /sdcard/downloaded_rom
# TWRP 安装 zip

# 安装 MagiskManager.apk
adb reboot
adb install MagiskManager.apk

# 安装 Magisk Riru-Core Riru-EdXposed 模块

# 安装 EdXposedManager.apk
adb install EdXposedManager.apk

推荐文章

  • Hecker-Android自动开启app
  • Hecker-红米K30S 稳定版线刷包 安装Magisk 获取ROOT

运维-Centos7 ulimit 设置

作者: 小敏-mingo | 发表于 2019-08-22 | 分类于 IT , 运维 | | 阅读次数:

ulimit -n是设置当前shell的当前用户所有进程能打开的最大文件数量

阅读全文 »

运维-nodejs安装

发表于 2019-08-07 | | 阅读次数:

下载

https://nodejs.org/zh-cn/download/

1
wget https://nodejs.org/dist/v10.16.2/node-v10.16.2-linux-x64.tar.xz

解压/安装

1
2
3
4
5
6
7
8
tar -xvf node-v10.16.2-linux-x64.tar.xz

mv node-v10.16.2-linux-x64 nodejs

ln -s /opt/nodejs/bin/npm /usr/local/bin/
ln -s /opt/nodejs/bin/node /usr/local/bin/

node -v
<i class="fa fa-angle-left"></i>1…678…11<i class="fa fa-angle-right"></i>

106 日志
15 分类
173 标签
GitHub E-Mail
友情链接
  • Google
  • Twitter
  • FB Page
  • VK Group
  • StackOverflow
  • YouTube
  • Instagram
© 2018 — 2025 小敏-mingo
由 Hexo 强力驱动
|
主题 — NexT.Gemini v5.1.4
本站总访问量次 本站访客数次