GVKun编程网logo

ubuntu MySQL配置文件

3

对于ubuntuMySQL配置文件感兴趣的读者,本文将会是一篇不错的选择,并为您提供关于apt-getupdate失败ubuntu:Temporyfailureresolving'cn.archive

对于ubuntu MySQL配置文件感兴趣的读者,本文将会是一篇不错的选择,并为您提供关于apt-get update 失败 ubuntu:Tempory failure resolving 'cn.archive.ubuntu.com ubuntu、install nginx on ubuntu install ubuntu usb install ubuntu 14.04 ubuntu install jd、Intel RealSense D435i Installation on Linux (Ubuntu 16.04 and Ubuntu 18.04)、Kurento 源码安装(Ubuntu 14.04 和 Ubuntu 16.04)的有用信息。

本文目录一览:

ubuntu MySQL配置文件

ubuntu MySQL配置文件

https://www.linuxidc.com/Linux/2014-10/108644.htm

[client]

port = 3306
socket = /tmp/MysqL.sock
1
2
[MysqLd]

#MysqL服务的唯一编号 每个MysqL服务Id需唯一
server-id = 1

#服务端口号 默认3306
port = 3306

#MysqL安装根目录
basedir = /usr/local/MysqL

#MysqL数据文件所在位置
datadir = /usr/local/MysqL/data

#临时目录
tmpdir  = /tmp

#设置socke文件所在目录
socket = /tmp/MysqL.sock

#主要用于MyISAM存储引擎,如果多台服务器连接一个数据库则建议注释下面内容
skip-external-locking

#只能用IP地址检查客户端的登录,不用主机名
skip_name_resolve = 1

#事务隔离级别,默认为可重复读,MysqL默认可重复读级别(此级别下可能参数很多间隙锁,影响性能)
transaction_isolation = READ-COMMITTED

#数据库默认字符集,主流字符集支持一些特殊表情符号(特殊表情符占用4个字节)
character-set-server = utf8mb4

#数据库字符集对应一些排序等规则,注意要和character-set-server对应
collation-server = utf8mb4_general_ci

#设置client连接MysqL时的字符集,防止乱码
init_connect=SET NAMES utf8mb4

#是否对sql语句大小写敏感,1表示不敏感
lower_case_table_names = 1

#最大连接数
max_connections = 400

#最大错误连接数
max_connect_errors = 1000

#TIMESTAMP如果没有显示声明NOT NULL,允许NULL值
explicit_defaults_for_timestamp = true

#sql数据包发送的大小,如果有BLOB对象建议修改成1G
max_allowed_packet = 128M


#MysqL连接闲置超过一定时间后(单位:秒)将会被强行关闭
#MysqL默认的wait_timeout  值为8个小时,interactive_timeout参数需要同时配置才能生效
interactive_timeout = 1800
wait_timeout = 1800

#内部内存临时表的最大值 ,设置成128M。
#比如大数据量的group by,order by时可能用到临时表,
#超过了这个值将写入磁盘,系统IO压力增大
tmp_table_size = 134217728
max_heap_table_size = 134217728

#禁用MysqL的缓存查询结果集功能
#后期根据业务情况测试决定是否开启
#大部分情况下关闭下面两项
query_cache_size = 0
query_cache_type = 0

#数据库错误日志文件
log_error = error.log

#慢查询sql日志设置
slow_query_log = 1
slow_query_log_file = slow.log

#检查未使用到索引的sql
log_queries_not_using_indexes = 1

#针对log_queries_not_using_indexes开启后,记录慢sql的频次、每分钟记录的条数
log_throttle_queries_not_using_indexes = 5

#作为从库时生效,从库复制中如何有慢sql也将被记录
log_slow_slave_statements = 1

#慢查询执行的秒数,必须达到此值可被记录
long_query_time = 8

#检索的行数必须达到此值才可被记为慢查询
min_examined_row_limit = 100

#MysqL binlog日志文件保存的过期时间,过期后自动删除
expire_logs_days = 5

 本机的

!includedir /etc/MysqL/conf.d/
!includedir /etc/MysqL/MysqL.conf.d/
[MysqLd]
# 设置3306端口
port=3306
# 设置MysqL的安装目录
# basedir=/usr/local/MysqL
# 设置MysqL数据库的数据的存放目录
# datadir= /var/lib/MysqL
# 允许最大连接数
max_connections=200
# 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统
max_connect_errors=10
# 服务端使用的字符集默认为UTF8
character-set-server=utf8mb4
#使用–skip-external-locking MysqL选项以避免外部锁定。该选项默认开启
external-locking = FALSE
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
# 默认使用“MysqL_native_password”插件认证
default_authentication_plugin=MysqL_native_password

