https://luerangler-dev.tistory.com/69
Ubuntu 20.04 LTS APM 설치 ( Apache2, Mysql, PHP )
// 패키지 정보 최신으로 업데이트 1) sudo apt update // 패키지 정보를 바탕으로 시스템에 설치된 패키지들을 업그레이드 2) sudo apt upgrade // 불필요해진 패키지를 자동으로 삭제 3) sudo apt autoremove //
luerangler-dev.tistory.com
위 진행 후
// 컴포저 설치
1. cd /tmp
2. curl -sS https://getcomposer.org/installer | php
3. sudo mv composer.phar /usr/local/bin/composer
// 라라벨 프로잭트 생성 및 설정
4. cd /var/www/html
5. sudo composer create-project laravel/laravel test
6. sudo chgrp -R www-data /var/www/html/test
7. sudo chmod -R 775 /var/www/html/test/storage
8. cd /etc/apache2/sites-available
9. vi laravel.conf
<VirtualHost *:80>
ServerName test
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/test/public
<Directory /var/www/html/test>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
입력 후 저장
10. sudo a2dissite 000-default.conf && sudo a2ensite laravel.conf && sudo a2enmod rewrite
11. sudo service apache2 restart
'개발이야기 > PHP' 카테고리의 다른 글
PHP 핸드폰 번호 자르기 (0) | 2020.03.17 |
---|