首页 文章 精选 留言 我的

精选列表

搜索[设置],共10024篇文章
优秀的个人博客,低调大师

ubuntu16.04设置tomcat自启动

我的tomcat名字叫tomcat8_product 1.拷贝catalina.sh到/etc/init.d/目录下 cd tomcat8_product/bin/catalina.sh /etc/init.d/ 2.改名 mv catalina.sh tomcat8_product 3.编辑tomcat8_product 在#!/bin/sh下添加两行内容后并保存退出 CATALINA_HOME=/home/tomcat8_productJAVA_HOME=/usr/lib/jvm/java-8-oracle 4.注册开机启动 update-rc.d -f tomcat8_product defaults 执行该命令会有两个警告提示,这个可以忽略,如果是报error,就一定不能忽略 5.重启机器 执行 reboot命令 6.重新登录 登录成功后,执行 ps -ef|grep 7.执行ps -ef|grep tomcat8_product 8.看到有相应的tomcat进程再运行,然后输入浏览器地址xxxxxx:8080,出现tomcat欢迎页表示整个流程是顺利,成功让tomcat自启动

优秀的个人博客,低调大师

openstack学习笔记二 网络设置基础

租用这个服务的机构,我们称之"租户/tenant/项目/project" 租户 用户 vxlan划分租户 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [root@h1~] #ipaddr 1:lo:<LOOPBACK,UP,LOWER_UP>mtu65536qdiscnoqueuestateUNKNOWN link /loopback 00:00:00:00:00:00brd00:00:00:00:00:00 inet127.0.0.1 /8 scopehostlo valid_lftforeverpreferred_lftforever 2:eth0:<BROADCAST,MULTICAST,UP,LOWER_UP>mtu1500qdiscmqstateUPqlen1000 link /ether 00:50:56:a0:b6:6bbrdff:ff:ff:ff:ff:ff inet192.168.1.201 /24 brd192.168.1.255scopeglobaleth0 valid_lftforeverpreferred_lftforever 3:ovs-system:<BROADCAST,MULTICAST>mtu1500qdiscnoopstateDOWN link /ether 36:26:25:65:14:9cbrdff:ff:ff:ff:ff:ff 4:br-ex:<BROADCAST,MULTICAST,UP,LOWER_UP>mtu1500qdiscnoqueuestateUNKNOWN link /ether de:4c:6d:9c:15:4dbrdff:ff:ff:ff:ff:ff 5:br-int:<BROADCAST,MULTICAST>mtu1500qdiscnoopstateDOWN link /ether ce:0b:9b:b5:c1:4dbrdff:ff:ff:ff:ff:ff 6:br-tun:<BROADCAST,MULTICAST>mtu1500qdiscnoopstateDOWN link /ether ae:75:26:fb:f8:42brdff:ff:ff:ff:ff:ff 你想把哪个网络作为数据包的出口,那么你就应该把那个网卡桥接到 br-ex openvswitch 简称 ovs 配置网卡 重点 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [root@h1network-scripts] #catifcfg-eth0 DEVICE=eth0 DEVICETYPE=ovs TYPE=OVSPort OVS_BRIDGE=br-ex ONBOOT= yes BOOTPROTO=none [root@h1network-scripts] #catifcfg-br-ex DEVICE=br-ex DEVICETYPE=ovs TYPE=OVSBridge ONBOOT= yes BOOTPROTO=none IPADDR=192.168.1.201 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 DNS1=202.106.0.20 1 2 3 4 5 6 7 8 9 10 查看网卡 2:eth0:<BROADCAST,MULTICAST,UP,LOWER_UP>mtu1500qdiscmqmasterovs-systemstateUPqlen1000 link /ether 00:50:56:a0:b6:6bbrdff:ff:ff:ff:ff:ff 3:ovs-system:<BROADCAST,MULTICAST>mtu1500qdiscnoopstateDOWN link /ether d2:18:7d:5e:5e:b9brdff:ff:ff:ff:ff:ff 5:br-ex:<BROADCAST,MULTICAST,UP,LOWER_UP>mtu1500qdiscnoqueuestateUNKNOWN link /ether 00:50:56:a0:b6:6bbrdff:ff:ff:ff:ff:ff inet192.168.1.201 /24 brd192.168.1.255scopeglobalbr-ex valid_lftforeverpreferred_lftforever 管理员登陆http://192.168.1.201/dashboard 选择系统--网络--创建网络 创建,点击网络名称put-ex 下一步 创建一个项目,创建一个新的用户,新用户关联项目。 用新的用户登录,创建网络 先创建网络,然后创建路由,连到网络上,最后添加端口 本文转自 295631788 51CTO博客,原文链接:http://blog.51cto.com/hequan/1795705,如需转载请自行联系原作者

优秀的个人博客,低调大师

Openstack 之 网络设置静态IP地址

Openstack网络分配都是动态分配,但是在实际使用当中更多的会用到静态IP,Ocata版本的web管理界面尚未提供完善的操作菜单界面,暂时只能通过命令行解决,其实也很简单,一条命令就解决了。下面是操作方法: 实例连接接口,系统会自动分配一个IP地址,比如192.168.170.153,修改成固定IP(192.168.170.181)方法如下: 1、openstack port list ,找出自动分配的IP和subnet; 2、然后执行下面这个命令进行修改,加--name参数顺便将端口名称修改: openstack port set --name cirros-1 --no-fixed-ip --fixed-ip ip-address='192.168.170.181',subnet='19b1397a-1150-495f-a423-fe0b104602d8' 7e475b34-7ae8-41dd-be10-7079f973926c 3、然后进入虚拟机,将相应的端口地址改为固定IP 192.168.170.181 本文转自yuweibing51CTO博客,原文链接:http://blog.51cto.com/yuweibing/2071351,如需转载请自行联系原作者

