asp网站配置伪静态重庆注册公司核名在哪个网站
news/
2025/9/26 12:49:49/
文章来源:
asp网站配置伪静态,重庆注册公司核名在哪个网站,网站建设网站需求分析报告功能,怎么给别人做网站优化上次提到的开机自启动的配置#xff0c;获得了LD的称赞#xff0c;然而LD的要求#xff0c;都是“既得陇复望蜀”的#xff0c;他又期望我们能实现openGauss安装的“自动化”#xff0c;于是尝试了下用shell脚本部署#xff0c;附件中的脚本实测有效#xff0c;openEule…上次提到的开机自启动的配置获得了LD的称赞然而LD的要求都是“既得陇复望蜀”的他又期望我们能实现openGauss安装的“自动化”于是尝试了下用shell脚本部署附件中的脚本实测有效openEuler 20.03 LTS通过shell脚本建议操作部署openGauss 5.0.0企业版成功。
说明除了安装openGauss的shell脚本外还需要准备两个配置文件一个是openGauss集群的配置文件cluster_config.xml另外一个是openeuler的repo文件yum源需要用到。这两个并非安装脚本内容因此不多做介绍。安装过程和手工安装基本类似因此下面简单描述下脚本执行的过程供参考和指正
1. 执行前首先创建好安装包存放的路径下载好安装包并且把安装的shell脚本以及cluster_config文件以及openeuler的repo文件都copy到系统中的某个文件夹下如/opt/software/opengaussshellinstall。当然也可以通过wget下载安装包朋友们感兴趣可以自己调整脚本。 其中的...zhaofeng.tar文件为安装成功后需要restore的备份数据。
2. 注意安装脚本copy后可能会没有执行权限需要执行chmod x shell test.sh脚本文件名修改权限。
3. 脚本通过变量读取安装包所在的位置因此执行命令时需要附上安装包所在的路径
./bin/shell test.sh /opt/software/opengaussshellinstall
4. 脚本大致分为下面几部分
4.1 检查并修改python版本
4.2 安装三方依赖件expect, libaio等包括脚本中用到的tar以及net-tools
4.3 修改performance.conf文件本步可选
4.4 修改profile文件增加openGauss相关的环境变量
4.5 创建openGauss安装路径copy安装包cluster配置文件等到openGauss安装路径默认为/opt/software/opengauss可根据需要修改脚本也可以做成变量感兴趣可以自行调整
4.6 修改cluster文件替换本机ip地址及hostname替换app, log等路径;
4.7 解压安装包
4.8 preinstall
4.9 install
4.10 修改postgresql.conf和pg_hba.conf文件使数据库可以被远程连接
4.11 创建数据库创建用户restore之前备份的数据。
4.12 重启数据库。
如此则整个过程完成。
4.5 创建openGauss安装路径copy安装包、cluster配置文件等到openGauss安装路径默认为/opt/software/opengauss可根据需要修改脚本也可以做成变量感兴趣可以自行调整
4.6 修改clusterconfig.xml文件替换本机ip地址及hostname替换app, log等路径;
4.7 解压安装包脚本中解压安装包和修改xml文件放在一个方法中了注意解压完后需要对路径重置权限。
4.8 preinstall预安装需要输入omm用户的密码
4.9 install安装需要输入数据库的密码
4.10 修改postgresql.conf和pg_hba.conf文件使数据库可以被远程连接此处为了简单起见添加0.0.0.0/0以及‘*’
4.11 创建数据库创建用户restore之前备份的数据。
4.12 重启数据库。
如此则整个过程完成。
以下为附件内容 cluster_config.txt
PARAM namegaussdbLogPath value/var/log/omm /PARAM nametmpMppdbPath value/opt/huawei/tmp/PARAM namegaussdbToolPath value/opt/huawei/install/om /PARAM namecorePath value/opt/huawei/corefile/PARAM namebackIp1s valueopengausshostip//CLUSTERDEVICELISTDEVICE snopengausshostnamePARAM namename valueopengausshostname/PARAM nameazName valueAZ1/PARAM nameazPriority value1/PARAM namebackIp1 valueopengausshostip/PARAM namesshIp1 valueopengausshostip/!-- dn --PARAM namedataNum value1/PARAM namedataPortBase value26100/PARAM namedataNode1 value/opt/huawei/install/data/dn/PARAM namedataNode1_syncNum value0//DEVICE/DEVICELIST
/ROOT openGauss.sh
#!/bin/bashgauss_home$1echo ------$gauss_home -----------
if [ ! -d $gauss_home ]; thenecho -e \033[31m 请输入安装路径 \033[0mexit
fipython_versionpython -V 21|awk {print $2}|awk -F . {print $1}function PythonVersionChange() {echo python version : ${python_version} if [ $python_version -eq 2 ]; thenecho -e \e[32m change python version \e[0mcd /usr/binmv python python.bakln -s python3 /usr/bin/pythonnow_pyhton_versionpython -V 21|awk {print $2}|awk -F . {print $1}echo -e \e[32m now python version $now_pyhton_version \e[0mfi
}echo -e \e[37m install 3rd software(s) \e[0m
echo -------copy yum repo-------
cp /opt/software/openEulerOS.repo /etc/yum.repos.d/
echo -------install nettools tar -------
yum -y install tar
yum -y install net-tools
echo -------install nettools tar completed-------
echo -------install 3rd software(s)-------
yum install libaio* -y
yum install -y bzip2 bzip2-devel curl libaio libaio-devel readline-devel
yum -y install expectecho -e \e[37m install 3rd software(s) completed \e[0mfunction PerformanceChange() {echo -e \e[37m sed performance \e[0msed -i s/sysctl -w vm\.min_free_kbytes112640/#sysctl -w vm\.min_free_kbytes112640/ /etc/profile.d/performance.shecho -e \e[37m sed performance completed \e[0m
}function ProfileChange() {echo -------ProfileChange-------echo export packagePath/opt/software/openGauss /etc/profileecho export LD_LIBRARY_PATH/opt/software/openGauss/script/gspylib/clib:$dddd /etc/profileecho -------ProfileChange completed-------
}ip_addifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk {print $2}|tr -d addr:
arrar(echo $ip_add | tr \n )
ip${arrar[0]}echo ip is : $ip if [ ! -d /opt/software/openGauss ]; thenmkdir -p /opt/software/openGausschmod 755 -R /opt/software/openGausscp /opt/software/openGauss-5.0.0-openEuler-64bit-all.tar.gz /opt/software/openGauss/
fichmod 755 -R /opt/softwarehost_namehostname
#appPath$gauss_home/openGauss/appappPath/opt/gaussdb/appecho host name is -------------------: $host_namedata_node/openGauss/data/db1function CompressGauss() {cp /opt/software/clusterconfig.xml /opt/software/openGauss -R# app_path$gauss_home/openGauss/applog_path/var/log/gaussdb# core_path$gauss_home/software/openGauss/corefile# tool_path$gauss_home/software/openGauss/huawei/wisequerycore_path/opt/opengauss/corefiletool_path/opt/huawei/wisequeryecho host name is -------------------: $appPathsed -i s/opengausshostip/$ip/g /opt/software/openGauss/clusterconfig.xmlsed -i s/opengausshostname/$host_name/g /opt/software/openGauss/clusterconfig.xmlsed -i s#gauss_db_app_path#$appPath#g /opt/software/openGauss/clusterconfig.xmlsed -i s#gauss_db_Log_Path#$log_path#g /opt/software/openGauss/clusterconfig.xmlecho -------------------: $tool_pathsed -i s#gauss_db_Tool_Path#$tool_path#g /opt/software/openGauss/clusterconfig.xmlsed -i s#core_Path#$core_path#g /opt/software/openGauss/clusterconfig.xmlsed -i s#data_node#$data_node#g /opt/software/openGauss/clusterconfig.xmlcd /opt/software/openGausstar -zxvf openGauss-5.0.0-openEuler-64bit-all.tar.gztar zxvf openGauss-5.0.0-openEuler-64bit-om.tar.gzchmod -R 755 /opt/software
}function preinstall() {chmod -R 755 /opt/softwarecd /opt/software/openGauss/scriptecho ----- pre install start $(pwd)--------#python gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xmlecho -e yes\n1qazQAZ\n1qazQAZ\n | python gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xmlsleep 2
}function install() {echo -------install openGauss-------chmod -R 755 /opt/software/openGauss/script/#$gauss_home/swanlink-cloud-aiot/bin/password_input.sh
su - omm EOFcd /opt/software/openGauss/scriptecho current : gs_install -X /opt/software/openGauss/clusterconfig.xml --gsinit-parameter--encodingUTF8 --dn-gucmax_process_memory4GB --dn-gucshared_buffers256MB --dn-gucbulk_write_ring_size256MB --dn-guccstore_buffers16MB
exit;
EOF
}function connectdb() {systemctl start firewalld.servicefirewall-cmd --zonepublic --add-port26000/tcp --permanentfirewall-cmd --reloadsed -i s/listen_addresses.*/listen_addresses */ $data_node/postgresql.confsed -i s#.*$ip.*#host all all 0.0.0.0/0 sha256# $data_node/pg_hba.conf
}function createUserAndImportData() {su - omm EOFgsql -d postgres -p 26000 -r DBcreate user testuser identified by !!$#$ad1123;grant all privileges to testuser;create user clouduser identified by !!$#$ad1123;grant all privileges to clduser;create database clddb;
DB
EOFecho connect
}function restoreData() {cp /opt/software/zhaofeng.tar /home/omm/chown omm:dbgrp /home/omm/zhaofeng.tardata_path$gauss_home/package/DatabaseBackup.sqlsu - omm EOFgs_restore /home/omm/zhaofeng.tar -p 26000 -d clddb
EOF
}function restartGSDB() {su - omm EOFgs_om -t restart
EOF
}PythonVersionChange
ProfileChange
PerformanceChange
CompressGauss
preinstall
install
connectdb
createUserAndImportData
restoreData
restartGSDB openEulerOS.repo.txt [openEuler-source]
nameopenEuler-source
baseurlhttps://repo.huaweicloud.com/openeuler/openEuler-20.03-LTS/source/
enabled1
gpgcheck1
gpgkeyhttps://repo.huaweicloud.com/openeuler/openEuler-20.03-LTS/source/RPM-GPG-KEY-openEuler[openEuler-os]
nameopenEuler-os
baseurlhttps://repo.huaweicloud.com/openeuler/openEuler-20.03-LTS/OS/x86_64/
enabled1
gpgcheck1
gpgkeyhttps://repo.huaweicloud.com/openeuler/openEuler-20.03-LTS/OS/x86_64/RPM-GPG-KEY-openEuler[openEuler-everything]
nameopenEuler-everything
baseurlhttps://repo.huaweicloud.com/openeuler/openEuler-20.03-LTS/everything/x86_64/
enabled1
gpgcheck1
gpgkeyhttps://repo.huaweicloud.com/openeuler/openEuler-20.03-LTS/everything/x86_64/RPM-GPG-KEY-openEuler[openEuler-EPOL]
nameopenEuler-epol
baseurlhttps://repo.huaweicloud.com/openeuler/openEuler-20.03-LTS/EPOL/x86_64/
enabled1
gpgcheck0
本文作者
本文内容来自于数据库领域资深技术专家赵锋老师希望我们的文章正好能解决你的问题。
欢迎技术交流~
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/918260.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!