Difference between revisions of "Production Setup: Webserver"
(→Setup) |
(→Setup: No longer needed per https://github.com/dreamwidth/dw-free/commit/f50fef09360a6921eb95227efdb9857b4037890b) |
||
(6 intermediate revisions by 6 users not shown) | |||
Line 2: | Line 2: | ||
Emphasis on CPU and RAM. We don't need disk. | Emphasis on CPU and RAM. We don't need disk. | ||
+ | |||
+ | [[Category: Production]] | ||
== Setup == | == Setup == | ||
Line 18: | Line 20: | ||
apt-get update | apt-get update | ||
− | apt-get install vim-perl screen | + | apt-get install vim-perl screen dh-make-perl \ |
+ | libgtop2-dev libapache2-mod-perl2 libapache2-request-perl | ||
apt-get dist-upgrade | apt-get dist-upgrade | ||
Line 34: | Line 37: | ||
ln -s production/ current | ln -s production/ current | ||
cd $LJHOME | cd $LJHOME | ||
− | wget | + | wget https://github.com/dreamwidth/dw-free/blob/develop/bin/bootstrap.pl |
perl bootstrap.pl | perl bootstrap.pl | ||
This will also run for a while. It should say something about starting at the beginning, and then go bouncing along its merry way as it starts checking things out. Good times will be had by all. | This will also run for a while. It should say something about starting at the beginning, and then go bouncing along its merry way as it starts checking things out. Good times will be had by all. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Now let's get a list of modules to install, or try: | Now let's get a list of modules to install, or try: | ||
Line 52: | Line 47: | ||
do sudo apt-get -qq install $i; \ | do sudo apt-get -qq install $i; \ | ||
done | done | ||
+ | |||
+ | The package list should look very similar to the one maintained on the page for [[Dreamwidth_Scratch_Installation#Installing_necessary_packages|installing from scratch]]. | ||
+ | |||
+ | There are also some modules we have manually built: | ||
+ | |||
+ | sudo dpkg -i cvs/dw-private/debs/*.deb | ||
Now let's see what modules didn't get installed for some reason: | Now let's see what modules didn't get installed for some reason: | ||
Line 57: | Line 58: | ||
bin/checkconfig.pl --only=modules --needed-debs | bin/checkconfig.pl --only=modules --needed-debs | ||
− | If there are any, | + | If there are any at this point, then we did something majorly wrong and we need to update something somewhere. Your build won't work. |
+ | |||
+ | Next up, we need to configure Apache. | ||
+ | |||
+ | sudo cp etc/SOMETHING/httpd.conf /etc/apache2/conf.d/dw.conf | ||
+ | sudo a2dissite default | ||
+ | sudo a2enmod apreq | ||
+ | sudo /etc/init.d/apache2 stop | ||
+ | sudo /etc/init.d/apache2 start | ||
− | + | stuff |
Latest revision as of 04:35, 19 August 2019
Webservers are the basic building block of the site. They run most of the interactions of the site and are the majority of the servers that we have.
Emphasis on CPU and RAM. We don't need disk.
Setup
Current production setup steps:
- Get slice for new webserver
- SSH in as root with given password, change root's password.
Setup DW account.
adduser dw echo "dw ALL=NOPASSWD: ALL" >> /etc/sudoers
Install base packages, still as root, and do a system update. This will take a little bit to run, so get some coffee real fast.
apt-get update apt-get install vim-perl screen dh-make-perl \ libgtop2-dev libapache2-mod-perl2 libapache2-request-perl apt-get dist-upgrade
Now let's get the DW user setup.
su - dw echo -e "\nsource ~/.dwrc" >> .bashrc echo -e 'export LJHOME="/home/dw/current"' > ~/.dwrc exit
Now we log back into the DW user to continue (this sets up $LJHOME).
su - dw mkdir production ln -s production/ current cd $LJHOME wget https://github.com/dreamwidth/dw-free/blob/develop/bin/bootstrap.pl perl bootstrap.pl
This will also run for a while. It should say something about starting at the beginning, and then go bouncing along its merry way as it starts checking things out. Good times will be had by all.
Now let's get a list of modules to install, or try:
for i in `bin/checkconfig.pl --only=modules --needed-debs`; \ do sudo apt-get -qq install $i; \ done
The package list should look very similar to the one maintained on the page for installing from scratch.
There are also some modules we have manually built:
sudo dpkg -i cvs/dw-private/debs/*.deb
Now let's see what modules didn't get installed for some reason:
bin/checkconfig.pl --only=modules --needed-debs
If there are any at this point, then we did something majorly wrong and we need to update something somewhere. Your build won't work.
Next up, we need to configure Apache.
sudo cp etc/SOMETHING/httpd.conf /etc/apache2/conf.d/dw.conf sudo a2dissite default sudo a2enmod apreq sudo /etc/init.d/apache2 stop sudo /etc/init.d/apache2 start
stuff