[LINUX] Steps to deploy EMLauncher on CentOS 8

Steps to deploy EM Launcher on CentOS 8

This procedure manual is for installing KLab's Android / iOS test application distribution tool ʻEM Launcher` on CentOS8.

__ * The version of CentOS used when writing this procedure is 8.1.1911. __

Reference site

Introducing EmLauncher

__ * Please log in as the root user and execute all the following processes. __

  1. Firewall setup

  2. Open the http (80) port.

    firewall-cmd --zone=public --add-port=80/tcp --permanent
    systemctl restart firewalld
  3. Install required packages

  4. Add the EPEL repository.

    dnf -y install epel-release
  5. Add the Remi repository.

    dnf -y install http://rpms.famillecollet.com/enterprise/remi-release-8.rpm
  6. Install PHP 7.4.

    dnf -y module install php:remi-7.4
  7. Install other packages.

    dnf -y install httpd mariadb-server memcached php-gd php-mbstring php-xml php-pecl-imagick php-pecl-memcached php-pecl-zip php-pdo php-mysqlnd git
  8. Install Composer.

    curl -sS https://getcomposer.org/installer | php
    mv composer.phar /usr/local/bin/composer`
  9. Deploy codes

  10. Clone the emlauncher from GitHub.

    cd /var/www/html
    git clone https://github.com/KLab/emlauncher.git
  11. Initialize and update the submodule.

    cd emlauncher
    git submodule init && git submodule update
  12. Install the related packages in Composer.

    composer install
  13. Adjust the permissions so that Apache can access the emlauncher.

    chown -R apache:apache /var/www/html/emlauncher
  14. Apache setup

  1. Edit ʻemlauncher /web/.htaccess`.

    vim /var/www/html/emlauncher/web/.htaccess

Comment out the following content.

#php_flag short_open_tag On
#php_value memory_limit "4G"
#php_value upload_max_filesize "4G"
#php_value post_max_size "4G"
#php_value max_execution_time 300
#php_value max_input_time 300
  1. Edit /etc/php.ini.

    vim /etc/php.ini

Set the commented out settings in .htaccess as follows.

short_open_tag = On
max_execution_time = 300
max_input_time = 300
memory_limit = 4G
post_max_size = 4G
upload_max_filesize = 4G
  1. Edit the Apache configuration file /etc/httpd/conf/httpd.conf.

    vim /etc/httpd/conf/httpd.conf

Modify as follows.

SetEnv MFW_ENV 'ec2'
<Directory "/var/www/html">  
    Options FollowSymLinks  
    AllowOverride All  
  1. Enable httpd.

    systemctl start httpd && systemctl enable httpd
  2. Database setup

  3. Enable Database.

    systemctl start mariadb && systemctl enable mariadb
  4. Create a dbauth file that contains your Database username and password.

    echo 'emlauncher:password' > /var/www/html/dbauth

__ * Please replace the password part above before executing. __

  1. Modify the xxxxxxxx part in ʻemlauncher /data/sql/database.sql to match the password for dbauth`.

    vim /var/www/html/emlauncher/data/sql/database.sql
  2. Stream the emlauncher database settings to MySQL.

    mysql -u root < /var/www/html/emlauncher/data/sql/database.sql
    mysql -u root emlauncher < /var/www/html/emlauncher/data/sql/tables.sql
  3. Memcache setup

  4. Enable Memcache.

    systemctl start memcached && systemctl enable memcached
  5. Setup bundletool for Android App Bundle

I don't need a keystore to re-sign the APK, so I'll skip it.

  1. Configuration


  1. Copy config / mfw_serverenv_config_sample.php and replace$ serverenv_config ['ec2'] ['database'] ['authfile']with the path of the dbauth file created in 5.

    cd /var/www/html/emlauncher/config
    cp mfw_serverenv_config_sample.php mfw_serverenv_config.php
    vim mfw_serverenv_config.php

Rewrite the dbauth file path.

'authfile' => '/var/www/html/dbauth',


  1. Create a storage directory.

    mkdir /var/www/html/emlauncher-files
  2. Adjust the permissions so that Apache can access the storage directory.

    chown -R apache:apache /var/www/html/emlauncher-files
  3. Copy config / emlauncher_config_sample.php and rewrite it for your environment.

    cd /var/www/html/emlauncher/config
    cp emlauncher_config_sample.php emlauncher_config.php
    vim emlauncher_config.php

Modify as follows.

'storage_class' => 'LocalFile',
'path' => '/var/www/html/emlauncher-files',  
'url_prefix' => '../../../emlauncher-files',
  1. Complete

When the EM Launcher login page "http: // virtual machine address (192.168.xxx.xxx) /emlauncher/web/login" is displayed on your browser, the installation of EM Launcher is complete.

How to register as a user

  1. Connect to Mysql. The password is the password set in dbauth.

    mysql -u emlauncher -p emlauncher
  2. Register the user's mail in the ʻuser_pass` table.

    INSERT INTO user_pass (mail) VALUES ('[email protected]');

