Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
W
wiki-php
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • 互联网应用开发
  • wiki-php
  • Wiki
  • envrioment

Last edited by 互联网应用开发 Nov 24, 2021
Page history

envrioment

配置git环境

安装

  • windows https://git-for-windows.github.io/
  • mac https://sourceforge.net/projects/git-osx-installer/
  • ubuntu sudo apt-get install git

设置公钥

windows用户使用git-bash(git的安装目录下找) 执行命令 macosx & Linux 命令相同

ssh-keygen -t rsa  

一路默认回车 然后进入用户目录的.ssh文件夹下,复制rsa.pub的内容 到gitlab的设置ssh-key的地方即可 http://tech.pingansec.com/profile/keys

下载源码

  1. 下载wamp (linux & mac 需要自行安装)
  2. 启动 (linux & mac 需要自行安装)
  3. 进入wamp/www/ (linux & mac 自行设定目录)
  4. git clone git@tech.pingansec.com:wangqs/web-php.git
  5. git clone git@tech.pingansec.com:wangqs/php-config.git
  6. git clone git@tech.pingansec.com:wangqs/static.git
  7. 将php-config目录的config文件夹复制到web-php目录 linux 或者 mac 可以建一个软连接

windows 配置域名

<VirtualHost *:80>
    DocumentRoot e:/wamp/www/web-php/app-shuidi
    ServerName shuidi.dev.pingansec.com
    <Location />
        AddDefaultCharset utf-8
        RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . index.php [L,QSA]
        RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]
    </Location>
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot e:/wamp/www/static
    ServerName static.dev.pingansec.com
    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

将上边内容复制到wamp/bin/apache/apache2.x/conf/http.conf文件的最下边

在http.conf中搜索mod_rewrite.so把这一行的注释去掉,保存文件

下载 redis扩展

http://windows.php.net/downloads/pecl/releases/redis/2.2.7/php_redis-2.2.7-5.5-ts-vc11-x86.zip

下载mongodb扩展

http://windows.php.net/downloads/pecl/releases/mongodb/1.1.7/php_mongodb-1.1.7-5.5-ts-vc11-x86.zip

将上边三个文件解压缩,将里边的dll文件复制到 wamp\bin\php\php.x.x.x\ext\目录里

修改wamp\bin\apache\apache.x.x.x\bin\php.ini文件 搜索 short_open_tag 注意是apache目录

然后找到short_open_tag=Off 将Off改成On

增加三行

extension=php_redis.dll
extension=php_mongodb.dll
将wamp\bin\php\php.x.x.x\ 加入环境变量

重启wamp

浏览器输入 shuidi.dev.pingansec.com

phpstorm配置

下载phpstorm(有办法破解的话)或者vscode

phpstorm配置git

file->settins->搜索 git 选择git,path设置成

C:\Program Files (x86)\Git\cmd\git.exe

搜索ssh 选择 subversion 右边选择ssh settings

将private key设置成你的私钥,ssh-keygen生成的 类似

C:\Users\suxianbaozi\.ssh\id_rsa

试试能不能用git了吧~~

linux & mac

通过pecl安装 或者brew安装 solr.so mongodb.so redis.so扩展

环境要求 nginx + php-fpm 可以安装brew之后进行安装

nginx 配置文件

server {
        listen       80;
        server_name shuidi.dev.pingansec.com;
        index index.html index.htm index.php;
        root  /Users/www/web-php/app-shuidi;
        rewrite . /index.php;


        location ~ .*\.(php|php5)?$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
}

#静态文件
server {
        listen      80;
        server_name static.dev.pingansec.com;
        root  /Users/www/static;
        limit_rate 512k;
}
Clone repository
  • 360safeguardnativeapi
  • all new classmate
  • bind phone
  • code standard
  • deploy_sys
  • edit common
  • edit master
  • envrioment
  • find psw
  • front new classmate
  • front statck
  • git
  • Home
  • idcard md5
  • ide
View All Pages