라라벨 설정 > 질문답변

본문 바로가기

사이트 내 전체검색

뒤로가기 질문답변

라라벨 설정

페이지 정보

작성자 미친새 작성일 20-02-21 19:00 조회 16,249 댓글 0

본문

라라벨은 composer install 시 메모리를 겁나 잡아 먹는다
반드시 2GB 이상의 메모리를 확보하고 실행해야한다. 아니면 오류 발생


apache2.4.41 설치
yum install -y epel-release
cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo
yum install httpd
systemctl enable httpd
systemctl start httpd

출처: https://okcn.tistory.com/356 [MurMur]


sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum install epel-release yum-utils

sudo yum-config-manager --disable remi-php54
sudo yum-config-manager --enable remi-php73
yum install redis memcached

yum install php php-devel php-common php-cli php-redis php-brotli php-intl php-gd php-gmp php-imap php-bcmath php-interbase php-json
yum install php-mbstring php-mysqlnd php-odbc php-opcache php-memcached php-tidy php-pdo php-pdo-dblib php-pear php-pgsql php-process php-pecl-apcu
yum install php-pecl-geoip php-pecl-gmagick php-pecl-hrtime php-pecl-json php-pecl-memcache php-pecl-mongodb php-pecl-rar php-pecl-pq
yum install php-pecl-yaml php-pecl-zip


systemctl restart httpd


* composer 설치
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/bin/composer
chmod +x /usr/bin/composer

생성한 계정으로 이동하여 laravel 설치
$ composer global require "laravel/installer"

git 으로 받거나 composer 로 설치
git clone https://github.com/laravel/laravel.git
composer create-project --prefer-dist laravel/laravel laraveldir
composer install
npm install 해야 하는지 모르겠다.

chown -R apache.apache /var/www/laravel
chmod -R 755 /var/www/html/laravel
chmod -R 777 /var/www/html/laravel/storage

디렉토리를 그냥 출력하면(localhost:80 접근시)
http.conf 수정
 DocumentRoot /var/www/html/test/spowide/public

<VirtualHost *:80>
    DocumentRoot /var/www/html/test/spowide/public
    ServerName localhost
    <Directory "/var/www/html/test/spowide/public">
      Options Indexes FollowSymLinks
      AllowOverride All
      Require all granted
    </Directory>
</VirtualHost>

에러 발생(selinux 때문)
UnexpectedValueException
The stream or file "storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied

selinux 처리
chcon -R -t httpd_sys_rw_content_t ./storage

댓글목록 0

등록된 댓글이 없습니다.

Copyright © 소유하신 도메인. All rights reserved.

사이트 정보

회사명 : 회사명 / 대표 : 대표자명
주소 : OO도 OO시 OO구 OO동 123-45
사업자 등록번호 : 123-45-67890
전화 : 02-123-4567 팩스 : 02-123-4568
통신판매업신고번호 : 제 OO구 - 123호
개인정보관리책임자 : 정보책임자명

PC 버전으로 보기