Coder Social home page Coder Social logo

arceus's Introduction

2018暑期任务说明文档

注:各阶段具体学习情况详见 LS.md(Learning Stage)

任务一:在树莓派上搭建一个Web服务器(Nginx)并能够通过浏览器访问。

安装Nginx

sudo apt-get install nginx

开启Web服务

sudo service nginx start 

安装Flash支持(可选):

sudo apt-get install browser-plugin-gnash 

打开浏览器,输入树莓派IP,如果看到 Welcome to nginx! 就表明Nginx开启成功了!

之后可自行添加php支持和Web应用框架等。

任务二:Socket和串口通信

任务三:创建自己的账户并赋予其超级权限

切换至root用户:

su -

创建账户:(需要在管理员用户下执行)

adduser <用户名>

特别注意:

CentOs下useradd与adduser是没有区别的都是在创建用户,在home下自动创建目录,没有设置密码,需要使用passwd命令修改密码。 而在Ubuntu下useradd与adduser有所不同

1、useradd在使用该命令创建用户是不会在/home下自动创建与用户名同名的用户目录,而且不会自动选择shell版本,也没有设置密码,那么这个用户是不能登录的,需要使用passwd命令修改密码。

2、adduser在使用该命令创建用户是会在/home下自动创建与用户名同名的用户目录,系统shell版本,会在创建时会提示输入密码,更加友好。

赋予其超级权限:(需要在管理员用户下执行)

usermod -g root <用户名>    //将用户添加至root组
nano /etc/sudoers    //编辑sudoers文件

增加新的用户名,后面ALL=(ALL) ALL照原格式写:

# User privilege specification
root    ALL=(ALL) ALL
<用户名>    ALL=(ALL) ALL

检验是否成功赋予:

切换至该用户:

su <用户名>

1)尝试打开只有管理员权限才能打开的目录:

nano /etc/passwd

如果能打开,则表明已成功将该用户移至管理员组。

2)尝试使用 sudo 命令删除pi用户的密码:

sudo passwd pi -d

键入密码,如出现:

则表明成功清除pi用户密码,赋予权限成功!

arceus's People

Contributors

mrwallye avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.