Nginx源码构建
wget http://nginx.org/download/nginx-1.21.5.tar.gz
tar -xvf nginx-1.21.5.tar.gz
cd nginx-1.21.5
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
wget http://nginx.org/download/nginx-1.21.5.tar.gz
tar -xvf nginx-1.21.5.tar.gz
cd nginx-1.21.5
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
安装
yum groups install "X Window System"
yum groups install "GNOME Desktop"
systemctl set-default graphical.target
yum -y install tigervnc-server tigervnc
reboot
启动
cp /lib/systemd/system/[email protected] /etc/systemd/system/vncserver@:1.service
修改/etc/systemd/system/vncserver@:1.service中的用户名
systemctl daemon-reload
systemctl enable vncserver@:1
执行 vncpasswd 设置密码
systemctl start vncserver@:1
连接
https://www.realvnc.com/en/connect/download/viewer/
下载vnc viewer,地址栏中输入ip地址:1进行连接。
修改节点分片数
# 临时增加分片数(重启es会设置时效)
PUT /_cluster/settings
{
"transient": {
"cluster": {
"max_shards_per_node":900000
}
}
}
# 永久增加分片数(推荐)
PUT /_cluster/settings
{
"persistent": {
"cluster": {
"max_shards_per_node":900000
}
}
}
方法一
test.py内容
mm="%s,%s,%s"%("aabbcc1",333,"cccc")
print(mm)
def retobj2 = "/usr/bin/python /data/script/test.py".execute().text.readLines()
retobj2.each{println it}
def retobj2 = "/usr/bin/python /tmp/11.py".execute().text.readLines()
return retobj2
方法二
test.py内容
jj = json.dumps({"name":"fulei.sssyang","age":"18"})
print(jj)
def respText = "/usr/local/python3/bin/python3 /data/script/py/test.py".execute().text
def slurper = new groovy.json.JsonSlurper()
def branchs = slurper.parseText(respText) //parseText将json字符串转换为Map对象;JsonOutput类用于将Groovy对象转换为JSON字符串
方法三
python返回\n换行的字符串
"".execute().text.readLines()
方法4)
def html = "http://xxxxxx".toURL().text
def list = html.readLines()
settings.xml
<server>
<id>nexus-releases</id>
<username>admin</username>
<password>你的密码</password>
</server>
<server>
<id>nexus-snapshots</id>
<username>admin</username>
<password>你的密码</password>
</server>
<repositories>
<repository>
<id>nexus</id>
<name>Nexus Repository</name>
<url>http://172.16.3.100:8081/repository/maven-public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>Nexus Plugin Repository</name>
<url>http://172.16.3.100:8081/repository/maven-public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
配置上传jar包项目的pom.xml
<distributionManagement>
<repository>
<id>nexus-releases</id>
<name>Nexus Release Repository</name>
<url>http://172.16.3.100:8081/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<name>Nexus Snapshot Repository</name>
<url>http://172.16.3.100:8081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
上传jar包到nexus
mvn deploy:deploy-file
-DgroupId=坐标
-DartifactId=坐标
-Dversion=版本
-Dpackaging=jar
-Dfile=jar本地路径
-Durl=http://172.16.3.100:8081/repository/3rdparty/
-DrepositoryId=nexus-releases
docker启动nexus
cd /opt && mkdir nexus-data && chmod 200 nexus-data && chown nexus nexus-data
docker run -d -p 8081:8081 --name nexus --ulimit nofile=65536:65536 -v /opt/nexus-data:/nexus-data sonatype/nexus3:3.24.0
docker run -dti \
--net=host \
--name=nexus \
--privileged=true \
--restart=always \
--ulimit nofile=65536:65536 \
--ulimit memlock=-1 \
--memory=16G \
--memory-swap=-1 \
--cpuset-cpus='1-7' \
-e INSTALL4J_ADD_VM_PARAMS="-Xms4g -Xmx4g -XX:MaxDirectMemorySize=8g" \
-v /etc/localtime:/etc/localtime \
-v /data/nexus:/nexus-data \
sonatype/nexus3:latest