1 安装redis
1下载压缩包
wget http://download.redis.io/releases/redis-5.0.8.tar.gz
2解压
tar zxvf redis-4.0.5.tar.gz
3安装
先安装gcc,使用命令安装
gcc:yum install gcc
cd redis-4.0.8
make MALLOC=libc
cd src
make install PREFIX=/usr/local/redis
4移动配置
cd ../
mkdir /usr/local/redis/etc
mv redis.conf /usr/local/redis/etc
5设置后台启动
vi /usr/local/redis/etc/redis.conf //将daemonize no 改成daemonize yes
vi /etc/rc.local //在里面添加内容:/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf
chmod 755 /etc/rc.d/rc.local
6启动redis
/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf
2 yum安装mysql
https://www.jianshu.com/p/af707e0c6097
1下载并安装MySQL官方的 Yum Repository
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server
systemctl start mysqld
systemctl status mysqld
systemctl restart mysqld
设置开机自启systemctl enable mysqld
systemctl daemon-reload
grep 'temporary password' /var/log/mysqld.log
mysql -uroot -p
set global validate_password_policy=0;
set password for 'root'@'localhost'=password('nebula2019');
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'nebula2019' WITH GRANT OPTION;
flush privileges;
2.1 修改mysql到挂载目录
#查询目录位置 select @@datadir;
停用mysql服务 systemctl stop mysqld
数据目录迁移 rsync -av /var/lib/mysql /mnt/data/
mv /var/lib/mysql /var/lib/mysql.bak
修改mysql配置文件,重新指定mysqld数据读取路径和mysql命令socket路径修改/etc/my.cnf
#修改[mysqld]
default-time_zone = '+8:00'
character-set-server = utf8mb4
collation-server = utf8mb4_bin
datadir=/mnt/data/mysql
socket=/mnt/data/mysql/mysql.sock
#新增 [client] port=3306
socket=/mnt/data/mysql/mysql.sock
3 安装jdk
解压,然后配置环境变量
编辑文件 vi /etc/profile
复制保存环境变量配置
JAVA_HOME=/usr/java/jdk1.8.0_201
CLASSPATH=.:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH
刷新配置 source /etc/profile
sudo chmod -R 777 /home
4 安装nginx
https://www.jianshu.com/p/3b29aeec5d0e
1 安装工具 yum install gcc yum install pcre-devel yum install zlib zlib-devel
//进入local目录 cd /usr/local
//创建一个文件夹mkdir nginx
//进入nginx目录 cd nginx
//解压 tar -zxvf nginx-1.13.7.tar.gz
2 安装
//进入nginx解压目录 cd /usr/local/nginx/nginx-1.13.7
//配置 执行命令 --prefix 绑定安装目录 安装目录可以自己指定可 以和下载目录不同,这里制定为/usr/local/nginx 不写 --prefix= 会 使用默认安装目录 ./configure --prefix=/usr/local/nginx
//执行make命令 编译 make
//执行make install命令 安装 make install
4.1
安装ssl
./configure --prefix=/usr/local/nginx/ --with-http_ssl_module
5 安装activemq
注意腾讯云服务器需要修改主机名称,不能带下划线
vim /etc/sysconfig/network
vim /etc/hosts
hostnamectl set-hostname mycentos7
reboot
解压activemq
启动/usr/activemq/bin/activemq start
6 安装jenkins
下载
wget https://pkg.jenkins.io/redhat/jenkins-2.83-1.1.noarch.rpm
安装
rpm ‐ivh jenkins-2.83-1.1.noarch.rpm
配置
vi /etc/sysconfig/jenkins
修改端口号
JENKINS_USER="root"
JENKINS_PORT="8888"
启动服务
systemctl start jenkins
从/var/lib/jenkins/secrets/initialAdminPassword中获取初始密码串