#
写在前面
什么是Radxa?
它是一块ARM开发板,可以运行基于Ubuntu的Linux系统,功率低(一般状态不到3W),可以放在家里做个常开的Linux服务器。更多信息,可以看看这篇[Radxa折腾小记](http://atjason.com/519.html),或者到其[官网](http://radxa.com/)了解
什么是AMH?
国内首个免费开源虚拟主机面板。更多信息,可以到其[官网](http://amysql.com/AMH.htm)了解
#
安装过程遇到的问题及解决办法
正常运行amh.sh,得到如下错误:
[Error] Your system is not supported install AMH
more
编辑amh.sh,找到“Your system is not supported install AMH”,在上面添加“SysName='ubuntu';”(因为Radxa事实上运行的就是Linaro 13.09(基于Ubuntu 13.04),不过是ARM版的)
egrep -i "ubuntu" /etc/issue && SysName='ubuntu';
SysName='ubuntu';
[ “$SysName” == ‘’ ] && echo ‘[Error] Your system is not supported install AMH' && exit;
此时amh.sh可以运行,按正常模式安装,结束后得到如下错误:
Sorry, Failed to install AMH
Please contact us: http://amysql.com
查看amh.log,发现有如下关于"libiconv"的错误内容:
./stdio.h:1010:1: error: ‘gets’ undeclared here (not in a function)
make[2]: * [progname.o] Error 1
make[2]: Leaving directory `/home/amh_install/packages/untar/libiconv-1.14/srclib'
对于这个问题,参照[这个解决方案](http://amysql.com/bbs/forum.php?mod=viewthread&tid=2610)
另外的关于"mysql"的错误:
[ 72%] Building C object libmysql/CMakeFiles/clientlib.dir/__/sql-common/client_plugin.c.o
/home/amh_install/packages/untar/mysql-5.5.34/sql-common/client_plugin.c: In function ‘mysql_client_plugin_init’:
/home/amh_install/packages/untar/mysql-5.5.34/sql-common/client_plugin.c:252:5: error: incompatible type for argument 5 of ‘add_plugin’
/home/amh_install/packages/untar/mysql-5.5.34/sql-common/client_plugin.c:120:1: note: expected ‘va_list’ but argument is of type ‘int’
/home/amh_install/packages/untar/mysql-5.5.34/sql-common/client_plugin.c: In function ‘mysql_client_register_plugin’:
/home/amh_install/packages/untar/mysql-5.5.34/sql-common/client_plugin.c:310:5: error: incompatible type for argument 5 of ‘add_plugin’
/home/amh_install/packages/untar/mysql-5.5.34/sql-common/client_plugin.c:120:1: note: expected ‘va_list’ but argument is of type ‘int’
make[2]: * [libmysql/CMakeFiles/clientlib.dir/__/sql-common/client_plugin.c.o] Error 1
make[1]: * [libmysql/CMakeFiles/clientlib.dir/all] Error 2
make: * [all] Error 2
原因:其实是变量类型的问题,具体不多解释。解决办法:
编辑“/home/amh_install/packages/untar/mysql-5.5.34/sql-common/client_plugin.c”,搜索“mysql_client_plugin_init()”,在{下面添加一行:
va_list dummy;
向下搜索“add_plugin(&mysql, *builtin, 0, 0, 0)”,将其替换为“add_plugin(&mysql, *builtin, 0, 0, dummy)”
搜索“mysql_client_register_plugin(MYSQL”,在{下面添加一行:
va_list dummy;
向下搜索“plugin= add_plugin(mysql, plugin, 0, 0, 0)”,将其替换为“plugin= add_plugin(mysql, plugin, 0, 0, dummy)”
完成以上的手动打补丁,修改amh.sh,注释掉mysql的下载、解压步骤:
#Downloadfile "${MysqlVersion}.tar.gz" "http://code.amysql.com/files/${MysqlVersion}.tar.gz";
#rm -rf $AMHDir/packages/untar/$MysqlVersion;
#echo "tar -zxf ${MysqlVersion}.tar.gz ing...";
#tar -zxf $AMHDir/packages/$MysqlVersion.tar.gz -C $AMHDir/packages/untar;
另外,对于已经能成功安装的组件,可用上面类似的办法注释掉下载、解压步骤,这样下次运行安装脚本时就不需要重新下载、解压、编译,节约时间。如注释掉php相关的:
#Downloadfile "${PhpVersion}.tar.gz" "http://code.amysql.com/files/${PhpVersion}.tar.gz";
#rm -rf $AMHDir/packages/untar/$PhpVersion;
#echo "tar -zxf ${PhpVersion}.tar.gz ing...";
#tar -zxf $AMHDir/packages/$PhpVersion.tar.gz -C $AMHDir/packages/untar;
重新运行amh.sh,一切正常。访问http://IP:8888并登陆,一切正常
EndFragment