官术网_书友最值得收藏!

  • Kali Linux Cookbook
  • Willie L. Pritchett David De Smet
  • 303字
  • 2021-07-23 16:08:07

Installing and configuring nVidia video card drivers

In this recipe, we will embrace Compute Unified Device Architecture (CUDA), the nVidia parallel computing architecture. The first step will be the installation of the nVidia developer display driver followed by the installation of the CUDA toolkit. This will give us dramatic increases in computer performance with the power of the GPU which will be used in scenarios like password cracking.

Note

For more information about CUDA, please visit their website at http://www.nvidia.com/object/cuda_home_new.html.

Getting ready

An Internet connection is required to complete this recipe.

The preparation of kernel headers is needed before starting this task, which is explained in the Preparing kernel headers recipe at the beginning of this chapter.

In order to accomplish the installation of the nVidia driver, the X session needs to be shut down.

How to do it...

Let's begin the process of installing and configuring the nVidia video card drivers:

  1. Download the nVidia developer display driver according to your CPU architecture:
    cd /tmp/
    wget http://developer.download.nvidia.com/compute/cuda/4_1/rel/drivers/NVIDIA-Linux-x86_64-285.05.33.run
    
  2. Install the driver:
    chmod +x NVIDIA-Linux-x86_64-285.05.33.run
    ./NVIDIA-Linux-x86_64-285.05.33.run –kernel-source-path='/usr/src/linux'
    
  3. Download the CUDA toolkit:
    wget http://developer.download.nvidia.com/compute/cuda/4_1/rel/toolkit/cudatoolkit_4.1.28_linux_64_ubuntu11.04.run
    
  4. Install the CUDA toolkit to /opt:
    chmod +x cudatoolkit_4.1.28_linux_64_ubuntu11.04.run
    ./cudatoolkit_4.1.28_linux_64_ubuntu11.04.runConfigure the environment variables required for nvcc to work:
    echo PATH=$PATH:/opt/cuda/bin >> ~/.bashrc
    echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cuda/lib >> ~/.bashrc
    echo export PATH >> ~/.bashrc
    echo export LD_LIBRARY_PATH >> ~/.bashrc
    
  5. Run the following command to make the variables take effect:
    source ~/.bashrc
    ldconfig
    
  6. Install pyrit dependencies:
    apt-get install libssl-dev python-dev python-scapy
    
  7. Download and install the GPU powered tool, pyrit:
    svn co http://pyrit.googlecode.com/svn/trunk/ pyrit_src
    cd pyrit_src/pyrit
    python setup.py build
    python setup.py install
    
  8. Finally, add the nVidia GPU module to pyrit:
    cd /tmp/pyrit_src/cpyrit_cuda
    python setup.py build
    python setup.py install
    
Note

To verify if nvcc is installed correctly, we issue the following command:

nvcc –V

To perform a benchmark, we simply type the following command:

pyrit benchmark
主站蜘蛛池模板: 洱源县| 广宁县| 佛教| 太仓市| 扎赉特旗| 乐亭县| 佛山市| 股票| 肃宁县| 茌平县| 景洪市| 公安县| 高碑店市| 云浮市| 青神县| 和林格尔县| 金华市| 吉安市| 鄂温| 体育| 两当县| 惠东县| 巴青县| 四平市| 哈密市| 随州市| 霸州市| 博爱县| 乌拉特前旗| 牡丹江市| 秦安县| 洛南县| 黑水县| 贡觉县| 都安| 合阳县| 买车| 周至县| 聊城市| 岐山县| 蓝田县|