博客背景
每次重新安装完ubuntu 系统就有一堆程序需要安装,这样很费时间,也有很多自己忘记了安装的。
如何一次性安装完自己需求的软件。
解决办法:
使用批处理来安装所有需要的软件
步骤:
- 先要将源改成 ali 的源,初始的源版本很多不对,依赖也不对。
- 源修改 sudo gedit /etc/apt/sources.list
- 执行 bash 脚本
#!/bin/bash
# begin the install
# update the /etc/apt/sourcelists.txt with ali source
#deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
#deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
#deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
#deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
#deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ baionic main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
# used for new install Ubuntu
sudo apt-get update
# install the sure thunderbird version
sudo apt-get install -f -y thunderbird=1:38.6.0+build1-0ubuntu1
# install wubipinyin
sudo apt install -y fcitx-table-wbpy fcitx-config-gtk
im-config -n fcitx
# after install , need to restart lightdm service
# sudo systemctl restart lightdm.service
# aptitude
sudo apt-get -y install aptitude
# install goldendict
sudo apt-get -y install goldendict
# ssh
sudo apt-get -y install openssh-client
sudo apt-get -y install openssh-server
# git
sudo apt-get -y install git
sudo apt-get -y install gitk
# cmake
sudo apt-get -y install cmake
# totalcommander ubuntu version
sudo apt-get -y install gnome-commander
# valgrind
sudo apt-get -y install valgrind
# cutecom
sudo apt-get -y install cutecom
# vscode
# u need to download the software
dpkg -i ~/work/uisee_software/code_1.39.2-1571154070_amd64.deb
# nomachine
wget https://download.nomachine.com/download/6.8/Linux/nomachine_6.8.1_1_amd64.deb
sudo dpkg -i nomachine_6.8.1_1_amd64.deb
# drawio
dpkg -i ~/work/uisee_software/draw.io-amd64-12.1.7.deb
# xmind
dpkg -i ~/work/uisee_software/XMind-ZEN-for-Linux-64bit.deb
echo "basic software install over "
#################################### development thirdparty library
echo "begin to install third party library "
# gtest
sudo apt-get -y install libgtest-dev
# gflags / glog
## gflags
wget https://github.com/gflags/gflags/archive/v2.2.0.tar.gz
tar xzf v2.2.0.tar.gz
mkdir gflags-2.2.0/build
cd gflags-2.2.0/build
CXXFLAGS="-fPIC" cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF ..
make -j8
sudo make install
cd ../../
rm v2.2.0.tar.gz
rm -r -f gflags-2.2.0
#### glog
git clone https://github.com/google/glog
sudo apt-get -y install autoconf automake libtool
cd glog
./autogen.sh
./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"
make -j8 CXXFLAGS='-Wno-sign-compare -Wno-unused-local-typedefs -D_START_GOOGLE_NAMESPACE_="namespace google {" -D_END_GOOGLE_NAMESPACE_="}" -DGOOGLE_NAMESPACE="google" -DHAVE_PTHREAD -DHAVE_SYS_UTSNAME_H -DHAVE_SYS_SYSCALL_H -DHAVE_SYS_TIME_H -DHAVE_STDINT_H -DHAVE_STRING_H -DHAVE_PREAD -DHAVE_FCNTL -DHAVE_SYS_TYPES_H -DHAVE_SYSLOG_H -DHAVE_LIB_GFLAGS -DHAVE_UNISTD_H'
sudo make install
cd ..
rm -r -f glog
# jsoncpp
sudo apt-get -y install libjsoncpp-dev
# Eigen
sudo apt-get -y install libeigen3-dev
# opencv3
sudo apt-get -y install libopencv-dev python-opencv
Boost
sudo apt-get -y install libboost-dev
Pangolin
opengl
sudo apt-get -y install libgl1-mesa-dev
glew
sudo apt-get -y install libglew-dev
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cd build
cmake ..
cmake --build .
sudo make install
cd ../..
rm -r -f Pangolin
echo "begin to install and configure postgresql "
postgresql && other
postgresql
sudo apt-get -y install postgresql-9.5
sudo apt-get -y install libpq-dev
postgis
sudo apt-get -y install postgis
sudo apt-get -y install postgresql-9.5-postgis-2.2 postgresql-contrib-9.5
postgresql-9.5-postgis-scripts
pgadmin3
sudo apt-get -y install pgadmin3
pqxx
dependence(useless)
sudo apt-get -y install xmlto
wget http://pqxx.org/download/software/libpqxx/libpqxx-6.4.5.tar.gz
tar -xzvf libpqxx-6.4.5.tar.gz
cd libpqxx-6.4.5
./configure --prefix=/usr/local --enable-shared --disable-documentation(这一步很重要,生成共享库)
make clean
make
sudo make install
configure postgresql
sudo -u postgres psql
alter user postgres with password 'postgres';
change to a new terminal
sudo passwd -d postgres
sudo -u postgres passwd
网友评论