CentOS系统怎样搭建Git版本控制服务器

CentOS系统怎样搭建Git版本控制服务器,第1张

一、准备工作 上pkgs/download/nginx-1/download/nginx-1206/get/php-5414targz/from/this/mirror // 解压 [root@pangou php]# tar -zxvf php-5414targz 安装依赖包 [root@pangou php]# yum install -y libxml2-devel libjpeg-devel libpng-devel freetype-devel openssl-devel libcurl-devel libmcrypt-devel 编译php [root@pangou php]# ls php-5414 php-5414targz [root@pangou php]# cd php-5414 [root@pangou php-5414]# pwd /root/Downloads/php/php-5414 [root@pangou php-5414]# ls acincludem4 CREDITS ltmainsh NEWS READMEMAILINGLIST_RULES READMETESTING stamp-hin aclocalm4 ext main pear READMEnamespaces READMETESTING2 stubc build EXTENSIONS makedist php5specin READMENEW-OUTPUT-API READMEUNIX-BUILD-SYSTEM svncleanbat buildconf footer Makefilefrag phpgif READMEPARAMETER_PARSING_API READMEWIN32-BUILD-SYSTEM tests buildconfbat generated_lists Makefilegcov phpini-development READMEPHP4-TO-PHP5-THIN-CHANGES run-testsphp TSRM CODING_STANDARDS genfiles Makefileglobal phpini-production READMEREDISTBINS sapi UPGRADING configguess header makerpm READMEEXTENSIONS READMERELEASE_PROCESS scripts UPGRADINGINTERNALS configsub INSTALL missing READMEEXT_SKEL READMESELF-CONTAINED-EXTENSIONS server-tests-configphp vcsclean configure install-sh mkinstalldirs READMEGIT-RULES READMESTREAMS server-testsphp win32 configurein LICENSE netware READMEinput_filter READMESUBMITTING_PATCH snapshot Zend [root@pangou php-5414]# /configure --prefix=/opt/php --with-config-file-path=/opt/php/etc --with-mysql=/usr/ --with-mysqli=/usr/bin/mysql_config --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic // 编译时间可能有点长。。。 // 编译成功后,安装 [root@pangou php-5414]# make && make install // 安装时间也比较长 安装成功后,php的位置就应该在/opt/php目录下,接下去就是配置 // 复制配置文件到配置目录下 [root@pangou php-5414]# cp /root/Downloads/php/php-5414/phpini-production /opt/php/etc/phpini [root@pangou php-5414]# cp /opt/php/etc/php-fpmconfdefault /opt/php/etc/php-fpmconf [root@pangou php-5414]# cd /opt/php/etc/ [root@pangou etc]# ls php-fpmconf php-fpmconfdefault phpini // 然后配置nginx的配置文件,让其可以运行php [root@pangou etc]# cd /opt/nginx/conf/ [root@pangou conf]# ls fastcgiconf fastcgi_params koi-utf mimetypes nginxconf scgi_params uwsgi_params win-utf fastcgiconfdefault fastcgi_paramsdefault koi-win mimetypesdefault nginxconfdefault scgi_paramsdefault uwsgi_paramsdefault [root@pangou conf]# vim nginxconf 1、去掉 #user nobody; 的#号, 变成 user nobody; 2、去掉 #location ~ php$ { # root html; # fastcgi_pass 127001:9000; # fastcgi_index indexphp; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} 之前的#号, 并修改 fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; 为 fastcgi_param SCRIPT_FILENAME /opt/nginx/html$fastcgi_script_name; 最终修改后的内容为: location ~ php$ { root html; fastcgi_pass 127001:9000; fastcgi_index indexphp; fastcgi_param SCRIPT_FILENAME /opt/nginx/html$fastcgi_script_name; include fastcgi_params; } 重启nginx服务,并开启php-fpm [root@pangou ~]# /opt/nginx/sbin/nginx [root@pangou ~]# /opt/php/sbin/php-fpm // 创建phpinfo文件 [root@pangou ~]# vim /opt/nginx/html/phpinfophp 内容为 phpinfo(); > 访问127001/phpinfophp 安装成功。mysql,mysqli等扩展都有。 这边有一点偷懒,并没有编译安装mysql,而是使用yum安装的mysql。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zz/10749824.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-11
下一篇 2023-05-11

发表评论

登录后才能评论

评论列表(0条)

保存