Skip to content

Instantly share code, notes, and snippets.

@sowawa
Created March 14, 2012 16:28
Show Gist options
  • Save sowawa/2037654 to your computer and use it in GitHub Desktop.
Save sowawa/2037654 to your computer and use it in GitHub Desktop.
Wordpress for rackhub

wordpress

cd
git clone git://gist.github.com/2037654.git wordpress-installer
cd wordpress-installer
bash init.sh
#!/bin/bash
cd
# http://wordpress.org/download/release-archive/
# stop mysql
sudo /etc/init.d/mysql.server stop
MYSQL_DIR=/rhb/mysql-5.6.4-m7
MYSQL_DATA_DIR=$MYSQL_DIR/data
sudo rm -rf $MYSQL_DATA_DIR
sudo mkdir $MYSQL_DATA_DIR
# set up mysql
sudo $MYSQL_DIR/scripts/mysql_install_db --user=mysql --basedir=$MYSQL_DIR --datadir=$MYSQL_DATA_DIR
# chmod mysql
sudo chown -R mysql:mysql $MYSQL_DATA_DIR
# start mysql
sudo /etc/init.d/mysql.server start
# create wordpress database
sudo $MYSQL_DIR/bin/mysqladmin -uroot create wordpress
# set mysql password
sudo $MYSQL_DIR/bin/mysqladmin -u root password 'loverackhub'
# restart mysql
sudo /etc/init.d/mysql.server restart
# dl wordpress
wget http://wordpress.org/wordpress-3.3.1.tar.gz
# untar
tar xzf wordpress-3.3.1.tar.gz
# chmod +w
chmod 777 wordpress
cd /etc/apache2/sites-available
sudo rm default
sudo ln -s /home/rackhuber/wordpress-installer/wordpress default
sudo /etc/init.d/apache2 restart
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName my.rackhub.net
DocumentRoot /home/rackhuber/wordpress
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/rackhuber/wordpress>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
* installation. You don't have to use the web site, you can just copy this file
* to "wp-config.php" and fill in the values.
*
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');
/** MySQL database username */
define('DB_USER', 'root');
/** MySQL database password */
define('DB_PASSWORD', 'loverackhub');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define('AUTH_KEY', '>qUxMQ25DB9;o#.o8a2V+,+! )@t:DTe(pOp#s? <gT/g8)T_|s:E^]/- !J<#C6');
define('SECURE_AUTH_KEY', 'MKcNc|<^2i%Qy65zBUntB=ozwQA2xHYE)Svw<Ogn|v}qjA}&=I|wCgy3 e2z@sJU');
define('LOGGED_IN_KEY', '#K3>=0W%8-@1w&-@x=7GUXs5&MG#H9Gc#kK^ENWy`i;v|GBXEMa[FuF|0k}`N1d@');
define('NONCE_KEY', '2*q!,bRL$OL!8z8aW9JlA.}I1IG`hgnkK4LXko%aZkmU*351|}:9/9w8`EK7(TlP');
define('AUTH_SALT', 'N-Av*8%#X*px5TL%#|K[)K}{yU&favN<nn>U2^cAcj&+nUzN1@/!/v8IyS@;,~u#');
define('SECURE_AUTH_SALT', '}EPw<lM=,)RRfpIgw+m6<L8tX^f*sM8?mY>2Ofq-47F [@k@S8gq9 yQ_z3x!*^U');
define('LOGGED_IN_SALT', 'rBDE#x=#u-Yq,loygjPz`VEdCZ^PN3aXyA)Dzk/j#G!Tp!&E_zBH4tG?;x,h2lhw');
define('NONCE_SALT', '{n)cXYb).! 7u<YnirCf8.K.]mBUHkz]s>D_{]or[]I}bNT[ny8r=E(fDMLp/v+U');
/**#@-*/
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each a unique
* prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';
/**
* WordPress Localized Language, defaults to English.
*
* Change this to localize WordPress. A corresponding MO file for the chosen
* language must be installed to wp-content/languages. For example, install
* de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
* language support.
*/
define('WPLANG', '');
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define('WP_DEBUG', false);
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment