OS/Linux

라이믹스 설치하는법

_눙이_ 2021. 11. 17. 13:55
반응형

sudo passwd

apt update && upgrade

vi /etc/ssh/sshd_config

Port 2244

PasswordAuthentication yes

systemctl restart sshd

apt install nginx

systemctl enable nginx

fallocate -l 2G /swapfile

chmod 600 /swapfile

mkswap /swapfile

vi /etc/fstab

/swapfile swap swap defaults 0 0 추가

timedatectl set-timezone Asia/Seoul

timedatectl

dpkg-reconfigure tzdata

Asia - Seoul

dpkg-reconfigure locales

All locales - en_US.UTF-8

apt install mariadb-server mariadb-client.

mysql_secure_installation

Enter - Y - Password - all Y

apt install php7.4 php7.4-fpm php7.4-mysql php-common php7.4-cli php7.4-common php7.4-json php7.4-opcache php7.4-readline php7.4-mbstring php7.4-xml php7.4-gd php7.4-curl

systemctl enable php7.4-fpm

systemctl start php7.4-fpm

vi /etc/php/7.4/fpm/php.ini

short_open_tag = On

memory_limit = 256M

cgi.fix_pathinfo = 0

upload_max_filesize = 100M

post_max_size = 101M

max_execution_time = 360

date.timezone = Asia/Seoul

mysql -u root -p

CREATE DATABASE rhymix;

CREATE USER 'rhymixuser'@'localhost' IDENTIFIED BY '비밀번호''; //rhymix 유저

CREATE USER 'pmaroot'@'%' IDENTIFIED BY '비밀번호'; // 관리자

GRANT ALL ON rhymix.* TO 'rhymixuser'@'localhost' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON *.* TO 'pmaroot'@'%' WITH GRANT OPTION;

FLUSH PRIVILEGES;

EXIT;

cd /var/www

git clone https://github.com/rhymix/rhymix.git

chmod -R 755 /var/www/rhymix

mkdir /var/www/rhymix/files

chmod 707 /var/www/rhymix/files

chown -R www-data:www-data /var/www/rhymix

curl -sSLo /etc/nginx/snippets/rhymix-rewrite.conf https://raw.githubusercontent.com/rhymix/rhymix/master/common/manual/server_config/rhymix-nginx.conf

vi /etc/nginx/sites-available/rhymix

server {

listen 80;

listen [::]:80;

server_name www.example.com example.com; # example.com를 자신이 원하는 도메인으로 수정하세요.

root /var/www/rhymix;

index index.php ;

include snippets/rhymix-rewrite.conf;

location ~ \.(gif|jpg|png)$ {

add_header Vary "Accept-Encoding";

add_header Cache-Control "public, no-transform, max-age=31536000";

}

location ~* \.(css|js)$ {

add_header Cache-Control "public, max-age=604800";

log_not_found off;

access_log off;

}

location ~*.(mp4|ogg|ogv|svg|svgz|eot|otf|woff|woff2|ttf|rss|atom|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|cur)$ {

add_header Cache-Control "max-age=31536000";

access_log off;

}

charset utf-8;

server_tokens off;

client_max_body_size 100M;

location \ {

try_files $uri $uri/ =404;

}

location ~ /\.ht {

deny all;

}

location ~ \.php$ {

include snippets/fastcgi-php.conf;

fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;

}

}

ln -s /etc/nginx/sites-available/rhymix /etc/nginx/sites-enabled/

rm -f /etc/nginx/sites-enabled/default

nginx -t

service nginx restart

DB 사용지: rhymixuser

DB 패스워드: gksrnrwldhr@12

DB 이름: rhymix

apt update && sudo apt install phpmyadmin

Enter - Enter - password

반응형