b2br_bonus - KimTaebin-ai/study_posts GitHub Wiki
보λμ€ μ΄μ©κ΅¬ μ μ©κ΅¬
sudo apt install lighttpd
sudo systemctl stop lighttpd.service # μλ² μ€μ§
sudo systemctl start lighttpd.service # μλ² μμ
sudo systemctl enable lighttpd.service # λΆν
μ μλ² μ€ν
sudo systemctl disable lighttpd.service # λΆν
μ μλ² μ€ν μ μ§
sudo apt install php-fpm
sudo vim /etc/lighttpd/conf-available/15-fastcgi-php.conf
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/run/lighttpd/php.socket",
μ΄κ±° 2κ° μ£Όμμ²λ¦¬
"socket" => "/var/run/php/php8.2-fpm.sock",
μ λ΄μ© μΆκ°
sudo lighttpd-enable-mod fastcgi
sudo lighttpd-enable-mod fastcgi-php
sudo service lighttpd force-reload
sudo ufw allow 80
VirtualBox μ ν¬νΈ ν¬μλ© λ΄μ© μΆκ°
Host IP / Host Port : λ‘컬 μ»΄ν¨ν° IP μ£Όμ, 8080 Guest IP / Guest Port : κ°μ λ¨Έμ IP μ£Όμ, 80
λ‘컬 μ»΄ν¨ν°μ λΈλΌμ°μ μμ
λ‘컬 μ»΄ν¨ν° IPμ£Όμ:8080 λ₯Ό μ£Όμμ°½μ μ λ ₯νλ©΄ νμ΄μ§κ° λ¬λ€.
sudo apt install php8.2-mysql
sudo apt install mariadb-server mariadb-client -y
sudo systemctl stop mysql.service # μλ² μ€μ§
sudo systemctl start mysql.service # μλ² μμ
sudo systemctl enable mysql.service # λΆν
μ μλ² μ€ν
sudo systemctl disable mysql.service # λΆν
μ μλ² μ€ν μ μ§
sudo mysql_secure_installation
μ λΆ yλ‘ λμ΄κ°λ λ¨ (λΉλ°λ²νΈ μ¬μ€μ μ λΉμΆ)
sudo systemctl restart mysql.service
sudo mysql -u root
# DB μμ±
CREATE DATABASE wpdb;
# κ³μ μμ± λ° ν¨μ€μλ μ€μ
CREATE USER 'wp-user'@'localhost' IDENTIFIED BY 'wp-pw';
# κ³μ μ΄ DBμ μ κ·Όν μ μλ λͺ¨λ κΆν λΆμ¬
GRANT ALL ON wpdb.* TO 'wp-user'@'localhost' IDENTIFIED BY 'wp-pw' WITH GRANT OPTION;
# μ€μ μ λ§μΉ¨
FLUSH PRIVILEGES;
# μ’
λ£
EXIT;
sudo apt install wget -y
sudo wget -O /tmp/wordpress.tar.gz "http://wordpress.org/latest.tar.gz"
sudo tar -xvzf /tmp/wordpress.tar.gz -C /var/www/html
sudo vim /var/www/html/wordpress/wp-config-sample.php
μμμ μ€μ νλ DB_NAME,DB_USER, DB_PASSWORD μ
λ ₯
define 8μ€ μλκ±° μ¬κΈ° λκ°μ λ³΅λΆ https://api.wordpress.org/secret-key/1.1/salt/
sudo mv /var/www/html/wordpress/wp-config-sample.php /var/www/html/wordpress/wp-config.php
μλνλ μ€ ν€λ©΄ μ΄μ λ μΌ μ μ
sudo apt install phpmyadmin
N0 μ ν ν lighttpd μν°
sudo service lighttpd force-reload
phpmyadmin μΌ°μ λ λμμΌ μ μ
μ¬μ©μλͺ κ³Ό λΉλ°λ²νΈλ μμμ μ€μ νλ κ±° κ·Έλλ‘