ubuntu下常用软件下载安装
1、jdk
apt-get install openjdk-8-jdk
检查是否安装成功
java -version
2、mysql
安装
apt-get update
apt-get install mysql-server
mysql_secure_installation
设置密码
use mysql;
update user set authentication_string=PASSWORD("123456") where user='root';
update user set plugin="mysql_native_password";
远程登录
grant all on *.* to root@'%' identified by '123456' with grant option;
vi /etc/mysql/mysql.conf.d/mysqld.cnf
#注释掉
bind-address = 127.0.0.1
3、tomcat
下载安装包
wget https://mirrors.cnnic.cn/apache/tomcat/tomcat-10/v10.0.12/bin/apache-tomcat-10.0.12.tar.gz
解压重命名
tar -zvxf apache-tomcat-10.0.12.tar.gz
rm -rf apache-tomcat-10.0.12.tar.gz
mv apache-tomcat-10.0.12 Tomcat
4、maven
下载安装包
wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.8.3/binaries/apache-maven-3.8.3-bin.tar.gz
解压重命名
tar -zxvf apache-maven-3.8.3-bin.tar.gz
rm -rf apache-maven-3.8.3-bin.tar.gz
mv apache-maven-3.8.3 Maven
配置环境变量
vi /etc/profile
#添加
export MAVEN_HOME=/usr/local/Maven
export PATH=${MAVEN_HOME}/bin:$PATH
source /etc/profile
检查安装是否成功
mvn -v
修改镜像源
<!--修改setting.xml-->
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
5、node
安装
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
apt-get install -y nodejs
检查安装是否成功
npm -v
node -v
设置仓库地址
npm config set registry http://registry.npm.taobao.org/
安装cnpm和pm2
npm install cnpm -g
npm install pm2 -g
6、redis
安装
apt-get install redis-server
远程连接和设置密码
#注释掉
bind 127.0.0.1 ::1
#添加
requirepass 123456
7、jenkins
下载
wget https://mirrors.tuna.tsinghua.edu.cn/jenkins/debian-stable/jenkins_2.303.2_all.deb
安装
dpkg -i jenkins_2.303.2_all.deb
如果报错安装依赖
apt --fix-broken install
访问ip:8080,配置jenkins
其他配置
vi /etc/default/jenkins
#修改端口号
HTTP_PORT=1234
#修改启动用户
JENKINS_USER=root
chown -R root:root /var/lib/jenkins
chown -R root:root /var/cache/jenkins
chown -R root:root /var/log/jenkins