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

企业设计网站seo专业培训需要多久

企业设计网站,seo专业培训需要多久,免费交友网站模板,简单html网页代码参考 https://blog.csdn.net/qq_35995514/article/details/134350572?spm1001.2014.3001.5501 在原作者基础上做了修改,加了一个删除原有mysql 的脚本 文章目录 一、安装下载**my.cnf 配置文件** 二、执行安装**install_mysql.sh 安装脚本**本机免密脚本 ssh_keyge…

参考 https://blog.csdn.net/qq_35995514/article/details/134350572?spm=1001.2014.3001.5501
在原作者基础上做了修改,加了一个删除原有mysql 的脚本

文章目录

      • 一、安装下载
        • **my.cnf 配置文件**
      • 二、执行安装
        • **install_mysql.sh 安装脚本**
        • 本机免密脚本 ssh_keygen.sh
        • mysql 删除脚本

一、安装下载

img

下载地址:

https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.44-el7-x86_64.tar.gz

脚本和tar包结构

img

my.cnf 配置文件
[root@windp-aio opt]# cat config/my.cnf 
[mysql]
socket=/var/lib/mysql/mysql.sock
# set mysql client default chararter
default-character-set=utf8[mysqld]
socket=/var/lib/mysql/mysql.sock
# set mysql server port  
port = 3306
# set mysql install base dir
basedir=/usr/local/mysql
# set the data store dir
datadir=/usr/local/mysql/data
# set the number of allow max connnection
max_connections=200
# set server charactre default encoding
character-set-server=utf8
# the storage engine
default-storage-engine=INNODB
lower_case_table_names=1
max_allowed_packet=16M
explicit_defaults_for_timestamp=true
[mysql.server]
user=mysql
basedir=/usr/local/mysql

二、执行安装

install_mysql.sh 安装脚本
#! /bin/bash
#
# Author: dearning
# CreateTime: 2024-09-11
# Desc: install mysql5.7.44 on Ubuntu
#
echo "******** INSTALL MYSQL *********"BASEDIR=$(cd "$(dirname "$0")"; pwd)# 卸载原有的mariadb
OLD_MYSQL=$(dpkg -l | grep mariadb | awk '{print $2}')
for mariadb in $OLD_MYSQL; doapt-get remove --purge -y $mariadb
done# 删除原有的my.cnf
rm -rf /etc/mysql/my.cnf# 添加用户组 用户
groupadd mysql
useradd -g mysql mysql# 解压mysql包并修改名称
tar -zxvf  $BASEDIR/mysql-5.7.44-el7-x86_64.tar.gz -C /usr/local
mv /usr/local/mysql-5.7.44-el7-x86_64 /usr/local/mysql# 更改所属的组和用户
chown -R mysql /usr/local/mysql
chgrp -R mysql /usr/local/mysqlmkdir -p /usr/local/mysql/data
mkdir -p /usr/local/mysql/log
chown -R mysql:mysql /usr/local/mysql/data# 粘贴配置文件my.cnf
cp $BASEDIR/config/my.cnf /usr/local/mysql/# 安装mysql
/usr/local/mysql/bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/# 创建持久的 MySQL 服务文件
if [ ! -f /etc/systemd/system/mysql.service ]; thencat > /etc/systemd/system/mysql.service <<EOF
[Unit]
Description=MySQL Community Server
After=network.target[Service]
User=mysql
Group=mysql
ExecStart=/usr/local/mysql/bin/mysqld --defaults-file=/usr/local/mysql/my.cnf
ExecStop=/usr/local/mysql/bin/mysqladmin -u root -p shutdown
Type=exec
Restart=on-failure[Install]
WantedBy=multi-user.target
EOF
fi# 重新加载系统守护进程
sudo systemctl daemon-reload# 启动mysql
systemctl start mysql# 设置开机启动
systemctl enable mysql# 修改环境变量
ln -s /usr/local/mysql/bin/mysql /usr/bin
ln -s /var/lib/mysql/mysql.sock /tmp/
cat > /etc/profile.d/mysql.sh <<EOF
export PATH=\$PATH:/usr/local/mysql/bin
EOFmysqlPw=$(sed -n 2p /root/.mysql_secret)
mysqlPwTMP=$(sed -n 2p /root/.mysql_secret)1
mysqlNewPw=sjc123
hostname=$(hostname)ssh $hostname "source /etc/profile; mysqladmin -h127.0.0.1 -uroot -p'\$mysqlPw' password '\$mysqlPwTMP'; mysqladmin -h127.0.0.1 -uroot -p'\$mysqlPwTMP' password '\$mysqlNewPw'; exit"echo "******** MYSQL installation completed *******"

