MediaWiki:Blanknamespace

From askoh.net wiki

Jump to: navigation, search
  • Download and Burn Ubuntu Desktop 7.10 (Gutsy Gibbon) for 32 Bit X86 System (Though our server is AMD64) from http://releases.ubuntu.com/7.10/
  • Go to terminal and type sudo aptitude update , it would take some time to update the OS. Then type sudo aptitude upgrade
  • Change IP Address setting from DHCP to Static by System> Network > WiredConnection> Properties . Set it as Static IP and give a Static IP in your LAN. (Usually it is 192.168.1.1 ). So set your Server IP address as 192.168.1.100
  • Remote Desktop: Follow instructions on http://www.maddhat.com/?p=15
  • No-ip Client Installation: Follow instructions
  1. Go to System>Admininstration>Synaptec Package Manager
  2. Search for no-ip
  3. Right click on no-ip and select Mark for Install
  4. Accept any dependencies/upgrades of other packages
  5. Click on Tick Mark to Start Installation
  6. After installation is complete, go to terminal and type sudo no-ip -C
  7. It will ask for no-ip username, password and the accounts that should be updated and also set an update interval (10 mins), when it asks to "Run a script after successful instal", Select No and your settings are written to /etc/no-ip.conf
  1. Create directories in /var/www of all the websites the server is going to host. In our case, they are htp://demo1.no-ip.org and http://demo2.no-ip.org. Type sudo mkdir /var/www/demo1.no-ip.org , hit enter and sudo mkdir /var/www/demo2.no-ip.org and hit enter. Create a simple index.html in each of these 2 directories.
  2. sudo pico /etc/apache2/apache2.conf , go to last line and add Servername Caartz.com , set ServerTokens Prod , set ServerSignature Off, type NameVirtualHost *:80 Save and exit and then restart Apache by typing sudo /etc/init.d/apache2 restart
  3. Now we need to create Virtual hosts of these websites. cd /etc/apache2/sites-available , and you see default there. open it by sudo pico /etc/apache2/sites-available/default . Remove the first line and change the second line to <VirtualHost *:80> . Observe that public directory is /var/www . So for each of our hosted websites,we need one similar file which tells apache what to do. We shall create simple config files for these. <VirtualHost *:80>

ServerName demo1.no-ip.org DirectoryIndex index.html DocumentRoot /var/www/demo1.no-ip.org </VirtualHost>

  1. Once both the config files are created, Enable the sites by typing sudo a2ensite demo1.no-ip.org , and sudo a2ensite demo2.no-ip.org . restart apache by sudo /etc/init.d/apache2 force-reload
  • Now that we have apache installed and port forwarded (port 80) to our server from Router settings, we should be able to access the above created websites from any system outside of our LAN. I doubt if you can access these sites within LAN.
  • Lets add Squeak repository details to /etc/apt/sources.list by sudo pico /etc/apt/sources.list and add the following 2 lines: # deb http://ftp.squeak.org/debain/ stable main
# deb-src http://ftp.squeak.org/debian/ stable main  , and save and exit
  • install squeak by typing sudo aptitude install squeak , I am not sure if the latest version on the Debian repository is Squeak 3.77 which gets installed.
  • Install Postgresql by sudo aptitude install postgresql-8.2 . Then create postgres user in both PostgreSQL and as a Linux user.
  1. sudo su postgres -c psql template1
  2. template1=# ALTER USER postgres WITH PASSWORD 'secretPassword' ;
  3. template1=# \q
  4. sudo passwd -d postgres
  5. sudo su postgres -c passwd
  6. Enter the password as entered above
  • sudo /etc/postgresql/8.2/main/postgresql.conf
  1. Uncomment the line 'listen_addresses = 'localhost' '
  • sudo /etc/postgresql/8.2/main/pg_hba.conf
  1. change md5 to password in IPV4
  • Place the old Postgresql in a directory which has 777 permission (Thats actually requred when you export your Postgres DB). To import your old SQL file . Create a Database named 'ARDB'
  1. sudo -u postgres createdb ARDB
  2. su postgres
  3. pg_restore -d ARDB ardb.tar
  4. restart postgres
  5. /etc/init.d/postgresql-8.2 restart
  • Move all Caartz files (images, changes, SqueakSources , users , seaside-images/Css files etc) to /var/www/caartz.no-ip.org
  • CD to /var/www/caartz.no-ip.org , and then squeakvm caartzDell & or from FileSystem, go to that directory and rightclick on caartzDell.image and associate it to open with squeakvm, which is in /usr/bin/ , after doing this, Seaside Image starts running. In a workspace, execute WAKom StartOn:9091.
  • sudo pico /etc/apache2/sites-available/caartz.no-ip.org and enter the following text into it.
  1. LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so

LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy.http.so LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

<VirtualHost *:80> ServerName caartz.no-ip.org RewriteEngine On ProxyPreserveHost On DocumentRoot /var/www/caartz.no-ip.org

#Proxy the request to Seaside on port 8080 RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ http://localhost:9091/seaside/caartz$1 [P,L] </VirtualHost>

<Proxy *> Order allow,deny Allow from all </Proxy>

ProxyVia Block

  • Enable the new website by sudo a2ensite caartz.no-ip.org, by doing this, a symbolic link is created in /etc/apache2/sites-enabled
  • Save and Exit and you can restart apache by sudo /etc/init.d/apache2 restart
  • People outside of your LAN can access the website by pointing the browser to http://caartz.no-ip.org
  • You cannot access this site from within LAN as caartz.no-ip.org doesnt go out of your Router itselt. To overcome that, let Apache listen to port 9000 by
  1. sudo pico /etc/apache2/ports.conf and add Listen 9000 , this makes Apache to listen to port 80, which is default and also port 9000
  2. Add another virtual Host by, sudo pico /etc/apache2/sites-available/caartzLocal.conf and enter the following text. Note the changes in <VirtualHost localhost:9000>
  3. LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so

LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy.http.so LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

<VirtualHost localhost:9000> ServerName caartzLocal RewriteEngine On ProxyPreserveHost On DocumentRoot /var/www/caartz.no-ip.org

#Proxy the request to Seaside on port 8080 RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ http://localhost:9091/seaside/caartz$1 [P,L] </VirtualHost>

<Proxy *> Order allow,deny Allow from all </Proxy>

ProxyVia Block

  • Now enable the localSite by sudo a2ensite caartzLocal and restart apache by sudo /etc/init.d/apache2 restart. Browse to http://localhost:9090/ from the server or if you want to access this within the LAN, try http://192.168.0.50:9000/ where 192.168.0.50 is the static IP of the Home-Server we had set earlier
  • Now, we shall install MySQL by sudo aptitude install mysql , it will prompt you to enter root password, and enter it.
  • Create a DB in MySQL mysql -u root -p, it will ask for root password, Enter it and it will tak you to MySQL prompt,. There enter CREATE DATEABASE CaartzKBDB;. Then in the mysql prmpt, type GRANT ALL PRIVILEGES ON *.* TO 'KBUser'@'localhost' IDENTIFIED BY 'TopSecretPassword' WITH GRANT OPTION;
  • THere was a problem with KnowldegeBase installation as we are using no-ip. Looks like KB was finding itself on no.ip.org domain, which is hosted elsewhere.. Finally I mobed KB to smallguru server. The URL is http://www.smallguru.com/caartkb , Its up and running. Made appropriate changes in Caartz Image to point to the new URL. Hope Caartz is somewhat done for now.
Personal tools
Navigation