WordPress를 극찬하시는 분이 계시길래
호기심에 설치해 봤습니다 (PHP라서 써볼생각을 안해봤네요)
설치형 블로그로 개인서버에 블로그를 만들거나
웹호스팅 업체에서 제공하는 서버에다가 설치해서 바로 쓸수 있다는 장점이 있습니다
설치를 위해서는 기본적으로 apache + php + mysql (db) 가 설치되 있어야 한다는
조건이 있습니다
apache + php + mysql 설치는 [http://zelkun.tistory.com/69] 여기 참고
출처: https://ko.wordpress.org/news/
최신버전은 4.7 (Vaughan) 인가 보네요
다운로드 및 앞축해제는 utils 디렉토리에서 진행했습니다
pi@rasp2-dev:~ $ pwd /home/pi pi@rasp2-dev:~ $ cd utils/ pi@rasp2-dev:~/utils $ wget https://ko.wordpress.org/wordpress-4.7.2-ko_KR.tar.gz --2017-03-06 22:32:59-- https://ko.wordpress.org/wordpress-4.7.2-ko_KR.tar.gz Resolving ko.wordpress.org (ko.wordpress.org)... 66.155.40.250, 66.155.40.249 Connecting to ko.wordpress.org (ko.wordpress.org)|66.155.40.250|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 8469045 (8.1M) [application/octet-stream] Saving to: ‘wordpress-4.7.2-ko_KR.tar.gz’
wordpress-4.7.2-ko_KR.tar.gz 100%[================================================================================================>] 8.08M 1.05MB/s in 8.0s
2017-03-06 22:33:08 (1.01 MB/s) - ‘wordpress-4.7.2-ko_KR.tar.gz’ saved [8469045/8469045]
pi@rasp2-dev:~/utils $ tar -zxvf wordpress-4.7.2-ko_KR.tar.gz wordpress/ wordpress/wp-mail.php wordpress/wp-cron.php wordpress/wp-trackback.php wordpress/wp-activate.php wordpress/xmlrpc.php wordpress/wp-content/ wordpress/wp-content/index.php wordpress/wp-content/languages/ wordpress/wp-content/languages/continents-cities-ko_KR.mo wordpress/wp-content/languages/admin-network-ko_KR.po wordpress/wp-content/languages/ko_KR.mo wordpress/wp-content/languages/admin-network-ko_KR.mo wordpress/wp-content/languages/continents-cities-ko_KR.po wordpress/wp-content/languages/admin-ko_KR.po wordpress/wp-content/languages/themes/
. . .
wordpress/wp-includes/css/buttons.min.css wordpress/wp-includes/css/admin-bar-rtl.css wordpress/wp-includes/class-wp-query.php pi@rasp2-dev:~/utils $ |
기다리다 보면 앞축이 끝납니다
설치 절차 |
설치절차를 보게되면 3번까지 진행했으니
4번 이후로 계속 진행해줍니다
그전에 디렉토리를 /var/www 로 이동할거에요 utils 디렉토리는 잡다한게 많기도 하고
apache 설정 바꿀게 많아 귀찮거든요
그리고 pi 홈에 링크를 걸어줍니다
pi@rasp2-dev:~/utils $ sudo mv wordpress /var/www/ pi@rasp2-dev:~/utils $ cd .. pi@rasp2-dev:~ $ ln -s /var/www/wordpress wordpress pi@rasp2-dev:~ $ ls Desktop logs Pictures storm tomcat9 Documents Music Public study utils Downloads Network Trash Folder python_games Templates Videos gpio node solr5 Temporary Items wordpress pi@rasp2-dev:~ $ cd wordpress pi@rasp2-dev:~/wordpress $ |
mysql 에 DB를 추가해 줍니다
pi@rasp2-dev:~/wordpress $ mysql -u root -p Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3549 Server version: 5.5.54-0+deb8u1 (Raspbian)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | +--------------------+ 3 rows in set (0.04 sec)
mysql> create database wordpress; Query OK, 1 row affected (0.01 sec)
mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | wordpress | +--------------------+ 4 rows in set (0.00 sec)
mysql> quit Bye pi@rasp2-dev:~/wordpress $ |
wordpress DB를 만들었습니다
이제 설정을 수정하기 위해 wp-config-sample.php를 wp-config.php로 복사하고
수정해줍니다 mv로 이름을 변경해도 무관합니다
pi@rasp2-dev:~/wordpress $ ls index.php wp-blog-header.php wp-includes wp-settings.php license.txt wp-comments-post.php wp-links-opml.php wp-signup.php readme.html wp-config-sample.php wp-load.php wp-trackback.php wp-activate.php wp-content wp-login.php xmlrpc.php wp-admin wp-cron.php wp-mail.php pi@rasp2-dev:~/wordpress $ cp wp-config-sample.php wp-config.php pi@rasp2-dev:~/wordpress $ vi wp-config.php
20 21 // ** MySQL settings - You can get this info from your web host ** // 22 /** The name of the database for WordPress */ 23 define('DB_NAME', 'database_name_here'); 24 25 /** MySQL database username */ 26 define('DB_USER', 'username_here'); 27 28 /** MySQL database password */ 29 define('DB_PASSWORD', 'password_here'); 30 31 /** MySQL hostname */ 32 define('DB_HOST', 'localhost'); 33 34 /** Database Charset to use in creating database tables. */ 35 define('DB_CHARSET', 'utf8'); 36 37 /** The Database Collate type. Don't change this if in doubt. */ 38 define('DB_COLLATE', ''); 39 40 /**#@+ 41 * Authentication Unique Keys and Salts. 42 * 20,0-1 28%
|
23, 26, 29 번라인을 보면 DB_NAME, DB_USER, DB_PASSWORD 항목이 보이네요
여기를 수정해 줍니다
20 21 // ** MySQL settings - You can get this info from your web host ** // 22 /** The name of the database for WordPress */ 23 define('DB_NAME', 'wordpress'); 24 25 /** MySQL database username */ 26 define('DB_USER', 'root'); 27 28 /** MySQL database password */ 29 define('DB_PASSWORD', 'password_here'); 30 31 /** MySQL hostname */ 32 define('DB_HOST', 'localhost'); 33 34 /** Database Charset to use in creating database tables. */ 35 define('DB_CHARSET', 'utf8'); 36 37 /** The Database Collate type. Don't change this if in doubt. */ 38 define('DB_COLLATE', ''); 39 40 /**#@+ 41 * Authentication Unique Keys and Salts. 42 * -- INSERT -- 29,24 28% |
29번 라인의 password_here 부분은 계정에 맞춰서 패스워드를 넣어주면 됩니다
전 귀찮으니 mysql root계정으로 설정해놨습니다
다음은 "모든 파일을 호스팅 하는 서버에 업로드 합니다" 라는데
pi로 사용할 거기 때문에 apache 설정 변경해서 사용합니다
docmuntRoot경로를 wordpress로 경로로 바꿔주면 됩니다
apt-get으로 apache를 설치하면 /etc/apache2/apache2.conf 가
apache설정파일입니다 httpd.conf가 아닙니다
근데 site 설정은 별도로 관리되니
/etc/apache2/sites-enabled/000-default.conf 를 수정해줘야 합니다
pi@rasp2-dev:~/wordpress $ sudo vi /etc/apache2/sites-enabled/000-default.conf
1 <VirtualHost *:80> 2 # The ServerName directive sets the request scheme, hostname and por 3 # the server uses to identify itself. This is used when creating 4 # redirection URLs. In the context of virtual hosts, the ServerName 5 # specifies what hostname must appear in the request's Host: header 6 # match this virtual host. For the default virtual host (this file) 7 # value is not decisive as it is used as a last resort host regardle 8 # However, you must set it for any further virtual host explicitly. 9 #ServerName www.example.com 10 11 ServerAdmin webmaster@localhost 12 DocumentRoot /var/www/html 13 14 # Available loglevels: trace8, ..., trace1, debug, info, notice, war 15 # error, crit, alert, emerg. 16 # It is also possible to configure the loglevel for particular 17 # modules, e.g. 18 #LogLevel info ssl:warn 19 20 ErrorLog ${APACHE_LOG_DIR}/error.log 21 CustomLog ${APACHE_LOG_DIR}/access.log combined 22 23 # For most configuration files from conf-available/, which are "/etc/apache2/sites-enabled/000-default.conf" 31L, 1332C 1,1 Top |
12번째 라인의 DocumentRoot /var/www/html 부분을 wordpress 경로로 변경해줍니다
1 <VirtualHost *:80> 2 # The ServerName directive sets the request scheme, hostname and por 3 # the server uses to identify itself. This is used when creating 4 # redirection URLs. In the context of virtual hosts, the ServerName 5 # specifies what hostname must appear in the request's Host: header 6 # match this virtual host. For the default virtual host (this file) 7 # value is not decisive as it is used as a last resort host regardle 8 # However, you must set it for any further virtual host explicitly. 9 #ServerName www.example.com 10 11 ServerAdmin webmaster@localhost 12 #DocumentRoot /var/www/html 13 DocumentRoot /var/www/wordpress 14 15 # Available loglevels: trace8, ..., trace1, debug, info, notice, war 16 # error, crit, alert, emerg. 17 # It is also possible to configure the loglevel for particular 18 # modules, e.g. 19 #LogLevel info ssl:warn 20 21 ErrorLog ${APACHE_LOG_DIR}/error.log 22 CustomLog ${APACHE_LOG_DIR}/access.log combined 23 "/etc/apache2/sites-enabled/000-default.conf" 32L, 1366C 1,1 Top |
전 12번째 라인을 주석처리하고 한줄더 추가해줬습니다
그리고 apache 재시작
3개중에 하나 골라서 하시면 됩니다
pi@rasp2-dev:~/wordpress $ sudo service apache2 restart pi@rasp2-dev:~/wordpress $ sudo apachectl restart pi@rasp2-dev:~/wordpress $ sudo /etc/init.d/apache2 restart |
이제 브라우져로 접속해 봅니다
http://rasp2-dev/wp-admin/install.php
저는 pi 도메인이 rasp2-dev 를 사용하기 때문에 바로 접속되지만
실제 pi의 ip로 접속하셔야 할거에요
ex) http://192.168.0.25/wp-admin/install.php 이런식으로
접속을 하면 이제 설치할 수 있는 인터페이스를 제공합니다
사이트 제목, 사용자명 비밀번호등의 정보를 입력하고 설치하기를 클릭합니다
참고로.. 비밀번호가 약하면 설치버튼이 활성화가 안되네요.. 보통은 되야합니다
설치를 진행하고 mysql 을 접속해서 DB를 확인해 봤습니다
wordpress DB를 보니 table이 많이도 생겼네요
pi@rasp2-dev:~/wordpress $ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3672 Server version: 5.5.54-0+deb8u1 (Raspbian)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use wordpress; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Database changed mysql> show tables; +-----------------------+ | Tables_in_wordpress | +-----------------------+ | wp_commentmeta | | wp_comments | | wp_links | | wp_options | | wp_postmeta | | wp_posts | | wp_term_relationships | | wp_term_taxonomy | | wp_termmeta | | wp_terms | | wp_usermeta | | wp_users | +-----------------------+ 12 rows in set (0.02 sec)
mysql> |
오... 설치 끝
관리자 페이지를 벗어나보면
wordpress 설치가 끝났네요
디자인이라던가 게시판 관리는 관리자 페이지에서만 가능하니
비밀번호를 까먹으면 안됩니다
*참고로 도메인이 변경된건 host파일을 변경하고
apache의 vhost기능으로 분리해서입니다
기존 rasp2-dev로 접속하면 tomcat이 나옵니다
근데 매우 귀찮고 번거로운일..
처음 설치해본것 치곤 금방끝나네요 다만 글 작성하는데 3시간쯤...
Raspberry Pi Minergate Litecoin 라즈베리파이 마이너게이트 라이트코인 채굴 (0) | 2018.01.07 |
---|---|
Raspberry Pi Jessie 라즈베리파이 - apache-spark 아파치 스파크 설치 (0) | 2017.07.03 |
Raspberry Pi jessie - install git (0) | 2017.03.15 |
Raspberry Pi jessie - VNC Autostart VNC 자동시작 (0) | 2017.01.18 |
Raspberry Pi jessie - VNC install & VNC Viewer Connect 접속 (0) | 2017.01.16 |
댓글 영역