WordPress: Difference between revisions

From Alpine Linux
(some fixes)
mNo edit summary
Line 11: Line 11:
== Install lighttpd, PHP, and MySql ==
== Install lighttpd, PHP, and MySql ==
{{:Setting Up Lighttpd With FastCGI}}
{{:Setting Up Lighttpd With FastCGI}}
Install extra packages:
Install extra packages:
apk add php-mysql mysql mysql-client
{{Cmd|apk add php-mysql mysql mysql-client}}


== Installing and configuring  WordPress ==
== Installing and configuring  WordPress ==
Line 20: Line 21:
Make webapps folder
Make webapps folder


mkdir /usr/share/webapps/ -p
{{Cmd|mkdir /usr/share/webapps/ -p}}


Download  
Download  


cd /usr/share/webapps/
{{Cmd|cd /usr/share/webapps/
wget http://wordpress.org/latest.tar.gz
wget http://wordpress.org/latest.tar.gz}}


Unpack  
Unpack  


tar -xzvf latest.tar.gz
{{Cmd|tar -xzvf latest.tar.gz
rm latest.tar.gz
rm latest.tar.gz}}


Change Folder Persmissions
Change Folder Persmissions


  chown -R lighttpd /usr/share/webapps/wordpress
{{Cmd|chown -R lighttpd /usr/share/webapps/wordpress}}


Make symlinks to WordPress
Make symlinks to WordPress


ln -s /usr/share/webapps/wordpress/ /var/www/localhost/htdocs/wordpress
{{Cmd|ln -s /usr/share/webapps/wordpress/ /var/www/localhost/htdocs/wordpress}}


== Config and start MySql ==
== Config and start MySql ==


/usr/bin/mysql_install_db --user=mysql
{{Cmd|/usr/bin/mysql_install_db --user=mysql
/etc/init.d/mysql start && rc-update add mysql default
/etc/init.d/mysql start && rc-update add mysql default
/usr/bin/mysqladmin -u root password 'password'
/usr/bin/mysqladmin -u root password 'password'}}


'''Create the WordPress database'''
'''Create the WordPress database'''


mysql -u root -p
{{Cmd|mysql -u root -p}}


CREATE DATABASE wordpress;
{{Cmd|CREATE DATABASE wordpress;
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'wordpress password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'wordpress password';
FLUSH PRIVILEGES;
FLUSH PRIVILEGES;
EXIT
EXIT}}


== Config your WordPress ==
== Config your WordPress ==
Line 61: Line 62:
http://WEBSERVER_IP_ADDRESS/WordPress/
http://WEBSERVER_IP_ADDRESS/WordPress/


  click on: "Create a Configuration File"
* Click on: "Create a Configuration File"
  click on: "Let’s go!"
* Click on: "Let’s go!"
 
:* Database Name: wordpress
  Database Name: wordpress
:* User Name: wordpress
  User Name: wordpress
:* Password: <wordpress password>
  Password: <wordpress password>
:* Database Host: localhost
  Database Host: localhost
:* Table Prefix: wp_
  Table Prefix: wp_


  You may need create the wp-config.php manually, so modify define the 'DB_NAME', DB_USER and DB_PASSWORD, then copy and paste the text into it.
You may need create the wp-config.php manually, so modify define the 'DB_NAME', DB_USER and DB_PASSWORD, then copy and paste the text into it.
  After you've done that, click "Run the install."
After you've done that, click "Run the install."


  Enter Information needed
* Enter Information needed


  Site Title
:* Site Title
  Username
:* Username
  Password, twice
:* Password, twice
  Your E-mail
:* Your E-mail


After you've done that, click "Install WordPress"  
After you've done that, click "Install WordPress"  


You have WordPress working, to access go to http://WEBSERVER_IP_ADDRESS/wordpress and enjoy!
You have WordPress working, to access go to http://WEBSERVER_IP_ADDRESS/wordpress and enjoy!

Revision as of 07:06, 23 June 2011

Set up WordPress on Alpine Linux

WordPress is web software you can use to create a beautiful website or blog.

This document will be a quick c/p guide to setup WordPress on Alpine linux. What we will setup is the following:

  • Lighttpd with PHP
  • MySql
  • WordPress

Install lighttpd, PHP, and MySql

Basic Installation

For installing the additional packages first activate community packages and update the package index

Install the required packages:

# apk add lighttpd php82 fcgi php82-cgi

Configure Lighttpd

Edit lighttpd.conf (/etc/lighttpd/lighttpd.conf) and uncomment the line:

Contents of /etc/lighttpd/lighttpd.conf

... include "mod_fastcgi.conf" ...

Edit mod_fastcgi.conf (/etc/lighttpd/mod_fastcgi.conf), find and change /usr/bin/php-cgi to /usr/bin/php-cgi82.

Contents of /etc/lighttpd/mod_fastcgi.conf

... "bin-path" => "/usr/bin/php-cgi82" # php-cgi ...

Start lighttpd service and add it to default runlevel

# rc-service lighttpd start # rc-update add lighttpd default

Install extra packages:

apk add php-mysql mysql mysql-client

Installing and configuring WordPress

Install WordPress

Make webapps folder

mkdir /usr/share/webapps/ -p

Download

cd /usr/share/webapps/ wget http://wordpress.org/latest.tar.gz

Unpack

tar -xzvf latest.tar.gz rm latest.tar.gz

Change Folder Persmissions

chown -R lighttpd /usr/share/webapps/wordpress

Make symlinks to WordPress

ln -s /usr/share/webapps/wordpress/ /var/www/localhost/htdocs/wordpress

Config and start MySql

{{{1}}}

Create the WordPress database

mysql -u root -p

CREATE DATABASE wordpress; GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'wordpress password'; FLUSH PRIVILEGES; EXIT

Config your WordPress

Browse

http://WEBSERVER_IP_ADDRESS/WordPress/

  • Click on: "Create a Configuration File"
  • Click on: "Let’s go!"
  • Database Name: wordpress
  • User Name: wordpress
  • Password: <wordpress password>
  • Database Host: localhost
  • Table Prefix: wp_

You may need create the wp-config.php manually, so modify define the 'DB_NAME', DB_USER and DB_PASSWORD, then copy and paste the text into it. After you've done that, click "Run the install."

  • Enter Information needed
  • Site Title
  • Username
  • Password, twice
  • Your E-mail

After you've done that, click "Install WordPress"

You have WordPress working, to access go to http://WEBSERVER_IP_ADDRESS/wordpress and enjoy!