概述
ubuntu 默认登录的用户不是root用户,在安装完成后运行jenkins会遇到一些用户权限的问题,所以操作时遇好是切换到root 用户权限下操作(sudo su切到root用户,su user 切到当前用户 ,参考资料:Ubuntu中root用户和user用户的相互切换https://www.cnblogs.com/luyuwei/p/Linux.html)
1: install apt
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
2:install jdk
#apt sudo-get install oracle-java8-installer
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | su
#sudo update-java-alternatives -s java-8-oracle
java -version
#set oracle jdk environment
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_181 ## 这里要注意目录要换成自己解压的jdk 目录
export JRE_HOME=
J
A
V
A
H
O
M
E
/
j
r
e
e
x
p
o
r
t
C
L
A
S
S
P
A
T
H
=
.
:
{JAVA_HOME}/jre export CLASSPATH=.:
JAVAHOME/jreexportCLASSPATH=.:{JAVA_HOME}/lib:
J
R
E
H
O
M
E
/
l
i
b
e
x
p
o
r
t
P
A
T
H
=
{JRE_HOME}/lib export PATH=
JREHOME/libexportPATH={JAVA_HOME}/bin:$PATH
3:install android-sdk(https://www.jianshu.com/p/598d3617018b)()
#set android environment
export ANDROID_SDK_HOME=/home/test/Downloads/android-sdk-linux
export PATH=
P
A
T
H
:
PATH:
PATH:{ANDROID_SDK_HOME}/tools
export PATH=
P
A
T
H
:
PATH:
PATH:{ANDROID_SDK_HOME}/platform-tools
4:install node npm(https://blog.csdn.net/wangtaoking1/article/details/78005038)
sudo apt-get install python-software-properties
sudo curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
The program ‘curl’ is currently not installed. You can install it by typing:
sudo apt install curl
sudo apt-get install nodejs
sudo npm install -g nrm
nrm use taobao
5:install python
sudo apt install python-pip
sudo pip install Appium-Python-Client
6:install appium(https://www.jianshu.com/p/defe3c01de26)(https://www.cnblogs.com/v5captain/p/9823569.html)
sudo npm install -g cnpm --registry=https://registry.npm.taobao.org
sudo cnpm install -g appium@1.8.1
ln -s /usr/local/Cellar/node/10.12.0/lib/node_modules/appium/build/lib/main.js /usr/local/bin/appium
sudo cnpm install appium-doctor
7:install ssh(https://jingyan.baidu.com/article/9c69d48fb9fd7b13c8024e6b.html)
sudo apt-get update
sudo apt-get install openssh-server
sudo service ssh start
sudo ps -e |grep ssh
sudo gedit /etc/ssh/sshd_config
8:install jenkins(https://blog.csdn.net/ypgsh/article/details/79958101 )
一,安装
官方推荐
1,在本地添加对应posity的key。(注意key是有时效性,久了对应网站不认的)
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
2,到安装工具的资源目录/etc/apt/sources.list中添加任务配置
deb https://pkg.jenkins.io/debian-stable binary/
3,下载(更新)安装
sudo apt-get update
sudo apt-get install jenkins
二,使用
1,安装后自动再后台开启了,通过访问服务器网站:8080可进入页面
2,第一次会需要解锁,提示你密码在/var/lib/jenkins/secrets/initialAdminPassword中。
但一般cd到secrets文件会提示没有权限。直接通过sudo cat /secrets/initialAdminPassword就可以打开文件看到密码了
3,插件安装,选典型安装即可
4,自己创建用户名密码
三,配置项目
略
9:install Appium-Python-Client
sudo pip install Appium-Python-Client
10、卸载jenkins(链接:https://www.jianshu.com/p/2223a219fe48、https://stackoverflow.com/questions/38604715/how-can-i-remove-jenkins-completely-from-linux)
//服务
sudo apt-get remove jenkins
//安装包,注意这里如果不是ubuntu那就yum
sudo apt-get remove --auto-remove jenkins
//配置和数据
sudo apt-get purge jenkins
sudo apt-get purge --auto-remove jenkins
最后
以上就是大方猎豹为你收集整理的Ubuntu install python+appium+jenkins的全部内容,希望文章能够帮你解决Ubuntu install python+appium+jenkins所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复