1.安装ansible
1.1安装python3.5
1.2pip安装ansible
[[email protected] ~]# /usr/local/python/bin/pip3 install ansible
[[email protected] ~]# ln -s /usr/local/python/bin/ansible /usr/local/bin/
[[email protected] ~]# ansible --version
ansible 2.6.4
config file = None
configured module search path = [‘/root/.ansible/plugins/modules‘, ‘/usr/share/ansible/plugins/modules‘]
ansible python module location = /usr/local/python/lib/python3.5/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.5.2 (default, Sep 7 2018, 20:17:38) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]1.3ansible查看帮助
[[email protected] ~]# /usr/local/python/bin/ansible-doc -l 查看总帮助
[[email protected] ~]# /usr/local/python/bin/ansible-doc -s shell 查看shell模块的帮助
2.安装tomcat
2.1安装jdk
[[email protected] ~]# tar xf jdk-8u171-linux-x64.gz -C /usr/local
[[email protected] ~]# mv /usr/local/jdk1.8.0_171 /usr/local/jdk
[[email protected] ~]# sed -i.ori ‘$a export JAVA_HOME=/usr/local/jdk\nexport PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH\nexport CLASSPATH=.$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar‘ /etc/profile
[[email protected] ~]# source /etc/profile
[[email protected] ~]# java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
[[email protected] ~]# tail -3 /etc/profile
export JAVA_HOME=/usr/local/jdk
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export CLASSPATH=.$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar2.2安装tomcat
[[email protected] ~]# tar xf apache-tomcat-9.0.8.tar.gz -C /usr/local
[[email protected] ~]# export JAVA_HOME=/usr/local/jdk
[[email protected] ~]# tar xf apache-tomcat-9.0.8.tar.gz -C /usr/local
[[email protected] ~]# mv /usr/local/apache-tomcat-9.0.8/ /usr/local/tomcat
[[email protected] ~]# echo ‘export TOMCAT_HOME=/usr/local/tomcat‘ >> /etc/profile
[[email protected] ~]# source /etc/profile/usr/local/tomcat/bin/startup.sh
/usr/local/tomcat/bin/shutdown.sh2.3安装maven
[[email protected] ~]# tar xf apache-maven-3.5.3-bin.tar.gz -C /usr/local/
[[email protected] local]# mv /usr/local/apache-maven-3.5.3/ /usr/local/maven
[[email protected] ~]# sed -ri.bak ‘$a export MAVEN_HOME=/usr/local/maven \nexport PATH="$MAVEN_HOME/bin:$PATH"‘ /etc/profile
[[email protected] ~]# tail -2 /etc/profile
export MAVEN_HOME=/usr/local/maven
export PATH="$MAVEN_HOME/bin:$PATH"
[[email protected] local]# source /etc/profile
[[email protected] local]# mvn -version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T14:49:05-05:00)
Maven home: /usr/local/maven
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /usr/local/jdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-862.el7.x86_64", arch: "amd64", family: "unix"
3.安装jenkins
3.1清除webapps下的ROOT以外的目录和ROOT下的文件
[[email protected] webapps]# mv docs/ examples/ host-manager/ manager/ /tmp
[[email protected] ROOT]# rm -fr *3.2jenkins移过来
[[email protected] ROOT]# mv ~/jenkins.war /usr/local/tomcat/webapps/ROOT3.3解压war包
[[email protected] ROOT]# jar xvf jenkins.war3.4访问
ip:80803.5jenkins初始密码
[[email protected] ROOT]# cat /root/.jenkins/secrets/initialAdminPassword
36fa4201d20f4772912aa0cfb52df8c7
4.自建gitlab仓库
原文地址:http://blog.51cto.com/13893093/2171932