Skip to content
On this page

搭建 LAMP

php

sudo apt update

sudo apt -y install lsb-release apt-transport-https ca-certificates 
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list

sudo apt install php7.4
sudo apt install libapache2-mod-php7.4 php7.4-mysql

mysql

sudo apt update
sudo apt install mariadb-server

sudo systemctl start mariadb

sudo mysql_secure_installation

創建 mysql 數據庫/用戶/賦權

create database ego_hera;
create user 'newuser'@'localhost' IDENTIFIED BY 'user_password';
GRANT ALL PRIVILEGES ON ego_hera.* TO 'newuser'@'localhost';

Murmur

环境: Debian 10

安装 mumble

sudo apt install mumble-server

配置 mumble-server.ini

假设在 /etc/mumble-server.ini

cd /etc
sudo vim mumble-server.ini

可以自行配置

welcometext=
port=
serverpassword=
bandwidth=
users=
registerName=

重启 mumble-server

sudo systemctl restart mumble-server

创建:Lau
时间:2021/08/24

安装配置 wordpress

1. 安裝 wordpress

複製 dev.e-gomobility.com伺服器下 /var/www/html 內容(license文件夾除外)

2. 配置 phpmyadmin

複製 phpmyadmin database ego

3. (optional)

清空某些 table 的內容( xt前綴、app前綴 以及 mumble前綴 的 table),或者在 cms 中刪除(user、team、channel)

IcePHP for Murmur

版本: 3.7.5

环境: Debian 10

1. 安装 Ice for PHP

Configure APT repository

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv B6391CB2CFBA643D
sudo apt-add-repository "deb http://zeroc.com/download/ice/3.7/debian10 stable main"
sudo apt-get update

如果 提示 apt-add-repository: command not found, 先执行

sudo apt-get install software-properties-common

Install Ice for PHP

sudo apt-get install php-zeroc-ice

Install Slice compilers

sudo apt-get install zeroc-ice-compilers

2. 将 Murmur.php 移动/复制到 php 的 include_path 目录

查看 include_path 目录

php -i | grep include_path
// 以下假设目录是 /usr/share/php

Murmur.ice (一般在 /usr/share/slice 下) 移动到 ice 目录下 (/usr/share/ice/slice)

mv /usr/share/slice/Murmur.ice /usr/share/ice/slice/Murmur.ice

Murmur.ice 转换为 Murmur.php

slice2php -I/usr/share/ice/slice /usr/share/ice/slice/Murmur.ice

将生成的 Murmur.php 移动到 php 的 include_path 目录

mv /usr/share/ice/slice/Murmur.php /usr/share/php/Murmur.php

3. 配置 php.ini

假设在 /etc/php/7.3/apache2/php.ini

cd /etc/php/7.3/apache2
sudo vim php.ini

php.ini 中添加以下行

extension=IcePHP.so
ice.slice=/usr/share/ice/slice/Murmur.ice

重启 apache2

sudo systemctl reload apache2

4. 配置 mumble-server.ini

假设在 /etc/mumble-server.ini

cd /etc
sudo vim mumble-server.ini

找到并配置

ice="tcp -h 127.0.0.1 -p 6502"

注释掉以下内容 (方便 icePHP 調用 mumble 的方法,所以注释掉)

;icesecretread=
;icesecretwrite=

重启 mumble server

sudo systemctl restart mumble-server

5. 查看 phpinfo(), 如果 ice extension 正常,可以开始使用

创建:Lau
时间:2021/08/24

配置 license

1. 安裝 cms

複製 dev.e-gomobility.com/cms /var/www/html 下的 assetscmsuser 文件夹

2. 創建 license 用戶

登入 arke1.e-gomobility.com/license 新增 客户(假设 login=demo,password=123456)

3. 配置 license 用戶名

/var/www/html 下找到 index.php,添加以下内容(即 license 的用戶名,之後會被加密,用戶只能更改密碼)

define( 'ARKE_LICENSE_LOGIN', "demo" );

4. 配置 license 用戶密碼

/var/www/html 下创建 arke-lic.json 文件,内容如下(此文件不會被加密,更改密碼後需修改這個文件)

{
  "password": "123456",
  "license_server": "https://arke1.e-gomobility.com/api/"
}

5. 自動驗證

crontab -e

添加

0 0 * * *  /usr/bin/php /var/www/html/wp-content/themes/ego/cron.php

6. single port 的需要手动访问一次以下 api

[domain]/api/?c=Server&a=getList&v=1&keyword=&debugmod=3

假设 domain 是 https://dev.e-gomobility.com/

https://dev.e-gomobility.com/api/?c=Server&a=getList&v=1&keyword=&debugmod=3

创建:Lau
时间:2021/08/24

Released under the MIT License.