技术圈开发者交流群:

WSL设置root为默认登录用户

安装好WSL后,默认的用为自己设置的,每次执行命令都要sodu以下,毕竟是自己开发环境用的,没必要这么麻烦,索性直接改默认用户为root,这里以Ubuntu为例:

首先以管理员身份打开cmd命令行,查看用法:

C:\WINDOWS\system32> ubuntu /?
Launches or configures a Linux distribution.

Usage:
    <no args>
        Launches the user's default shell in the user's home directory.

    install [--root]
        Install the distribuiton and do not launch the shell when complete.
          --root
              Do not create a user account and leave the default user set to root.

    run <command line>
        Run the provided command line in the current working directory. If no
        command line is provided, the default shell is launched.

    config [setting [value]]
        Configure settings for this distribution.
        Settings:
          --default-user <username>
              Sets the default user to <username>. This must be an existing user.

    help
        Print usage information.

根据提示,接下来:

windows 2019年10月24日 328048

WSL开机启动ssh、nginx、mysql等服务

进入windows开机启动目录C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

新建vbs文件start-wsl.vbs:

Set ws = WScript.CreateObject("WScript.Shell")
cmd = "C:\Windows\System32\bash.exe -c ""bash /home/init.sh"""
' 运行命令不显示cmd窗口
ws.Run cmd, 0, false
Set ws = Nothing
WScript.quit
windows 2019年03月05日 241656

Server2016 安装IIS+PHP+Mysql教程

Server2016 安装IIS+PHP+Mysql教程


PHP安装与配置

php.ini-development为开发环境配置文件模板,生产环境请使用php.ini-production

  • 打开php.ini文件

    • 设置时区,找到 ;date.timezone = ,去掉前面的‘;’号,改为date.timezone = PRC

    • 开启常用扩展,找到; extension_dir = "ext",同样去掉前面的‘;’号。

    • 找到;extension=php_bz2.dll 该行,该行以下均是扩展,去掉前面的‘;’号即可。

    • 常用的扩展有:

    • extension=php_curl.dll

    • extension=php_fileinfo.dll

    • extension=php_gd2.dll

    • extension=php_mbstring.dll

    • extension=php_mysqli.dll

    • extension=php_openssl.dll

    • extension=php_pdo_mysql.dll

安装IIS

  • 开始菜单-服务器管理器-添加角色和功能-默认下一步下一步-选择角色(勾选Web服务器)-下一步-选择角色服务(勾选如图)-下一步-等待安装完成。  

配置IIS和PHP

  • 开始菜单-windows管理工具-Internet Information Services (IIS)管理器

  • 选择网站-处理程序映射-添加模块映射。   

  • 添加默认文档index.php 

安装Mysql,傻瓜式安装,这里就不啰嗦了

下载地址参考 https://dev.mysql.com/downloads/installer/

大功告成,验证时刻

  • 网站目录新建index.php 

  • 浏览器打开http://localhost/ ,见到下面的页面,就成功啦 


windows 2017年08月29日 42990

Hyper-v安装Server 2016 教程

Hyper-v安装Server 2016


windows10 开启hyper-v功能

  • 开始菜单 - windows系统 - 控制面板 - 程序 - 启用和关闭Windows功能 - 勾选“Hyper-V” - 确定 

打开hyper-v

  • 开始菜单 - windows管理工具 - hyper-V管理器

安装Server2016

接下来我就不多说了,和安装windows10差不多的步骤

如需要激活请参考 http://www.aiweibk.com/5315.html


windows 2017年08月27日 47177

排行

解决方案

网站建设

专业企业官网建设,塑造企业形象,传递企业价值

系统开发

系统软件开发,用心思考,用心设计,用心体验

技术支撑

打破技术瓶颈,让不堪重负的项目起死回生

业务中台

构建全渠道一体化运营能力,实现全链路数字化

文案策划

文案撰写、营销策划,专注品牌全案

新媒体运营

一站式解决企业互联网营销痛点和难题

以技术的力量,改变互联网

联系我们
鄂ICP备19028750号-1 @copyright 2023 tech1024.com