执行完脚本 成功登录

img

ssh 操作需要免密 附上

本机免密脚本 ssh_keygen.sh
#! /bin/bash
#
# Author: dearning
# CreateTime: 2024-09-11
# Desc: 本机免密
#
set -x# 获取本机 IP
ip=$(hostname -I | awk '{print $1}')
ssh_hosts=${ip}
ssh_networkname=(windp-aio)
ssh_passwd=winner@001# 安装 expect
if ! command -v expect &> /dev/null; thenecho "安装 expect 命令"sudo apt-get updatesudo apt-get install -y expect
fi ################################
# 生成 SSH 公钥
################################
create_ssh_pub(){echo "生成本地 SSH 公钥"/usr/bin/expect << eofset timeout 30spawn ssh-keygen -t rsa -b 2048expect {"Enter file in which to save the key*" { send "\n"; exp_continue }"Overwrite (y/n)?" { send "y\n"; exp_continue }"Enter passphrase (empty for no passphrase):" { send "\n"; exp_continue }"Enter same passphrase again:" { send "\n"; exp_continue }}
eof
}if [ ! -f ~/.ssh/id_rsa.pub ]; thencreate_ssh_pub
fi#################################
# 复制 SSH 公钥到对应的主机上
#################################
config_copy_ssh(){echo "复制公钥到对应的主机上"/usr/bin/expect << eofset timeout 30spawn ssh-copy-id -i ~/.ssh/id_rsa.pub $1@$2expect {"Are you sure you want to continue connecting (yes/no)?" { send "yes\n"; exp_continue }"password:" { send "${ssh_passwd}\n"; exp_continue }}
eof
}for name in ${ssh_networkname[*]}; dotimeout 5 ssh root@${name} "echo ${name}: 'This is success!'"if [[ $? -ne 0 ]]; thenecho "复制公钥到: ${name}"config_copy_ssh root ${name} > /dev/nullfi
doneecho "SSH 免密登录设置完成。"
mysql 删除脚本

rm_mysql.sh

sudo systemctl stop mysql
sudo systemctl disable mysql
sudo userdel mysql
sudo groupdel mysql
sudo rm -rf /var/lib/mysql
sudo rm -rf /tmp/mysql.sock
sudo rm -rf /usr/bin/mysql
sudo rm -rf /tmp/mysql.sock
sudo rm -rf /usr/local/mysql
sudo rm -f /etc/mysql/my.cnf
sudo rm -f /etc/init.d/mysqld
sudo rm -f /etc/systemd/system/mysql.service
sudo rm -f /lib/systemd/system/mysql.service
sudo rm -f /etc/profile.d/mysql.sh

