1.preparation install dependencies 1 yum install -y gcc g++ cmake gcc-c++
2.install and compile x264 if you haven’t installed the bzip2, you can run the code “sudo yum install bzip2 “ to install it before decompression.
1 2 3 4 5 6 7 8 9 10 11 wget https://code.videolan.org/videolan/x264/-/archive/master/x264-master.tar.bz2 tar -jxvf x264-master.tar.bz2 cd ./x264-mastermake clean && make uninstall PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure --enable-shared make -j4 && make install
3.install and compile x265 1 2 3 4 5 6 7 8 9 wget https://anduin.linuxfromscratch.org/BLFS/x265/x265_3.4.tar.gz tar -zxvf x265_3.4.tar.gz cd x265_3.4/sourcecmake -DCMAKE_INSTALL_PREFIX=/usr/local/x265 make install
4.download source code of ffmpeg, and install it 1 2 3 4 5 6 7 8 9 wget https://ffmpeg.org/releases/ffmpeg-4.2.3.tar.bz2 tar -jxvf ffmpeg-4.2.3.tar.bz2 cd ffmpeg-4.2.3./configure --prefix=/usr/local/ffmpeg --enable-shared --disable-w32threads --enable-pthreads --enable-gpl --enable-libx264 --enable-libx265 --enable-nonfree make && make install
1 2 3 4 5 6 export PKG_CONFIG_PATH=/usr/local/x265/lib/pkgconfigor add it in /etc/profile: export PKG_CONFIG_PATH=/usr/local/x264/lib/pkgconfig/export PKG_CONFIG_PATH=/usr/local/x265/lib/pkgconfig:$PKG_CONFIG_PATH
6.edit /etc/ld.so.config 1 2 3 4 5 6 include ld.so.conf.d/*.conf #add the following content /usr/local/ffmpeg/lib/ #ffmpeg installation path /usr/local/lib #other installation path,if you didn't select path, when installing x264. this is default path. /usr/local/x265/lib/ #Installation path for x265
Read More
1.1update YUM
1.2install GIT
1 2 3 git clone --depth 1 https://gitee.com/xia-chu/ZLMediaKit cd ZLMediaKitgit submodule update --init
1.4install dependencies 1 2 sudo yum -y install gcc sudo yum -y install gcc-c++
1.5 isntall cmake ZLMediaKit use cmake to Build,Makefile(or Xcode/VS project)can only be generated through cmake,so it is necessary to install cmake first to complete the subsequent steps.
1 2 3 4 5 6 sudo yum install cmake sudo yum install libssl-dev sudo yum install libsdl-dev sudo yum install libavcodec-dev sudo yum install libavutil-dev sudo yum install ffmpeg
1.6Build and compile projects 1 2 3 4 5 6 cd ZLMediaKitmkdir buildcd buildDOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2j/ cmake .. make -j4
2.install WVP-PRO …
Read More
1.Deployment Mysql5.7.44
1.1.Install .netFreamWork4.5.2(The specified version cannot installed in other versions)
https://dotnet.microsoft.com/zh-cn/download/dotnet-framework/net452
1.2.Install Windows 2008 R2 Service Pack 1
https://www.catalog.update.microsoft.com/Search.aspx?q=KB976932
1.3.Manually installing VC2019C++, it’s recommended to install the 2015-2019 collection, as direct installation is will to fail.
1.4.Normal installation of mysql5.7.44
2.Deployment Nginx
2.1.Download Nginxhttp://nginx.org/en/download.html
2.2.Unzip of download files
2.3.Run nginx.exe
2.4.configure nginx.conf
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 worker_processes 1 ; events { worker_connections 1024 ; } http { include mime.types ; default_type application/octet-stream; sendfile on; keepalive_timeout 65 ; # my application cms upstream cms { server localhost :8080 ; } # file preview server upstream filePreview{ server localhost :8012 ; } server { listen 80 ; server_name localhost; location / { proxy_pass http : root ../cms/html/web; index index.html index.htm ; } location /mg/ { proxy_set_header Host $http_host; proxy_set_header X-Real -IP $remote_addr; proxy_set_header REMOTE -HOST $remote_addr; proxy_set_header X-Forwarded -For $proxy_add_x_forwarded_for; proxy_pass http : } location /filePreview/ { proxy_set_header Host $http_host; proxy_set_header X-Real -IP $remote_addr; proxy_set_header REMOTE -HOST $remote_addr; proxy_set_header X-Forwarded -For $proxy_add_x_forwarded_for; proxy_pass http : } error_page 500 502 503 504 /50x.html ; location = /50x.html { root html; } } }
Read More
数据量过大,使用saveBatch保存数据太慢如何解决: 在使用mybatis-plus的saveBatch方法时发现保存太慢,会生成一大堆的insert,而不是一批一批的,影响因素可能有两个,如下:
mybatis-plus使用saveBatch的时候,需要保证字段不为null,如果可能为null的话,在可以在注解上增加忽略
@TableField(value = “manager_name”,insertStrategy = FieldStrategy.IGNORED) private String managerName; 这样能保证saveBatch的时候只会有一个insert(当然这也取决于你用的批次大小,默认为1000一次insert)
如果没有特别要求,可以设置全局配置来保障,实际中使用批量保存的其实就特定表,也不是特别建议使用全局的配置,把可能的字段添加忽略就行了。
mybatis-plus: global-config: db-config: insert-strategy: ignored 修改完毕后,insert应该是一批一个insert,而不是一堆
Mybatis-Plus saveBatch() 批量保存失效
如果已经是一批一个insert以后,还是慢,则需要修改数据库链接,需要在数据库链接后面增加
rewriteBatchedStatements=true 这样在调用saveBatch的时候时间能得到有效提升
解释:rewriteBatchedStatements=true MySQL的JDBC连接的url中要加rewriteBatchedStatements参数,并保证5.1.13以上版本的驱动,才能实现高性能的批量插入。 MySQL JDBC驱动在默认情况下会无视executeBatch()语句,把我们期望批量执行的一组sql语句拆散,一条一条地发给MySQL数据库,批量插入实际上是单条插入,直接造成较低的性能。 只有把rewriteBatchedStatements参数置为true, 驱动才会帮你批量执行SQL 另外这个选项对INSERT/UPDATE/DELETE都有效
Read More
Hello!
This is my first article!
Read More
Welcome to Hexo ! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub .
Quick Start Create a new post 1 $ hexo new "My New Post"
More info: Writing
Run server
More info: Server
Generate static files
More info: Generating
Deploy to remote sites
More info: Deployment
Read More