라라벨 설정
페이지 정보
본문
라라벨은 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
반드시 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
관련링크
- 이전글아파치 userdir 유저디렉토리 활성화 20.02.21
- 다음글syslog 서버 셋팅 20.02.21
댓글목록
등록된 댓글이 없습니다.