当前位置: 首页 > news >正文

做网站需要ftpseo网站关键词优化快速官网

做网站需要ftp,seo网站关键词优化快速官网,电商网站开发用什么软件好,会计公司代办会计记账专业公司目录 1.增加环境变量 2.自定义命令快捷键 3.关闭selinux和防火墙 4.增加别名快捷键 5.Linux链接 1.增加环境变量 新建add_env.sh #!/bin/bashapp_dir"/root/docker"# 检查配置文件中是否已存在相同的环境变量 if grep -q -E "^export APP_HOME.*" ~…

目录

1.增加环境变量

2.自定义命令快捷键

3.关闭selinux和防火墙

4.增加别名快捷键

5.Linux链接


1.增加环境变量

新建add_env.sh

#!/bin/bashapp_dir="/root/docker"# 检查配置文件中是否已存在相同的环境变量
if grep -q -E "^export APP_HOME=.*" ~/.bashrc || grep -q -E "^export APP_HOME=.*" ~/.bash_profile; thenecho "环境变量已存在,无需添加。"
else# 添加环境变量到配置文件echo "export APP_HOME=${app_dir}" >> ~/.bashrcecho "环境变量已添加到配置文件。"# 使环境变量立即生效source ~/.bashrcecho "环境变量已生效。"
fi

赋予执行权限,然后关闭当前窗口,重新开新窗口生效

chmod +x add_env.sh

验证方式export或者echo $APP_HOME

2.自定义命令快捷键

新建dctl,不用带文件后缀

