hostnamectl set-hostname <new-hostname>
vim /etc/hostname
1、下载并解压
下载地址:https://www.oracle.com/java/technologies/oracle-java-archive-downloads.html
解压:
mkdir /usr/java
tar -zxvf jdk-8u251-linux-x64.tar.gz -C /usr/java/
2、 配置环境变量
vim /etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_251
export CLASSPATH=:$JAVA_HOME/lib:$CLASSPATH
export PATH=$PATH:$JAVA_HOME/bin
#使配置生效
source /etc/profile
3、 校验
java -version
1、Centos7查看防火墙状态
#第一种:
firewall-cmd --state
#第二种:
systemctl status firewalld
2、关闭防火墙
#临时关闭
systemctl stop firewalld
#永久关闭
systemctl disable firewalld
3、关闭selinux
vim /etc/selinux/config
修改:SELINUX=disabled
4、修改Linux swapping参数
#查看
cat /proc/sys/vm/swappiness
#修改
echo 0 > /proc/sys/vm/swappiness
#修改配置文件(重启无忧)
vim /etc/sysctl.conf
添加vm.swappiness=0
5、禁止透明页
#临时
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled
#永久生效
echo "never > /sys/kernel/mm/transparent_hugepage/defrag" >> /etc/rc.local
echo "never > /sys/kernel/mm/transparent_hugepage/enabled" >> /etc/rc.local
yum -y install chkconfig python bind-utils psmisc libxslt zlib sqlite cyrus‐sasl* fuse fuse-libs
redhat-lsb httpd mod_ssl portmap python-psycopg2 MySQL-python openssl-devel /lib/lsb/init-functions
1、创建目录
mkdir /usr/share/java/
2、上传jar包
#下载地址
https://dev.mysql.com/downloads/connector/j/5.1.html
解压缩并上传mysql-connector-java-5.1.49.jar包
3、重命名
mv mysql-connector-java-5.1.49.jar mysql-connector-java.jar
mysql安装可以参考《Mysql5.7 Yum安装详解》
1、卸载mariadb
rpm -qa|grep mariadb
rpm -e --nodeps mariadb-libs-5.5.64-1.el7.x86_64
2、创建mysql目录
mkdir /opt/mysql/
cd /opt/mysql/
3、解压缩rpm包
tar -xvf ./mysql-5.7.19-1.el7.x86_64.rpm-bundle.tar
4、安装
rpm -ivh mysql-community-common-5.7.19-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.19-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.19-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.19-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-compat-5.7.19-1.el7.x86_64.rpm
5、配置
#初始化mysql使mysql目录的拥有者为mysql用户
mysqld --initialize --user=mysql
#查看随机生成的密码并登陆
grep 'temporary password' /var/log/mysqld.log
#修改密码
mysql>ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';
#开启远程连接
mysql>use mysql
mysql>select host ,user from user;
#修改权限并刷新
mysql>update user set host = "%" where user = "root";
mysql>flush privileges;
#启动mysql
systemctl start mysqld.service
#设置mysql服务开机自启动
systemctl enable mysqld.service
1、安装
yum -y install httpd
2、启动
service httpd start
3、开机自启
systemctl enable httpd.service
1、创建目录
mkdir -p /var/www/html/cloudera-repos/
2、下载cm包并解压到该目录中
#下载地址
https://archive.cloudera.com/cm6/6.2.1/repo-as-tarball/
tar -zxvf cm6.2.1-redhat7.tar.gz
3、修改配置
vim /etc/yum.repos.d/cloudera-manager.repo
[cloudera-manager]
name = Cloudera Manager, Version
baseurl = http://主节点hostname/cloudera-repos/
gpgcheck = 1
enabled=1
4、页面访问
http://主节点hostname/cloudera-repos/
5、parcel包管理
#下载地址
https://archive.cloudera.com/cdh6/6.2.1/parcels/
#下载下面三个文件
CDH-6.2.1-1.cdh6.2.1.p0.4951328-el7.parcel
CDH-6.2.1-1.cdh6.2.1.p0.4951328-el7.parcel.sha1
manifest.json
#1、查询系统熵值大小
cat /proc/sys/kernel/random/entropy_avail
#2、安装 rng-tools 工具
yum install rng-tools
#3、修改 /etc/sysconfig/rngd 文件,如没有该文件就创建
vim /etc/sysconfig/rngd
OPTIONS="-r /dev/urandom"
#4、启动服务,并重新查询熵池
service rngd start