在Vagrant/CentOS环境中尝试使用EMLauncher(尚未完成)
引起
我没有机会制作应用程序,但我的工作涉及“基础设施”,所以我想获取各种环境配置的知识。
因此,我将尝试构建KLab公司发布的针对Android/iOS平台的测试应用程序分发工具「EMLauncher」。
“EMLauncher 是什么?” (EMLauncher is what?)
Android/iOS的测试应用程序分发工具。这是一个使用PHP编写的开源软件,采用MIT许可证,同时也提供上传API。
原始材料:MOBILE TOUCH / EMLauncher – 快速评测!用以替代Testflight的iOS/Android应用分发平台。
・KLab公司新闻发布 / KLab发布了Android/iOS测试应用发布工具「EMLauncher」的源代码
・GitHub代码库 / KLab/emlauncher
安装
由于没有测试应用程序,所以只能在查看Github的README文件的同时进行构建的确认。
环境:Mac OSX 10.9.2 / Vagrant 1.5.4 / CentOS release 6.5
1. 安装各种软件包
$ sudo yum install php php-pdo php-mysql httpd memcached php-pecl-memcache php-mbstring php-pecl-imagick git
// READMEでは、mysql55-serverと記載されていますが、
// CentOS6.5では入らないので、epelとremiレポジトリを追加。
$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
$ sudo yum install mysql-server --enablerepo=remi
$ sudo git clone https://github.com/KLab/emlauncher.git
$ cd emlauncher/
2. 设定
// registered for pathと出てくるけど、大丈夫っぽい?
$ sudo git submodule init
Submodule 'libs/CFPropertyList' (https://github.com/rodneyrehm/CFPropertyList.git) registered for path 'libs/CFPropertyList'
Submodule 'mfw' (https://github.com/makiuchi-d/mfw.git) registered for path 'mfw'
$ sudo git submodule update
// Apacheがファイルにアクセスできるようにパーミッションを変更。
// (これで合ってるか不安w)
$ sudo chown -R apache:apache emlauncher/
$ sudo chmod -R 755 emlauncher/
这次放在了/var/www/html/emlauncher/,所以可以省略Apache的设置。
由于我对PHP的知识不了解,所以无法做出任何调整来实现登录功能。
DocumentRoot "/path/to/emlauncher/web"
SetEnv MFW_ENV 'ec2'
<Directory "/path/to/emlauncher/web">
AllowOverride All
</Directory>
$ sudo service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
[ OK ]
$ sudo chkconfig httpd on
尽管有一条信息出现,但在Vagrant中它每次都是相同的内容,因此应该不会对测试产生影响,所以我们可以省略。
数据库的设定,但因为更改了权限,所以要变成root。
// まずdbauthというファイルを作成し、DBのユーザ名、パスワードを記述しておく。
// 今回は動くことを第一に。セキュリティはテストなので考えない。
# echo 'emlauncher:password' > /var/www/html/dbauth
// /path/to/emlauncher/data/sql/database.sql にあるパスワードを修正。
# vi data/sql/database.sql
# service mysqld start
# chkconfig mysqld on
// DB設定をMySQLに流し込む。
# mysql -uroot < /path/to/emlauncher/data/sql/database.sql
# mysql -uroot emlauncher < /path/to/emlauncher/data/sql/tables.sql
然后,启动Memcache。
# service memcached start
# chkconfig memcached on
设置PHP的数据库访问等。
嗯(果然吗?)是EC2规格呢w 做到这一步了,不知道能不能在本地运行…
# cp config/mfw_serverenv_config_sample.php config/mfw_serverenv_config.php
// /** DBの ユーザ名:パスワード が書かれたファイル */の箇所を修正。
# vi mfw_serverenv_config.php
# cp config/emlauncher_config_sample.php config/emlauncher_config.php
所以,最后它动起来了!
只是登录无法完成。
因为似乎也没有测试用的用户,而且进展也不明确,所以这次就到此为止吧。
对于错误,虽然可以采取一些措施来应对,但还需要培养新的创造力!