shell自动部署linux环境下的组件安装配置(代码片段)

EbowTang EbowTang     2022-12-15     186

关键词:

为了业务部署的便利,将手动在linux中执行的组件部署任务,系统配置任务,编写shell实现自动安装配置

本文shell参考的就是附件链接中文档的“4 Linux课程镜像的创建”章节编码,同时该链接也上传了该脚本

阿里云盘链接:「部署课程脚本」https://www.aliyundrive.com/s/AZWnXaXk3Mx 

 代码如下

#! /bin/bash
##############################################################################
#     Func Box: Multi-function for Learning Space
# Date Created: 2019-08-14
#       Author: EbowTang
#  Description: auto install linux course
#       object: Learning Space
#    Return  0: Success
#-----------------------------------------------------------------------------
#  Modification History
#  DATE        NAME             	DESCRIPTION
#  2019-08-14  installUbuntu    	1,auto install ubuntu 
#  2019-08-18  installCentOSRedHat  2,auto install centos/redhat;
##############################################################################

global_path=$(pwd)
global_iscloudclass=99

# check if run as root user
#if [ `id -u` -ne 0 ]; then
#	echo "You need root privileges to run this script."
#	exit 1
#fi
if [ `whoami` != 'root' ]; then
	echo -e "User checking failure: You need root privileges to run this script."
	exit 1
fi

# check is Learning Space or CloudClass?
CLOUDCLASS_SSD_DIR=/gluster/ssd
CLOUDCLASS_HDD_DIR=/gluster/hdd
LearningSpace_CVK_DIR=/opt/H3C/H3CDHostAgent
LearningSpace_CVM_DIR=/opt/H3C/H3CDServer

if [ -f /etc/cas_cvk-version ] || [ -f /etc/cas_cvk-version/cas_cvk-version ]; then
	if [ -d $CLOUDCLASS_SSD_DIR ] || [ -d $CLOUDCLASS_HDD_DIR ]; then
		global_iscloudclass=1 #CloudClass
	elif [ -d $LearningSpace_CVK_DIR ] || [ -d $LearningSpace_CVM_DIR ]; then
		global_iscloudclass=0 #Learning Space
	else 
		global_iscloudclass=2 #just cas system
	fi
else 
	global_iscloudclass=2 #other system
fi

filename=$1
time=`date +%y%m%d%H%M`
DIR_LOG=/usr/local
[ ! -d $DIR_LOG ] && mkdir -p $DIR_LOG
cd $DIR_LOG
dir=$DIR_LOG/AutoInstall_$filename$time
if [ ! -d $dir ]
then
    mkdir -p $dir
fi
LOGFILE=$dir/auto_install.log

# check if execute this by bash,not support sh
declare -a test_bash_array >/dev/null 2>&1
if [ "$?" -ne 0 ]; then
	echo "Can not run this file by 'sh', you need to run it by:"
	echo "    chmod +x $0 && ./$0"
	echo "  or"
	echo "    bash $0" | tee -a $LOGFILE
	exit 1
fi

function loadscipt () 
	if [ -d /opt/H3C/H3CDServer/nginx/version/ ]; then
		cp $global_path/auto_install.sh /opt/H3C/H3CDServer/nginx/version/auto_install.sh
		echo -e "[INFO]:Script successfully loaded to nginx." | tee -a $LOGFILE
		echo -e "[INFO]:You can download this script from Linux course by browser, and proceed with this script." | tee -a $LOGFILE
		echo -e "[INFO]:Download this script: enter < brokerIP:8880/version > from Ubuntu/CentOS/Redhat browser." | tee -a $LOGFILE
		exit 1
	fi

