Yikun / yikun.github.com

Yikun's Blog
69 stars 22 forks source link

ARM Notes #78

Closed Yikun closed 4 years ago

Yikun commented 5 years ago

1. 更换CentOS 7 yum源

#### 备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

#### 更换阿里的centos-altarch源
wget http://mirrors.aliyun.com/repo/Centos-altarch-7.repo -O /etc/yum.repos.d/CentOS-Base.repo

#### 刷新缓存
yum clean all
yum makecache

#### 导入GPG
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#### 更新
yum update

2. 更换Maven源

  # vim apache-maven-3.5.4/conf/settings.xml
  <mirrors>
    <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors>

3. 启用epel-release

Extra Packages for Enterprise Linux (or EPEL) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Linux (OL).

yum install epel-release

装完就可以用yum install python36装python3了

4. Build storm in ubuntu.

wget https://mirrors.aliyun.com/apache/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
tar -xzf apache-maven-3.5.4-bin.tar.gz
export PATH=$PWD/apache-maven-3.5.4/bin:$PATH

command curl -sSL https://rvm.io/mpapis.asc | sudo gpg --import -
command curl -sSL https://rvm.io/pkuczynski.asc | sudo gpg --import -
curl -L https://get.rvm.io | bash -s stable --autolibs=enabled && source ~/.profile

source /etc/profile.d/rvm.sh

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash && source ~/.bashrc
rvm use 2.4.2 --install
nvm install 8.9.3

pip install mock
pip3 install mock

git clone https://github.com/apache/storm.git
make clean install

5. Build rocksdbjni on arm

git clone https://github.com/facebook/rocksdb.git

vim Makefile

CXXFLAGS += -march=armv8-a+crc -Wno-unused-function
CFLAGS += -march=armv8-a+crc -Wno-unused-function

make -j8 rocksdbjava

6. hack storm

vim storm/pom.xml
             <dependency>
                 <groupId>org.rocksdb</groupId>
                 <artifactId>rocksdbjni</artifactId>
-                <version>${rocksdb-version}</version>
+                <version>6.2.0</version>
+                <scope>system</scope>
+                <systemPath>/home/zuul/rocksdb/java/target/rocksdbjni-6.2.0-linux64.jar</systemPath>
             </dependency>
             <dependency>
                 <groupId>org.apache.activemq</groupId>