优秀的个人博客,低调大师

IPv6设置支持IOS审核

https://www.tunnelbroker.net/ 点击创建以后出现如下界面 检查服务器是否开启IPv6(表示没有开启)http://www.jianshu.com/p/2f6620e5a4f0 vim /etc/sysctl.conf #添加如下三行 sysctl -p net.ipv6.conf.all.disable_ipv6 = 0 net.ipv6.conf.default.disable_ipv6 = 0 net.ipv6.conf.lo.disable_ipv6 = 0 vim /etc/modprobe.d/disable_ipv6.conf #options ipv6 disable=1改为options ipv6 disable=0 alias net-pf-10 off options ipv6 disable=0 vim /etc/sysconfig/network 添加 NETWORKING_IPV6=yes 重启网络systemctl restart network 可以看出已经支持IPv6 服务器执行如下命令上面获取的: modprobe ipv6 ip tunnel add he-ipv6 mode sit remote 216.218.221.6 local 39.107.13.70 ttl 255 ip link set he-ipv6 up ip addr add 2001:470:18:107b::2/64 dev he-ipv6 ip route add ::/0 dev he-ipv6 ip -f inet6 addr DNS控制台解析 测试可以看出已经解析 然后在这台服务器上面大家nginx支持IPv6代理即可 user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; include /usr/share/nginx/modules/.conf; events { worker_connections 1024; } http { log_format main '$remote_addr - $remote_user [$time_local] "$http_host" "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" $http_x_forwarded_for ' '"$upstream_addr" "$upstream_status" "$upstream_response_time" "$request_time"'; access_log /etc/nginx/logs/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; include /etc/nginx/conf.d/.conf; } stream { upstream tcp_proxy { hash $remote_addr consistent; #远程地址做个hash server slbIP:80; } upstream tcp_proxy_443 { hash $remote_addr consistent; #远程地址做个hash server slbIP:443; } server { listen [::]:80; listen 80; proxy_connect_timeout 1s; proxy_timeout 10s; #后端连接超时时间 proxy_pass tcp_proxy; } server { listen [::]:443; listen 443; proxy_connect_timeout 1s; proxy_timeout 10s; #后端连接超时时间 proxy_pass tcp_proxy_443; } } 本文转自 小小三郎1 51CTO博客,原文链接:http://blog.51cto.com/wsxxsl/2044131,如需转载请自行联系原作者

优秀的个人博客,低调大师

ES设置查询的相似度算法

similarity Elasticsearch allows you to configure a scoring algorithm orsimilarityper field. Thesimilaritysetting provides a simple way of choosing a similarity algorithm other than the defaultBM25, such asTF/IDF. Similarities are mostly useful fortextfields, but can also apply to other field types. Custom similarities can be configured by tuning the parameters of the built-in similarities. For more details about this expert options, see thesimilarity module. The only similarities which can be used out of the box, without any further configuration are: BM25 The Okapi BM25 algorithm. The algorithm used by default in Elasticsearch and Lucene. See Pluggable Similarity Algorithmsfor more information. classic The TF/IDF algorithm which used to be the default in Elasticsearch and Lucene. See Lucene’s Practical Scoring Functionfor more information. boolean A simple boolean similarity, which is used when full-text ranking is not needed and the score should only be based on whether the query terms match or not. Boolean similarity gives terms a score equal to their query boost. Thesimilaritycan be set on the field level when a field is first created, as follows: PUT my_index { "mappings": { "my_type": { "properties": { "default_field": { "type": "text" }, "classic_field": { "type": "text", "similarity": "classic" }, "boolean_sim_field": { "type": "text", "similarity": "boolean" } } } } } COPY AS CURL VIEW IN CONSOLE Thedefault_fielduses theBM25similarity. Theclassic_fielduses theclassicsimilarity (ie TF/IDF). Theboolean_sim_fielduses thebooleansimilarity. Default and Base Similarities By default, Elasticsearch will use whatever similarity is configured asdefault. However, the similarity functionsqueryNorm()andcoord()are not per-field. Consequently, for expert users wanting to change the implementation used for these two methods, while not changing thedefault, it is possible to configure a similarity with the namebase. This similarity will then be used for the two methods. You can change the default similarity for all fields in an index when it iscreated: PUT /my_index { "settings": { "index": { "similarity": { "default": { "type": "classic" } } } } } If you want to change the default similarity after creating the index you mustcloseyour index, send the follwing request andopenit again afterwards: PUT /my_index/_settings { "settings": { "index": { "similarity": { "default": { "type": "classic" } } } } } from:https://www.elastic.co/guide/en/elasticsearch/reference/5.4/index-modules-similarity.html 本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/bonelee/p/7451929.html,如需转载请自行联系原作者

资源下载

更多资源
优质分享App

优质分享App

近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。

Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

用户登录
用户注册
修改密码
忘记密码