Difference between revisions of "Setting up Dreamwidth on Linode"

From Dreamwidth Notes
Redirect page
Jump to: navigation, search
m (Downloading the Dreamwidth code)
m (no point of other text on a redirect page)
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
These instructions will help you set up Dreamwidth on Linode hosting, brought to you by <ljuser>exor74</ljuser>.
+
#REDIRECT [[Dreamwidth Scratch Installation]]
 
+
== Ordering ==
+
 
+
Newark is the best choice for a node location for 2 reasons:
+
 
+
* Guaranteed 64-bit host
+
* Fast internal-network disk image fetch from <ljuser>exor674</ljuser>
+
 
+
== Setting up a Linux Deployment ==
+
 
+
Click on "Deploy a Linux Distribution":
+
 
+
[[Image:DeployDistribution.png]]
+
 
+
This will bring you to the Linode Distribution Wizard.
+
 
+
# Click on "Ubuntu 8.04 LTS 64 Bit"
+
# Enter "3096" as the disk image size
+
# Enter "256" Swap
+
# Enter password, and hit "Create Profile"
+
 
+
[[Image:LinodeDistributionWizard.png]]
+
 
+
Wait for it to complete, and then hit "Create new disk image".
+
 
+
# Label: "Dreamwidth Image"
+
# Size: "1024"
+
# Filesystem Type: "ext3"
+
# Hit "Create Disk"
+
 
+
[[Image:CreateDiskImage.png]]
+
 
+
# Click on "Ubuntu 8.04 LTS 64 Bit Profile"
+
# Set /dev/xvdc to "Dreamwidth Image", and hit "Save Profile"
+
 
+
[[Image:LinodeConfigurationProfile.png]]
+
 
+
Go to the "Network" tab, and click on "Add Private IP".
+
 
+
[[Image:AddPrivateIP.png]]
+
 
+
And take note of the text after "eth0"--this is your node's public IP--and the text under "for manual configuration"--your private network IP.
+
 
+
[[Image:LinodeNetworkConfiguration.png]]
+
 
+
== Getting into the node ==
+
 
+
Go back to the "Dashboard" tab, hit "Boot", and wait for the task to complete.
+
Open your SSH client and SSH to root@<i>noted eth0 address</i>, and enter your root password:
+
 
+
[[Image:LinodeSSH.png]]
+
 
+
== Install using the Dreamwidth image ==
+
 
+
We're going to install a canned Dreamwidth image to make things easier on us.
+
 
+
Install wget:
+
 
+
apt-get install wget
+
 
+
If you are on a Newark node:
+
 
+
<i>noted "for manual configuration" line</i>
+
wget http://192.168.133.102:6887/Linode-Dreamwidth-Ubuntu.img
+
 
+
If you are *NOT* in Newark:
+
 
+
wget http://ns1.andreanall.com:6887/Linode-Dreamwidth-Ubuntu.img
+
 
+
Now you can copy the image to your deployment:
+
 
+
dd if=Linode-Dreamwidth-Ubuntu.img of=/dev/xvdc
+
 
+
[[Image:LinodeDreamwidthImage.png]]
+
 
+
<b>Note:</b> This may take a while.  Now you can delete the old Ubuntu image and switch over to the Dreamwidth image. To delete the old Ubuntu image:
+
 
+
# Press "Shutdown"(Image 1), and wait for it to finish
+
# Ticky the box next to "Ubuntu 8.04 LTS 64 Bit Disk Image (ext3)"(Image 2) and hit "Delete"(Image 3)
+
# Click on "Ubuntu 8.04 LTS 64 Bit Profile"(Image 4)
+
 
+
[[Image:DeleteOldUbuntuImage.png]]
+
 
+
To switch to the Dreamwidth Image, click on your profile's link and:
+
 
+
# Change /dev/xvda to "Dreamwidth Image"
+
# Clear /dev/xvdc
+
# Hit "Save Profile"
+
 
+
[[Image:SwitchToDreamwidthImage.png]]
+
 
+
# Click on "Dreamwidth Image"
+
# Enter "12032" in the "New Size" field
+
# Hit "Save Changes"
+
# Wait till it completes
+
 
+
[[Image:EditDiskImage.png]]
+
 
+
=== Setting up the new disk image ===
+
 
+
# Go to the "Settings & Utilities" tab
+
# In the "Change a Filesystem's root Password" section
+
# Set the "Disk Image" to "Dreamwidth Image"
+
# Enter your password
+
# Hit "Change Password"
+
# Go to the "Dashboard" tab
+
 
+
[[Image:ChangeFilesystemRootPassword.png]]
+
 
+
Now, resign into your node:
+
 
