ipv4

linux高级-系统优化

夙愿已清 提交于 2019-12-30 04:12:46
linux系统优化 文章目录 linux系统优化 系统资源限制优化 内核参数优化 系统资源限制优化 #cat /etc/security/limits.conf #root账⼾的资源软限制和硬限制 (Ubuntu需要添加上下两部分) root soft core unlimited root hard core unlimited root soft nproc 1000000 root hard nproc 1000000 root soft nofile 1000000 root hard nofile 1000000 root soft memlock 32000 root hard memlock 32000 root soft msgqueue 8192000 root hard msgqueue 8192000 #其他账⼾的资源软限制和硬限制 (centos系统只需要下面这一部分即可) * soft core unlimited * hard core unlimited * soft nproc 1000000 * hard nproc 1000000 * soft nofile 1000000 * hard nofile 1000000 * soft memlock 32000 * hard memlock 32000 * soft msgqueue 8192000

Centos7.x 装机优化

泪湿孤枕 提交于 2019-12-30 02:20:39
Linux 服务器装机后优化 参考 https://blog.csdn.net/u010133338/article/details/81055475 优化初始化脚本 vim init_optimization.sh #!/bin/bash #author by cc #this script is only for CentOS 7.x #check the OS platform=`uname -i` if [ $platform != "x86_64" ];then echo "this script is only for 64bit Operating System !" exit 1 fi echo "the platform is ok" cat << EOF your system is CentOS 7 x86_64 EOF #添加公网DNS地址 cat >> /etc/resolv.conf << EOF nameserver 114.114.114.114 nameserver 223.5.5.5 EOF #Yum源更换为国内阿里源 yum install wget telnet -y mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup wget -O

centos 6.x 系统基础优化简版

杀马特。学长 韩版系。学妹 提交于 2019-12-30 02:19:54
Centos 6.x 系统基础优化 1、更换国内 yum 源 删除系统带的 centos 官方 yum 源 rm -rf /etc/yum.repos.d/* 使用国内 阿里云 源 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 使用国内阿里云 epel 源 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo 提示:如果这里提示没有 wget 命令,则需要执行: yum install wget -y 2、安装系统基础包 yum install lrzsz tree telnet wget lsof net-tools dos2unix sysstat traceroute unzip zip -y 3、时区配置和时间同步 将硬件时钟调整为与本地时钟一致, 0 为设置为 UTC 时间 cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ntpd时间同步服务 yum install chrony -y 配置: 编辑配置文件: /etc/chrony.conf ,删除4-6行,并修改第3行,如下:

centos7系统优化定制

守給你的承諾、 提交于 2019-12-30 02:18:40
#!/bin/bash #author junxi by #this script is only for CentOS 7.x #check the OS platform=`uname -i` if [ $platform != "x86_64" ];then echo "this script is only for 64bit Operating System !" exit 1 fi echo "the platform is ok" cat << EOF +---------------------------------------+ | your system is CentOS 7 x86_64 | | start optimizing....... | +--------------------------------------- EOF #添加公网DNS地址 cat >> /etc/resolv.conf << EOF nameserver 114.114.114.114 EOF #Yum源更换为国内阿里源 yum install wget telnet -y mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup wget -O /etc/yum.repos

How to set java.net.preferIPv4Stack=true at runtime?

孤人 提交于 2019-12-29 03:26:08
问题 I need to disable IPv6. For that the java documentation indicates setting jvm property java.net.preferIPv4Stack=true . But I don't understand how to do it from the code itself. Many forums demonstrated doing it from the command prompt, but I need to do it at runtime. 回答1: You can use System.setProperty("java.net.preferIPv4Stack" , "true"); This is equivalent to passing it in the command line via -Djava.net.preferIPv4Stack=true 回答2: Another approach, if you're desperate and don't have access

How to set java.net.preferIPv4Stack=true at runtime?

北城余情 提交于 2019-12-29 03:26:02
问题 I need to disable IPv6. For that the java documentation indicates setting jvm property java.net.preferIPv4Stack=true . But I don't understand how to do it from the code itself. Many forums demonstrated doing it from the command prompt, but I need to do it at runtime. 回答1: You can use System.setProperty("java.net.preferIPv4Stack" , "true"); This is equivalent to passing it in the command line via -Djava.net.preferIPv4Stack=true 回答2: Another approach, if you're desperate and don't have access

Google Recaptcha check timeout due to IPv6 issue - php on IIS

爷,独闯天下 提交于 2019-12-25 18:37:51
问题 I'm using google recaptcha v2 on my websites (html / php). On the server side I am trying to contact google recaptcha to check the user's input: $response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$privatekey."&response=".$_POST['g-recaptcha-response']); The line above is not working. It normally just times out. Occasionally it will work though. IPv6 is the Issue It appears to be an issue with the call to google resolving to IPv6 (from https://github.com

nginx性能优化及内核参数调整

橙三吉。 提交于 2019-12-25 17:33:54
Nginx配置参数优化 Nginx作为高性能web服务器,即使不特意调整配置参数也可以处理大量的并发请求。 以下的配置参数是借鉴网上的一些调优参数,仅作为参考,不见得适于你的线上业务。 worker进程 worker_processes 该参数表示启动几个工作进程,建议和本机CPU核数保持一致,每一核CPU处理一个进程。 worker_rlimit_nofile 它表示Nginx最大可用的文件描述符个数,需要配合系统的最大描述符,建议设置为102400。 还需要在系统里执行ulimit -n 102400才可以。 也可以直接修改配置文件/etc/security/limits.conf修改 增加: #* soft nofile 655350 (去掉前面的#) #* hard nofile 655350 (去掉前面的#) worker_connections 该参数用来配置每个Nginx worker进程最大处理的连接数,这个参数也决定了该Nginx服务器最多能处理多少客户端请求 (worker_processes * worker_connections),建议把该参数设置为10240,不建议太大。 http和tcp连接 use epoll 使用epoll模式的事件驱动模型,该模型为Linux系统下最优方式。 multi_accept on

App rejected due to connected to an IPv6 network to ensure it will launch without crashing

本小妞迷上赌 提交于 2019-12-25 08:53:27
问题 My app is contentiously rejected by reviewers.They gives me below reason. Please revise your app and test it on a device while connected to an IPv6 network (all apps must support IPv6) to ensure it will launch without crashing. I've used objective-c and the api which I used is in php. Also I have used NSURLSession and NSURLConnection for calling the API's. I'm not using AFnetworking .I have done lots of RNDs from last two days. Can anyone suggest me how can I solve this issue? 回答1: If you are

Rails: Geokit incorrectly converting IPv4 address to latitude and longitude

这一生的挚爱 提交于 2019-12-25 05:25:36
问题 I want to convert two IPv4 addresses to latitude and longitude, then calculate the geographical distance between them. Geokit says it can do this. Seattle: a = Geokit::Geocoders::GoogleGeocoder.geocode("207.244.147.34") a.lat => 37.0483944, a.lng => 37.3421261 (should be 47.5839, -122.2995) Edit: Okay below is an IP address for UK not SF, but its still UK not Turkey. San Francisco: b = Geokit::Geocoders::GoogleGeocoder.geocode("5.68.123.155") a.lat => 14.6478672, a.lng => 120.9880659 (should