zoukankan      html  css  js  c++  java
  • linux运维、架构之路-禅道环境搭建

    一、介绍

               禅道项目管理软件是国产的开源项目管理软件,专注研发项目管理,内置需求管理、任务管理、bug管理、缺陷管理、用例管理、计划发布等功能,实现了软件的完整生命周期管理。

    禅道官网:http://www.zentao.net/

    安装禅道环境需求为LNMP或者LAMP环境

    二、安装部署

    1、环境

    [root@lnmp ~]# cat /etc/redhat-release 
    CentOS release 6.9 (Final)
    [root@lnmp ~]# uname -r
    2.6.32-696.el6.x86_64
    [root@lnmp ~]# /etc/init.d/iptables status
    iptables: Firewall is not running.
    [root@lnmp ~]# getenforce 
    Disabled
    

    2、优化相关

    ①配置yum源,安装常用软件

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 
    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
    yum install -y net-tools vim wget lrzsz tree screen lsof tcpdump   

    ②调整文件描述符

    echo '*   -    nofile   100000 ' >>/etc/security/limits.conf

    ③更新系统并重启

    yum update -y && reboot
    

    3、安装Nginx

    useradd -s /sbin/nologin -M www
    mkdir -p /server/tools/
    cd /server/tools/
    wget http://nginx.org/download/nginx-1.10.3.tar.gz
    tar xf nginx-1.10.3.tar.gz
    yum install pcre-devel openssl-devel -y
    cd /server/tools/nginx-1.10.3
    ./configure --prefix=/application/nginx-1.10.3 --user=www --group=www  --with-http_stub_status_module  --with-http_ssl_module
    make && make install
    ln -s /application/nginx-1.10.3/ /application/nginx
    ln -s /application/nginx/sbin/nginx  /usr/local/sbin/
    nginx
    lsof -i:80
    

    4、安装PHP

    ①安装依赖包

    yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel -y
    yum install freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libxslt-devel -y 

    ②安装PHP扩展库

    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
    yum -y install libmcrypt-devel mhash mcrypt libmcrypt-devel

    ③安装libiconv包

    wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
    tar xf libiconv-1.14.tar.gz
    cd libiconv-1.14
    ./configure --prefix=/usr/local/libiconv
    make && make install  

    ④编译安装PHP-5.6.30

    cd /server/tools/
    tar xf php-5.6.30.tar.gz
    cd php-5.6.30
    ./configure 
    --prefix=/usr/local/php5.6.30 
    --with-config-file-path=/usr/local/php56/etc 
    --enable-inline-optimization 
    --disable-debug 
    --disable-rpath 
    --enable-shared 
    --enable-opcache 
    --enable-fpm 
    --with-fpm-user=nginx 
    --with-fpm-group=nginx 
    --with-mysql=mysqlnd 
    --with-mysqli=mysqlnd 
    --with-pdo-mysql=mysqlnd 
    --with-gettext 
    --enable-mbstring 
    --with-iconv 
    --with-mcrypt 
    --with-mhash 
    --with-openssl 
    --enable-bcmath 
    --enable-soap 
    --with-libxml-dir 
    --enable-pcntl 
    --enable-shmop 
    --enable-sysvmsg 
    --enable-sysvsem 
    --enable-sysvshm 
    --enable-sockets 
    --with-curl 
    --with-zlib 
    --enable-zip 
    --with-bz2 
    --with-readline 

    注:编译时报错解决

    yum install openssl-devel -y
    yum -y install libcurl-devel
    yum -y install bzip2-devel
    yum -y install readline-devel
    ###linux编译安装时常见错误解决办法
    https://www.cnblogs.com/sweetXiaoma/p/5855732.html  

    安装

    make && make install
    ln -s /usr/local/php5.6.30/  /usr/local/php
    cd /server/tools/
    cp php5.6.30/php.ini-development /usr/local/php/lib/php.ini
    cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf  

    启动PHP服务

    /usr/local/php/sbin/php-fpm
    

    5、安装MySQL 

    useradd -s /sbin/nologin -M mysql
    cd /server/tools
    tar xf mysql-5.6.34-linux-glibc2.5-x86_64.tar.gz
    mkdir -p /application/
    mv /server/tools/mysql-5.6.34-*-x86_64 /application/mysql-5.6.34
    ln -s /application/mysql-5.6.34/ /application/mysql
    chown -R mysql.mysql /application/mysql/
    /application/mysql/scripts/mysql_install_db --basedir=/application/mysql --datadir=/application/mysql/data --user=mysql
    cp /application/mysql/support-files/mysql.server /etc/init.d/mysqld
    chmod +x /etc/init.d/mysqld
    sed -i 's#/usr/local/mysql#/application/mysql#g' /application/mysql/bin/mysqld_safe /etc/init.d/mysqld
    cp /application/mysql/support-files/my-default.cnf /etc/my.cnf
    /etc/init.d/mysqld start
    lsof -i:3306
    echo 'export PATH=/application/mysql/bin:$PATH' >>/etc/profile
    source /etc/profile
    chkconfig --add mysqld 
    chkconfig mysqld on
    /application/mysql/bin/mysqladmin -u root password '123456'

    6、PHP与nginx结合

    nginx.conf配置如下:

    cat nginx.conf
    user  nginx;
    worker_processes  2;
    error_log  /var/log/nginx/error.log;
    pid        /var/run/nginx.pid;
    events {
        use epoll;
        worker_connections  65535;
    }
    http {
        include       mime.types;
        default_type  application/octet-stream;
        log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                          '$status $body_bytes_sent "$http_referer" '
                          '"$http_user_agent" "$http_x_forwarded_for"';
        access_log  /var/log/nginx/access.log  main;
        server_tokens off;
        sendfile        on;
        tcp_nopush     on;
        keepalive_timeout  65;
        tcp_nodelay on;
        client_header_buffer_size 4k;
        open_file_cache max=65535 inactive=60s;
        open_file_cache_valid 80s;
        client_body_buffer_size 512k;
        large_client_header_buffers 4 512k;
        proxy_connect_timeout 30;
        proxy_read_timeout 60;
        proxy_send_timeout 20;
        proxy_buffering on;
        proxy_buffer_size 16k;
        proxy_buffers 4 64k;
        proxy_busy_buffers_size 128k;
        proxy_temp_file_write_size 128k;
        gzip  on;
        gzip_min_length 1k;
        gzip_buffers 4 16k;
        gzip_http_version 1.1;
        gzip_comp_level 2;
        gzip_types text/plainapplication/x-javascript text/css application/xml;
        gzip_vary on;
    include /application/nginx/conf/extra/*.conf;
    }
    

    server标签配置如下: 

    cat zentao.conf 
    server {
        listen       80;
        server_name  域名;
        access_log  /var/log/nginx/zentao_access.log main;
            root   /application/php_php/zentao/www;
        location / {
            index  index.php index.html index.htm;
        }
        location ~ .*.(php|php5)?$ {
            fastcgi_pass  127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi.conf;
        }
    }

    三、下载禅道

    wget http://dl.cnezsoft.com/zentao/9.1.2/ZenTaoPMS.9.1.2.zip
    #将程序解压访问即可,我们nginx站点目录设置如下:php_php/zentao/www;
    直接访问IP或者域即可 

    配置:

       

    成功最有效的方法就是向有经验的人学习!
  • 相关阅读:
    [ZJOI2006]物流运输
    [SCOI2009]生日快乐
    [FJOI2007]轮状病毒
    [转载]centos 7(1611)安装笔记
    发行版Linux和麒麟操作系统下netperf 网络性能测试
    ARM64平台编译stream、netperf出错解决办法 解决办法:指定编译平台为alpha [root@localhost netperf-2.6.0]# ./configure –build=alpha
    查看linux系统是多少位,使用 getconf LONG_BIT
    https://www.jqhtml.com/30047.html strace + 命令: 这条命令十分强大,可以定位你程序到底是哪个地方出了问题
    Centos7 利用crontab定时执行任务及配置方法
    清楚自己的短板是什么 搞清楚自己的职业规划是什么
  • 原文地址:https://www.cnblogs.com/yanxinjiang/p/9235171.html
Copyright © 2011-2022 走看看