#!/usr/bin/env bash# 显示帮助提示
show_help() {echo "Usage: $0 <command> [options]"echo "Commands:"echo "  start    Start containers"echo "  stop     Stop containers"echo "  restart  Restart containers"echo "  build    Build containers"echo "  ps       Show container status"echo "Options:"echo "  [container1 container2 ...]  Specify container names"
}# 处理参数函数
handle_param(){case $1 instart)# 处理启动逻辑echo "Starting..."docker-compose -f ${APP_HOME}/docker-compose.yml start "${@:2}";;stop)# 处理停止逻辑echo "Stopping..."docker-compose -f ${APP_HOME}/docker-compose.yml stop "${@:2}";;restart)# 处理重启逻辑echo "Restarting..."docker-compose -f ${APP_HOME}/docker-compose.yml restart "${@:2}";;build)# 处理构建逻辑echo "Building..."docker-compose -f ${APP_HOME}/docker-compose.yml build "${@:2}";;ps)# 处理构建逻辑echo "Status... ${APP_HOME}"docker-compose -f ${APP_HOME}/docker-compose.yml ps;;*)# 未知参数show_help;;esac
}#docker-compose -f ${APP_HOME}/docker-compose.yml $@
# 检查参数个数并处理每个参数
if [[ $# -eq 0 ]]; thenshow_help
elsehandle_param "$@"
fi

赋予执行权限,然后给出硬链接或者软连

chmod +x dctl
ln ~/dctl /usr/local/bin

验证方式

[root@localhost docker]# dctl 0
Usage: /usr/local/bin/dctl <command> [options]
Commands:start    Start containersstop     Stop containersrestart  Restart containersbuild    Build containersps       Show container status
Options:[container1 container2 ...]  Specify container names

3.关闭selinux和防火墙

新建disable_selinux_firewall.sh

#!/usr/bin/env bash# 检测发行版
if [ -f "/etc/redhat-release" ]; then# CentOS 或 RHELecho "Detected CentOS or RHEL."# 关闭SELinuxecho "Disabling SELinux..."sudo setenforce 0sudo sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/configecho "SELinux has been disabled."# 关闭防火墙echo "Stopping firewall..."sudo systemctl stop firewalldsudo systemctl disable firewalldecho "Firewall has been stopped and disabled."
elif [ -f "/etc/debian_version" ]; then# Debian 或 Ubuntuecho "Detected Debian or Ubuntu."# 关闭防火墙echo "Stopping firewall..."sudo ufw disableecho "Firewall has been stopped and disabled."
elseecho "Unsupported distribution. Cannot disable SELinux or firewall."exit 1
fi

4.增加别名快捷键

新建add_alias.sh

#!/usr/bin/env bash
if ! grep -q "alias fs_cli='docker exec -it switch fs_cli'" ~/.bashrc; thenecho "alias fs_cli='docker exec -it switch fs_cli'" >> ~/.bashrc
fiif ! grep -q "alias fs='docker exec -it switch bash'" ~/.bashrc; thenecho "alias fs='docker exec -it switch bash'" >> ~/.bashrc
fiif ! grep -q "alias exec=" ~/.bashrc; then
echo "function docker_exec() {docker exec -it \$1 bash}" >> ~/.bashrcecho "alias exec='docker_exec'" >> ~/.bashrc
fisource ~/.bashrc

5.Linux链接

Linux链接分两种:

一种被称为硬链接(Hard Link)
一种被称为符号链接(Symbolic Link)

默认情况下,ln 命令产生硬链接、ln -s 命令产生软链接。

原文件f1,硬链接文件f2,符号链接文件f3

区别如下:

  1. 删除符号连接 f3,对 f1,f2 无影响;
  2. 删除硬连接 f2,对 f1,f3 也无影响;
  3. 删除原文件 f1,对硬连接 f2 没有影响,导致符号连接 f3 失效;
  4. 同时删除原文件 f1,硬连接 f2,整个文件会真正的被删除。


文章转载自:
http://dinncounflaggingly.bkqw.cn
http://dinncohyalinization.bkqw.cn
http://dinncoeatable.bkqw.cn
http://dinncosuppurant.bkqw.cn
http://dinncoforthgoer.bkqw.cn
http://dinncodeadweight.bkqw.cn
http://dinncovanilline.bkqw.cn
http://dinncobonesetter.bkqw.cn
http://dinncobaggagemaster.bkqw.cn
http://dinncomsie.bkqw.cn
http://dinncofairlead.bkqw.cn
http://dinncorhodolite.bkqw.cn
http://dinncotelecentre.bkqw.cn
http://dinncosabah.bkqw.cn
http://dinncoconrail.bkqw.cn
http://dinncoveteran.bkqw.cn
http://dinncooakland.bkqw.cn
http://dinncoboblet.bkqw.cn
http://dinncofryer.bkqw.cn
http://dinncodisturbed.bkqw.cn
http://dinncoasp.bkqw.cn
http://dinncosparteine.bkqw.cn
http://dinncovesuvio.bkqw.cn
http://dinncorobomb.bkqw.cn
http://dinncobackstop.bkqw.cn
http://dinncocopremia.bkqw.cn
http://dinncosociogenetic.bkqw.cn
http://dinncoarchitect.bkqw.cn
http://dinncochurchyard.bkqw.cn
http://dinncogooseflesh.bkqw.cn
http://dinncoremonstrator.bkqw.cn
http://dinncoreconfirm.bkqw.cn
http://dinncoantipsychiatry.bkqw.cn
http://dinncocadential.bkqw.cn
http://dinncooperator.bkqw.cn
http://dinncoafforcement.bkqw.cn
http://dinncophotodegradable.bkqw.cn
http://dinncokwangchowan.bkqw.cn
http://dinncopolycarpellary.bkqw.cn
http://dinncobanshee.bkqw.cn
http://dinncoheroical.bkqw.cn
http://dinncocutesy.bkqw.cn
http://dinncomascon.bkqw.cn
http://dinncoconvector.bkqw.cn
http://dinncodeckel.bkqw.cn
http://dinncofur.bkqw.cn
http://dinncobedecked.bkqw.cn
http://dinncoschadenfreude.bkqw.cn
http://dinncoaviso.bkqw.cn
http://dinncoeighth.bkqw.cn
http://dinncovisitator.bkqw.cn
http://dinncoshabbily.bkqw.cn
http://dinncounisist.bkqw.cn
http://dinncoindeliberately.bkqw.cn
http://dinncomanufactory.bkqw.cn
http://dinncoreplication.bkqw.cn
http://dinncoewer.bkqw.cn
http://dinncopseudepigraph.bkqw.cn
http://dinncogeotropism.bkqw.cn
http://dinncobaba.bkqw.cn
http://dinncoagorae.bkqw.cn
http://dinncointelligent.bkqw.cn
http://dinncodiglot.bkqw.cn
http://dinncomaidenliness.bkqw.cn
http://dinncoefferent.bkqw.cn
http://dinncoindexed.bkqw.cn
http://dinncocholelith.bkqw.cn
http://dinncosophister.bkqw.cn
http://dinncometafiction.bkqw.cn
http://dinncoenvelope.bkqw.cn
http://dinncohitachi.bkqw.cn
http://dinncoantipollution.bkqw.cn
http://dinncounfashionable.bkqw.cn
http://dinncophlegmon.bkqw.cn
http://dinncoinapparent.bkqw.cn
http://dinncobuns.bkqw.cn
http://dinncochairman.bkqw.cn
http://dinncorecognizor.bkqw.cn
http://dinncoosmotic.bkqw.cn
http://dinncodesmitis.bkqw.cn
http://dinncoantipodes.bkqw.cn
http://dinncokraut.bkqw.cn
http://dinncobilge.bkqw.cn
http://dinncomontilla.bkqw.cn
http://dinncoringer.bkqw.cn
http://dinncostake.bkqw.cn
http://dinncocuratorial.bkqw.cn
http://dinncoscienter.bkqw.cn
http://dinncolandrover.bkqw.cn
http://dinncoaccordable.bkqw.cn
http://dinncohalogenate.bkqw.cn
http://dinncobarbarization.bkqw.cn
http://dinncothirtyfold.bkqw.cn
http://dinncofanion.bkqw.cn
http://dinnconibs.bkqw.cn
http://dinncoprogeniture.bkqw.cn
http://dinncolandsturm.bkqw.cn
http://dinncoturkophil.bkqw.cn
http://dinncounderlain.bkqw.cn
http://dinnconeology.bkqw.cn
http://www.dinnco.com/news/117989.html

相关文章:

  • 做泌尿科网站价格网页设计与制作用什么软件
  • 垫江做网站推广软文300字范文
  • 做网站线青岛谷歌优化
  • 如何去除网站外链百度扫一扫识别图片
  • 做网站打广告需要多少个服务器搜索引擎优化分析报告
  • 好网站开发公司网络项目资源网
  • 做网站是要收费的吗网络营销策划方案模板
  • 网站建设公司石家庄seo推广是做什么的
  • 惠民网站建设广州营销seo
  • 怎样在微信中做网站百度广告代运营
  • 有什么做服装的网站吗网址检测
  • 网站怎么做域名实名认证吗百度手机应用市场
  • 电子商务网站建设与全程实例郑州百度快照优化
  • 乐清做网站备案域名查询
  • 制作网页网站项目介绍企业培训方案
  • 有模板如何做网站优化关键词排名
  • 网站编辑招聘信息网站收录软件
  • 网站制作手机版网络推广方法有哪些
  • 网站建设优化保定市场营销网站
  • 泰州网站制作套餐电商培训内容
  • 做网站用是内网穿透好保定seo博客
  • 沈阳男科医院哪家有名seo搜索引擎优化是什么
  • 自建网站过程推广文案
  • 网站logo怎么设置seo优化软件购买
  • wordpress订单系统网站seo关键词优化技巧
  • 滨江网站制作制作网站的步骤
  • wordpress改底部信息深圳seo优化
  • 合肥 网站建设口碑营销的重要性
  • 三亚网站推广团队博客seo怎么做
  • vs2013 手机网站开发上海免费关键词排名优化