阿里云linux服务器搭建流程
ifconfig -a -- 查看本机ip信息
数据拷贝:
scp -r root@101.200.146.196:/home/admin/my-git .
select registerId from registration_code_info
where ( channel='b9') into outfile "/var/lib/mysql-files/b9.txt"
安装vsftp上传软件
ftp 服务器发送命令的退出状态1
要使用adduser增加一个新用户,不用useradd
userdel -r ftpuser
service vsftpd restart
运行命令:“usermod -s /sbin/nologin test” //限定用户test不能telnet,只能ftp
运行命令:“usermod -s /sbin/bash test” //用户test恢复正常
首先自己增加一个新用户
adduser tmp_3452
passwd tmp_3452
usermod -s /usr/sbin/nologin tmp_3452
apt-get install vsftpd
useradd -d /home/my-git/ -s /usr/sbin/nologin admin
passwd admin
cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.backup.conf
vim /etc/vsftpd/vsftpd.conf
将配置文件中”anonymous_enable=YES “改为 “anonymous_enable=NO”
取消如下配置前的注释符号:
local_enable=YES
write_enable=YES
chroot_local_user=YES
保存修改,按ESC键,输入:wq
查看端口占用情况:
netstat -anp |grep
数据查询
SELECT * FROM purchase_statistical_info WHERE purchaseTime LIKE '2018-05-30%';
nginx 安装
apt-get install nginx
/etc/nginx/conf.d/default.conf
service nginx reload
server{
listen 80;
server_name apguanru.com www.apguanru.com;
location /{
root /home/data/tomcat7/webapps/;
index /guanru/index.jsp;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://47.94.1.147:8080/;
}
}
改变tomcat的默认欢迎界面
tomcat中的server.xml中appBase="webapps"增加
<Context path="" docBase="guanru" debug="0" reloadable="true" />