openssh-server
$sudo apt-get install openssh-server
Output:
Creating config file /etc/ssh/sshd_config with new version
Creating SSH2 RSA key; this may take some time ...
2048 SHA256:b5yoiBT8uHRSy6soAxv0wZzkQSy3n+2g1aOe1QdF4K0 root@oldlie-PC (RSA)
Creating SSH2 ECDSA key; this may take some time ...
256 SHA256:zlOFKRLYWOQV7AeMMzuZzmjDXyMwnvSgr0OcIUw1Kf0 root@oldlie-PC (ECDSA)
Creating SSH2 ED25519 key; this may take some time ...
256 SHA256:fSN92CkgGA3/Vy3flKhVRpRpAQ8PLtNkN4DtTLvsXWs root@oldlie-PC (ED25519)
Created symlink /etc/systemd/system/sshd.service → /lib/systemd/system/ssh.service.
Created symlink /etc/systemd/system/multi-user.target.wants/ssh.service → /lib/systemd/system/ssh.service.
deepin安装Oracle jdk8,以及添加add-apt-repository命令支持
Deepin安装Oracle-jdk8时,需要添加ppa。但是deepin一开始不支持add-apt-repository这个命令,需要:
$sudo apt-get install software-properties-common python-software-properties
先运行这个命令,选择Y就可以了,然后使用
$sudo apt-get install python-software-properties
$sudo add-apt-repository ppa:webupd8team/java
$sudo apt-get update
$sudo apt-get install oracle-java8
这四个命令安装Oracle-jdk8,用键盘选择确定,然后键盘选择是,命令行就会自动安装了,使用Java -version查看jdk版本。
MySQL 5.6
创建数据库:
CREATE DATABASE IF NOT EXISTS yourdbname DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
创建账号:
create user "username"@"host" identified by "password";
给账号授权
grant privileges on databasename.tablename to 'username'@'host' IDENTIFIED BY 'PASSWORD';
eg:
/*授予用户通过外网IP对于该数据库的全部权限*/
grant all privileges on `test`.* to 'test'@'%' ;
/*授予用户在本地服务器对该数据库的全部权限*/
grant all privileges on `test`.* to 'test'@'localhost';
grant select on test.* to 'user1'@'localhost'; /*给予查询权限*/
grant insert on test.* to 'user1'@'localhost'; /*添加插入权限*/
grant delete on test.* to 'user1'@'localhost'; /*添加删除权限*/
grant update on test.* to 'user1'@'localhost'; /*添加权限*/
flush privileges; /*刷新权限*/
删除权限:
revoke privileges on databasename.tablename from 'username'@'host';
eg:
revoke delete on test.* from 'jack'@'localhost';
nginx 1.17.3
/usr/local/nginx
/usr/local/nginx/sbin
/usr/local/nginx/conf
修改conf文件:
$sudo vim nginx.conf
将nginx添加到服务中:
直接复制nginx 文件到/etc/init.d/ 目录下即可
$cp nginx /etc/inin.d/
然后可以通过service 的指令进行启动,由于是使用了nginx的脚本,所以指令的参数有些不同
#启动:
$sudo service nginx
#停止
$sudo service nginx -s stop
#重启
sudo service nginx -s reload
网友评论