[MysqLd_safe]
log-error=error.log
#pid-file=MysqLd.pid
# 定义MysqL应该支持的sql语法,数据校验
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[MysqL]
# 设置MysqL客户端默认字符集
default-character-set=utf8mb4
[client]
# 设置MysqL客户端连接服务端时默认使用的端口
port=3306
default-character-set=utf8mb4

apt-get update 失败 ubuntu:Tempory failure resolving 'cn.archive.ubuntu.com ubuntu

apt-get update 失败 ubuntu:Tempory failure resolving 'cn.archive.ubuntu.com ubuntu

当运行apt-get update后出现如下错误时:
E: Some index files Failed to download,they have been ignored,or old ones used instead.

可以将目录下/var/lib/apt/lists/partial/所有的文件清掉,再次运行apt-get update即可!自带源在大陆不好。


出现以下错误:

ubuntu:Tempory failure resolving ''cn.archive.ubuntu.com ubuntu


修改dns:

1,重启生效:

sudovi/etc/resolvconf/resolv.conf.d/base(这个文件默认是空的)

在里面插入:
nameserver8.8.8.8
nameserver8.8.4.4

如果有多个DNS就一行一个

修改好保存,然后执行

sudoresolvconf-u

再看/etc/resolv.conf,最下面就多了2行:

cat/etc/resolv.conf
#Dynamicresolv.conf(5)fileforglibcresolver(3)generatedbyresolvconf(8)
#DONOTEDITTHISFILEBYHAND--YOURCHANGESWILLBEOVERWRITTEN
可以看到我们的设置已经加上了,然后再ping一个域名,当时就可以解析了,无需重启。


2,重启失效:

配置文件地址 /etc/resolv.conf

使用编辑器打开

改为如下内容:
search localdomain
nameserver 202.96.128.86 希望修改成的DNS
nameserver 202.96.128.166 备用DNS

重启网络:sudo /etc/init.d/networking restart。即可

install nginx on ubuntu install ubuntu usb install ubuntu 14.04 ubuntu install jd

install nginx on ubuntu install ubuntu usb install ubuntu 14.04 ubuntu install jd

Intel RealSense D435i Installation on Linux (Ubuntu 16.04 and Ubuntu 18.04)

Intel RealSense D435i Installation on Linux (Ubuntu 16.04 and Ubuntu 18.04)

1. Install 3rd-party dependencies

1.1 apt-get update

sudo apt-get update
  • 1

1.2 install libusb-1.0, libglfw, freeglut,

sudo apt-get install libusb-dev libusb-1.0-0-dev libglfw3 libglfw3-dev freeglut3 freeglut3-dev
  • 1

1.3 Install libpng12-dev

1.3.1 On Ubuntu 16.04, run the following command:

sudo apt-get install libpng12-dev

1.3.2 On Ubuntu 18.04, run the following command:

wget -q -O /tmp/libpng12.deb http://security.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb

sudo dpkg -i /tmp/libpng12.deb

2. Debian Package Installation

2.1 Add Intel server to the list of repositories :

echo 'deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main' | sudo tee /etc/apt/sources.list.d/realsense-public.list
  • 1

It is recommended to backup /etc/apt/sources.list.d/realsense-public.list file in case of an upgrade.

2.2 Register the server’s public key :

sudo apt-key adv --keyserver keys.gnupg.net --recv-key 6F3EFCDE
sudo apt-key adv --keyserver keys.gnupg.net --recv-key C8B3A55A6F3EFCDE || sudo apt-key adv -- keyserver hkp://keyserver.ubuntu.com:80 --recv-key C8B3A55A6F3EFCDE
  • 1
  • 2

Refresh the list of repositories and packages available :

sudo apt-get update
  • 1

2.3 Install the librscalibrationtool package which includes Intel® RealSense™ Dynamic Calibrator:

sudo apt-get install librscalibrationtool
  • 1

说明:

librscalibrationtool适用设备为 Intel RealSense D400, D410, D415, D420, D430, D435.
安装后的使用说明见: /usr/share/doc/librscalibrationtool/README.md

2.4 Failure – (Optional) Developers shall also install librscalibrationapi package:

sudo apt-get install librscalibrationapi
  • 1

Problem:

librscalibrationapi : Depends: libpng12-dev but it is not installable
分析: 自Ubuntu18.04以后,libpng12-dev已经被弃用

