Centos开发环境配置(Java,Tomcat,Maven,Mysql,Redis,Jenkins,Maven,Docker,Git)
首先,在本地准备好以上工具的linux版本,使用Xftp将文件传到服务器上(/usr/local 目录)。
2.1 Java环境搭建
进入/usr/local目录下,直接使用 tar -xvzf 命令解压java的压缩包,得到jdk1.8.0_191这个文件目录就是java文件目录
接着配置jdk环境变量,编辑bashrc文件
[root@Lionel local]# vi ~/.bashrc
在文件末尾加上如下配置,JAVA_HOME的位置是java的具体安装位置
export JAVA_HOME=/usr/local/jdk1.8.0_191
export JAVA_LIB=$JAVA_HOME/lib
export JAVA_BIN=$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_LIB/tools.jar:$JAVA_LIB/dt.jar
export PATH=$JAVA_BIN:$PATH
# User specific aliases and functions
保存,输入
[root@Lionel local]# source ~/.bashrc
使配置生效,输入java -version、java、javac验证配置是否成功
jdk安装完毕
2.2 Tomcat安装
同样使用 tar -xvzf命令解压Tomcat压缩文件,解压完毕,apache-tomcat-8.0.53即是tomcat的目录![]()
![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA4gAAACDCAYAAADPnzWQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAACXLSURBVHhe7Z3bkdw6skXlwPmWC8eEkSyQB7JgOmJckL7GArUBskPOHFPuR1+AQ7A3shIvEqyux1oRGVFNAmDitZnJevSn//znP281/rx8evv06eXtz/o3AMzmz9vLp7DPXthlAAAAAPCxdCaIl/b19Z+1BAAM8efF3VMkiAAAAADw0ZAgAlwbEkQAAAAAuFGaCSIAAAAAAAA8BySIAAAAAAAAsHCXCeKfl+D4p9XCawD4WHbvyT/v9b78Wo8FXlJbwfjgLQDAjaJizdckAB4GEkQAOMwtJYjqy8xw5Z/X93bVfs36OnZo56vT/uyQq3d8sjlN1jG3Z40/ANwg954gbv53iNseutoP45bG0LND49poO5negAECfMQUAD4OuXcdSRBfv76XVztyW1XcZEnscFzUuIcfTUJH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RAA4Fe/7xtWPkE+EBBEAAABgDBJEADgVmyBeKzmMkCACAAAAjEGCCAAAAAAAAAvNBPHPy6e3T58u7etr8fcHocE2pvfylsafl4v5n+r/2e2fzaj/995fAAAAAHhYSBCVf17fvl6hnySIBhLEennhn9evoezL+gMv/7y9fu2rBwAAAADQQ2eCmALSe+PP28sSfLf9T0lbFmuvgfxlktjf7kOSEumzEpOz2z+bYf/X9dRRflmnX1/X/x/4v3q8mw8AAAAAsyBBDOTvyuT450gQSRArnJYgmoRwvc69DhMAAAAA3B6TEkSTMNmP0G3veBicj9pV3w3pLJ/eDaxaiqq9IPviOgcTRMfvaM13frr62xj7WvaQEpnNvr61XFo4O4Hrbb9zPWxc9LdWZ/34pinb1eXh8elMENd2t2JL/zvnDAAAAACgg+kJ4uvyjtv/gunNnASxmsQ5gfJI+ZEE8eIdQht0u0H4+Qlif38bYx/Mu87/+n1ZNpoz/Dk3kCCOrp9afy/nMY2pZx0J2VkJolmLyxiUHr4AAAAAAAzz9vb/+MqBIR3XcB4AAAAASUVORK5CYII=)
进入目录,执行./startup.sh,即可启动tomcat
在访问tomcat下启动的项目的过程中可能会碰到无法访问的问题,这时候检查下是否打开了防火墙,可以关闭防火墙或者去配置文件加上允许访问的端口,具体百度。
[root@Lionel bin]# service iptables status
2.3 Mysql安装
安装mysql过程中碰到很多坑,一步步百度过来的。
首先检查系统是否已经安装了mysql
[root@Lionel bin]# rpm -qa|grep mysql
若无反应,则表示未安装,可进行下一步,否则执行下面命令卸载mysql
[root@Lionel bin]# rpm -e 软件全名
解压Mysql压缩文件,并将文件夹改名为mysql(使用 mv 命令)
创建用户组和用户
创建用户组:groupadd mysql
创建用户:useradd -r -g mysql mysql
指定专有用户和用户组,首先创建data目录
cd /usr/local/mysql
mkdir data
指定用户和用户组:
cd /usr/local
chown -R mysql mysql/
chgrp -R mysql mysql/
-R包含目录下所有和目录和文件
初始化mysql
cd /usr/local/mysql/bin
./mysqld --initialize --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/ --lc_messages_dir=/usr/local/mysql/share --lc_messages=en_US
可能会报error while loading shared libraries: libaio.so.1的错误,执行下列命令即可解决
yum install libaio
如果出现libnuma.so.1 的错误,执行下列命令
yum -y install numactl
初始化之后会生成一个临时密码,要记住
如果忘记密码或者想重新初始化,可以先将mysql/data目录中文件删除,然后再执行初始化命令
配置my.cnf
vi /etc/my.cnf
# 加上这两行配置
basedir=/usr/local/mysql/
datadir=/usr/local/mysql/data/
进入bin目录,启动mysql
./mysqld_safe --user=mysql &
设为开机启动
cd /usr/local/mysql/support-files/
cp mysql.server /etc/init.d/mysql
vi /etc/init.d/mysql
将mysql目录填上:
basedir=/usr/local/mysql/
datadir=/usr/local/mysql/data/
授权:chmod +x /etc/init.d/mysql
设为开机启动:chkconfig --add mysql
mysql命令
重启服务:service mysql restart
停止服务:service mysql stop
启动服务:service mysql start
查看服务:service mysql status
登录mysql并修改密码
cd /usr/local/mysql/bin
ls 临时密码
修改密码:set password=password("新密码");
登录授权:grant all privileges on *.* to'root' @'%' identified by 'root';
授权生效:flush privileges;
本地使用navicat来控制服务器的mysql,可能无法连接远程服务器的3306端口,今天就碰到这样的问题,检查服务器防火墙,发现并未打开,在服务器配置时已经加上了允许外部主机访问所有端口的配置,解决未果,使用了另一种配置方法。
2.4 Redis安装
首先查看是否已安装gcc
[root@Lionel local]# rpm -qa |grep gcc
若未安装,执行命令进行安装
yum install gcc
安装完成,解压实现准备好的redis安装包
[root@Lionel local]# tar -xvzf redis-4.0.11.tar.gz
进入解压后的目录,执行make进行编译
[root@Lionel local]# cd redis-4.0.11
[root@Lionel redis-4.0.11]# make
编译成功,出现下面界面
执行安装命令,PREFIX后面跟的是安装目录
[root@Lionel redis-4.0.11]# make PREFIX=/usr/local/redis install
安装成功 ,进入安装目录下,发现多了一个bin目录(若无bin目录,删除目录重新编译安装)
配置redis,移动并修改配置文件(将解压文件下的配置文件移动到安装路径redis下,并修改)
[root@Lionel bin]# mv /usr/local/redis-4.0.11/redis.conf /usr/local/redis
注释掉本地ip,允许远程连接,并将redis放在后台运行
保存修改,并改名文件名为6379.conf
注册服务开机自启,将redis服务脚本(redis-4.0.11/utils/redis_init_script)移动到/etc/init.d目录下(init.d目录----在系统启动的时候,某些指定脚本将被执行),将脚本名改为redis,并修改配置信息
[root@Lionel init.d]# mv /usr/local/redis-4.0.11/utils/redis_init_script /etc/init.d
[root@Lionel init.d]# mv redis_init_script redis
[root@Lionel init.d]# vi redis
保存修改,增加文件执行权限
[root@Lionel init.d]# chmod +x /etc/init.d/redis
加入服务,开机自启
[root@Lionel init.d]# chkconfig --add redis
查看开机自启项
[root@Lionel init.d]# chkconfig --list
启动redis
[root@Lionel init.d]# service redis start
查看redis启动状态
[root@Lionel init.d]# ps -ef|grep redis
停止redis
[root@Lionel init.d]# service redis stop
停止成功 ![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA2gAAAAuCAYAAABd/zrRAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAABMGSURBVHhe7Z2Ndeu8DYbvFl2hK/Qu0gmaIbpEPU2WyTApJRIUSYH4oShZtt/nHPTLtSAKBEASsOP0zy94Ub5/v/78+f3z5yv8ZMGrDwAAAAAAALgaNGgvCxo0AAAAAAAA3g00aC8LGjQAAAAAAADeDTRoLwsaNAAAAAAAAN4NNGgAAAAAAAAAcBO6Ddr31/Jpy17+Pn6SBvCSffr1Ip9hfX/t4n+m/Wf759b+T76u1tfF/gcyP4+/TDz+/va2xDXfEKt7wK2vhpfbnwEAALwtaNAWfh6/fy+Y58sVAGjQrmNygxabCfp11p/fx1/bfYCntx8u0tsr1nvg83uABg0AAMALoTRor/p9Jfv3rehQrs7k7mH+4d/jokb27QuYJ8TZUEBmuwz+X/P67yO0Zuu/1vvksUEfyof+p2UcaNBuhGl9AQAAAPfgoxu0+lOGGv7aEwr3O4EG7TymNmhRL4+V4oZeYZSxfECDdiPQoAEAAHgh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67Q+Sro+cb3x9eDnAskm494/WBbWhP9Bk14VrM+D/lfJdwfxonSNDk9gj3bPZyUDVH4IaxfXq/4/1071KCl6z057KOaMGLJYEIym6aULG79BJs82gHwtgw2IDnGkk6JT38fIy2XmPGnJPlE/7jsSfd3feTzJ3vAifG6gF2jOeMAG41XYLefOHLO7UstvgG3PRbI5mWsJoeMczDtn503EXpLIOanszg+JX9ujHe+bv848/nj7PHQ7kMxt2kfPtqgrezs356zcXy934fG/iTdmm+wPsx+1c5r8/iD8XXQ7slk+vZ6mRdtbia70nw0H5nr51H/qwRrw1hRjA3aQojrdl8p3KdV4YXgo1ovPCvMKf97tEFb6NoS5IQkCaMCAAC4N+cXC36STVPeUAHgvlCDdl2q33G9AwCuBA0aAADcnvsVbEOfngFwW35+H1/SJwpXrj00aAB8OmjQAADg9tysYLP+OhEAL4P8a9bXpjoaNAA+HTRoAABwe1CwAXA6pu+HXQHWOwCfDho0AIBKXbDoAgAAAAAAxuhWUuxffAky56+5fCbZp6/ya0HMX/M50/6z/XNr/3N/ieli/0uwdggCAAAAAABG+P39P1a2+EV2B9lKAAAAAElFTkSuQmCC)
本地测试连接服务器的redis
打开rdm软件,添加配置
![](https://img2018.cnblogs.com/blog/1433728/201906/1433728-20190605172202322-322157440.png)
![](https://img2018.cnblogs.com/blog/1433728/201906/1433728-20190605172043933-1788673045.png)
本地新建一个key(1-1)
在服务器进行测试,打开redis-cli客户端
测试成功
2.5 Jenkins安装
下载Jenkins,地址: http://pkg.jenkins-ci.org/redhat/
下载的是rpm包,使用rpm包安装命令
[root@Lionel local]# sudo rpm -ih jenkins-2.156-1.1.noarch.rpm
安装完成,启动jenkins
[root@Lionel local]# service jenkins start
报错Job for jenkins.service failed because the control process exited with error,检查后发现jenkins配置文件中未加上java的路径
[root@Lionel bin]# vi /etc/init.d/jenkins
修改Jenkins的端口和默认用户
[root@Lionel bin]# vi /etc/sysconfig/jenkins
重新执行jenkins启动命令
本地访问jenkins地址,http://47.102.113.174:8888,第一次进入需要进行jenkins配置
[root@Lionel ~]# vi /var/lib/jenkins/secrets/initialAdminPassword
输入完成,进入下一步
卸载jenkins
service jenkins stop
yum clean all
yum -y remove jenkins
2.6 Maven安装
解压maven安装包,改名
tar -xvzf apache-maven-3.6.0-bin.tar.gz
mv apache-maven-3.6.0 maven
更改配置,在末尾加上maven安装地址
vi ~/.bashrc
export M2_HOME=/usr/local/maven
export PATH=$JAVA_BIN:$M2_HOME/bin:$PATH
source ~/.bashrc
2.7 Docker安装
通过 uname -r 命令查看当前的内核版本
uname -r
更新yum包
sudo yum update
安装依赖包
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
设置yum源
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
查看仓库中所有docker版本
yum list docker-ce --showduplicates | sort -r
安装docker
sudo yum install docker-ce
2.8 Git安装
官网下载git centos版,解压
tar -xvzf git-2.21.0.tar.gz
进入解压后的文件夹,执行命令
cd git-2.21.0
./configure --prefix=/usr/local/git
make & make install
可能出现zlib.h: No such file or directory 的错误,安装缺失的依赖
yum install zlib
yum install zlib-devel
fatal error: openssl/opensslv.h: No such file or directory
yum install openssl-devel
重新执行命令
make & make install