Posted
Filed under 개발/그외
  • All categories Link

  • Active File In StatusBar Link

    • Visual Studio Code extension for showing the full path of the currently active file in the status bar.
  • C/C++ Link

    • language support for C/C++ to Visual Studio Code
  • Code Runner Link

    • Run code snippet or code file for multiple languages
  • Code Spell Checker Link

    • A basic spell checker that works well with camelCase code.
  • CodeMap Link

    • Interactive code map for quick visualization and navigation within code DOM objects (e.g. classes, members).
  • Excel Viewer Link

    • View Excel spreadsheets and CSV files within Visual Studio Code workspaces.
  • Git Graph Link

    • View a Git Graph of your repository, and perform Git actions from the graph.
  • indent-rainbow Link

    • This extension colorizes the indentation in front of your text alternating four different colors on each step. Some may find it helpful in writing code for Nim or Python.
  • Kotlin Language Link

    • Kotlin language support for VS Code
  • LaTeX Workshop Link

    • Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
  • Maintained Swift Development Environment Link

    • New home of Swift Development Environment for VS Code
  • Markdown All in One Link

    • All you need to write Markdown (keyboard shortcuts, table of contents, auto preview and more)
  • PlantUML Link

    • Rich PlantUML support for Visual Studio Code.
  • Path Autocomplete Link

    • Provides path completion for visual studio code.
  • Python Link

    • A Visual Studio Code extension with rich support for the Python language (for all actively supported versions of the language: 2.7, >=3.4), including features such as linting, debugging, IntelliSense, code navigation, code formatting, refactoring, unit tests, snippets, and more!
  • Settings Sync Link

    • Synchronize Settings, Snippets, Themes, File Icons, Launch, Keybindings, Workspaces and Extensions Across Multiple Machines Using GitHub Gist.
  • Todo Tree Link

    • Show TODO, FIXME, etc. comment tags in a tree view
  • Visual Studio IntelliCode Link

    • AI-assisted development
  • vscode-icons Link

    • Icons for Visual Studio Code
2020/09/24 23:17 2020/09/24 23:17
Posted
Filed under 개발/Linux
* Nginx + MariaDB, PHP 7.3으로 텍스트큐브 설치하기

* nginx 설치
$ sudo apt-get install nginx
$ sudo service nginx start

* php 7.3 설치
$ sudo apt install php7.3-fpm
$ sudo apt install php7.3-common php7.3-mysql php7.3-xml php7.3-xmlrpc php7.3-curl php7.3-gd php7.3-imagick php7.3-cli php7.3-dev php7.3-imap php7.3-mbstring php7.3-opcache php7.3-soap php7.3-zip php7.3-intl -y

* 텍스트큐브 설치
$ wget https://github.com/Needlworks/Textcube/archive/v1.10.10.tar.gz -P /home/pi/
$ tar -xvzf /home/pi/v1.10.10.tar.gz -C /home/pi

* 디렉토리 접근권한 부여
$ chmod 0777 /home/pi/tc
$ chmod 0777 /home/pi/tc/skin/blog


* sites-available에 www.example.com 파일 추가
$ sudo nano /etc/nginx/sites-available/www.example.com
server {
    listen 80;
    root /home/pi/tc;
    server_name www.example.com;
    index index.php index.html;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.3-fpm.sock;
    }
}


* sites-enabled에 심볼릭링크 추가
$ sudo ln -s /etc/nginx/sites-available/www.example.com /etc/nginx/sites-enabled/www.example.com


* mysql 셋업
$ sudo apt-get install mariadb-server
$ sudo mysql -u root
MariaDB [(none)]> use mysql

CREATE DATABASE tc;
SHOW DATABASES;
CREATE USER 'tc'@'localhost' IDENTIFIED BY 'password';
USE mysql;
SELECT user, host FROM user;
GRANT ALL PRIVILEGES ON tc.* TO tc@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
SHOW GRANTS FOR tc@localhost


* 웹사이트에 접속해서 텍스트큐브 설정을 한다.
중간에 Rewrite 관련 에러가 나오는데 ‘사용하지 않음’을 체크하고 계속 진행한다.

* nginx.conf에 아래와 같이 rewrite 항목을 추가한다.
$ sudo systemctl stop nginx
$ sudo nano /etc/nginx/sites-available/www.example.com
    server {
       location /  {
           set $rewrite_base '';
           if (!-f $request_filename) {
               rewrite ^(thumbnail)/([0-9]+/.+)$ cache/$1/$2;
           }
           if ($request_filename ~* ^(cache)+/+(.+[^/])\.(cache|xml|txt|log)$) {
               return 403;
           }
           if (-d $request_filename) {
               rewrite ^(.+[^/])$ $1/;
           }
           rewrite  ^(.*)$ $rewrite_base/rewrite.php last;
       }
    }
$ sudo systemctl start nginx


* PHP 7.3 이상에서 관리자 인증이 잘못되는 문제 깁기
https://pat.im/1199


* lets encrypt 인증서 작성
sudo certbot certonly –standalone -d www.example.com
sudo certbot certonly --webroot -w /home/pi/tc -d www.example.com

* phpmyadmin 관련
- phpmyadmin 설치
$ sudo apt-get install phpmyadmin
web server는 선택하지 않고 넘기기
$ sudo ln -s /usr/share/phpmyadmin/ /var/www/html
http://IP/phpmyadmin/index.php로 접속

- phpmyadmin 업그레이드
https://devanswers.co/manually-upgrade-phpmyadmin/

- php 업로드 용량변경
https://conory.com/blog/44009

- phpmyadmin에서 업로드 용량 변경
https://www.keycdn.com/support/413-request-entity-too-large

- nginx Timeout 늘리기
https://blog.lael.be/post/9251
2020/09/22 23:46 2020/09/22 23:46