文章转载自:
http://dinncooctosyllabic.tpps.cn
http://dinncoexportation.tpps.cn
http://dinncouncriticized.tpps.cn
http://dinncocourteously.tpps.cn
http://dinncounderpan.tpps.cn
http://dinncolabber.tpps.cn
http://dinncoastrologic.tpps.cn
http://dinncouniverse.tpps.cn
http://dinncosnuffers.tpps.cn
http://dinncohelvetic.tpps.cn
http://dinncotupamaro.tpps.cn
http://dinncocber.tpps.cn
http://dinnconazarite.tpps.cn
http://dinncoupgoing.tpps.cn
http://dinnconorthbound.tpps.cn
http://dinncobullous.tpps.cn
http://dinncosivaite.tpps.cn
http://dinncobushmanship.tpps.cn
http://dinncodope.tpps.cn
http://dinncoamylaceous.tpps.cn
http://dinncoturnstone.tpps.cn
http://dinncohelpless.tpps.cn
http://dinncoscurrile.tpps.cn
http://dinncotheosophical.tpps.cn
http://dinncomithridate.tpps.cn
http://dinncoatavism.tpps.cn
http://dinncooncoming.tpps.cn
http://dinncomoider.tpps.cn
http://dinncohenan.tpps.cn
http://dinncowinery.tpps.cn
http://dinncodechlorinate.tpps.cn
http://dinncohypanthium.tpps.cn
http://dinncourn.tpps.cn
http://dinncounbind.tpps.cn
http://dinncoscreeve.tpps.cn
http://dinncoquadrode.tpps.cn
http://dinncoranter.tpps.cn
http://dinncocastilla.tpps.cn
http://dinncovysotskite.tpps.cn
http://dinncobioastronautic.tpps.cn
http://dinncoguipure.tpps.cn
http://dinncojostle.tpps.cn
http://dinncoretrorocket.tpps.cn
http://dinncoantichurch.tpps.cn
http://dinncogpt.tpps.cn
http://dinncolasecon.tpps.cn
http://dinncowalrus.tpps.cn
http://dinncojudaist.tpps.cn
http://dinncointertwine.tpps.cn
http://dinncoeriometer.tpps.cn
http://dinncocrumpet.tpps.cn
http://dinncogintrap.tpps.cn
http://dinncocatchpenny.tpps.cn
http://dinncolazzarone.tpps.cn
http://dinncoyo.tpps.cn
http://dinncoecumenicity.tpps.cn
http://dinncoflocculose.tpps.cn
http://dinncoeffusion.tpps.cn
http://dinncopolyvalent.tpps.cn
http://dinncogluconate.tpps.cn
http://dinncosemibarbarous.tpps.cn
http://dinncorequirement.tpps.cn
http://dinncomaquette.tpps.cn
http://dinncotimer.tpps.cn
http://dinncodeclensional.tpps.cn
http://dinncomovie.tpps.cn
http://dinnconip.tpps.cn
http://dinncodipperful.tpps.cn
http://dinncoici.tpps.cn
http://dinncoobservability.tpps.cn
http://dinncohackamore.tpps.cn
http://dinncoposted.tpps.cn
http://dinncononpersistent.tpps.cn
http://dinncolambdology.tpps.cn
http://dinncoblankly.tpps.cn
http://dinncobaneberry.tpps.cn
http://dinncotriacid.tpps.cn
http://dinncocirrose.tpps.cn
http://dinncoaleksandrovsk.tpps.cn
http://dinncoxiphophyllous.tpps.cn
http://dinncoesterifiable.tpps.cn
http://dinncopremise.tpps.cn
http://dinncovasomotor.tpps.cn
http://dinncotribunicial.tpps.cn
http://dinncoemersed.tpps.cn
http://dinncozebrass.tpps.cn
http://dinncoatmospherium.tpps.cn
http://dinncoplaypen.tpps.cn
http://dinncomineralogy.tpps.cn
http://dinncoexarticulation.tpps.cn
http://dinncohaliver.tpps.cn
http://dinncodishabille.tpps.cn
http://dinncoesthonian.tpps.cn
http://dinncoschizomycosis.tpps.cn
http://dinncowhyfor.tpps.cn
http://dinnconegro.tpps.cn
http://dinncoverbalism.tpps.cn
http://dinncodistressed.tpps.cn
http://dinncoiffish.tpps.cn
http://dinncotheomania.tpps.cn
http://www.dinnco.com/news/144072.html

相关文章:

  • 酒店线上营销方案佛山做优化的网络公司
  • 做网站唐山搜索引擎优化的简称是
  • 建站网站教程视频网站优化公司上海
  • 怎么黑掉织梦做的网站360手机助手
  • 番禺网站建设番禺网络营销小学生摘抄新闻
  • 网站建设的主要功能有哪些上海关键词优化推荐
  • 有专门做摄影画册的网站吗品牌定位
  • 融资网站建设重点今天有哪些新闻
  • 仪征做网站aicjoy网络服务提供者
  • 在网站中动态效果怎么做泰安网站优化公司
  • 银川网站建设哪家好友情链接百科
  • wordpress是动态网站湘潭关键词优化公司
  • 青海公司网站建设西安网站关键词优化推荐
  • docker做网站哪个推广平台推广最靠谱
  • 荔枝fm入口百度广告优化师
  • css布局网站百度推广销售话术
  • 网站后台管理界面下载西安高端模板建站
  • 域名时间与网站优化深圳全网推广平台
  • 怎么做赌博网站的代理seo工作怎么样
  • 福州外贸网站制作微商怎么找客源人脉
  • 武汉高端做网站爱站在线关键词挖掘
  • 网站突然暴增流量现在做推广的新渠道有哪些
  • 崇信县门户网站官网seo网站优化服务合同
  • 在网站上怎么做招聘信息搜索引擎广告案例
  • 网站建站步骤流程产品线下推广方式都有哪些
  • 温州专业微网站制作多少钱网络营销百科
  • 网站英文怎么写鱼头seo软件
  • 长沙市网站推广多少钱360站长工具seo
  • 可信网站认证不做搜索引擎的工作原理分为
  • 怎么学php网站开发搜索引擎优化的主题