====== Setup DEV Talent / Performance Application ====== ===== Install Default developer packages ===== Add below mentioned both entrys 127.0.0.1 server url server url #This was tested in CentOS 6.5. yum install epel-release -y yum update -y yum groupinstall "Development Tools" -y yum groupinstall "Additional Development" -y yum install gcc gcc-c++ make wget libtool libxml libxml-devel libxslt libxslt-devel subversion curl-devel java-1.7.0-openjdk java-1.7.0-openjdk-devel git-core openssl-devel -y yum install ImageMagick ImageMagick-devel -y yum install gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel -y ==== Installing MYSQL 5.6.x ==== yum install wget -y wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm rpm -ivh mysql-community-release-el6-5.noarch.rpm yum install mysql-community-server.x86_64 -y /etc/init.d/mysqld start mysql -u root mysql> use mysql; mysql> update user set password=PASSWORD("GIVE-NEW-ROOT-PASSWORD") where User='root'; mysql> flush privileges; mysql> quit === Installing Ejabberd === Download the latest version of Ejabberd from www.process-one.net website, at the time of writing this document 15.07 was the latest. wget "https://www.process-one.net/downloads/downloads-action.php?file=/ejabberd/15.07/ejabberd-15.07-linux-x86_64-installer.run" chmod 751 ejabberd-15.07-linux-x86_64-installer.run ./ejabberd-15.07-linux-x86_64-installer.run Do you accept this license? [y/n]: y Installation Directory [/opt/ejabberd-15.07]: ejabberd server domain [devtalent02.exphosted.com]: devtalent01.exphosted.com Administrator username [admin]: Administrator password [********] : Retype password [********] : Cluster [y/N]: n Do you want to continue? [Y/n]: y ---------------------------------------------------------------------------- Please wait while Setup installs ejabberd on your computer. Installing 0% ______________ 50% ______________ 100% ######################################### ---------------------------------------------------------------------------- cd /opt/ejabberd-15.07/bin cp ejabberd.init /etc/init.d/ejabberd follow this link for ejabbered configuration https://wiki.exphosted.com/doku.php/xmpp_chat /etc/init.d/ejabberd start == Adding user expdev01 and adding to sudoers list == useradd -m expdev01 vi /etc/sudoers expdev01 ALL=(ALL) NOPASSWD: ALL Login as expdev01 and perform the following actions; vi ~/.profile export PATH="$PATH:$HOME/.rvm/bin" [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" vi ~/.bashrc export PATH="$PATH:$HOME/.rvm/bin" [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" Logout and login again as expdev01 == Installing Ruby 2.2.2P95 with RVM == curl -sSL https://get.rvm.io | bash rvm install 2.2.2 == Installing NGINX and Phusion Passenger == Add Latest Nginx repository /etc/yum.repos.d/nginx.repo [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1 Install Passenger and Nginx sudo yum install -y nginx gem install passenger Edit passenger configuration for Nginx # for passenger root passenger-config --root /etc/nginx/conf.d/passenger.conf passenger_root /home/expdev01/.rvm/gems/ruby-2.2.2/gems/passenger-5.0.18; passenger_ruby /home/expdev01/.rvm/rubies/ruby-2.2.2/bin/ruby; passenger_instance_registry_dir /var/run/passenger-instreg; sudo service nginx restart Validate passenger and Nginx installation sudo passenger-config validate-install copy from existing working machine /deploy folder structure -- find and replace ip and urs according to setup chown -R expdev01:expdev01 /deploy ##appuser change ownership == Database creation and loading seed data == Modify the database.yml file to reflect proper DB settings in development and test section and then run following rake task to create all the databases. bundle exec rake db:create:all Once the DBs are created run the migrations to create necessary tables using following command. bundle exec rake db:migrate bundle exec rake db:migrate RAILS_ENV=test Run rake db:seed to create the default company and related data (This is just one time task) bundle exec rake db:seed The default company will be created with name 'Performexa' and subdomain as 'default'. No subdomain in url will refer to default company. e.g. http://dev01.performexa.com will take default company as a context. An admin user for the default company will also be created. The username for admin user is 'admin@performexa.com' and password is 'pforperformance'.