====== Installation of other roles ====== This article covers installation of Memcached, Chat and Load balancer roles. ====== Memcached Role======= =====Install from precompiled rpm===== All the required files for memcached, including init files are packaged in to the rpm. \\ cd /tmp wget --user=expbbbu --password= ftp://qacollab01.exphosted.com/softrepo/app/installed-software/memcached-1.4.5-1.el5.x86_64.rpm rpm -ivvh memcached-1.4.5-1.el5.x86_64.rpm This will install configuration file in /etc/sysconfig/memcached and the init files in init.d Modify the configuration so memcached allows network clients to connect: sed -i.bak s/OPTIONS=""/OPTIONS="-l 0.0.0.0"/g /etc/sysconfig/memcached Memcached is also monitored by God. =====Install from source ===== Follow the instructions over at https://wiki.exphosted.com/doku.php/software_versions#Install%20Memcached. ===== INIT Scripts ===== An Init script is automatically installed with the RPM version. \\ You need to manually install an INIT script if building from source. \\ Instructions here in the link above. Add memcached to list of services to be started at boot: chkconfig memcached on ====== Chat Role ====== ===== Install Node ===== We use Juggernaut which is a node application. \\ At the time of this writing, it is deprecated. cd /tmp wget --user=expbbbu --password= ftp://qacollab01.exphosted.com/softrepo/app/installed-software/node-v0.2.4.tar.gz tar zxvf node-v0.2.4.tar.gz cd node-v0.2.4 ./configure make && make install ===== Install Binaries ===== The production user //expprodl// 's home directory is [[https://wiki.exphosted.com/doku.php/setup_an_app_server#Application Setup|already shipped]] with the required Juggernaut and Redis software. #Ensure you are expprodl cd ~/bin chat_sss.sh start ===== INIT Scripts ===== echo "Start Juggernaut, Redis" >> /etc/rc.local echo "/home/expprodl/bin/chat_sss.sh start" > /etc/rc.local ====== Load balancer Role ======= We use Haproxy 1.5.15 with SSL support; ==== Make sure that you change the following files first ==== Apache - TCP port - 81 (/opt/apache2/conf/httpd.conf) ## Listen section Listen 81 ## VirtualHost Section VirtualHost 192.168.2.x:81 ## ServerName section ServerName qa01.learnexa.com:81 Chat - TCP port - 8018 (/home/expdev01/bin/chat_sss.sh - node command) ## Change the following line; nohup node server.js --port 8018 > /var/log/chat.log & === Install load-balancer on the server with SSL support === export STATICLIBSSL=/path/to/openssl/lib/headers #Compile with the latest version of Openssl 1.0.2d and above; ./config --prefix=$STATICLIBSSL no-shared make make install_sw #Compile Haproxy 1.5.x ./config --prefix=$STATICLIBSSL no-shared make && make install_sw cd /src/haproxy make clean make TARGET=linux2628 CPU=x86_64 USE_OPENSSL=1 SSL_INC=$STATICLIBSSL/include SSL_LIB=$STATICLIBSSL/lib ADDLIB=-ldl USE_ZLIB=1 USE_PCRE=1 make install for validation use; haproxy -vv === THE BELOW DOCUMENT IS OBSOLETE - PLEASE IGNORE === We use software based load balancing using HaProxy software. Since this is Internet facing and primary point of contact, its best if you use the [[http://haproxy.1wt.eu|latest version]] within the currently used branch. \\ It is confirmed that as long as you use the same branch (currently 1.4), it will not break any existing configuration. \\ A copy of HaProxy 1.4.24 is available in the software repo. ===== Install HaProxy ===== cd /tmp wget --user=expbbbu --password= ftp://qacollab01.exphosted.com/softrepo/app/installed-software/haproxy-1.4.24.tar.gz tar zxvf haproxy-1.4.24.tar.gz make TARGET=linux26 make install ===== Configure HaProxy===== mkdir /etc/haproxy cd /etc/haproxy wget --user=expbbbu --password= ftp://qacollab01.exphosted.com/softrepo/app/conf/haproxy.cfg ===== INIT Scripts ===== cd /etc/init.d wget --user=expbbbu --password= ftp://qacollab01.exphosted.com/softrepo/app/conf/init/haproxy