function installUbuntu () 
	if [ "$(cat /etc/issue | awk 'NR==1print $1')" != "Ubuntu" ] || [ "$(uname -i)" != "x86_64" ] || [ $global_iscloudclass -ne 2 ]; then
		echo -e "[FATAL]:System does not meet the requirements, please check!!!" | tee -a $LOGFILE
		exit 1
	fi
	if [ ! -b /dev/sr0 ]; then
			echo -e "[FAILED]:There is no CD-ROM, please check!!!" | tee -a $LOGFILE
			return 1
	fi
	
	df -h | grep "castools" >> tmpfile1
	df -h | grep "castools" | awk 'print $6'>> tmpfile2
	var_castool=$(cat tmpfile1)
	var_castool_path=$(cat tmpfile2)
	rm tmpfile1 tmpfile2
	if [ "$var_castool" == "" ]; then
		echo -e "[ERROR]:Wrong CD-ROM,please remount castools CD-ROM!" | tee -a $LOGFILE
		echo -e "[INFO]:If you already mount castools CD-ROM,you can check by <df -h> after reboot this course." | tee -a $LOGFILE
		df -h
		exit 1
	else
		cd $var_castool_path/linux
	fi
	
	read -p "Please enter Broker IP:" BrokerIP
	ping -c1 -w2 $BrokerIP > /dev/null 2>&1
	if [ $? -eq 0 ]; then
		echo "[INFO]:The Broker($BrokerIP) is connected." | tee -a $LOGFILE
	else
		echo "[FATAL]:The Broker($BrokerIP) is not connected!!!" | tee -a $LOGFILE
		return 1
	fi
	./CAS_tools_install.sh | tee -a $LOGFILE
	cd /usr/local/
	var_version="ubuntu14.04-64bit"
	version_number=$(cat /etc/issue | awk 'NR==1print $2')
	if [ "$version_number" == "14.04.2" ]; then
		var_version="ubuntu14.04-64bit"
	elif [ "$version_number" == "12.04.5" ]; then
		var_version="ubuntu12.04-64bit"
	fi
	wget --no-check-certificate http://$BrokerIP:8880/version/H3CDAgent/Linux%26Ubuntu/$var_version/mydebs.tar.bz2 | tee -a $LOGFILE
	if [ -f /usr/local/mydebs.tar.bz2 ]; then
		tar -xvf mydebs.tar.bz2
		echo -e "[INFO]:Download mydebs.tar.bz2 complete" | tee -a $LOGFILE
		sleep 1
	else
		echo -e "[FAILED]:Download mydebs.tar.bz2 failed, you can manually download it to /usr/local/, and continue this script。" | tee -a $LOGFILE
		exit 1
	fi
	cp /etc/apt/sources.list /etc/apt/sources.list.bak
	cat /dev/null > /etc/apt/sources.list
	echo "deb file:///usr/local/mydebs ./" > /etc/apt/sources.list
	apt-get update | tee -a $LOGFILE
	sleep 1
	apt-get install h3cdagent
	h3cdagent $BrokerIP
	#edit grub.cfg
	cp /boot/grub/grub.cfg /boot/grub/grub.cfg.bak
	sed -i 's/'"set timeout=30"'/'"set timeout=0"'/g' /boot/grub/grub.cfg
	sed -i 's/'"set timeout=-1"'/'"set timeout=0"'/g' /boot/grub/grub.cfg
	service h3cdservice status


