🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 常见命令(Linux) 使用本镜像的Linux版本,可能需要用到的命令如下: ## 基本命令 ``` //进入网站根目录 cd /data/wwwroot/default //重启服务器 reboot //下载url对应的文件 wget url //解压xx.zip文件到当前目录 unzip xx.zip ``` ## 修改文件权限 ``` //LAMP环境下修改用户和用户组 chown -R apache.apache /data/wwwroot/default //分别修改文件和文件夹的读、写、执行权限 find /data/wwwroot/default -type f -exec chmod 640 {} \; find /data/wwwroot/default -type d -exec chmod 750 {} \; ``` ## Web服务启停 修改环境后,需要运行如下命令进行服务重启后方可生效 ### Apache ``` systemctl restart httpd ``` ### Nginx ``` systemctl restart nginx //重启nginx systemctl restart php-fpm //重启php-fpm ``` ## 升级 ``` ~# yum update -y //升级所有包同时也升级软件和系统内核,-y当安装过程提示选择全部为"yes" ~# yum upgrade -y //只升级所有包,不升级软件和系统内核,-y当安装过程提示选择全部为"yes" ```