linux日常问题

1,linux下中文文件乱码nginx访问不了问题:
执行下面操作进行转码
convmv -f GBK -t UTF-8 --notest -r /home/init/edu-play-main/mould/*

2,修改登录用户密码
echo 12345678 | passwd --stdin root

3,centos7 开机启动(tomcat 示例)
(1)修改 /etc/rc.d/rc.local 文件方式
    步骤:
        $ vi /etc/rc.d/rc.local
        添加内容: 
            export RUN_AS_USER=root  (root 用户启动)
            /usr/local/tomcat/bin/startup.sh  (tomcat 安装启动路径)
        启动rc-local 服务        
        $ chmod +x /etc/rc.d/rc.local
        $ systemctl status rc-local.service (查看开机启动 rc.local 服务状态)
        $ systemctl enable rc-local.service
        $ systemctl start rc-local.service
        $ systemctl status rc-local.service (查看开机启动 rc.local 服务状态)
        
(2)脚本方式 方式(推荐)
    步骤:创建启动脚本
    $ touch test
        内容:
            #!/bin/bash
            #chkconfig:2345 10 90
            #descriptions:test service ……
            要执行脚本
    $ cp test /etc/init.d/test
    $ systemctl enable test
    $ systemctl start test
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值