function installCentOSRedHat () 
	local overflag
	overflag=0
	sysflag=100
	
	if [ "$(cat /etc/issue | awk 'NR==1print $1')" == "CentOS" ]; then
		sysflag=0
	elif [ "$(cat /etc/issue | awk 'NR==1print $1')" == "Red" ]; then
		sysflag=1
	else
		echo -e "[FATAL]:System does not meet the requirements, please check!!!" | tee -a $LOGFILE
		exit 1
	fi
	
	if [ "$(uname -i)" != "x86_64" ] || [ $global_iscloudclass -ne 2 ]; then
		echo -e "[FATAL]:System does not meet the requirements, please check!!!" | tee -a $LOGFILE
		exit 1
	fi
	if [ ! -b /dev/sr0 ]; then
			echo -e "[FAILED]:There is no CD-ROM, please check!!!" | tee -a $LOGFILE
			return 1
	fi
	[ ! -d /usr/local ] && mkdir -p /usr/local
	
	if [ ! -f /usr/local/agent_check.conf ]; then
		if [ $sysflag -eq 0 ]; then
			if [ ! -f /usr/local/mountflag.tmp ]; then
				df -h | grep "CentOS" >> tmpfile1
				var_centos=$(cat tmpfile1)
				rm -rf tmpfile1
				if [ "$var_centos" == "" ]; then
					echo -e "[ERROR]:Wrong CD-ROM,please mount CentOS CD-ROM!" | tee -a $LOGFILE
					echo -e "[INFO]:If you already click CentOS CD-ROM,you can check by <df -h> after reboot this course." | tee -a $LOGFILE
					df -h
					exit 1
				fi
				#mount centos
				umount /dev/sr0 | tee -a $LOGFILE
				[ ! -d /installmnt ] && mkdir /installmnt
				mount /dev/sr0 /installmnt | tee -a $LOGFILE && cat /dev/null > /usr/local/mountflag.tmp
			fi
			#config CentOS-Base.repo
			confile=/etc/yum.repos.d/CentOS-Base.repo
			[ -f $confile ] && cp $confile $confile.bak || echo -e "[FAILED]:Config ERROR!" | tee -a $LOGFILE
			cat /dev/null > $confile
			echo "[base]" >> $confile
			echo 'name=CentOS-$releaserver - Base' >> $confile
			echo "baseurl=file:///installmnt" >> $confile
			echo "gpgcheck=0" >> $confile
			echo "enable=1" >> $confile
			echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6" >> $confile
			#config CentOS-Media.repo
			confile=/etc/yum.repos.d/CentOS-Media.repo
			[ -f $confile ] && cp $confile $confile.bak || echo -e "[FAILED]:Config ERROR!" | tee -a $LOGFILE
			cat /dev/null > $confile
			echo "[c6-media]" >> $confile
			echo 'name=CentOS-$releaserver - Media' >> $confile
			echo "baseurl=file:///installmnt" >> $confile
			echo "gpgcheck=0" >> $confile
			echo "enable=1" >> $confile
			echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6" >> $confile
		elif [ $sysflag -eq 1 ]; then
			if [ ! -f /usr/local/mountflag.tmp ]; then
				df -h | grep "RHEL" >> tmpfile2
				var_rhel=$(cat tmpfile2)
				rm -rf tmpfile2
				if [ "$var_rhel" == "" ]; then
					echo -e "[ERROR]:Wrong CD-ROM,please mount Red Hat CD-ROM!" | tee -a $LOGFILE
					echo -e "[INFO]:If you already click RedHat CD-ROM,you can check by <df -h> after reboot this course." | tee -a $LOGFILE
					df -h
					exit 1
				fi
				#mount rhel
				umount /dev/sr0 | tee -a $LOGFILE
				[ ! -d /installmnt ] && mkdir /installmnt
				mount /dev/sr0 /installmnt | tee -a $LOGFILE && cat /dev/null > /usr/local/mountflag.tmp
			fi
			#config rhel-source.repo
			confile=/etc/yum.repos.d/rhel-source.repo
			[ -f $confile ] && cp $confile $confile.bak || echo -e "[FAILED]:Config ERROR!" | tee -a $LOGFILE
			cat /dev/null > $confile
			echo "[rhel-source]" >> $confile
			echo 'name=Red Hat Enterprise Linux $releasever - $basearch - Source' >> $confile
			echo "baseurl=file:///installmnt" >> $confile
			echo "gpgcheck=0" >> $confile
			echo "enable=1" >> $confile
			echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release" >> $confile
		fi
		#yum install
		yum clean all | tee -a $LOGFILE
		yum repolist | tee -a $LOGFILE
		echo "y" | yum install xulrunner.i686 | tee -a $LOGFILE
		echo "y" | yum install libXtst.i686 | tee -a $LOGFILE
		if [ $? -eq 0 ]; then
			echo -e "[INFO]:yum install complete." | tee -a $LOGFILE
		else 
			echo -e "[ERROR]:yum install failed. Please check!" | tee -a $LOGFILE
			exit 1 
		fi
		#install xrdp and download file
		read -p "Please enter Broker IP:" BrokerIP
		ping -c1 -w1 $BrokerIP > /dev/null 2>&1
		if [ $? -eq 0 ]; then
			echo "[INFO]:The Broker($BrokerIP) is connected." | tee -a $LOGFILE
		else
			echo "[FATAL]:The Broker($BrokerIP) is not connected!!!" | tee -a $LOGFILE
			return 1
		fi
		
		cd /usr/local
		wget --no-check-certificate http://$BrokerIP:8880/version/H3CDAgent/Linux%26Ubuntu/xrdp-v0.6.1.tar.gz | tee -a $LOGFILE
		wget --no-check-certificate http://$BrokerIP:8880/version/H3CDAgent/Linux%26Ubuntu/h3cdaemon.run | tee -a $LOGFILE
		if [ ! -f /usr/local/xrdp-v0.6.1.tar.gz ] || [ ! -f /usr/local/h3cdaemon.run ]; then
			echo -e "[FAILED]:download xrdp or h3cdaemon failed."  | tee -a $LOGFILE
			exit 1
		fi
		tar -xvzf xrdp-v0.6.1.tar.gz | tee -a $LOGFILE
		cd xrdp-v0.6.1
		./bootstrap | tee -a $LOGFILE
		./configure | tee -a $LOGFILE
		make
		make install | tee -a $LOGFILE
		if [ $? -ne 0 ]; then
			echo -e "[ERROR]:make install failed. Please check!" | tee -a $LOGFILE
			exit 1 
		fi
		cd instfiles
		./xrdp.sh start
		ps aux | grep xrdp
		cp xrdp.sh /etc/rc.d/init.d/xrdpd
		chkconfig --level 2345 xrdpd on
		chkconfig --list xrdpd
		#install vnsserver
		cd /installmnt/Packages
		vncfile=$(find /installmnt/Packages -name tigervnc-server*)
		rpm -ivh $vncfile | tee -a $LOGFILE
		chkconfig --add vncserver
		chkconfig vncserver on
		service vncserver start
		vncserver
		service vncserver status
		service iptables stop
		chkconfig iptables off
		#install agent
		cd /usr/local
		chmod a+x h3cdaemon.run
		./h3cdaemon.run $BrokerIP | tee -a $LOGFILE
		if [ $? -ne 0 ]; then
			echo -e "[ERROR]:install h3cdaemon failed. Please check!" | tee -a $LOGFILE
			exit 1 
		fi
		chkconfig --add h3cdservice
		chkconfig h3cdservice on 
		service h3cdservice status | tee -a $LOGFILE
		service h3cdservice version | tee -a $LOGFILE
		echo -e "install_agent=1" > /usr/local/agent_check.conf
		cp $global_path/auto_install* /usr/local/auto_install.sh 
		rm -rf /usr/local/mountflag.tmp
	else
		echo -e "Start to configure the system......" | tee -a $LOGFILE
		#configure network
		FILE_ETH0=/etc/sysconfig/network-scripts/ifcfg-eth0
		if [ ! -f $FILE_ETH0 ]; then
			echo -e "[FAILED]:failed to configure eth0 "
			exit 1
		fi
		sed -i 's/'"ONBOOT=no"'/'"ONBOOT=yes"'/g' $FILE_ETH0
		sed -i 's/'"NM_CONTROLLED=yes"'/'"NM_CONTROLLED=no"'/g' $FILE_ETH0
		sed -i '/HWADDR/d' $FILE_ETH0 #if no ‘-i’,will not modify FILE_ETH0
		sleep 1
		cd /etc/udev/rules.d/
		rm -rf 70-persistent-net.rules
		sleep 1
		#configure user
		PASSWD_FILE=/etc/passwd
		[ ! -f $PASSWD_FILE.back ] && cp $PASSWD_FILE $PASSWD_FILE.back
		lastconf=$(cat /etc/passwd | sed -n '$p')
		USERNAME=$(sed -n '$p' $PASSWD_FILE | cut -d ":" -f 1) #‘-d’ (Specify separator),‘-f’ (Specify which character to print)
		tmpconf=$(sed -n '$p' $PASSWD_FILE | cut -d ":" -f 3-19) #Specify ‘:’ to be separator,print 3-19 part
		oldconf=$(sed -n '$p' $PASSWD_FILE)
		newconf="$USERNAME:"":$tmpconf"
		[ "$lastconf" != "$newconf" ] && sed -i 's!'"$oldconf"'!'"$newconf"'!g' $PASSWD_FILE
		#auto login
		CUSTOM_FILE=/etc/gdm/custom.conf
		if [ ! -f $CUSTOM_FILE.back ]; then
			cp $CUSTOM_FILE $CUSTOM_FILE.back
			autouserconf="AutomaticLogin=$USERNAME"
			timeuserconf="TimedLogin=$USERNAME"
			sed -i '3a AutomaticLoginEnable=True' $CUSTOM_FILE
			sed -i "4a $autouserconf" $CUSTOM_FILE
			sed -i '5a TimedLoginEnable=true' $CUSTOM_FILE
			sed -i "6a $timeuserconf" $CUSTOM_FILE
			sed -i '7a TimedLoginDelay=7' $CUSTOM_FILE
		fi
		echo -e "Configure the system complete." | tee -a $LOGFILE
		[ -f /usr/local/castool_check.conf ] && exit 0
		echo -e "Start to install Castool......" | tee -a $LOGFILE
		df -h | grep "castools" >> tmpfile3
		df -h | grep "castools" | awk 'print $6'>> tmpfile4
		var_castool=$(cat tmpfile3)
		var_castool_path=$(cat tmpfile4)
		rm tmpfile3 tmpfile4
		if [ "$var_castool" == "" ]; then
			echo -e "[ERROR]:Wrong CD-ROM,please mount Castools CD-ROM!" | tee -a $LOGFILE
			echo -e "[INFO]:If you already mount castools CD-ROM,you can check by <df -h> after reboot this course." | tee -a $LOGFILE
			df -h
			exit 1		
		fi
		#Castool installing
		cd $var_castool_path/linux
		./CAS_tools_install.sh
		[ $? -eq 0 ] && echo -e "[INFO]:Castool install complete!" || echo -e "[ERROR]:Castool install failed!" | tee -a $LOGFILE
		overflag=1
		echo -e "install_castool=1" > /usr/local/castool_check.conf
	fi
	#done
	echo -e "############################################################################################"
	echo -e "[INFO]:You can change broker IP from /opt/h3c/h3cdaemon/conf/imf.cfg" | tee -a $LOGFILE
	[ $overflag -eq 0 ] && echo -e "[INFO]:Please continue with this script(/usr/local/auto_install.sh) before mount Castools CD-ROM." | tee -a $LOGFILE
	[ $overflag -eq 0 ] && echo -e "[INFO]:If you already click Castools CD-ROM,you can check by <df -h> after reboot this course." | tee -a $LOGFILE
	[ $overflag -eq 1 ] && echo -e "[INFO]:Install complete!" | tee -a $LOGFILE
	echo -e "############################################################################################"


