客快物流大数据项目(三十一):常用工具安装

2022-02-24 14:07:53 浏览数 (1)

目录

常用工具安装

一、安装依赖包

二、安装Apache

三、​​​​​​​添加MySQL驱动包

四、​​​​​​​禁用交换空间

五、​​​​​​​禁用透明页

六、配置本地Parcel存储库

七、​​​​​​​配置CM的YUM源

八、​​​​​​​安装CDH所需要的依赖包

九、​​​​​​​安装MySQL

十、​​​​​​​安装JDK

常用工具安装

一、安装依赖包

如果不提前安装这些依赖包,在后面安装CM的时候可能会出现异常。

代码语言:javascript复制
yum install -y cyrus-sasl-plain cyrus-sasl-gssapi portmap fuse-libs bind-utils libxslt fuse

yum install -y /lib/lsb/init-functions createrepo deltarpm python-deltarpm

yum install -y mod_ssl openssl-devel python-psycopg2 MySQL-python

二、​​​​​​​安装Apache

代码语言:javascript复制
yum install httpd createrepo
systemctl start httpd
systemctl status httpd

三、​​​​​​​添加MySQL驱动包

代码语言:javascript复制
mkdir /usr/share/java
cp /export/softwares/jars/mysql-connector-java-5.1.44.jar /usr/share/java/mysql-connector-java.jar

四、​​​​​​​禁用交换空间

临时生效:

sysctl -w vm.swappiness=10

永久生效:

echo "vm.swappiness=10" >> /etc/sysctl.conf

五、​​​​​​​禁用透明页

临时生效:

echo never > /sys/kernel/mm/transparent_hugepage/defrag echo never > /sys/kernel/mm/transparent_hugepage/enabled

永久生效:

echo "echo never > /sys/kernel/mm/transparent_hugepage/defrag" >> /etc/rc.local echo "echo never > /sys/kernel/mm/transparent_hugepage/enabled" >> /etc/rc.local

六、配置本地Parcel存储库

创建/opt/cloudera/parcel-repo目录,将下载好的parcel和manifest.json文件放置到该目录,然后执行下面的命令:

mkdir -p /opt/cloudera/parcel-repo

cd /export/softwares/cdh-6.2.1/

cp *parcel* manifest.json /opt/cloudera/parcel-repo/

注意:需要将.sha1校验文件复制一份为.sha

cp CDH-6.2.1-1.cdh6.2.1.p0.1425774-el7.parcel.sha1 CDH-6.2.1-1.cdh6.2.1.p0.1425774-el7.parcel.sha

mkdir -p /var/www/html/cloudera-repo

cd /export/softwares/cdh-6.2.1/

cp *rpm RPM-GPG-KEY-cloudera manifest.json /var/www/html/cloudera-repo

cd /var/www/html/cloudera-repo

执行:createrepo .

七、​​​​​​​配置CM的YUM源

vi /etc/yum.repos.d/cloudera-manager.repo(此时不存在该文件,确保文件内容为如下)

[cloudera-manager] name=Cloudera Manager 6.2.1 baseurl=http://node2/cloudera-repo/ gpgkey=http://node2/cloudera-repo/RPM-GPG-KEY-cloudera gpgcheck=1 enabled=1 autorefresh=0 type=rpm-md

然后执行:yum clean all && yum makecache

八、​​​​​​​安装CDH所需要的依赖包

代码语言:javascript复制
yum install edhat-lsb portmap mod_ssl openssl-devel python-psycopg2 MySQL-python chkconfig bind-utils libxslt zlib sqlite cyrus-sasl-plain cyrus-sasl-gssapi fuse fuse-libs

九、​​​​​​​安装MySQL

wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm

yum localinstall mysql57-community-release-el7-8.noarch.rpm yum install mysql-community-server systemctl start mysqld systemctl status mysqld

grep 'temporary password' /var/log/mysqld.log            //会生成临时密码

mysql -uroot -p”sZlks?>yp2L>”

取消mysql密码规范限制

set global validate_password_policy=0;

set global validate_password_length=1;

重设密码

alter user 'root'@'localhost' identified by '123456';

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;

flush privileges;

退出mysql客户端,使用新密码重新登录

mysql -uroot -p123456

十、​​​​​​​安装JDK

tar -zxf /export/softwares/jdk-8u221-linux-x64.tar.gz -C /usr/java/ ln -s /usr/java/jdk1.8.0_221 /usr/java/jdk

vim /etc/profile

export JAVA_HOME=/usr/java/jdk export PATH=.:$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH

source /etc/profile

0 人点赞