这是一篇记录Ubuntu服务器安装后基本软件安装、信息配置的帖子,主要内容以若干个bash文件的格式给出。
详情可以参考我之前写过的文章: https://www.cnblogs.com/Higgerw/p/14036700.html#:~:text=https%3A//pan.baidu.com/s/1hNJ5Y7fqs6ONbwvHzv5qnA
代码片段1
有很多软件工具不需要全部安装,取决于个人的使用需求
echo "alias cls='clear'" >> .bashrc
source .bashrc
apt update
apt install gcc g++ gdb
apt install python3
apt install python3-pip
apt install build-essential
apt install python3-dev
apt install python3-setuptools
apt install vim wget git curl netcat
apt install nmap hping3 tshark tcpdump
mkdir .config && cd .config
mkdir pip && cd pip
touch pip3.conf
echo '[global]' >> pip3.conf
echo 'timeout = 1200' >> pip3.conf
echo 'index-url = http://pypi.douban.com/simple' >> pip3.conf
echo 'trusted-host = pypi.douban.com' >> pip3.conf
cp pip3.conf pip.conf
cd ~
代码片段2
# 安装mysql
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install libmysqlclient-dev
# 更新密码 mysql -u root -p 默认密码是root
# use mysql;
# 下一行中把密码改为了123456,可以设置成其他的
# update mysql.user set authentication_string=password('123456') where user='root' and Host ='localhost';
# update user set plugin="mysql_native_password";
# flush privileges;
# quit;
# sudo service mysql restart
apt install apache2 -y
sudo /etc/init.d/apache2 restart
# 安装php7 和 相关插件
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.3
sudo apt-get install php7.3-mysql php7.3-curl php7.3-json php7.3-cgi php7.3-xsl php7.3-mbstring php-gettext
代码片段3
# 安装 anaconda
sudo wget https://repo.anaconda.com/archive/Anaconda3-2023.03-1-Linux-x86_64.sh --no-check-certificate
sudo sh Anaconda3-2023.03-1-Linux-x86_64.sh
source ~/.bashrc
# 更新版本与清华软件源的配置
conda update -n base -c defaults conda
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes
标签:mysql,sudo,php7.3,apt,程序员,conda,install,Ubuntu,安装
From: https://www.cnblogs.com/Higgerw/p/17458972.html