OSN

OSN is a distributed social network with an open protocol.
Download

OSN Ranking & Summary

Advertisement

  • Rating:
  • License:
  • AGPL
  • Price:
  • FREE
  • Publisher Name:
  • Gordon Irlam
  • Publisher web site:

OSN Tags


OSN Description

OSN is a distributed social network with an open protocol. OSN is a distributed social network with an open protocol. From a user's perspective, all the individual sites in the federation appear as one. Users can search, browse profiles, link to each other without regard to which sites other users are using and send messages.Public key cryptography is used to make the system resilient to spam. User profiles are based on the FOAF XML file format and users can migrate their profiles from one site to another.Installation instructions:If you are upgrading OSN from a prior release please skip to theupgrade instructions at the end of this file.OSN has the option of being installed on a multi-computer system. Anynumber of profile servers, a profile database server, a search server,a search server database, any number of mail servers, and a mailserver database. Presently the database machines have to be the sameas the hosts they serve, although changing this would be trivial. Ifyou are getting started it is recommended that everything be installedon the same machine.To install OSN you will need root access to a Linux dedicated host orvirtual private server. Debian and probably Ubuntu work best,although other variants may also work.It is assumed that OSN is being installed on a machine where the otherlocal users are trusted. As a convenience to development OSN does notpresently support running in an untrusted environment. If you wererunning in an untrusted environment you would probably need tochmod/chown the "config/site_config.*" and "profile/site_secrets.php"files created later so that they are only accessible by the web serveruser, make "search/pathd" readable only by user, remove the twochmod() calls in "profile/image.php" save_image(), and run"profile/create_iu" described later as the web server user. Let usknow if you need or try this.The examples given here assume a single host, example.com, with IPaddress 192.168.1.100 takes on the role of all six system types.First decide on the host names of the machines:profile (database) server = example.comsearch (database) server = search.example.commail (database) server = mail.example.comThese hostnames should be distinct. The name of the profile server isalso the name of the user facing website, so make it somethingmemorable.Configure DNS:Configure DNS for the machines by adding the appropriate entries tothe zone file for example.com:@ 3600 IN A 192.168.1.100search 3600 IN CNAME @mail 3600 IN CNAME @www 3600 IN CNAME @@ 3600 IN MX 0 mail.example.com."www" will be set to forward to example.com later on. Also note theaddition of an MX record for the example.com domain pointing to themail server.You may also wish to add an SPF record to prevent spammers besmirchingthe reputation of your domain. The details could vary but a basicworking example is:@ 3600 IN TXT "v=spf1 a"Configuring the source:If you are reading this file you have already retrieved and unpackedthe source. We will assume you unpacked it into/home/user/osn-RELEASE. Rename the source:cd /home/usermv osn-RELEASE osnCreate includes/site_config.php:cd /home/user/osn/includes./create_configThis script will ask you a series of questions. Most should by now beself explanatory. For the database password you are free to go withthe default or to make something up. If the database is ever runningon separate machines from the hosts they serve, you should probablymake something up.Create includes/site_secrets.php:cd /home/user/osn/profile./create_secretsThis script will create the secrets in "profile/site_secrets.php" usedto authenticate session cookies, validate invites, and track bouncemessages. It would be bad if this file was lost, but not the end ofthe world. The contents of this file must not be publicly disclosed.Setting up GCC and Make:GCC is used to compile pathd the high speed path lookup daemon.(as root)aptitude install gcc make libmysqlclient-devSetting up PHP:Install the required PHP modules:(as root)aptitude install php5-cli php5-mysql php-mail php-mail-mime php5-curl php5-mcrypt php5-gdInstall php-mail-mime 1.5.2 or later. Earlier versions gave theerror: Error: Only variable references should be returned by reference in /usr/share/php/Mail/mime.php on line 375so if "aptitude show php-mail-mime" shows a version less than 1.5.2install the source manually:cd /home/user/osn/srctar -zxf Mail_Mime-1.5.2.tgz(then as root)cp Mail_Mime-1.5.2/* /usr/share/php/MailInstall Mail_mimeDecode 1.5.0 or later:cd /home/user/osn/srctar -zxf Mail_mimeDecode-1.5.0.tgz(then as root)cp Mail_mimeDecode-1.5.0/mimeDecode.php /usr/share/php/Mail(edit) /usr/share/php/Mail/mimeDecode.php remove "&" from "new" on line 324(edit) /usr/share/php/PEAR.php remove "&" from "new" on line 563, 566Lastly configure the apache php.ini:(as root)(edit) /etc/php5/apache2/php.ini Set: display_errors = Off log_errors = On post_max_size = 21M upload_max_filesize = 20M"display_errors" should be "On" for development environments. Thetweaking of the post/upload sizes to to permit the uploading of largeimages.Make apache pick up the new modules and configuration:(as root)apache2ctl restartSetting up Exim:Exim need to be configured appropriately to send and receive mail.This may already be the case. If not:(as root)dpkg-reconfigure exim4-config Internet site; mail is sent and received directly using SMTP System mail name: example.com IP-addresses to listen on for incoming SMTP connections: Other destinations for which mail is accepted: example.com Domains to relay for: Machines to relay mail for: Keep number of DNS-queries minimal (Dial-on-Demand)?: This last option is for performance reasons it is recommended youavoid DNS lookups of the local nodename on each remote connection.The exim mailer now needs to be configured to accept mail intended forOSN and invoke filter processes to handle it. First we need togenerate the exim configuration code to do this:cd /home/user/osnmake configure-eximThen we need to install this code it in the exim configuration file:(as root)(edit) /etc/exim4/exim4.conf.template (in the routers section right before smarthost insert the contents of the file /home/user/osn/mail/exim-routers.conf) (anywhere in the transports section insert the contents of the file /home/user/osn/mail/exim-transports.conf)Finally restart exim:(as root)/etc/init.d/exim4 restart (runs update-exim4.conf)Configuring regular mail:OSN publishes an alias, info@example.com, for people to use to contactthe local site. This alias needs to be setup to forward to a userthat will respond to such email.(as root)(edit) /etc/aliases add an alias for "info"Setting up MySQL:(as root)aptitude install mysql-server mysql-clientCreate the database access priviliges:(as root)cd /home/user/osnmake configure-mysqlYou can use "make -n configure-mysql" if you want to see what databasecommands will be performed before deciding to perform them.Setting up Apache:The web servers need to be configured on the profile and searchservers. As a cosmetic issue www.example.com also needs to beconfigured to forward to example.com.cd /home/user/osnmake configure-apache(as root)cd /home/user/osnmake install-apache/etc/init.d/apache2 reloadBuilding pathd:pathd is the high speed path lookup daemon:cd /home/user/osn/searchmakeConfiguring the databases:The initial profile database schema need to be defined and the initialdata values populated:cd /home/user/osn/profile./create_db (enter "osn" or the database password you have chosen)./create_iu"create_iu" creates the initial users. It will ask for theadministrator username, which should be a name like "fred". It shouldalso ask for the initial account password, which should be secure,since it will be web accessible.The search server and mail server databases also need to be setup:cd /home/user/osn/search./create_db (enter "osn" or the database password you have chosen)cd /home/user/osn/mail./create_db (enter "osn" or the database password you have chosen)Setting up the daemon scripts:OSN has a number of processes which must always be running. These are"fetchd" the search server profile discovery daemon, "pathd" the highspeed path lookup daemon, "maild" the OSN mail processing daemon, and"check_daemons" which monitors the state of the other daemons andreports if any of them crashed.cd /home/usr/osnmake configure-daemons(as root)cd /home/user/osnmake install-daemonsSetting up the feed directory:OSN generates feeds for discussion forums. The feed directory needsto be writeable by the web user.(as root)cd /home/user/osnmkdir -p profile/http/feed/tmpchown -R www-data:www-data profile/http/feedGoing live:Everything is now setup. The daemons can be started:(as root)/etc/init.d/osn startAnd the website can be enabled:cd /home/user/osn/includes(edit) site_config.php change: $sitedown = 1; to: $sitedown = 0;The website is now live. If you are in a production environment youmight also want to set $invite_only to 1. This will prevent new userscreating accounts before you have had a chance to login and pokearound. You can set $invite_only back to 0, once you are satisfiedeverything looks good.You should now be able to connect to http://example.com/ with a webbrowser and login with the administrator username and password youspecified earlier when running "create_iu". You should set the nameof the adminstrator to your name, and the description of theadminsistrator to your self description. Be sure to do this for theadministrator username you specified earlier, and not the user"admin". The user "admin" is an automated user that send out noticesto other users.


OSN Related Software