__ * Please replace [email protected] with your own email and execute. __

  1. Exit from Mysql.

  2. Reset your password from forgot password on the EM Launcher login page.

About sending emails

-EMLauncher uses sendmail, so please install and set postfix so that you can send emails.

  1. Install postfix.

    dnf -y install postfix
  2. Enable postfix.

    systemctl start postfix && systemctl enable postfix

-If the error "mb_send_mail faild" is displayed when sending an email, disable SELinux.

  1. Temporarily disable SELinux.

    setenforce 0
  2. Disable it permanently by editing the SELinux configuration file.

    vim /etc/selinux/config

Change SELINUX from ʻenforcing to disable. SELINUX=disable`

・ If you sent an email but did not receive it

In my case, it was caused by Outbound Port 25 Blocking, so I solved it by forwarding it with Gmail.

  1. To transfer from Postfix, enable "Insecure App Access" on the Security Settings Page of your Gmail account for forwarding.

  2. Add the setting to forward by Gmail to the postfix configuration file.

    vim /etc/postfix/main.cf

Add the following settings at the very end.

# Gmail
relayhost = [smtp.gmail.com]:587  
smtp_use_tls = yes  
smtp_tls_CApath = /etc/pki/tls/certs/ca-bundle.crt  
smtp_sasl_auth_enable = yes  
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd  
smtp_sasl_tls_security_options = noanonymous  
smtp_sasl_mechanism_filter = plain  
  1. Set up your Gmail account information for forwarding.

    vim /etc/postfix/sasl_passwd

Replace the email and password below with the contents below. [smtp.gmail.com]:587 [email protected]:password

  1. Create a database from your Gmail account information file.

    postmap hash:/etc/postfix/sasl_passwd
  2. Delete the file containing your Gmail account and password.

    rm -f /etc/postfix/sasl_passwd
  3. Restart psotfix.

    systemctl restart postfix

Recommended Posts

Steps to deploy EMLauncher on CentOS 8
Steps to install MySQL 8.0 on CentOS 8.1
Steps to install VirtualBox on CentOS
Steps to install matplotlib on Mac
How to deploy django-compressor on Windows
How to install PyPy on CentOS
How to install TensorFlow on CentOS 7
How to install Maven on CentOS
Steps to install python3 on mac
Steps to install Python environment on Ubuntu
Connecting from python to MySQL on CentOS 6.4
How to switch mouse operations on CentOS
How to update security on CentOS Linux 8
How to install Apache (httpd) on CentOS7
Deploy CentOS 6.10 x86_64 on VMware vSphere ESXi 5.5
How to install Eclipse GlassFish 5.1.0 on CentOS 7
How to install Apache (httpd) on CentOS8
Steps to install CentOS 8.1 in Virtual Box
Steps to build PyTorch 1.5 for CUDA 10.2 on Windows
Install Faiss on CentOS 7
How to deploy a Django application on Alibaba Cloud
Steps to install the latest Python on your Mac
Install numba on CentOS 7.2
What to do if SciPy installation fails on CentOS
How to install Git GUI and Gitk on CentOS
Steps to measure coverage and get badges on codecov.io
Install Python3.4 on CentOS 6.6
[Note] How to give sudo authority to user on CentOS
Introducing Python 2.7 to CentOS 6.6
Install mecab-python on CentOS
Install Python 2.7.3 on CentOS 5.4
Installation on CentOS8 VirtualBox
I want to restart CentOS 8 on time every day.
Install awscli on centos7
Install Chainer on CentOS 6.7
Torque setup on CentOS 6
How to install Python2.7 python3.5 with pyenv (on RHEL5 CentOS5) (2016 Nov)
How to deploy the easiest python textbook pybot on Heroku
Connect to centos6 on virtualbox with ssh connection from Mac
To deploy Java application on VPS (Apache / Tomcat installation / linkage)
Introduced Jupyter Notebook to CentOS 7
Setting up grub on CentOS 8
Until docker-compose up on CentOS7
Implemented retina net on CentOS
Anaconda environment construction on CentOS7
Install ImageMagick-6.2.x series on CentOS7.7
Install Python 3.8 on CentOS 7 (SCL)
Apache installation fails on CentOS 8.2
Deploy masonite app on Heroku 2020
How to register on pypi
python-social-auth v0.2 to v0.3 migration steps
Update python on Mac to 3.7-> 3.8
Simple traffic monitor on CentOS
Install Chrome on CentOS 7 series
Switch from python2.7 to python3.6 (centos7)
Install Python 3.8 on CentOS 8 (AppStream)
Deploy django project to heroku
Notes on installing Python on CentOS
Freetype2 support not available on PIL when trying to blockdiag on CentOS6.5
The day Chainer runs on GPU CentOS edition (up to CPU)
How to deploy a Django app on heroku in just 5 minutes