Deepin GNU/Linux 15.11 配置
安装 Tenda U12 wifi 驱动
- 官网下载linux驱动安装出现如下报错
- 通过如下方法安装可以成功安装驱动
sudo apt install dkms
sudo apt update
sudo apt install git
git clone https://github.com/gnab/rtl8812au.git
sudo dkms add ./rtl8812au
dkms build 8812au/4.2.3
sudo dkms install 8812au/4.2.3
sudo modprobe 8812au
安装 KVM
sudo apt-get install virt-manager bridge-utils libvirt-clients qemu qemu-kvm
service libvirtd status
reboot
配置逻辑卷
fdisk -l
创建物理卷
pvcreate /dev/sda
创建卷组
vgcreate vg /dev/sda
创建逻辑卷
lvcreate -L 200G -n kvmservers vg
lvcreate -L 50G -n videos vg
lvcreate -L 50G -n zhuyun vg
扩展逻辑卷
lvextend -L +1G /dev/vg/videos
挂载逻辑卷
/etc/fstab
/dev/mapper/vg-kvmservers /var/lib/libvirt/images ext4 defaults 0 0
/dev/mapper/vg-videos /home/java/Desktop/videos ext4 defaults 0 0
/dev/mapper/vg-zhuyun /home/java/Desktop/驻云 ext4 defaults 0 0
mkdir /home/java/Desktop/videos
mkdir /home/java/Desktop/驻云
mount -a
df -hP
配置postgresql数据库
参考文档: https://computingforgeeks.com/how-to-install-postgresql-11-on-debian-9-debian-8/
第一步: 添加postgresql 11 仓库
- 加入signing key
sudo apt install -y vim wget
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
- 将仓库地址加入到本机仓库文件
RELEASE=$(lsb_release -cs)
echo "deb http://apt.postgresql.org/pub/repos/apt/ ${RELEASE}"-pgdg main | sudo tee /etc/apt/sources.list.d/pgdg.list
- 仓库文件(
/etc/apt/sources.list.d/pgdg.list
)如下所示
deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main
第二步: 安装postgresql 11
sudo apt -y install postgresql-11
第三步: 配置数据库支持远程连接
- 修改主配置文件
sudo vim /etc/postgresql/11/main/postgresql.conf
listen_addresses = '*'
-
配置文件内容
默认端口是5433, 这里改成5432
cat /etc/postgresql/11/main/postgresql.conf
-
检查postgresql监听端口
使用 postgres 用户执行下面的命令检查
ss -tunelp | grep 5432
第四步: 修改管理员账户postgres的账号密码
sudo su - postgres
psql -c "alter user postgres with password 'StrongPassword'"
第五步: 测试postgresql
- 添加账户test_user1
createuser test_user1
- 创建数据库test_db, 拥有者是 test_user1
createdb test_db -O test_user1
- 检查数据库test_db是否创建成功
psql -l | grep test_db
- 登录数据库test_db
psql test_db
- 设置test_user1的密码
alter user test_user1 with password 'MyDBpassword';
- 创建表test_table
create table test_table ( id int,first_name text, last_name text );
- 插入数据到表test_table
insert into test_table (id,first_name,last_name) values (1,'John','Doe');
insert into test_table (id,first_name,last_name) values (1,'魏新雨','为');
安装docker
参考文档: https://bbs.deepin.org/forum.php?mod=viewthread&tid=139514&highlight=安装docker
sudo apt-get remove docker docker-engine
sudo apt-get install apt-transport-https ca-certificates curl python-software-properties software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo echo "deb [arch=amd64] https://download.docker.com/linux/debian wheezy stable"
>> /etc/apt/sources.list.d/pgdg.list
sudo apt-get update
sudo apt-get install docker-ce
安装pgadmin4
docker pull dpage/pgadmin4:4.19
sudo docker run -p 80:80 -e "PGADMIN_DEFAULT_EMAIL=1392263019@qq.com" -e "PGADMIN_DEFAULT_PASSWORD=123456" -d dpage/pgadmin4:4.19
访问127.0.0.1
输入用户名 1392263019@qq.com
和 密码 123456
就可以登录 了
安装python
安装python解释器3.6
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz
cd Python-3.6.8/
export LANG=zh_CN.UTF-8
export LANGUAGE=zh_CN.UTF-8
./configure --prefix=/usr/local/python36
make && make install
echo "PATH=$PATH:/usr/local/python3/bin" >> /etc/profile
echo "export PATH" >> /etc/profile
source /etc/profile
配置模块pyenv
https://github.com/pyenv/pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc
source ~/.bashrc