3. Checking Package Installation

After the debian package install finishes, check for files installed. Under debian convention, the executables are installed under /usr/bin, library files under /usr/lib, and other files including sample code under /usr/share/doc.
For example, for Calibration Tool, librscalibrationtool, the files are installed as below:

sudo dpkg -L librscalibrationtool
  • 1

4. Video4Linux backend

  1. In order to run demos install:
sudo apt-get install librealsense2-dkms
sudo apt-get install librealsense2-utils
  • 1
  • 2

The above two lines will deploy librealsense2 udev rules, kernel drivers, runtime library and executable demos and tools.
Reconnect the Intel RealSense depth camera and run: realsense-viewer

  1. Developers shall install additional packages:
sudo apt-get install librealsense2-dev
sudo apt-get install librealsense2-dbg
  • 1
  • 2

With dev package installed, you can compile an application with librealsense using g++ -std=c++11 filename.cpp -lrealsense2 or an IDE of your choice.

  1. Verify that the kernel is updated :
modinfo uvcvideo | grep "version:" 
  • 1

should include realsense string

5. Test Installation

  1. Print the tool version to screen:
/usr/bin/Intel.Realsense.DynamicCalibrator -v
  • 1
  1. To print device information to screen, connect a camera device to the system and execute the following command:
/usr/bin/Intel.Realsense.DynamicCalibrator -list
  • 1

6. Perform Calibration for Camera

/usr/bin/Intel.Realsense.DynamicCalibrator
  • 1

* Problem (not fixed):

I can see the RGB, Depth and Gyro information without problems when I run realsense-vieweror subscribe to the realsense-ros topics. But when I run/usr/bin/Intel.Realsense.DynamicCalibrator
And click on Start Calibration I get the Failed to start Calibration Error as seen:

PS: relative issue discussion on github:
https://github.com/IntelRealSense/librealsense/issues/3990

Kurento 源码安装(Ubuntu 14.04 和 Ubuntu 16.04)

Kurento 源码安装(Ubuntu 14.04 和 Ubuntu 16.04)

1. 进入 Home 目录

cd ~

2. 添加镜像源 

 ubuntu 14.04

echo "deb http://ubuntu.kurento.org trusty-dev kms6" | sudo tee /etc/apt/sources.list.d/kurento-dev.list

ubuntu 16.04

echo "deb http://ubuntu.kurento.org xenial-dev kms6" | sudo tee /etc/apt/sources.list.d/kurento-dev.list

3. 下载 kurento.gpg.key

wget -O - http://ubuntu.kurento.org/kurento.gpg.key | sudo apt-key add -

4. 更新

sudo apt-get update

5. 安装 git (已安装跳过)

sudo apt-get install git

6. 安装 build-essential

sudo apt-get install build-essential

7. 下载 KMS

git clone https://github.com/Kurento/kurento-media-server.git

8. 进入 KMS 目录

cd kurento-media-server

9. 安装 KMS 依赖

sudo apt-get install $(cat debian/control | sed -e "s/$/\!\!/g" | tr -d ''\n'' | sed "s/\!\! / /g" | sed "s/\!\!/\n/g" | grep "Build-Depends" | sed "s/Build-Depends: //g" | sed "s/([^)]*)//g" | sed "s/, */ /g")

10. 新建 build 目录

mkdir -p build

11. 进入 build 目录

cd build

12. 生成 makefile

cmake ..

13. 编译 KMS

make -j4

14. git submodule

cd ..

git submodule update --recursive --init

15. deb 打包

dpkg-buildpackage -us -uc

16. 安装 KMS

sudo dpkg -i ../kurento_<version>_<arch>.deb

17. 启动 KMS

sudo service kurento-media-server start

18. 停止 KMS

sudo service kurento-media-server stop

 

今天关于ubuntu MySQL配置文件的讲解已经结束,谢谢您的阅读,如果想了解更多关于apt-get update 失败 ubuntu:Tempory failure resolving 'cn.archive.ubuntu.com ubuntu、install nginx on ubuntu install ubuntu usb install ubuntu 14.04 ubuntu install jd、Intel RealSense D435i Installation on Linux (Ubuntu 16.04 and Ubuntu 18.04)、Kurento 源码安装(Ubuntu 14.04 和 Ubuntu 16.04)的相关知识,请在本站搜索。

本文标签:

上一篇Ubuntu 国内安装 kubernetes(ubuntu安装kubuntu)

下一篇ubuntu MySQL的安装