更新路径
parent
ad4e118f20
commit
4fe80b5df6
|
@ -1,4 +1,4 @@
|
||||||
# linux-notes `codes/bash`
|
# OS `codes/bash`
|
||||||
|
|
||||||
> 本目录的代码是和 `docs/shell.md` 相关的示例代码。
|
> 本目录的代码是和 `docs/shell.md` 相关的示例代码。
|
||||||
>
|
>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# linux-notes `codes/practice`
|
# OS `codes/practice`
|
||||||
|
|
||||||
> 本目录的代码是本人在开发中总结的一些实用代码。
|
> 本目录的代码是本人在开发中总结的一些实用代码。
|
||||||
>
|
>
|
||||||
|
|
|
@ -18,7 +18,7 @@ version=`cat /etc/redhat-release | awk '{print substr($4,1,1)}'`
|
||||||
# 根据发型版本选择相应 yum 镜像
|
# 根据发型版本选择相应 yum 镜像
|
||||||
if [ ${version} == 5 ]; then
|
if [ ${version} == 5 ]; then
|
||||||
# Cento5 已废弃,只能使用 http://vault.centos.org/ 替换,但由于是国外镜像,速度较慢
|
# Cento5 已废弃,只能使用 http://vault.centos.org/ 替换,但由于是国外镜像,速度较慢
|
||||||
wget --no-cookie --no-check-certificate -O /etc/yum.repos.d/CentOS-Base.repo https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/sys/yum/CentOS-Base.repo
|
wget --no-cookie --no-check-certificate -O /etc/yum.repos.d/CentOS-Base.repo https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/sys/yum/CentOS-Base.repo
|
||||||
|
|
||||||
# 根据实际发型版本情况替换
|
# 根据实际发型版本情况替换
|
||||||
detailVersion=`lsb_release -r | awk '{print substr($2,1,3)}'`
|
detailVersion=`lsb_release -r | awk '{print substr($2,1,3)}'`
|
||||||
|
|
|
@ -91,7 +91,7 @@ replaceLogstashConfig() {
|
||||||
sed -i "s/# http.host: \"127.0.0.1\"/ http.host: ${IP}/g" ${ELASTIC_SOFTWARE_PATH}/logstash-${version}/config/logstash.yml
|
sed -i "s/# http.host: \"127.0.0.1\"/ http.host: ${IP}/g" ${ELASTIC_SOFTWARE_PATH}/logstash-${version}/config/logstash.yml
|
||||||
touch ${ELASTIC_SOFTWARE_PATH}/logstash-${version}/bin/nohup.out
|
touch ${ELASTIC_SOFTWARE_PATH}/logstash-${version}/bin/nohup.out
|
||||||
cd ${ELASTIC_SOFTWARE_PATH}/logstash-${version}/bin
|
cd ${ELASTIC_SOFTWARE_PATH}/logstash-${version}/bin
|
||||||
wget https://github.com/dunwu/linux-notes/blob/master/codes/deploy/tool/elk/config/logstash.conf
|
wget "https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/elk/config/logstash.conf"
|
||||||
}
|
}
|
||||||
|
|
||||||
# 替换 Kibana 配置
|
# 替换 Kibana 配置
|
||||||
|
@ -107,7 +107,7 @@ replaceKibanaConfig() {
|
||||||
replaceFilebeatConfig() {
|
replaceFilebeatConfig() {
|
||||||
cp ${ELASTIC_SOFTWARE_PATH}/filebeat-${version}-linux-x86_64/filebeat.yml ${ELASTIC_SOFTWARE_PATH}/filebeat-${version}-linux-x86_64/filebeat.yml.bak
|
cp ${ELASTIC_SOFTWARE_PATH}/filebeat-${version}-linux-x86_64/filebeat.yml ${ELASTIC_SOFTWARE_PATH}/filebeat-${version}-linux-x86_64/filebeat.yml.bak
|
||||||
cd ${ELASTIC_SOFTWARE_PATH}/filebeat-${version}-linux-x86_64
|
cd ${ELASTIC_SOFTWARE_PATH}/filebeat-${version}-linux-x86_64
|
||||||
wget https://github.com/dunwu/linux-notes/blob/master/codes/deploy/tool/elk/config/filebeat.yml
|
wget https://github.com/dunwu/OS/blob/master/codes/deploy/tool/elk/config/filebeat.yml
|
||||||
sed -i 's/127.0.0.1/'"${IP}"'/g' ${ELASTIC_SOFTWARE_PATH}/filebeat-${version}-linux-x86_64/filebeat.yml
|
sed -i 's/127.0.0.1/'"${IP}"'/g' ${ELASTIC_SOFTWARE_PATH}/filebeat-${version}-linux-x86_64/filebeat.yml
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,6 +140,6 @@ replaceFilebeatConfig
|
||||||
|
|
||||||
# 最后,将启动脚本下载到本地
|
# 最后,将启动脚本下载到本地
|
||||||
mkdir -p /home/zp/script
|
mkdir -p /home/zp/script
|
||||||
wget -P /home/zp/script "https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/elk/boot-elk.sh"
|
wget -P /home/zp/script "https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/elk/boot-elk.sh"
|
||||||
#setPrivilegeForUser
|
#setPrivilegeForUser
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
使用方法:
|
使用方法:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/jdk/install-jdk8.sh | bash
|
curl -o- https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/jdk/install-jdk8.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
脚本会下载解压 jdk8 到 `/opt/java` 路径下。
|
脚本会下载解压 jdk8 到 `/opt/java` 路径下。
|
||||||
|
@ -15,9 +15,9 @@ curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/
|
||||||
使用方法:
|
使用方法:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
wget --no-check-certificate --no-cookies https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/jdk/install-jdk8-by-yum.sh
|
wget --no-check-certificate --no-cookies https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/jdk/install-jdk8-by-yum.sh
|
||||||
chmod -R 777 install-jdk8-by-yum.sh
|
chmod -R 777 install-jdk8-by-yum.sh
|
||||||
./install-jdk8-by-yum.sh
|
./install-jdk8-by-yum.sh
|
||||||
curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/jdk/install-jdk8-by-yum.sh | bash
|
curl -o- https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/jdk/install-jdk8-by-yum.sh | bash
|
||||||
```
|
```
|
||||||
脚本会下载解压 jdk8 到 `/usr/lib/jvm/java` 路径下。
|
脚本会下载解压 jdk8 到 `/usr/lib/jvm/java` 路径下。
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
使用方法:
|
使用方法:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/jenkins/install-jenkins.sh | bash
|
curl -o- https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/jenkins/install-jenkins.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
脚本会下载解压 Jenkins 到 `/opt/jenkins` 路径下。
|
脚本会下载解压 Jenkins 到 `/opt/jenkins` 路径下。
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
使用方法:
|
使用方法:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/kafka/install-kafka.sh | bash
|
curl -o- https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/kafka/install-kafka.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
脚本会下载解压 kafka 到 `/opt/kafka` 路径下。
|
脚本会下载解压 kafka 到 `/opt/kafka` 路径下。
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
使用方法:
|
使用方法:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/maven/install-maven3.sh | bash
|
curl -o- https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/maven/install-maven3.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
脚本会下载解压 maven 到 `/opt/maven` 路径下。
|
脚本会下载解压 maven 到 `/opt/maven` 路径下。
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
使用方法:
|
使用方法:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/mongodb/install-mongodb.sh | bash
|
curl -o- https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/mongodb/install-mongodb.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
脚本会下载解压 redis 到 `/opt/mongodb` 路径下。
|
脚本会下载解压 redis 到 `/opt/mongodb` 路径下。
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
使用方法:
|
使用方法:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/nginx/install-nginx.sh | bash
|
curl -o- https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/nginx/install-nginx.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
脚本会下载解压 nginx 到 `/opt/nginx` 路径下。
|
脚本会下载解压 nginx 到 `/opt/nginx` 路径下。
|
||||||
|
@ -15,6 +15,6 @@ curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/
|
||||||
使用方法:
|
使用方法:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/nginx/install-nginx-by-yum.sh | bash
|
curl -o- https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/nginx/install-nginx-by-yum.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
使用方法:
|
使用方法:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/nodejs/install-nodejs.sh | bash
|
curl -o- https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/nodejs/install-nodejs.sh | bash
|
||||||
```
|
```
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
使用方法:
|
使用方法:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/redis/install-redis.sh | bash
|
curl -o- https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/redis/install-redis.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
脚本会下载解压 redis 到 `/opt/redis` 路径下。
|
脚本会下载解压 redis 到 `/opt/redis` 路径下。
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
使用方法:
|
使用方法:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/rocketmq/install-rocketmq.sh | bash
|
curl -o- https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/rocketmq/install-rocketmq.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
脚本会下载解压 RocketMQ 到 `/opt/rocketmq` 路径下。
|
脚本会下载解压 RocketMQ 到 `/opt/rocketmq` 路径下。
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
使用方法:
|
使用方法:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
wget --no-check-certificate --no-cookies https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/tomcat/install-tomcat8.sh
|
wget --no-check-certificate --no-cookies https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/tomcat/install-tomcat8.sh
|
||||||
chmod -R 777 install-tomcat8.sh
|
chmod -R 777 install-tomcat8.sh
|
||||||
./install-tomcat8.sh
|
./install-tomcat8.sh
|
||||||
|
|
||||||
curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/tomcat/install-tomcat8.sh | bash
|
curl -o- https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/tomcat/install-tomcat8.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
脚本会下载解压 tomcat 到 `/opt/tomcat` 路径下。
|
脚本会下载解压 tomcat 到 `/opt/tomcat` 路径下。
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
使用方法:
|
使用方法:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -o- https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/zookeeper/install-zookeeper.sh | bash
|
curl -o- https://raw.githubusercontent.com/dunwu/OS/master/codes/deploy/tool/zookeeper/install-zookeeper.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
脚本会下载解压 zookeeper 到 `/opt/zookeeper` 路径下。
|
脚本会下载解压 zookeeper 到 `/opt/zookeeper` 路径下。
|
||||||
|
|
Loading…
Reference in New Issue