Win10下配置开发环境
总阅读次
JAVA
安装
添加系统变量
- 变量名
JAVA_HOME
变量值:C:\Program Files\Java\jdk1.8.0_121
jdk的目录
- 添加变量名
CLASSPATH
变量值:.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
在Path添加
添加%JAVA_HOME%\bin
和%JAVA_HOME%\jre\bin
两个系统变量。Path使得系统可以在任何路径下识别java命令检查是否正确正确配置
在CMD下执行java -version
WSL win10子系统
- 子系统路径:
子系统目录在1
USERPROFILE \AppData\Local\lxss
换个说法C:\Users\你的用户名\AppData\Local\lxss
如果downloading from the windows store总是失败可以,在windows10地区选台湾/香港 再下载试试
- 卡机自动启动WSL,并自动开启ssh
l. 首先是需要修改的sshd_config内容其实只有这几项:
1 | Port (随便改一个就行) |
sudo ssh-keygen -A
1 |
|
sudo service ssh restart
1 | 4. 添加计划任务,具体操作: |
Set ws = CreateObject(“Wscript.Shell”)
ws.run “bash /usr/boot.sh”,vbhide
1 | >``WScript.Shell``是一个对象,可以执行操作系统外壳常用的操作:比如运行程序、读写注册表、环境变量等 |
lxrun /setdefaultuser root
1 | 如果是ubntu18.04则应该在 |
ubuntu1804 config –default-user root
1 |
|
#!/bin/sh
service ssh start
$SHELL #这句很重要,挂起当前脚本进程, 进而维持 base.exe 一直打开
1
再赋权限
chmod 777 /usr/boot.sh
1 | >在CMD中设置 ``ubuntu config --default-user root`` 不然普通用户无法执行脚本 |
1.备份原来的数据源配置文件
cp /etc/apt/sources.list /etc/apt/sources.list_backup
2.编辑数据源配置文件
vim /etc/apt/sources.list
在这里我使用的是阿里云的数据源:
#==============================================================================================
deb cdrom:[Ubuntu 16.04 LTS Xenial Xerus - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
#===============================================================================================
3.更新配置
apt-get update
1 |
|
$ sudo mkdir /mnt/d
$ sudo mount -t drvfs D: /mnt/d
1 | Now, you will be able to access the files of your D: drive under /mnt/d. When you wish to unmount the drive, for example so you can safely remove it, run the following command: |
$ sudo umount /mnt/d
1 |
|
- 执行scp用tab键补全:
-bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_CN.UTF-8)
解决方法:
编辑 ~/.bashrc
文件或~/.profile文件
(修改/etc/profile文件也可以,但是会影响全局的设置)
1 | vim ~/.bahsrc |
在文件尾部添加一语句:
1 | export LC_CTYPE="en_US.UTF-8" |
搭建环境
HTTP服务软件
Apache网页程序设计语言
PHP数据库管理系统软件
MySQL图形界面的数据管理软件
phpMyAdmin