CentOS or RedHat Install Guide

Easy Setup

You can now install with a single command prompt! Use this method unless you have a good reason not to!

sudo yum install -y -q wget > /dev/null; wget -qO - http://portals.interworks.com/scripts/centos_redhat.sh | bash
  1. Server Setup

    If the server is not already setup for web traffic, install Httpd, MySQL, PHP, and dependancies. You can do this with the commands below:

CentOS:

sudo yum update
sudo yum install zip unzip httpd libcurl httpd-devel mysql mysql-server mysql-devel php php-mysql php-common php-gd php-mbstring php-memcached php-mcrypt php-devel php-xml php-pear php-pdo -y
sudo pecl install zip
sudo service mysqld start
sudo mysql_secure_installation
sudo service mysqld restart
sudo service httpd start
sudo chkconfig httpd on
sudo chkconfig mysqld on
sudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT
sudo /etc/init.d/iptables save

RHEL:

sudo yum update
sudo yum install zip unzip httpd libcurl httpd-devel mysql mysql-server mysql-devel mariadb-server php php-mysql php-common php-gd php-mbstring php-memcached php-mcrypt php-devel php-xml php-pear php-pdo php-pecl-zip -y
sudo pecl install zip
sudo systemctl start mariadb
sudo mysql_secure_installation
sudo systemctl restart mariadb
sudo systemctl start httpd
sudo chkconfig httpd on
sudo chkconfig mysqld on
sudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT
sudo /sbin/service iptables save
  1. Dealing with Old PHP

    On some versions of RedHat and CentOS, yum does not have a new enough PHP version. You can check your PHP version with php -v, or via the install.php file.

If this is the case, you can upgrade to the latest version using the following commands:

sudo yum install epel*
sudo yum update
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum install yum-utils
sudo yum-config-manager --enable remi-php71
sudo yum update
sudo service httpd restart
  1. Enable htaccess

    You will likely need to enable .htaccess overrides. Open the /etc/httpd/conf/httpd.conf file with vim and find a chunk that looks like the following:

    <Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>

Modify the "AllowOverride" piece of this to say "All".

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

Finally, restart httpd to enable the configuration change.

sudo service httpd restart
  1. MySQL Setup

    Log into MySQL with your root user. (Password blank by default - but you should have configured something else in Step 1)

mysql -u root -p

Then, run the following commands to create a database and user:

CREATE DATABASE tableau_portal;
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON tableau_portal.* TO 'newuser'@'localhost';
FLUSH PRIVILEGES;
  1. Code Installation

    Now that we have installed the server, unzip the latest Integration System code to /var/www/html.

Make sure the directory is open for writing:

chmod 0777 -R /var/www/html

Run http://[your-server-here]/install.php in a web browser.

  1. Set up Cron

    Add a crontab with the following line. Modify the path to artisan as needed.

* * * * * php /var/www/html/artisan schedule:run >> /dev/null 2>&1
  1. Final Steps

    After installation, remove install.php and the install_files folder. Manage through /backend as needed.

  2. SSL/TLS (optional as requested by client)

    Add the following to the httpd configuration, modify as needed. You can put it here if there isn't a better place: /etc/httpd/conf/httpd.conf

NameVirtualHost *:80
NameVirtualHost *:443

#Include conf/vhosts/*.conf
#Include conf/vhosts_ssl/*.conf

<VirtualHost *:443>
    ServerName website.com
    SSLEngine on
    SSLProtocol all -SSLv2
    SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
    SSLCertificateFile /etc/httpd/conf/site.crt
    SSLCertificateKeyFile /etc/httpd/conf/site.key
    ErrorLog logs/ssl_error_log
    TransferLog logs/ssl_access_log
    LogLevel warn
    <Files ~ "\.(cgi|shtml|phtml|php3?)$">
        SSLOptions +StdEnvVars
    </Files>
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
    CustomLog logs/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    DocumentRoot /var/www/html/
</VirtualHost>

Then restart apache using one of the following:

sudo service httpd restart
sudo systemctl start httpd