Difference between revisions of "Setting up Dreamwidth on Linode"

From Dreamwidth Notes
Jump to: navigation, search
m (Set up ljconfig.pl)
Line 52: Line 52:
 
[[Image:LinodeSSH.png]]
 
[[Image:LinodeSSH.png]]
  
== Getting and using the Dreamwidth image ==
+
== Install using the Dreamwidth image ==
  
 
We're going to install a canned Dreamwidth image to make things easier on us.
 
We're going to install a canned Dreamwidth image to make things easier on us.
Line 98: Line 98:
 
[[Image:EditDiskImage.png]]
 
[[Image:EditDiskImage.png]]
  
== Setting up the new disk image ==
+
=== Setting up the new disk image ===
  
 
# Go to the "Settings & Utilities" tab
 
# Go to the "Settings & Utilities" tab
Line 122: Line 122:
 
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.
 
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 ==
+
=== Set up database and postfix ===
  
 
  passwd dw
 
  passwd dw
Line 140: Line 140:
 
  su - dw
 
  su - dw
  
== Set up ljconfig.pl ==
+
=== Set up ljconfig.pl ===
  
 
  vi etc/ljconfig.pl
 
  vi etc/ljconfig.pl
Line 155: Line 155:
 
# ??
 
# ??
 
# PROFIT!
 
# PROFIT!
 +
 +
== Installing from scratch ==
 +
 +
sudo visudo
 +
 +
uncomment line: %sudo ALL=NOPASSWD: ALL
 +
 +
adduser <userid>
 +
 +
fill out info
 +
 +
usermod -a -G sudo <userid>
 +
 +
you might want to:
 +
 +
apt-get update
 +
apt-get upgrade
 +
apt-get install man vim
 +
 +
---
 +
 +
apt-get install mercurial subversion apache2-mpm-prefork /
 +
  libapache2-mod-perl2 libapache2-mod-apreq2 libapache2-request-perl /
 +
  mysql-server wget
 +
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'
 +
perl -MCPAN -e 'install Unicode::CheckUTF8'
 +
perl -MCPAN -e 'install Captcha::reCAPTCHA'
 +
 +
add-user dw
 +
 +
su - dw
 +
 +
add "export LJHOME=/home/dw" to .profile
 +
 +
exit
 +
sudo - dw
 +
 +
wget http://hg.dwscoalition.org/dw-free/raw-file/e4be2e864b95/bin/bootstrap.pl
 +
perl bootstrap.pl
 +
 +
-- continue from dw-nonfree
  
 
[[Category: Development]]
 
[[Category: Development]]

Revision as of 07:55, 30 July 2008

These instructions will help you set up Dreamwidth on Linode hosting, brought to you by [info]exor74.

Ordering

Newark is the best choice for a node location for 2 reasons:

  • Guaranteed 64-bit host
  • Fast internal-network disk image fetch from [info]exor674

Setting up a Linux Deployment

Click on "Deploy a Linux Distribution":

DeployDistribution.png

This will bring you to the Linode Distribution Wizard.

  1. Click on "Ubuntu 8.04 LTS 64 Bit"
  2. Enter "3096" as the disk image size
  3. Enter "256" Swap
  4. Enter password, and hit "Create Profile"

LinodeDistributionWizard.png

Wait for it to complete, and then hit "Create new disk image".

  1. Label: "Dreamwidth Image"
  2. Size: "1024"
  3. Filesystem Type: "ext3"
  4. Hit "Create Disk"

CreateDiskImage.png

  1. Click on "Ubuntu 8.04 LTS 64 Bit Profile"
  2. Set /dev/xvdc to "Dreamwidth Image", and hit "Save Profile"

LinodeConfigurationProfile.png

Go to the "Network" tab, and click on "Add Private IP".

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.

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@noted eth0 address, and enter your root password:

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:

noted "for manual configuration" line 
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

LinodeDreamwidthImage.png

Note: 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:

  1. Press "Shutdown"(Image 1), and wait for it to finish
  2. Ticky the box next to "Ubuntu 8.04 LTS 64 Bit Disk Image (ext3)"(Image 2) and hit "Delete"(Image 3)
  3. Click on "Ubuntu 8.04 LTS 64 Bit Profile"(Image 4)

DeleteOldUbuntuImage.png

To switch to the Dreamwidth Image, click on your profile's link and:

  1. Change /dev/xvda to "Dreamwidth Image"
  2. Clear /dev/xvdc
  3. Hit "Save Profile"

SwitchToDreamwidthImage.png

  1. Click on "Dreamwidth Image"
  2. Enter "12032" in the "New Size" field
  3. Hit "Save Changes"
  4. Wait till it completes

EditDiskImage.png

Setting up the new disk image

  1. Go to the "Settings & Utilities" tab
  2. In the "Change a Filesystem's root Password" section
  3. Set the "Disk Image" to "Dreamwidth Image"
  4. Enter your password
  5. Hit "Change Password"
  6. Go to the "Dashboard" tab

ChangeFilesystemRootPassword.png

Now, resign into your node:

  1. Hit "Boot"
  2. Wait 30 seconds after the job completes.
  3. Open your SSH client and SSH to root@noted eth0 address, and enter your root password

Note: 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@noted eth0 address, and enter your root password. Note: 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 newpassword
echo 'set password = password("othernewpass")' | \
  mysql -udw -pyay\!dreamwidth
dpkg-reconfigure postfix

Choose "Internet Site". Enter

Note: If you can't enter your domain name in the Mac OS X Terminal because it won't delete the default, go to Preferences->Advanced and click "Delete sends Ctrl-H". Change it back afterwards, or vi will delete before instead of after the cursor.

su - dw

Set up ljconfig.pl

vi etc/ljconfig.pl
  1. Use the right domain: Change $DOMAIN to your domain
  2. Get the right database password: Search for "yay" (/yay in vi). Change "yay!dreamwidth" to "other_new_password"

EditLJConfig.png

Save and quit vi (:wq) and restart apache:

sudo /etc/init.d/apache2 restart
  1.  ??
  2. PROFIT!

Installing from scratch

sudo visudo

uncomment line: %sudo ALL=NOPASSWD: ALL

adduser <userid>

fill out info

usermod -a -G sudo <userid>

you might want to:

apt-get update
apt-get upgrade
apt-get install man vim

---

apt-get install mercurial subversion apache2-mpm-prefork /
  libapache2-mod-perl2 libapache2-mod-apreq2 libapache2-request-perl /
  mysql-server wget
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'
perl -MCPAN -e 'install Unicode::CheckUTF8'
perl -MCPAN -e 'install Captcha::reCAPTCHA'
add-user dw
su - dw

add "export LJHOME=/home/dw" to .profile

exit
sudo - dw
wget http://hg.dwscoalition.org/dw-free/raw-file/e4be2e864b95/bin/bootstrap.pl
perl bootstrap.pl

-- continue from dw-nonfree