Linux+XAMPP+eolinker开源版v3.2.4

版权声明: https://blog.csdn.net/shijianzhihu/article/details/79932464

eolinker 是一个由国人开源的接口管理系统(AMS),特性及介绍详见开源中国-eolinker首页.

搭建步骤参考:eolinker开源指南

系统环境:CentOS Linux release 7.3.1611 x86_64 GNU/Linux

工具准备

  • eolinker开源版(码云):git clone https://gitee.com/eoLinker-API-Management/eoLinker-OS_3.X-CHN.git

  • xampp
    选择XAMPP for Linux(7.2.1 / PHP 7.2.1)

    下载完成后是一个.run文件。

安装XAMPP

  1. 将下载完成的xampp和eolinker.zip上传到服务器;
  2. 给xampp安装包赋予可执行的权限;
chmod 777 xampp-linux-x64-7.2.1-0-installer.run
  1. 运行./chmod 777 xampp-linux-x64-7.2.1-0-installer.run 进行安装操作,安装过程遇到确认的地方都选择Y;
    image.png

配置lampp全局可见:cp /opt/lampp/lampp /usr/bin/lampp
配置xampp-mysql全局可见:sudo ln -s /opt/lampp/bin/mysql /usr/bin
4. 启动XAMPP

#启动
lampp start 或 /opt/lampp/lampp satrt
#关闭
lampp stop
#重启
lampp restart
#卸载
rm -rf /opt/lampp/

  1. 访问测试
    • 在浏览器中输入服务器IP地址后回车,可以查看XAMPP首页;
      dashboard
    • 服务器新建php文件:vi /opt/lampp/htdocs/phpinfo.php,输入以下代码后,:wq保存;
<?
phpinfo();
?>

浏览器地址中输入:服务器IP/phpinfo.php,正常情况下,会显示以下页面:

在页面上搜索,可以发现,php默认已经安装并启用了mbstring,curl,pdo拓展,eolinker依赖这些模块;

  1. 设置mysql允许外部连接
    xampp安装的mysql root用户默认是没有密码的,首先进入mysql:
#这里没有密码,直接回车
[root@rethink] /opt/lampp/bin/mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.1.30-MariaDB Source distribution

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> set password =password('your passwd');
Query OK, 0 rows affected (0.00 sec)

#设置完成后,还需要给root用户开放权限:
MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'your passwd' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> \q;
Bye

还需要修改phpmyadmin的配置文件:vi /opt/lampp/phpmyadmin/config.inc.php

$cfg['Servers'][$i]['password'] = ''; 设置成刚才修改的root密码,保存后关闭,重启xampp:lampp restart

  1. 访问phpMyAdmin
    在浏览器中输入:服务器IP/phpmyadmin/, 可能会出现Access forbidden,按照提示信息修改配置文件httpd-xampp.conf:
    vi /opt/lampp/etc/extra/httpd-xampp.conf

在第21行加上一句Require all granted,然后重启xammp服务:lampp restart, 就可以实现远程访问了。

phpMyAdmin页面如下:

部署eolinker

  1. /opt/lampp/htdocs/目录下新建目录:mkdir eolinker,将eolinker压缩包移动到此目录下,然后解压:unzip eolinker_os_3.2.4.zip
  2. 项目目录需要具有完全的读写权限(777),用于写入配置文件。
    chmod -R 777 /opt/lampp/htdocs/eolinker/
  3. 新建一个数据库,用于存储项目数据。可以通过phpMyAdmin新建,也可以通过命令行新建;

    下面是通过命令行创建:
$ /opt/lampp/bin/mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 128
Server version: 10.1.30-MariaDB Source distribution

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database eolinker_os;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| eolinker_os        |
| information_schema |
| mysql              |
| performance_schema |
| phpmyadmin         |
| test               |
+--------------------+
6 rows in set (0.00 sec)

MariaDB [(none)]> \q;
Bye
  1. 浏览器访问项目:服务器IP/eolinker/,出现以下引导页面:

根据指引页面提示,输入相应数据库信息并通过环境监测后,即可安装成功。

猜你喜欢

转载自blog.csdn.net/shijianzhihu/article/details/79932464