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/anylinux.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 mariadb-server mysql-devel php php-mysql php-common php-gd php-mbstring php-memcached php-devel php-xml php-pear php-pdo -y
sudo pecl install zip
sudo service mariadb start
sudo mysql_secure_installation
sudo service mariadb restart
sudo service httpd start
sudo chkconfig httpd on
sudo chkconfig mariadb 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-devel mariadb-server php php-mysql php-common php-gd php-mbstring php-memcached 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 mariadb 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:

wget -q http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
sudo rpm -ivh epel-release-7-11.noarch.rpm
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-php72
sudo yum update
sudo service httpd restart
  1. Enable htaccess

    You will likely need to enable .htaccess overrides. You can edit the /etc/httpd/conf/httpd.conf file with the following:

    sudo sed -i 's/AllowOverride None/AllowOverride All/gI' /etc/httpd/conf/httpd.conf
    sudo service httpd restart
  2. 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 and owned by the apache user:

sudo chmod -Rf 2775 /var/www
sudo chown -R apache:apache /var/www
sudo chcon -R -t httpd_sys_rw_content_t /var/www

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