Last active
December 10, 2015 16:18
-
-
Save elecnix/4459983 to your computer and use it in GitHub Desktop.
Steps from an empty, minimalist Ubuntu 12.04 virtual machine to an Idea Torrent instance. See: http://www.ideatorrent.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# ========================= WARNING ======================== | |
# This is not intended to be run as-is, rather copy-pasted one line at a time! | |
# It contains comments with instructions to perform manually, such as opening | |
# a browser or configuring a VM in the VirtualBox GUI. | |
# ========================= WARNING ======================== | |
# | |
# Launch a "12.04 LTS JeOS Ubuntu" virtual appliance (works in Virtual Box) | |
# https://solutionexchange.vmware.com/store/products/12-04-lts-jeos-ubuntu | |
# TODO: Document VM settings changes (storage caching, network as "bridge") | |
# In the console: | |
apt-get update | |
apt-get install openssh-server nano | |
ifconfig # Note IP address | |
# On the host: | |
IP=10.0.0.1 # IP address of the guest | |
ssh-copy-id root@$IP | |
ssh root@$IP | |
hostname ideatorrent | |
echo ideatorrent > /etc/hostname | |
# Bad clock can fail OpenID login | |
apt-get install ntpdate | |
ntpdate ntp.ubuntu.com | |
apt-get install ntp | |
apt-get install libreadline5 libreadline6 lib64readline5 whiptail less locales | |
locale-gen en_US en_US.UTF-8 fr_FR.UTF-8 | |
apt-get install postgresql php5-pgsql | |
apt-get install apache2 php5 libapache2-mod-php5 | |
wget http://ftp.drupal.org/files/projects/drupal-6.27.tar.gz | |
tar xzf drupal-6.27.tar.gz | |
mv drupal-6.27/* drupal-6.27/.htaccess /var/www/ | |
cd /var/www/ | |
rm index.html | |
su - postgres -c "createuser --pwprompt --encrypted --no-adduser --no-createdb ideatorrent" | |
su - postgres -c "createdb --encoding=UNICODE --owner=ideatorrent ideatorrent" | |
cp sites/default/default.settings.php sites/default/settings.php | |
a2enmod rewrite | |
nano /etc/apache2/conf.d/drupal6.conf | |
# Add: (without the '#' comments) | |
# <Directory /var/www> | |
# RewriteEngine on | |
# RewriteBase / | |
# RewriteCond %{REQUEST_FILENAME} !-f | |
# RewriteCond %{REQUEST_FILENAME} !-d | |
# RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] | |
#</Directory> | |
service apache2 restart | |
mkdir -p sites/default/files | |
chown www-data: sites/default/files | |
chmod a+w sites/default/settings.php | |
# Open /install.php in browser | |
chmod go-w sites/default/settings.php | |
cd modules/ | |
wget http://www.ideatorrent.org/downloads/ideatorrent-0.9.1.tar.gz | |
tar xzf ideatorrent-0.9.1.tar.gz | |
mv ideatorrent*/{ideatorrent,qawebsite} . | |
# Enable QA-Website module, Save configuration | |
# Enable IdeaTorrent module, Save configuration | |
# Note: you will see this message: "user warning: query: CREATE LANGUAGE plpgsql" | |
# Follow the rest at: | |
# http://www.ideatorrent.org/docs/en/installation.txt.html | |
# There will be no "Submit idea" link until you enable the QA-Website blocks | |
# Left sidebar: "QA-Website module action block 2" | |
# Header: "QA-Website module action block" | |
# Disabled: "QA-Website top navigation bar" | |
# Before the idea shows up, it must be voted UP by two users, so you need to create a second user. | |
# (this can be lowered in /ideatorrent/ideatorrent_admin/) | |
# Install OpenID Selector - Follow instructions at http://drupal.org/project/openid_selector | |
# Enable "Attribute Exchange for OpenID" and "OpenID Selector Inline" modules. | |
# Then go to My Profile / OpenID Identities, and click on your desired provider. | |
# In User Settings (/admin/user/settings): | |
# Un-check "Require e-mail verification when a visitor creates an account". | |
# Check "Visitors can create accounts and no administrator approval is required" | |
# Disable password login / registration by commenting-out code from /var/www/modules/user/user.module: | |
# user_login_block function: from $form['name'] to the end, leaving "return $form;" untouched | |
# user_edit_form function: from "if (!$register) { $form['account']['pass']" to the end of the elseif block. | |
# To keep only one OpenID provider, comment-out the other ones in: | |
# /var/www/sites/all/libraries/openid-selector/js/openid-en.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment