Last updated 6 years ago
EPEL 과 WebTatic 저장소 설치
Info Laravel 구동하는데 필요한 모듈 위주
Info curl 을 많이 사용할 경우 curl.cainfo 에 다운받은 CA 인증서 묶음(cacert.pem) 파일의 절대 경로를 설정
설정 파일(/etc/php-fpm.d/www.conf) 수정
fpm 설정
시작 및 부팅시 자동 구동 설정
설치:
사용:
[PHP] max_execution_time = 60 memory_limit = 1024M post_max_size = 128M upload_max_filesize = 128M max_file_uploads = 20 [Date] date.timezone = Asia/Seoul [curl] ; curl.cainfo = /etc/ssl/certs/cacert.pem
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum -y install https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y install php71w-cli php71w-common php71w-fpm php71w-intl \ php71w-gd php71w-mbstring php71w-mysqlnd php71w-opcache php71w-pdo \ php71w-xml
yum -y install php72w-cli php72w-common php72w-fpm php72w-intl \ php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo \ php72w-sodium php72w-xml
curl -k -L -O https://curl.haxx.se/ca/cacert.pem && mv cacert.pem /etc/ssl/certs
php -r "phpinfo();"|grep -E "memory_limit|execution_time|post_max_size|upload_max_filesize"
vi /etc/php-fpm.d/www.conf
[www] # 구동 계정 수정 user = lesstif group = lesstif pm.max_children = 50 pm.start_servers = 10 pm.min_spare_servers = 10 pm.max_spare_servers = 35 ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from ; the current environment. ; Default Value: clean env ;env[HOSTNAME] = $HOSTNAME ;env[PATH] = /usr/local/bin:/usr/bin:/bin
systemctl enable php-fpm systemctl restart php-fpm
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin/ sudo ln -s /usr/local/bin/composer.phar /usr/local/bin/composer
wget --no-check-certificate https://phar.phpunit.de/phpunit-5.7.27.phar chmod +x phpunit-5.7.*.phar sudo mv phpunit-5.7.*.phar /usr/local/bin/ sudo ln -s /usr/local/bin/phpunit-5.7.*.phar /usr/local/bin/phpunit sudo ln -s /usr/local/bin/phpunit-5.7.*.phar /usr/local/bin/phpunit5
wget --no-check-certificate https://phar.phpunit.de/phpunit-6.5.9.phar chmod +x phpunit-6.*.phar sudo mv phpunit-6.*.phar /usr/local/bin/ sudo ln -s /usr/local/bin/phpunit-6.*.phar /usr/local/bin/phpunit6
curl -o serve-php.sh https://gist.githubusercontent.com/lesstif/82c107282241c7a52ad9/raw sudo mv serve-php.sh /usr/local/bin/ sudo chmod +x /usr/local/bin/serve-php.sh
serve-php.sh myhost.com /var/www/myhost.com