function readMe () 
	echo -e "[Error]:Your option is not exist. Please check!!!" | tee -a $LOGFILE
	exit 1


function workMain () 
	loadscipt
	echo  "##################################################################"
	echo  "Please enter your options(number only, 1 or 2)"
	echo  "	 options 1: Auto Install Ubuntu course"
	echo  "	 options 2: Auto Install CentOS/RedHat course"
	echo  "##################################################################"
	read -p "Please enter your options: " choice
	# check enter number 
	flag=true
	isnum=0
	while $flag
	do
	   #expr $choice + 0 &>/dev/null
	   #[ $? -eq 0 ] && [ flag=false ] || [ read -p "Please enter number only:(1<=options<= 2)" choice ]
		expr $choice + 10 &>/dev/null
		[ $? -eq 0 ] && isnum=1 || read -p "Number only,please enter again:"  choice
		if [ $isnum -eq 1 ] && [ $choice -le 2 -a $choice -ge 1 ]; then
			flag=false
		elif [ $isnum -eq 1 ]; then
			isnum=0
			read -p "Out of range,please enter again(1<=options<=2):" "choice"
		fi
	done
	
	if [ $choice -eq 1 ]; then
		installUbuntu
	elif [ $choice -eq 2 ]; then
		installCentOSRedHat
	else
		readMe
	fi
	return 0

