20180318更新:上一个系统被我玩坏了(大概 只能再重新装一遍了
①修改了配置文件的编辑方式(系统被玩坏可能就是因为这个原因
之前是直接修改/etc/profile
,才发现文件的头部有这么一段提示
# It's NOT a good idea to change this file unless you know what you
# are doing. It's much better to create a custom.sh shell script in
# /etc/profile.d/ to make custom changes to your environment, as this
# will prevent the need for merging in future updates.
替代解决方案:在/etc/profile.d/
目录下创建设置环境变量的shell脚本,然后系统打开的时候就会自动加载对应的环境变量;不需要的某个环境变量时,删除对应shell脚本即可
重新打开系统的时候环境变量才会生效(xshell下的话,新开一个连接即可)
②修改了部分库的安装方式 不知道为什么有些包用yum搜不到了 之前明明可以的
openstf项目开源地址:
https://github.com/openstf/stf/
安装环境为物理机,win7/linux双系统,Linux为Centos7
第一步,安装nodejs
linux下安装nodejs有四种方式:
1.源码安装
2.使用已编译版本安装
3.使用yum安装
4.使用apt-get安装
这里选择了第二种方法,优势是可以尽早使用最新的版本
方法二,使用已编译版本安装
1.首先从官网下载已经编译好的文件 nodejs官网下载地址
[root@localhost ~]# wget https://nodejs.org/dist/v9.4.0/node-v9.4.0-linux-x64.tar.xz
中间替换为自己需要的版本
网上大多教程中间的版本号为v0.10.28
,可以说是非常古老的版本了
2.下载完成后,进行解压
[root@localhost ~]# xz -d **.tar.xz
[root@localhost ~]# tar -xv -f **.tar
//或者
[root@localhost ~]# tar -Jxv -f **.tar.xz (大写的J)
解压完成后,目录下新增一个名为node-v9.4.0-linux-x64
的文件夹
3.建立软连接
//先将解压出来的文件移动到一个安全的位置防止误删
[root@localhost ~]# mv node-v9.4.0-linux-x64/ /usr/local/nodejs
[root@localhost ~]# ln -s /usr/local/nodejs/bin/node /usr/local/bin
[root@localhost ~]# ln -s /usr/local/nodejs/bin/npm /usr/local/bin
4.验证
在任意目录下输入node -v
返回v9.4.0
即为安装成功(当前时间为2018年1月29日19:57:27)
方法三,使用yum安装
0.卸载已有的老版本
[root@localhost ~]# yum remove -y nodejs npm
1.yum下载及安装
[root@localhost ~]# yum install -y nodejs
然后系统会开始自动下载及安装相关依赖,yum默认安装的路径为/usr/bin
2.建立软连接
[root@localhost ~]# ln -s /usr/bin/node /usr/local/bin
[root@localhost ~]# ln -s /usr/bin/npm /usr/local/bin
3.验证
在任意目录下输入node -v
返回v6.12.2
即为安装成功(当前时间为2018年1月29日19:58:59)
可以看到通过yum安装的仍是较老的版本
第二步,安装Android SDK
安装Android SDK之前,要先安装jdk
三种安装方式:
①下载jdk压缩包解压 ②yum ③rpm
这里选用的是方法①
0.检查系统是否自带了openJDK以及相关安装包,如果有的话则先将其卸载
[root@localhost ~]# rpm -qa | grep java
如果发现有安装好的openJDK以及安装包那么依次执行卸载
[root@localhost ~]# rpm -e --nodeps tzdata-java-2017c-1.el7.noarch
[root@localhost ~]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.161-2.6.12.0.el7x86_64
1.下载jdk安装包并上传至Linux
因为在linux中直接使用curl
或者wget
下载jdk安装包会被重定向,所以我们要先在windows里先下载好所需的安装包再上传到linux中 jdk1.8官网下载地址 jdk1.9官网下载地址
我这里下载的包是:jdk-8u161-linux-x64.tar.gz
空白的linux系统默认是没有上传/下载命令的 所以还要先安装对应的包
[root@localhost ~]# yum install -y lrzsz
安装完成后,即可使用rz(上传)/sz(下载)命令了
2.解压安装
对安装包执行解压
[root@localhost ~]# tar -zxvf jdk-8u161-linux-x64.tar.gz
解压出来一个文件夹jdk1.8.0_161
//和nodejs一样先将解压出来的文件移到一个安全的位置
[root@localhost ~]# mv jdk1.8.0_161/ /usr/local/java
3.配置环境变量
创建shell脚本,并写入内容
[root@localhost ~]# vim /etc/profile.d/java.sh
#set java environment
export JAVA_HOME=/usr/local/java/
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
4.验证
在任意目录下输入java -version
,返回
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
与所安装的包版本对应即为安装成功
接着来安装Android SDK
1.下载sdktools并解压 官网页面地址 该页面访问需要科 学 上 网
[root@localhost ~]# wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
[root@localhost ~]# unzip sdk-tools-linux-3859397.zip
如果提示-bash: unzip: 未找到命令
,则需要先安装zip和unzip应用
[root@localhost ~]# yum install -y zip unzip
解压出来一个文件夹tools
//和之前一样先将解压出来的文件移到一个安全的位置
[root@localhost ~]# mkdir /usr/local/android-sdk/
[root@localhost ~]# mv tools/ /usr/local/android-sdk/tools
2.配置环境变量
新建环境变量配置shell/etc/profile.d/androidsdk.sh
,并输入环境配置
[root@localhost ~]# vim /etc/profile.d/androidsdk.sh
#set android_sdk environment
export PATH=$PATH:/usr/local/android-sdk/tools/bin
3.查看sdk管理
[root@localhost ~]# sdkmanager --list
Warning: File /root/.android/repositories.cfg could not be loaded.
Installed packages:
Path | Version | Description | Location
------- | ------- | ------- | -------
tools | 26.0.1 | Android SDK Tools 26.0.1 | tools/
Available Packages:
Path | Version | Description
------- | ------- | -------
add-ons;addon-g..._apis-google-15 | 3 | Google APIs
add-ons;addon-g..._apis-google-16 | 4 | Google APIs
add-ons;addon-g..._apis-google-17 | 4 | Google APIs
add-ons;addon-g..._apis-google-18 | 4 | Google APIs
add-ons;addon-g..._apis-google-19 | 20 | Google APIs
add-ons;addon-g..._apis-google-21 | 1 | Google APIs
add-ons;addon-g..._apis-google-22 | 1 | Google APIs
add-ons;addon-g..._apis-google-23 | 1 | Google APIs
add-ons;addon-g..._apis-google-24 | 1 | Google APIs
add-ons;addon-g...e_gdk-google-19 | 11 | Glass Development Kit Preview
build-tools;19.1.0 | 19.1.0 | Android SDK Build-Tools 19.1
build-tools;20.0.0 | 20.0.0 | Android SDK Build-Tools 20
build-tools;21.1.2 | 21.1.2 | Android SDK Build-Tools 21.1.2
build-tools;22.0.1 | 22.0.1 | Android SDK Build-Tools 22.0.1
build-tools;23.0.1 | 23.0.1 | Android SDK Build-Tools 23.0.1
build-tools;23.0.2 | 23.0.2 | Android SDK Build-Tools 23.0.2
build-tools;23.0.3 | 23.0.3 | Android SDK Build-Tools 23.0.3
build-tools;24.0.0 | 24.0.0 | Android SDK Build-Tools 24
build-tools;24.0.1 | 24.0.1 | Android SDK Build-Tools 24.0.1
build-tools;24.0.2 | 24.0.2 | Android SDK Build-Tools 24.0.2
build-tools;24.0.3 | 24.0.3 | Android SDK Build-Tools 24.0.3
build-tools;25.0.0 | 25.0.0 | Android SDK Build-Tools 25
build-tools;25.0.1 | 25.0.1 | Android SDK Build-Tools 25.0.1
build-tools;25.0.2 | 25.0.2 | Android SDK Build-Tools 25.0.2
build-tools;25.0.3 | 25.0.3 | Android SDK Build-Tools 25.0.3
build-tools;26.0.0 | 26.0.0 | Android SDK Build-Tools 26
build-tools;26.0.1 | 26.0.1 | Android SDK Build-Tools 26.0.1
build-tools;26.0.2 | 26.0.2 | Android SDK Build-Tools 26.0.2
build-tools;26.0.3 | 26.0.3 | Android SDK Build-Tools 26.0.3
build-tools;27.0.0 | 27.0.0 | Android SDK Build-Tools 27
build-tools;27.0.1 | 27.0.1 | Android SDK Build-Tools 27.0.1
build-tools;27.0.2 | 27.0.2 | Android SDK Build-Tools 27.0.2
build-tools;27.0.3 | 27.0.3 | Android SDK Build-Tools 27.0.3
cmake;3.6.4111459 | 3.6.4111459 | CMake 3.6.4111459
docs | 1 | Documentation for Android SDK
emulator | 27.0.5 | Android Emulator
extras;android;gapid;1 | 1.0.3 | GPU Debugging tools
extras;android;gapid;3 | 3.1.0 | GPU Debugging tools
extras;android;m2repository | 47.0.0 | Android Support Repository
extras;google;auto | 1.1 | Android Auto Desktop Head Unit...
extras;google;g...e_play_services | 46 | Google Play services
extras;google;instantapps | 1.1.0 | Instant Apps Development SDK
extras;google;m2repository | 58 | Google Repository
extras;google;m...t_apk_expansion | 1 | Google Play APK Expansion library
extras;google;market_licensing | 1 | Google Play Licensing Library
extras;google;simulators | 1 | Android Auto API Simulators
extras;google;webdriver | 2 | Google Web Driver
extras;m2reposi...ut-solver;1.0.0 | 1 | Solver for ConstraintLayout 1.0.0
extras;m2reposi...er;1.0.0-alpha2 | 1 | com.android.support.constraint...
extras;m2reposi...er;1.0.0-alpha3 | 1 | com.android.support.constraint...
extras;m2reposi...er;1.0.0-alpha4 | 1 | com.android.support.constraint...
extras;m2reposi...er;1.0.0-alpha5 | 1 | Solver for ConstraintLayout 1....
extras;m2reposi...er;1.0.0-alpha6 | 1 | Solver for ConstraintLayout 1....
extras;m2reposi...er;1.0.0-alpha7 | 1 | Solver for ConstraintLayout 1....
extras;m2reposi...er;1.0.0-alpha8 | 1 | Solver for ConstraintLayout 1....
extras;m2reposi...er;1.0.0-alpha9 | 1 | Solver for ConstraintLayout 1....
extras;m2reposi...ver;1.0.0-beta1 | 1 | Solver for ConstraintLayout 1....
extras;m2reposi...ver;1.0.0-beta2 | 1 | Solver for ConstraintLayout 1....
extras;m2reposi...ver;1.0.0-beta3 | 1 | Solver for ConstraintLayout 1....
extras;m2reposi...ver;1.0.0-beta4 | 1 | Solver for ConstraintLayout 1....
extras;m2reposi...ver;1.0.0-beta5 | 1 | Solver for ConstraintLayout 1....
extras;m2reposi...ut-solver;1.0.1 | 1 | Solver for ConstraintLayout 1.0.1
extras;m2reposi...ut-solver;1.0.2 | 1 | Solver for ConstraintLayout 1.0.2
extras;m2reposi...nt-layout;1.0.0 | 1 | ConstraintLayout for Android 1...
extras;m2reposi...ut;1.0.0-alpha2 | 1 | com.android.support.constraint...
extras;m2reposi...ut;1.0.0-alpha3 | 1 | com.android.support.constraint...
extras;m2reposi...ut;1.0.0-alpha4 | 1 | com.android.support.constraint...
extras;m2reposi...ut;1.0.0-alpha5 | 1 | ConstraintLayout for Android 1...
extras;m2reposi...ut;1.0.0-alpha6 | 1 | ConstraintLayout for Android 1...
extras;m2reposi...ut;1.0.0-alpha7 | 1 | ConstraintLayout for Android 1...
extras;m2reposi...ut;1.0.0-alpha8 | 1 | ConstraintLayout for Android 1...
extras;m2reposi...ut;1.0.0-alpha9 | 1 | ConstraintLayout for Android 1...
extras;m2reposi...out;1.0.0-beta1 | 1 | ConstraintLayout for Android 1...
extras;m2reposi...out;1.0.0-beta2 | 1 | ConstraintLayout for Android 1...
extras;m2reposi...out;1.0.0-beta3 | 1 | ConstraintLayout for Android 1...
extras;m2reposi...out;1.0.0-beta4 | 1 | ConstraintLayout for Android 1...
extras;m2reposi...out;1.0.0-beta5 | 1 | ConstraintLayout for Android 1...
extras;m2reposi...nt-layout;1.0.1 | 1 | ConstraintLayout for Android 1...
extras;m2reposi...nt-layout;1.0.2 | 1 | ConstraintLayout for Android 1...
lldb;2.0 | 2.0.2558144 | LLDB 2.0
lldb;2.1 | 2.1.2852477 | LLDB 2.1
lldb;2.2 | 2.2.3271982 | LLDB 2.2
lldb;2.3 | 2.3.3614996 | LLDB 2.3
lldb;3.0 | 3.0.4213617 | LLDB 3.0
ndk-bundle | 16.1.4479499 | NDK
patcher;v4 | 1 | SDK Patch Applier v4
platform-tools | 27.0.1 | Android SDK Platform-Tools
platforms;android-10 | 2 | Android SDK Platform 10
platforms;android-11 | 2 | Android SDK Platform 11
platforms;android-12 | 3 | Android SDK Platform 12
platforms;android-13 | 1 | Android SDK Platform 13
platforms;android-14 | 4 | Android SDK Platform 14
platforms;android-15 | 5 | Android SDK Platform 15
platforms;android-16 | 5 | Android SDK Platform 16
platforms;android-17 | 3 | Android SDK Platform 17
platforms;android-18 | 3 | Android SDK Platform 18
platforms;android-19 | 4 | Android SDK Platform 19
platforms;android-20 | 2 | Android SDK Platform 20
platforms;android-21 | 2 | Android SDK Platform 21
platforms;android-22 | 2 | Android SDK Platform 22
platforms;android-23 | 3 | Android SDK Platform 23
platforms;android-24 | 2 | Android SDK Platform 24
platforms;android-25 | 3 | Android SDK Platform 25
platforms;android-26 | 2 | Android SDK Platform 26
platforms;android-27 | 1 | Android SDK Platform 27
platforms;android-7 | 3 | Android SDK Platform 7
platforms;android-8 | 3 | Android SDK Platform 8
platforms;android-9 | 2 | Android SDK Platform 9
sources;android-15 | 2 | Sources for Android 15
sources;android-16 | 2 | Sources for Android 16
sources;android-17 | 1 | Sources for Android 17
sources;android-18 | 1 | Sources for Android 18
sources;android-19 | 2 | Sources for Android 19
sources;android-20 | 1 | Sources for Android 20
sources;android-21 | 1 | Sources for Android 21
sources;android-22 | 1 | Sources for Android 22
sources;android-23 | 1 | Sources for Android 23
sources;android-24 | 1 | Sources for Android 24
sources;android-25 | 1 | Sources for Android 25
sources;android-26 | 1 | Sources for Android 26
sources;android-27 | 1 | Sources for Android 27
system-images;a...ult;armeabi-v7a | 4 | ARM EABI v7a System Image
system-images;a...-10;default;x86 | 4 | Intel x86 Atom System Image
system-images;a...pis;armeabi-v7a | 5 | Google APIs ARM EABI v7a Syste...
system-images;a...google_apis;x86 | 5 | Google APIs Intel x86 Atom Sys...
system-images;a...ult;armeabi-v7a | 2 | ARM EABI v7a System Image
system-images;a...ult;armeabi-v7a | 4 | ARM EABI v7a System Image
system-images;a...15;default;mips | 1 | MIPS System Image
system-images;a...-15;default;x86 | 4 | Intel x86 Atom System Image
system-images;a...pis;armeabi-v7a | 5 | Google APIs ARM EABI v7a Syste...
system-images;a...google_apis;x86 | 5 | Google APIs Intel x86 Atom Sys...
system-images;a...ult;armeabi-v7a | 4 | ARM EABI v7a System Image
system-images;a...16;default;mips | 1 | MIPS System Image
system-images;a...-16;default;x86 | 5 | Intel x86 Atom System Image
system-images;a...google_apis;x86 | 5 | Google APIs Intel x86 Atom Sys...
system-images;a...ult;armeabi-v7a | 5 | ARM EABI v7a System Image
system-images;a...17;default;mips | 1 | MIPS System Image
system-images;a...-17;default;x86 | 3 | Intel x86 Atom System Image
system-images;a...pis;armeabi-v7a | 5 | Google APIs ARM EABI v7a Syste...
system-images;a...google_apis;x86 | 5 | Google APIs Intel x86 Atom Sys...
system-images;a...ult;armeabi-v7a | 4 | ARM EABI v7a System Image
system-images;a...-18;default;x86 | 3 | Intel x86 Atom System Image
system-images;a...pis;armeabi-v7a | 5 | Google APIs ARM EABI v7a Syste...
system-images;a...google_apis;x86 | 5 | Google APIs Intel x86 Atom Sys...
system-images;a...ult;armeabi-v7a | 5 | ARM EABI v7a System Image
system-images;a...-19;default;x86 | 6 | Intel x86 Atom System Image
system-images;a...pis;armeabi-v7a | 33 | Google APIs ARM EABI v7a Syste...
system-images;a...google_apis;x86 | 33 | Google APIs Intel x86 Atom Sys...
system-images;a...-tv;armeabi-v7a | 3 | Android TV ARM EABI v7a System...
system-images;a...;android-tv;x86 | 3 | Android TV Intel x86 Atom Syst...
system-images;a...ult;armeabi-v7a | 4 | ARM EABI v7a System Image
system-images;a...-21;default;x86 | 5 | Intel x86 Atom System Image
system-images;a...;default;x86_64 | 5 | Intel x86 Atom_64 System Image
system-images;a...pis;armeabi-v7a | 25 | Google APIs ARM EABI v7a Syste...
system-images;a...google_apis;x86 | 25 | Google APIs Intel x86 Atom Sys...
system-images;a...gle_apis;x86_64 | 25 | Google APIs Intel x86 Atom_64 ...
system-images;a...-tv;armeabi-v7a | 1 | Android TV ARM EABI v7a System...
system-images;a...;android-tv;x86 | 3 | Android TV Intel x86 Atom Syst...
system-images;a...ult;armeabi-v7a | 2 | ARM EABI v7a System Image
system-images;a...-22;default;x86 | 6 | Intel x86 Atom System Image
system-images;a...;default;x86_64 | 6 | Intel x86 Atom_64 System Image
system-images;a...pis;armeabi-v7a | 19 | Google APIs ARM EABI v7a Syste...
system-images;a...google_apis;x86 | 19 | Google APIs Intel x86 Atom Sys...
system-images;a...gle_apis;x86_64 | 19 | Google APIs Intel x86 Atom_64 ...
system-images;a...-tv;armeabi-v7a | 12 | Android TV ARM EABI v7a System...
system-images;a...;android-tv;x86 | 14 | Android TV Intel x86 Atom Syst...
system-images;a...ear;armeabi-v7a | 6 | Android Wear ARM EABI v7a Syst...
system-images;a...ndroid-wear;x86 | 6 | Android Wear Intel x86 Atom Sy...
system-images;a...-23;default;x86 | 10 | Intel x86 Atom System Image
system-images;a...;default;x86_64 | 10 | Intel x86 Atom_64 System Image
system-images;a...pis;armeabi-v7a | 26 | Google APIs ARM EABI v7a Syste...
system-images;a...google_apis;x86 | 26 | Google APIs Intel x86 Atom Sys...
system-images;a...gle_apis;x86_64 | 26 | Google APIs Intel x86 Atom_64 ...
system-images;a...;android-tv;x86 | 15 | Android TV Intel x86 Atom Syst...
system-images;a...fault;arm64-v8a | 7 | ARM 64 v8a System Image
system-images;a...ult;armeabi-v7a | 7 | ARM EABI v7a System Image
system-images;a...-24;default;x86 | 8 | Intel x86 Atom System Image
system-images;a...;default;x86_64 | 8 | Intel x86 Atom_64 System Image
system-images;a..._apis;arm64-v8a | 20 | Google APIs ARM 64 v8a System ...
system-images;a...pis;armeabi-v7a | 20 | Google APIs ARM EABI v7a Syste...
system-images;a...google_apis;x86 | 20 | Google APIs Intel x86 Atom Sys...
system-images;a...gle_apis;x86_64 | 20 | Google APIs Intel x86 Atom_64 ...
system-images;a...s_playstore;x86 | 19 | Google Play Intel x86 Atom Sys...
system-images;a...;android-tv;x86 | 9 | Android TV Intel x86 Atom Syst...
system-images;a...-cn;armeabi-v7a | 4 | China version of Android Wear ...
system-images;a...oid-wear-cn;x86 | 4 | China version of Android Wear ...
system-images;a...ear;armeabi-v7a | 3 | Android Wear ARM EABI v7a Syst...
system-images;a...ndroid-wear;x86 | 3 | Android Wear Intel x86 Atom Sy...
system-images;a..._apis;arm64-v8a | 11 | Google APIs ARM 64 v8a System ...
system-images;a...pis;armeabi-v7a | 11 | Google APIs ARM EABI v7a Syste...
system-images;a...google_apis;x86 | 11 | Google APIs Intel x86 Atom Sys...
system-images;a...gle_apis;x86_64 | 11 | Google APIs Intel x86 Atom_64 ...
system-images;a...s_playstore;x86 | 9 | Google Play Intel x86 Atom Sys...
system-images;a...;android-tv;x86 | 7 | Android TV Intel x86 Atom Syst...
system-images;a...oid-wear-cn;x86 | 4 | China version of Android Wear ...
system-images;a...ndroid-wear;x86 | 4 | Android Wear Intel x86 Atom Sy...
system-images;a...google_apis;x86 | 8 | Google APIs Intel x86 Atom Sys...
system-images;a...gle_apis;x86_64 | 8 | Google APIs Intel x86 Atom_64 ...
system-images;a...s_playstore;x86 | 7 | Google Play Intel x86 Atom Sys...
system-images;a...;android-tv;x86 | 2 | Android TV Intel x86 Atom Syst...
system-images;a...google_apis;x86 | 2 | Google APIs Intel x86 Atom Sys...
system-images;a...s_playstore;x86 | 2 | Google Play Intel x86 Atom Sys...
tools | 26.1.1 | Android SDK Tools
Available Updates:
ID | Installed | Available
------- | ------- | -------
tools | 26.0.1 | 26.1.1
done
4.安装所需的package,引号中的内容替换为上方列表中的项,其中的platform-tools是必装的(不装会导致adb命令无法调用)
[root@localhost ~]# sdkmanager "build-tools;26.0.0"
5.配置环境变量
安装好platform-tools之后,打开环境变量配置shell/etc/profile.d/androidsdk.sh
在shell的末尾添加如下内容
export PATH=$PATH:/usr/local/android-sdk/platform-tools
6.验证
在任意目录下输入adb version
,返回
Android Debug Bridge version 1.0.39
Version 0.0.1-4500957
Installed as /usr/local/android-sdk/platform-tools/adb
即为安装成功
对于中间执行命令时报错Warning: File /root/.android/repositories.cfg could not be loaded.
我们可以创建一个空白文件来屏蔽这个报错
执行命令
[root@localhost ~]# touch ~/.android/repositories.cfg
然后执行命令时就不会有这个报错了
第三步,安装RethinkDB
官网安装文档
简单粗暴的按照官方文档安装
[root@localhost ~]# wget http://download.rethinkdb.com/centos/7/`uname -m`/rethinkdb.repo -O /etc/yum.repos.d/rethinkdb.repo
[root@localhost ~]# yum install -y rethinkdb
安装好之后验证下
[root@localhost ~]# rethinkdb -v
rethinkdb 2.3.6 (GCC 4.8.3)
第四步,安装GraphicsMagick
1.安装依赖
[root@localhost ~]# yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel
2.下载安装包并上传 官网下载地址
我这里下载了GraphicsMagick-1.3.25.tar.gz
3.解压
[root@localhost ~]# tar -zxvf GraphicsMagick-1.3.25.tar.gz
解压出来一个文件夹GraphicsMagick-1.3.25
4.安装
[root@localhost ~]# cd GraphicsMagick-1.3.25
[root@localhost GraphicsMagick-1.3.25]# ./configure --prefix=/usr/local/GraphicsMagick //--prefix参数为指定安装路径
[root@localhost GraphicsMagick-1.3.25]# make
[root@localhost GraphicsMagick-1.3.25]# make install
5.配置环境变量
新建环境变量配置shell/etc/profile.d/GraphicsMagick.sh
,并输入环境配置
[root@localhost ~]# vim /etc/profile.d/GraphicsMagick.sh
#set GraphicsMagick environment
export GM_HOME=/usr/local/GraphicsMagick //要和上边的安装路径一致
export PATH=$PATH:$GM_HOME/bin
6.安装好之后验证下
[root@localhost ~]# gm version
GraphicsMagick 1.3.25 2016-09-05 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2016 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Feature Support:
Native Thread Safe yes
Large Files (> 32 bit) yes
Large Memory (> 32 bit) yes
BZIP no
DPS no
FlashPix no
FreeType yes
Ghostscript (Library) no
JBIG no
JPEG-2000 no
JPEG yes
Little CMS no
Loadable Modules no
OpenMP yes (201107)
PNG yes
TIFF yes
TRIO no
UMEM no
WebP no
WMF no
X11 no
XML no
ZLIB yes
Host type: x86_64-unknown-linux-gnu
Configured using the command:
./configure '--prefix=/usr/local/GraphicsMagick'
Final Build Parameters:
CC = gcc -std=gnu99
CFLAGS = -fopenmp -g -O2 -Wall -pthread
CPPFLAGS = -I/usr/include/freetype2
CXX = g++
CXXFLAGS = -pthread
LDFLAGS =
LIBS = -ltiff -lfreetype -ljpeg -lpng15 -lz -lm -lgomp -lpthread
第五步,安装ZeroMQ
1.下载安装包并上传 官网下载地址
我这里下载了zeromq-4.1.4.tar.gz
2.解压
[root@localhost ~]# tar zvxf zeromq-4.1.4.tar.gz
解压出来一个文件夹zeromq-4.1.4
3.安装
[root@localhost ~]# cd zeromq-4.1.4
[root@localhost zeromq-4.1.4]# ./configure --prefix=/usr/local/zeromq --without-libsodium //--prefix参数为指定安装路径
[root@localhost zeromq-4.1.4]# make
[root@localhost zeromq-4.1.4]# make install
第六步,安装yasm
1.下载安装包 下载目录
[root@localhost ~]# wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
2.解压
[root@localhost ~]# tar zxvf yasm-1.3.0.tar.gz
解压出来一个文件夹yasm-1.3.0.tar.gz
3.安装
[root@localhost ~]# cd yasm-1.3.0
[root@localhost yasm-1.3.0]# ./configure --prefix=/usr/local/yasm //--prefix参数为指定安装路径
[root@localhost yasm-1.3.0]# make
[root@localhost yasm-1.3.0]# make install
第七步,安装libsodium
1.下载安装包 下载目录
[root@localhost ~]# wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.16.tar.gz
2.解压
[root@localhost ~]# tar zxvf libsodium-1.0.16.tar.gz
解压出来一个文件夹libsodium-1.0.16.tar.gz
3.安装
[root@localhost ~]# cd libsodium-1.0.16
[root@localhost libsodium-1.0.16]# ./configure --prefix=/usr/local/libsodium //--prefix参数为指定安装路径
[root@localhost libsodium-1.0.16]# make
[root@localhost libsodium-1.0.16]# make install
第七步,安装pkg-config
[root@localhost ~]# yum install -y pkgconfig
第八步,安装Protocol Buffers
[root@localhost ~]# yum install -y protobuf
第九步,部署stf
[root@localhost ~]# npm install -g stf
安装过程中可能会报如下错误,然后不停循环
gyp WARN EACCES user "root" does not have permission to access the dev dir "/usr/local/nodejs/lib/node_modules/stf/node_modules/dtrace-provider/.node-gyp/9.4.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/nodejs/lib/node_modules/stf/node_modules/dtrace-provider/.node-gyp"
按下Ctrl+C停止安装,输入npm config set unsafe-perm=true
,然后重新安装
[root@localhost ~]# npm install -g stf
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: Critical security bugs fixed in 2.5.5
/usr/local/nodejs/bin/stf -> /usr/local/nodejs/lib/node_modules/stf/bin/stf
+ [email protected]
updated 1 package in 28.55s
第十步,启动stf
[root@localhost ~]# rethinkdb
Recursively removing directory /root/rethinkdb_data/tmp
Initializing directory /root/rethinkdb_data
Running rethinkdb 2.3.6 (GCC 4.8.3)...
Running on Linux 3.10.0-693.el7.x86_64 x86_64
Loading data from directory /root/rethinkdb_data
Listening for intracluster connections on port 29015
Listening for client driver connections on port 28015
Listening for administrative HTTP connections on port 8080
Listening on cluster addresses: 127.0.0.1, ::1
Listening on driver addresses: 127.0.0.1, ::1
Listening on http addresses: 127.0.0.1, ::1
To fully expose RethinkDB on the network, bind to all addresses by running rethinkdb with the `--bind all` command line option.
Server ready, "localhost_localdomain_8my" 9363fd12-a2a4-4fb3-bb16-d304ebd91a96
然后新开一个连接
[root@localhost ~]# cd /usr/local/nodejs/lib/node_modules/stf/bin/
[root@localhost bin]# ./stf local
然后报错....
Could not locate the bindings file. Tried:
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/build/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/build/Debug/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/build/Release/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/out/Debug/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/Debug/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/out/Release/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/Release/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/build/default/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/compiled/9.4.0/linux/x64/zmq.node
2018-03-20T06:17:50.547Z FTL/cli:local 16331 [*] Child process had an error ExitError: Exit code "1"
at ChildProcess. (/usr/local/nodejs/lib/node_modules/stf/lib/util/procutil.js:49:23)
at ChildProcess.emit (events.js:160:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
2018-03-20T06:17:50.547Z INF/cli:local 16331 [*] Shutting down all child processes
../lib/cli triproxy [name]
选项:
-h, --help Show help. [布尔]
-V, --version Show version. [布尔]
--bind-dealer, -d The address to bind the ZeroMQ DEALER endpoint to.
[字符串] [默认值: "tcp://*:7112"]
--bind-pub, -u The address to bind the ZeroMQ PUB endpoint to.
[字符串] [默认值: "tcp://*:7111"]
--bind-pull, -p The address to bind the ZeroMQ PULL endpoint to.
[字符串] [默认值: "tcp://*:7113"]
--name An easily identifiable name for log output.
[字符串] [默认值: "localhost.localdomain"]
Each option can be be overwritten with an environment variable by converting the
option to uppercase, replacing dashes with underscores and prefixing it with
`STF_TRIPROXY_` (e.g. `STF_TRIPROXY_BIND_PUB`).
Could not locate the bindings file. Tried:
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/build/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/build/Debug/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/build/Release/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/out/Debug/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/Debug/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/out/Release/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/Release/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/build/default/zmq.node
→ /usr/local/nodejs/lib/node_modules/stf/node_modules/zmq/compiled/9.4.0/linux/x64/zmq.node
为了解决上边这个问题,不小心手贱把node给删了,修复不了 正在重装第三遍o(╯□╰)o