+
# Hit "Boot"
+
# Wait 30 seconds after the job completes.
+
# Open your SSH client and SSH to root@<i>noted eth0 address</i>, and enter your root password
+
<b>Note:</b> you may have to tell SSH that nothing funky is happening
+
 
+
rm /etc/ssh/*key*
+
dpkg-reconfigure openssh-server
+
exit
+
 
+
Open your SSH client and SSH to root@<i>noted eth0 address</i>, and enter your root password. <b>Note:</b> you may have to tell SSH that nothing funky is happening.
+
 
+
=== Set up database and postfix ===
+
 
+
passwd dw
+
wget http://ns1.andreanall.com:6887/LDW-patch1.tgz
+
cd /
+
tar xzvpf ~/LDW-patch1.tgz
+
rm ~/LDW-patch1.tgz
+
mysqladmin -pomg\!dreamwidth password <i>newpassword</i>
+
echo 'set password = password("othernewpass")' | \
+
  mysql -udw -pyay\!dreamwidth
+
dpkg-reconfigure postfix
+
 
+
Choose "Internet Site".  Enter
+
 
+
<b>Note:</b> If you can't enter your domain name in the Mac OS X Terminal because it won't delete the default, go to Preferences-&gt;Advanced and click "Delete sends Ctrl-H".  Change it back afterwards, or <code>vi</code> will delete before instead of after the cursor.
+
 
+
su - dw
+
 
+
=== Set up ljconfig.pl ===
+
 
+
vi etc/ljconfig.pl
+
 
+
# Use the right domain: Change $DOMAIN to your domain
+
# Get the right database password: Search for "yay" (<code>/yay</code> in vi). Change "yay!dreamwidth" to "other_new_password"
+
 
+
[[Image:EditLJConfig.png]]
+
 
+
Save and quit vi (:wq) and restart apache:
+
 
+
sudo /etc/init.d/apache2 restart
+
 
+
# ??
+
# PROFIT!
+
 
+
== Installing from scratch ==
+
 
+
=== Setting up the user ===
+
 
+
apt-get install vim
+
sudo visudo
+
 
+
uncomment line: %sudo ALL=NOPASSWD: ALL
+
 
+
Add the user:
+
 
+
adduser <i>username</i>
+
 
+
Fill out the user's info and put them in the sudo group:
+
 
+
usermod -a -G sudo <i>username</i>
+
 
+
So, to use <code>dw</code> as a username:
+
 
+
adduser dw
+
usermod -a -G sudo dw
+
 
+
=== Bringing the system up to date ===
+
 
+
You might want to:
+
 
+
apt-get update
+
apt-get upgrade
+
 
+
If you want man pages on your system:
+
 
+
apt-get install man
+
 
+
=== Installing necessary packages ===
+
 
+
apt-get install mercurial subversion apache2-mpm-prefork \
+
  libapache2-mod-perl2 libapache2-mod-apreq2 libapache2-request-perl \
+
  mysql-server wget unzip links
+
apt-get install libclass-autouse-perl libcompress-zlib-perl \
+
  libdatetime-perl libdigest-sha1-perl libgd-gd2-perl libhtml-template-perl \
+
  libwww-perl libmime-lite-perl libnet-dns-perl liburi-perl libxml-simple-perl
+
apt-get install libclass-accessor-perl libclass-data-inheritable-perl \
+
  libclass-trigger-perl libcrypt-dh-perl libmath-bigint-gmp-perl \
+
  liburi-fetch-perl libgd-graph-perl libgnupg-interface-perl
+
apt-get install libmail-gnupg-perl perlmagick libproc-processtable-perl \
+
  libsoap-lite-perl librpc-xml-perl libstring-crc32-perl libtext-vcard-perl \
+
  libxml-atom-perl libxml-rss-perl
+
apt-get install libimage-size-perl libunicode-maputf8-perl
+
apt-get install libgtop2-dev build-essential
+
perl -MCPAN -e 'install GTop' # this will guide you through setting up CPAN
+
perl -MCPAN -e 'install Unicode::CheckUTF8'
+
perl -MCPAN -e 'install Captcha::reCAPTCHA'
+
+
add-user dw
+
+
su - dw
+
 
+
Add "export LJHOME=/home/dw" to the end of ~/.profile, then:
+
 
+
source ~/.profile
+
 
+
=== Downloading the Dreamwidth code ===
+
 
+
wget http://hg.dwscoalition.org/dw-free/raw-file/e4be2e864b95/bin/bootstrap.pl
+
perl bootstrap.pl
+
rm bootstrap.pl
+
 
+
Now, continue [[Dev_Getting_Started#dw-nonfree|here]].
+
 
+
[[Category: Development]]
+

Latest revision as of 22:55, 5 April 2011