workMain
exit 0

rac环境部署自动化shell脚本

RAC环境部署自动化shell脚本富士康质检员张全蛋2018-03-2614:48:59301收藏1分类专栏:ORACLERAC+ASM版权下面是一个rac搭建时候的一个环境自动部署脚本,这个脚本可以自动帮你完成安装数据库需要的包,创建oracle,grid用户,并且配置环境... 查看详情

linux通过shell自动部署springboot

需要提前配置jdk、git、maven、MySQL环境,这里主要介绍maven环境配置一、maven环境配置1、下载maven官方下载地址:https://maven.apache.org/download.cgi方案1:直接点击下载,然后上传到服务器方案2:(推荐)复... 查看详情

linux基于jenkins自动打包并部署tomcat环境/docker环境/php环境(代码片段)

...件3、配置jenkins并发执行数量4、配置邮件地址基于Jenkins自动打包并部署Tomcat环境传统网站部署的流程主流网站部署的流程Jenkins工作原理及实验准备1、配置git主机2、配置jenkins主机3、配置web主机4、新建Maven项目5、验证Jenkins自动... 查看详情

linux网络服务——pxe服务器实现linux安装自动部署(包含操作详解)(代码片段)

PXE服务器实现Linux安装自动部署预启动执行环境PXE简介实验环境准备PXE服务器配置准备工作PXE服务器配置PXE无人值守自动化装机测试预启动执行环境预启动执行环境(PrebooteXecutionEnvironment,PXE)也被称为预执行环境... 查看详情

centos一键部署lamp,shell脚本和搭建教程(代码片段)

