CentOS 安装Jitamin项目管理软件

因为jitamin 建议使用php7 ,所以,开始要检查一下php 的版本,如php -v 

如果是5.5 之类,建议卸载

rpm -qa|grep php

然后一个个删除

 

 rpm -e php56w-gd-5.6.33-1.w7.x86_64

rpm -e php56w-mysql-5.6.33-1.w7.x86_64

 

rpm -e php56w-5.6.33-1.w7.x86_64

 

rpm -e php56w-devel-5.6.33-1.w7.x86_64

rpm -e php56w-intl-5.6.33-1.w7.x86_64

rpm -e php56w-odbc-5.6.33-1.w7.x86_64

rpm -e php56w-opcache-5.6.33-1.w7.x86_64

rpm -e php56w-fpm-5.6.33-1.w7.x86_64

 

rpm -e php56w-mcrypt-5.6.33-1.w7.x86_64

rpm -e php56w-pear-1.10.4-1.w7.noarch

rpm -e php56w-ldap-5.6.33-1.w7.x86_64

 

rpm -e php56w-pdo-5.6.33-1.w7.x86_64

rpm -e php56w-process-5.6.33-1.w7.x86_64

rpm -e php56w-xml-5.6.33-1.w7.x86_64

rpm -e php56w-cli-5.6.33-1.w7.x86_64

rpm -e php56w-common-5.6.33-1.w7.x86_64

 

直到php -v 不显示版本, 然后开始安装php 7

wget -O php7. tar .gz http: //cn2 .php.net /get/php-7 .1.1. tar .gz /from/this/mirror
 
tar  zxvf php7. tar .gz
cd  php-7.1.1/
yum  install  libxml2 libxml2-devel openssl openssl-devel  bzip2  bzip2 -devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel 
     // 安装依赖包
如果遇到错误
configure: error: no acceptable C compiler found in $PATH 
需要安装
yum -y install gcc
 
再使用./configure编译php源代码
. /configure  --prefix= /usr/local/php  --with-config- file -path= /etc  -- enable -fpm --with-fpm-user=nginx --with-fpm-group=nginx -- enable -inline-optimization --disable-debug --disable-rpath -- enable -shared -- enable -soap --with-libxml- dir  --with-xmlrpc --with-openssl --with-mcrypt --with-mhash --with-pcre-regex --with-sqlite3 --with-zlib -- enable -bcmath --with-iconv --with-bz2 -- enable -calendar --with-curl --with-cdb -- enable -dom -- enable -exif -- enable -fileinfo -- enable -filter --with-pcre- dir  -- enable - ftp  --with-gd --with-openssl- dir  --with-jpeg- dir  --with-png- dir  --with-zlib- dir  --with-freetype- dir  -- enable -gd-native-ttf -- enable -gd-jis-conv --with-gettext --with-gmp --with-mhash -- enable -json -- enable -mbstring -- enable -mbregex -- enable -mbregex-backtrack --with-libmbfl --with-onig -- enable -pdo --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-zlib- dir  --with-pdo-sqlite --with-readline -- enable -session -- enable -shmop -- enable -simplexml -- enable -sockets -- enable -sysvmsg -- enable -sysvsem -- enable -sysvshm -- enable -wddx --with-libxml- dir  --with-xsl -- enable -zip -- enable -mysqlnd-compression-support --with-pear -- enable -opcache
 
若无报错即可使用make编译安装
 
make  &&  make  install
vi  /etc/profile
 
在文件最末尾添加一下内容
PATH=$PATH: /usr/local/php/bin
export  PATH
 
保存退出后输入以下命令将配置立即生效
source   /etc/profile
 
复制php-fpm默认配置文件至安装目录,并赋予权限
cp  php.ini-production  /etc/php .ini   
cp  /usr/local/php/etc/php-fpm .d /www .conf.default  /usr/local/php/etc/php-fpm .d /www .conf
cp  /usr/local/php/etc/php-fpm .conf.default   /usr/local/php/etc/php-fpm .conf
cp  sapi /fpm/init .d.php-fpm  /etc/init .d /php-fpm
chmod  +x  /etc/init .d /php-fpm
 
/etc/init .d /php-fpm start 启动
 
php 安装完成,
 
安装 nginx 
yum instal nginx 
默认安装即可
安装mysql 
 
 
下载jitamin 源文件,放在对应的文件目录
cd jitamin/config/
cp config.default.php config.php
vim config.php                   //修改配置文件
将'db_driver' => 'sqlite',修改为'db_driver' => 'mysql',
curl -sS https://getcomposer.org/installer | php      //下载安装composer
php composer.phar install -o --no-dev  
/usr/local/mysql/bin/mysql-p -uroot -S /data/mysql_data_3306/mysql.sock    //登录sql,由于未设置密码,在显示输入密码处直接回车空密码进入
CREATE DATABASE jitamin                //创建jitamin表
ctrl + c               //退出sql
vendor/bin/phinx migrate                 //同步数据库 
 
好了jitamin 这边没什么问题
然后,设置nginx.cnf
 
 server {
        listen       8186;//端口自定
        server_name  localhost;
        index index.php;
 
                                charset utf-8;
 
        root    /data/jitamin/public;
        location / {
                                try_files $uri $uri/ /index.php?$query_string;
        }
 
      location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        #fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
    }
 
        location ~ /\.ht {
            deny  all;
        }
 
    }
   
 
保存退出,然后重启
 
然后就可以访问了


 
 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值