企业DevOps构建 (一)

一,环境:

tomcat 7.0.92
jenkins 1.658
maven
mysql 5.5.23
mongodb 2.6.11
redis 4.0.12
 
01, 安装jenkins
  wget https://pkg.jenkins.io/redhat/jenkins-2.72-1.1.noarch.rpm
  rpm -ivh jenkins-2.72-1.1.noarch.rpm
02, 安装java
  下载java包1.7.80
  配置环境变量
  JAVA_HOME=/application/evn/jdk
  CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
  JRE_HOME=$JAVA_HOME/jre
    PATH=$JAVA_HOME/bin:$HOME/bin:$HOME/.local/bin:$PATH
 
  出现问题01:
    

    解决结果:

      yum install glibc.i686

      

   03, 安装maven

      下载maven 解压移动到对应项目

        tar zxvf apache-maven-3.0.5-bin.tar.gz -C /usr/local/
        ln -s /usr/local/apache-maven-3.0.5/ /usr/local/maven
          vim /etc/profile
        MAVEN_HOME=/usr/local/maven
        PATH=$PATH:${MAVEN_HOME}/bin
          source /etc/profile
        mvn -v

   04, 安装tomcat

      wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-7/v7.0.92/bin/apache-tomcat-7.0.92.tar.gz

      tar zxvf apache-tomcat-7.0.92.tar.gz -C /application/server/ && ln -s apache-tomcat-7.0.92/ tomcat

      启动文件在bin目录下

   05. 安装mysql

     下载包解压

      yum install gcc-c++ ncurses-devel libaio-devel cmake -y

     useradd -s /sbin/nologin -g mysql -M mysql 

     进入mysql安装包目录里面
    cmake -DCMAKE_INSTALL_PREFIX=/application/server/mysql-5.5.23 -DMYSQL_DATADIR=/application/server/mysql-5.5.23/data -DMYSQL_UNIX_ADDR=/application/server/mysql-5.5.23/tmp/mysql.sock -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_ZLIB=bundled -DWITH_SSL=bundled -DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1 -DENABLE_DOWNLOADS=1 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DMYSQL_TCP_PORT=3306 -DWITH_DEBUG=0
     make && make insatll
    /application/server/mysql/scripts/mysql_install_db --user=mysql --basedir=/application/server/mysql-5.5.23 --datadir=//application/server/mysql-5.5.23/data
    chown -R mysql:mysql /application/server/mysql-5.5.23
    启动mysql
  06. 安装redis
      wget http://download.redis.io/releases/redis-4.0.12.tar.gz
      tar zxvf redis-4.0.12.tar.gz
      cd redis-4.0.12
      make
      启动
      make install PREFIX=/application/server/redis-4.0.12
      redis-server &
  07。 mongo
      解压文件移动就行
 
 
二,项目整合
  
   启动jenkins
    systemctl start jenkins
  开放端口
      firewall-cmd --zone=public --add-port=8080/tcp --permanent
  进入网址:8080
  cat /var/lib/jenkins/secrets/initialAdminPassword
   输入密码
    
posted on 2019-01-09 16:48  kingle-l  阅读(457)  评论(0编辑  收藏  举报

levels of contents