...在无网络环境搭建部署,几条命令搞定。linux系统上自动搭建lamp环境1.下载这些东西,或者直接下载我的压缩包ps:里面的内容如图,是一些安装包和一个脚本(脚本内容在最后)用xshell里的xftp把压缩包上传到... 查看详情

docker在windows环境下的安装部署

一、准备  系统环境:Windows1064bit  Docker安装包:DockerforWindowsInstaller.exe二、安装步骤  1、开启系统的hyper-v2、重启电脑后,安装docker。3、配置docker共享盘(C#项目文件所在盘符)4、配置docker配置镜像(由于用官方镜像比... 查看详情

linux操作系统(常用命令软件安装,项目手动部署shell自动化部署)(代码片段)

Linux操作系统不同领域的主流操作系统桌面操作系统: windows(用户数量最多)、 MacOS(操作体验好,办公人士首选)、 Linux(用户数量少)服务器操作系统: UNIX(安全、稳定、收费)... 查看详情

linux操作系统(常用命令软件安装,项目手动部署shell自动化部署)(代码片段)

Linux操作系统不同领域的主流操作系统桌面操作系统: windows(用户数量最多)、 MacOS(操作体验好,办公人士首选)、 Linux(用户数量少)服务器操作系统: UNIX(安全、稳定、收费)... 查看详情

自动化部署之cobbler的安装

...常广泛,可以实现从系统安装到配置几乎无认为干涉的全自动化部署,他使用dnsmasq作为内部的dhcp和dns服务器。可以自定义其snippets脚本来实现更复杂的安装配置操作。而且他支持webui来进行配置。其核心组件主要有:  Dis... 查看详情

jenkins在windows环境下的3种部署方式

...A9234yQ  提取码:tk4d tips:前两种方式在构建web自动化任务时,都不会在用户前台打开浏览器,只有最后一种方式会有打开浏览器的效果。在解析war包时会默认在c盘生成jenkins安装目录,可在环境变量中设置jenkins的安装... 查看详情

linux下的java环境配置

1:安装wget   yuminstallwget      wget是Linux下的一个下载工具   2:安装jdk   新建软件下载目录:     mkdir/home/soft &nb 查看详情

linux系统:第十四章:安装docker,安装配置gitlab私有仓库以及jenkins自动化部署(图文)(代码片段)

文章目录一、docker安装二、配置docker对外端口三、安装配置gitlab四、安装配置jekins一、准备工作二、下载安装配置Jenkins五、jenkins主要的一些配置六、项目配置七、jekins迁移到另一台服务器上总结一、docker安装说明:以下为... 查看详情

linux下的nfs搭建配置

...墙四、客户端配置1.检查服务端共享目录是否存在2.安装自动挂载程序2.启动服务3.编辑配置文件五、检查测试一、NFS介绍1.NFS简介NFS:网络文件系统,由Sun公司开发,通过网络,NFS支持在不同的文件系统之间共享文件.用 查看详情

linux下安装tomcat+jdk环境部署

    Linux下安装apache比较简单,安装apache的httpd就可以了。  但是如果要用tomcat的话,要稍微复杂一点,但如果按步骤来,也会很顺利地装好。  首先,tomcat安装之前,需要安装java环境,即需要下载java... 查看详情

dockerforwindows安装配置及常用维护

...在不更改.net开发和配置文件的前提下快速实现IIS组件的部署配 查看详情

linux集成环境部署mysql+tomcat+redis(代码片段)

Linux集成环境部署mysql+tomcat+redisMySQL安装和配置Tomcat安装配置Tomcat环境部署-单实例部署Tomcat多实例部署Tomcat访问日志配置Nginx安装配置MySQL安装和配置MySQL是一个关系型数据库管理系统,由瑞典MysqlAB公司开发,目前属... 查看详情

linux环境下的python配置,必备库的安装配置(代码片段)

 1、默认Python安装情况一般情况,Linux会预装Python的,版本较低,比如Ubuntu15的系统一般预装的是Python2.7.10。使用命令:whichpython可以查看当前的python的安装路径: 打开对应路径就可以看到: 如果没有明确必须要使用Py... 查看详情

tvm在linux环境下的安装与编译及vscode如何配置tvm的远程连接调试环境(代码片段)

文章目录前言1.安装TVM1.1下载源码1.2创建虚拟环境及安装依赖库1.3编译TVM源码1.4验证安装是否成功2.配置vscode3.安装FFINavigator结束语前言  本篇文章介绍一下tvm在linux环境下的安装与编译,以及如何使用vscode来配置tvm的远程... 查看详情