Last active
January 23, 2018 19:27
-
-
Save ShreyasSkandan/e6e46c2c76d230836c59478f7fce84c6 to your computer and use it in GitHub Desktop.
Setup Ubuntu 16.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Setup Ubuntu 16.04 | |
sudo apt-get update | |
sudo apt-get upgrade | |
# Install Text Editors | |
sudo apt-get install vim | |
sudo apt-get install gedit | |
# Install Terminal Multiplexer | |
sudo apt-get install tmux | |
# Install Process Manager | |
sudo apt-get install htop | |
# Install PIP (Python) | |
sudo apt install python-pip | |
# Install iPython | |
sudo apt install ipython | |
# Install ROS Kinetic | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 | |
sudo apt-get update | |
sudo apt-get install ros-kinetic-desktop-full | |
sudo rosdep init | |
rosdep update | |
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc | |
source ~/.bashrc | |
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential | |
sudo apt-get install python-catkin-tools | |
# Create and build catkin workspace using Catkin Build | |
mkdir -p ~/catkin_ws/src | |
cd ~/catkin_ws/ | |
catkin build | |
# Setup SSH | |
sudo apt-get install openssh-server | |
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.factory-defaults | |
sudo chmod a-w /etc/ssh/sshd_config.factory-defaults | |
# Install CURL | |
sudo apt-get install -y curl | |
# Install GIT | |
sudo apt-get install -y git | |
# Install CUDA (Requires Editing Script) | |
# Manually download CUDA .deb package | |
#read -p "Press any key after cuda-repo-XYZ-FILENAME-deb.deb is placed in ~/Downloads folder.." | |
#cd ~/Downloads | |
#sudo dpkg -i cuda-repo-XYZ-FILENAME-deb | |
#sudo apt-get update | |
#sudo apt-get install cuda | |
# Add the following lines to ~/.bashrc file | |
#export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}} | |
#export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64\ ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} | |
# Run the following script to install cuda install samples in home directory | |
#cuda-install-samples-8.0.sh ~ | |
# Installing OPENCV 2.4 | |
# Install Dependencies | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y cmake | |
sudo apt-get install -y libgtk2.0-dev | |
sudo apt-get install -y pkg-config | |
sudo apt-get install -y python-numpy python-dev | |
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev | |
sudo apt-get install -y libjpeg-dev libpng12-dev libtiff5-dev libjasper-dev | |
sudo apt-get -qq install libopencv-dev checkinstall pkg-config yasm libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine2 libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils | |
# DOWNLOAD OPENCV 2.4.13 | |
wget https://github.com/opencv/opencv/archive/2.4.13.4.zip -O opencv-2.4.13.4.zip | |
unzip opencv-2.4.13.4.zip | |
cd opencv-2.4.13.4 | |
mkdir release | |
cd release | |
# BUILD AND INSTALL OPENCV | |
cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=/usr/bin/g++ CMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_TBB=ON -DBUILD_NEW_PYTHON_SUPPORT=ON -DWITH_V4L=ON -DINSTALL_C_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON -DBUILD_EXAMPLES=ON -DWITH_QT=ON -DWITH_OPENGL=ON -DBUILD_FAT_JAVA_LIB=ON -DINSTALL_TO_MANGLED_PATHS=ON -DINSTALL_CREATE_DISTRIB=ON -DINSTALL_TESTS=ON -DENABLE_FAST_MATH=ON -DWITH_IMAGEIO=ON -DBUILD_SHARED_LIBS=OFF -DWITH_GSTREAMER=ON -DWITH_CUDA=ON.. | |
make all -j | |
sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment