CentOS7安装composer和部署laravel

1.安装php7

更新yum源:

CentOS/RHEL 7.x:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
CentOS/RHEL 6.x:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

然后就可以直接yum安装php7.0了,可以安装的拓展如下:


yum install php70w-common php70w-fpm php70w-opcache php70w-gd php70w-mysqlnd php70w-mbstring php70w-pecl-redis php70w-pecl-memcached php70w-devel

php-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif, php-fileinfo, php-filter, php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-json, php-libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-pecl-zip, php-reflection, php-session, php-shmop, php-simplexml, php-sockets, php-spl, php-tokenizer, php-zend-abi, php-zip, php-zlib

安装包         提供的拓展
php70w          mod_php , php70w-zts
php70w-bcmath       
php70w-cli      php-cgi, php-pcntl, php-readline
php70w-common   php-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif, php-fileinfo, php-filter, php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-json, php-libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-pecl-zip, php-reflection, php-session, php-shmop, php-simplexml   , php-sockets, php-spl, php-tokenizer, php-zend-abi, php-zip, php-zlib
php70w-dba      
php70w-devel        
php70w-embedded     php-embedded-devel
php70w-enchant      
php70w-fpm      
php70w-gd       
php70w-imap     
php70w-interbase        php_database, php-firebird
php70w-intl     
php70w-ldap     
php70w-mbstring     
php70w-mcrypt       
php70w-mysql        php-mysqli, php_database
php70w-mysqlnd      php-mysqli, php_database
php70w-odbc     php-pdo_odbc, php_database
php70w-opcache      php70w-pecl-zendopcache
php70w-pdo      php70w-pdo_sqlite, php70w-sqlite3
php70w-pdo_dblib        php70w-mssql
php70w-pear     
php70w-pecl-apcu    
php70w-pecl-imagick 
php70w-pecl-memcached   
php70w-pecl-mongodb 
php70w-pecl-redis   
php70w-pecl-xdebug  
php70w-pgsql        php-pdo_pgsql, php_database
php70w-phpdbg       
php70w-process      php-posix, php-sysvmsg, php-sysvsem, php-sysvshm
php70w-pspell       
php70w-recode       
php70w-snmp     
php70w-soap     
php70w-tidy     
php70w-xml      php-dom, php-domxml, php-wddx, php-xsl
php70w-xmlrpc   

比如安装xml

yum install php70w-xml

查看版本:php -v


查看扩展:php -m

[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
igbinary
json
libxml
mbstring
memcached
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

2.安装composer

CentOS7安装composer和部署laravel_第1张图片

CentOS7安装composer和部署laravel_第2张图片


3.部署Laravel

配置使用使用国内镜像
composer config -g repo.packagist composer https://packagist.phpcomposer.com
下载
composer create-project laravel/laravel xiaohu
运行
php -S localhost:8000 -t xiaohu/public

CentOS7安装composer和部署laravel_第3张图片













你可能感兴趣的:(运维)