首页
统计
墙纸
留言
Search
1
PVE8优化
12 阅读
2
内核版本 4.9 以上的 Linux 系统开启/关闭 BBR 的方法
10 阅读
3
MySQL创建数据库与创建用户以及授权
7 阅读
4
选择相机的曝光模式
6 阅读
5
jenkins根据分支、文件夹打包
5 阅读
web前端
Vue
CSS
javascript
React
那些年爬过过的坑
ES6
TypeScrippt
ES7
javascript图灵 - 总结
Node
面试总结
React-Native
Web优化
基础
AngularJS
拍摄
Flutter
Dart
Docker
Linux
mysql
PVE
登录
/
注册
Search
标签搜索
vue+elementui
Cicada
累计撰写
151
篇文章
累计收到
6
条评论
首页
栏目
web前端
Vue
CSS
javascript
React
那些年爬过过的坑
ES6
TypeScrippt
ES7
javascript图灵 - 总结
Node
面试总结
React-Native
Web优化
基础
AngularJS
拍摄
Flutter
Dart
Docker
Linux
mysql
PVE
页面
统计
墙纸
留言
搜索到
17
篇与
的结果
2024-04-28
Debian 12 / Ubuntu 22.04 使用源安装 LAMP 教程
本文将介绍使用官方源和第三方源在 Debian 12 和 Ubuntu 22.04 安装最新版 Apache 2 + PHP + MySQL 的教程,并且可以自行选择 PHP 版本。PS:本文同时适用于 Debian 11 Bullseye,Debian 10 Buster,Ubuntu 20.04 Focal 以及 Ubuntu 22.04 Jammy以下操作需要在 root 用户下完成,请使用 sudo -i 或 su root 切换到 root 用户进行操作。[](#1、更新系统并安装部分必要软件)1、更新系统并安装部分必要软件apt update apt upgrade -y apt dist-upgrade -y apt install curl vim wget gnupg dpkg apt-transport-https lsb-release ca-certificates如果您通过 iso 方式安装 Debian 11 并且设置了 root 密码,则默认不带 sudo 包,使用 apt install sudo 安装即可[](#2、增加-ondrej-sury-大神打包的-php-源并安装-php-8-x)2、增加 Ondřej Surý 大神打包的 PHP 源并安装 PHP 8.x和 LEMP 安装方法一样,我们还是使用 Ondřej Surý 大佬打包的 PHP 源。至于为啥先装 PHP 再装 Apache 2,因为装了 PHP 以后 Apache 2 会识别你 PHP 版本然后生成对应的配置文件?[](#2-1-debian-和-ubuntu-安装-lamp-区别)2.1 Debian 和 Ubuntu 安装 LAMP 区别唯一区别就是 PHP 和 Apache 2 的安装添加源方法不一样,其他的步骤都一毛一样。[](#2-2-加入大神做好的源)2.2 加入大神做好的源wget -O /usr/share/keyrings/php.gpg https://packages.sury.org/php/apt.gpg echo "deb [signed-by=/usr/share/keyrings/php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.listadd-apt-repository ppa:ondrej/php[](#2-3-更新系统源)2.3 更新系统源apt update apt upgrade -y[](#2-4-安装自己需要的-php-版本)2.4 安装自己需要的 PHP 版本这个源目前默认的 PHP 是 8.3.x,如果您需要其他版本,那么请修改对应的 PHP 版本号 (注意配置文件哦)。这里举例 WordPress 需要的部分 PHP 包安装 PHP 8.3.x:apt install php8.3-{fpm,cli,mysql,curl,gd,mbstring,xml,zip,imap,opcache,soap,gmp,bcmath} -y安装 PHP 8.2.x:apt install php8.2-fpm php8.2-cli php8.2-mysql php8.2-curl php8.2-gd php8.2-mbstring php8.2-xml php8.2-zip php8.2-imap php8.2-opcache php8.2-soap php8.2-gmp php8.2-bcmath -y安装 PHP 8.1.xapt install php8.1-fpm php8.1-cli php8.1-mysql php8.1-curl php8.1-gd php8.1-mbstring php8.1-xml php8.1-zip php8.1-imap php8.1-opcache php8.1-soap php8.1-gmp php8.1-bcmath -y以下版本 PHP 已经 EOL,PHP 官方不再提供支持,请尽快更新您的程序兼容最新的 PHP,如果您的程序还未兼容,建议鞭策开发者安装 PHP 8.0.xapt install php8.0-fpm php8.0-cli php8.0-mysql php8.0-curl php8.0-gd php8.0-mbstring php8.0-xml php8.0-zip php8.0-imap php8.0-opcache php8.0-soap php8.0-gmp php8.0-bcmath -y安装 PHP 7.4.xapt install php7.4-fpm php7.4-cli php7.4-mysql php7.4-curl php7.4-gd php7.4-mbstring php7.4-xml php7.4-xmlrpc php7.4-zip php7.4-json php7.4-imap php7.4-opcache php7.4-soap php7.4-gmp php7.4-bcmath -y安装 PHP 7.3.xapt install php7.3-fpm php7.3-mysql php7.3-curl php7.3-gd php7.3-mbstring php7.3-xml php7.3-xmlrpc php7.3-zip php7.3-opcache安装 PHP 7.2.x (PHP 7.2 开始已经不支持 mcrypt 组件)apt install php7.2-fpm php7.2-mysql php7.2-curl php7.2-gd php7.2-mbstring php7.2-xml php7.2-xmlrpc php7.2-zip php7.2-opcache安装 PHP 7.1.xapt install php7.1-fpm php7.1-mysql php7.1-curl php7.1-gd php7.1-mbstring php7.1-mcrypt php7.1-xml php7.1-xmlrpc php7.1-zip php7.1-opcache安装 PHP 7.0.xapt php7.0-fpm php7.0-mysql php7.0-curl php7.0-gd php7.0-mbstring php7.0-mcrypt php7.0-xml php7.0-xmlrpc php7.0-zip php7.0-opcache安装 PHP 5.6.xapt install php5.6-fpm php5.6-mysql php5.6-curl php5.6-gd php5.6-mbstring php5.6-mcrypt php5.6-xml php5.6-xmlrpc php5.6-zip php5.6-opcache如果希望安装其他组件,可以通过搜索看看有没有对应的包apt-cache search php8.3* | grep php修改 php.ini 防止跨目录攻击,如果安装的 PHP 8.2.x 请相应修改 /etc/php/8.3/fpm/php.ini PHP 7.4.x 请相应修改 /etc/php/7.4/fpm/php.inised -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/php/8.3/fpm/php.ini 修改 php.ini 增加上传大小限制sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 10M/' /etc/php/8.3/fpm/php.ini sed -i 's/post_max_size = 8M/post_max_size = 10M/' /etc/php/8.3/fpm/php.ini您也可以同时安装多个 PHP 版本,然后使用以下命令选择系统默认的 PHP 版本:update-alternatives --config php[](#3、增加-ondrej-sury-大神打包的-apache-2-源并安装)3、增加 Ondřej Surý 大神打包的 Apache 2 源并安装这里我们推荐 Ondřej Surý 打包的 Apache 2 源。[](#3-1-debian-和-ubuntu-安装-lamp-区别)3.1 Debian 和 Ubuntu 安装 LAMP 区别唯一区别就是 Apache 2 和 PHP 的安装添加源方法不一样,其他的步骤都一毛一样。[](#3-2-首先增加-apache-源)3.2 首先增加 Apache 源wget -O /usr/share/keyrings/apache2.gpg https://packages.sury.org/apache2/apt.gpg echo "deb [signed-by=/usr/share/keyrings/apache2.gpg] https://packages.sury.org/apache2/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/apache2.listadd-apt-repository ppa:ondrej/apache2[](#3-3-接着更新并接安装-apache-2-4)3.3 接着更新并接安装 Apache 2.4apt update apt upgrade -y apt install apache2 -y安装完毕后,我们可以使用 apache2 -v 命令看到 Apache 2 已经是最新的 2.4 版本了root@debian ~ # apache2 -v Server version: Apache/2.4.54 (Debian) Server built: 2022-06-08T16:00:36[](#3-4-apache-2-开启-php-fpm-支持)3.4 Apache 2 开启 PHP-FPM 支持首先,需要开启 Apache 2 的 PHP-FPM 支持,我们以 PHP 8.3 为例,按照自己的需求,可以开启如下模块a2enconf php8.3-fpm a2enmod proxy_fcgi a2enmod headers a2enmod http2 a2enmod remoteip a2enmod ssl a2enmod rewrite a2enmod expires a2enmod deflate a2enmod mime a2enmod setenvif然后我们重启 PHP-FPM 服务systemctl restart php8.3-fpm对应 PHP 7.4.x 命令如下systemctl restart php7.4-fpmApache 2 参考配置文件如下,因为默认 Debian 的 Apache 2 默认配置已经使用了 example.com 这个域名,所以我们以 example.org 为例,新建立个 /etc/apache2/sites-available/example.org.confcat >> /etc/apache2/sites-available/example.org.conf << EOF <VirtualHost *:80> ServerName example.org DocumentRoot /var/www/example.org DirectoryIndex index.php index.html index.htm ErrorLog ${APACHE_LOG_DIR}/example.org.error.log CustomLog ${APACHE_LOG_DIR}/example.org.access.log combined <Directory /var/www/example.org> Options FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost> EOF然后使用 a2ensite 命令使其生效a2ensite example.org.conf如果不需要这个 vhost 的时候可以使用 a2dissite example.org.conf 命令移除检测是否已经软链接到 /etc/apache2/sites-enabled 目录root@debian ~ # ls /etc/apache2/sites-enabled 000-default.conf example.org.conf到这里基本没有问题,我们可以执行 apache2ctl configtest 命令检查配置文件是否出错root@debian ~ # apache2ctl configtest Syntax OK显示 Syntax OK 则说明所有配置文件均无问题,可以重启 Apache 2 使我们的配置生效systemctl restart apache2我们的目录在 /var/www/example.org,我们先创建这个目录mkdir -p /var/www/example.org然后创建一个 phpinfo.php 并输入 phpinfo() 函数cat >> /var/www/example.org/phpinfo.php << EOF <?php phpinfo(); ?> EOF好了,此时在浏览器输入 http://example.org/phpinfo.php,如果看到经典的 phpinfo 页面则说明安装成功,如果不成功,请仔细对比步骤查找哪里出错或在烧饼博客下方留言。[](#4、安装-mariadb)4、安装 MariaDB这里我们使用 MariaDB 作为 MySQL 的代替[](#4-1-首先,添加并导入-mariadb-的官方源)4.1 首先,添加并导入 Mariadb 的官方源按照官方的教程导入 GPG下载 GPG Key:curl -sSL https://mariadb.org/mariadb_release_signing_key.asc | gpg --dearmor > /usr/share/keyrings/mariadb.gpg然后添加 MariaDB 的源echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/mariadb.gpg] https://mirror-cdn.xtom.com/mariadb/repo/10.11/debian $(lsb_release -sc) main" > /etc/apt/sources.list.d/mariadb.listecho "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/mariadb.gpg] https://mirror-cdn.xtom.com/mariadb/repo/10.11/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/mariadb.list国内可以用清华 TUNA 的源echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/mariadb.gpg] https://mirrors.tuna.tsinghua.edu.cn/mariadb/repo/10.6/debian $(lsb_release -sc) main" > /etc/apt/sources.list.d/mariadb.listecho "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/mariadb.gpg] https://mirrors.tuna.tsinghua.edu.cn/mariadb/repo/10.6/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/mariadb.list您也可以在这儿找到更多的 MariaDB 源[](#4-2-接着更新一下系统)4.2 接着更新一下系统[](#4-3-然后直接安装最新稳定版-mariadb)4.3 然后直接安装最新稳定版 MariaDBapt install mariadb-server mariadb-client安装完毕后强烈推荐使用 mariadb-secure-installation 命令做一次安全设置[](#4-4-创建数据库并测试)4.4 创建数据库并测试开启数据库之前,您可以使用 pwgen 这个小工具或者随机密码生成器生成一个强大的随机密码,比如 32 位,然后随意挑选一个使用apt install pwgen pwgen 32使用 MySQL root 用户登陆,因为默认使用 Unix domain socket 模式,所以本机不需要 MySQL root 密码即可登录创建数据库 example_databaseCREATE DATABASE example_database DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;创建用户名 example_user 并赋予权限GRANT ALL ON example_database.* TO 'example_user'@'localhost' IDENTIFIED BY '这里改成您要设置的强大的没人能猜出来的随机的密码';刷新 MySQL 权限没问题以后就可以退出了新建立一个 /var/www/example.org/mysql-test.php 文件并测试cat >> /var/www/example.org/mysql-test.php << EOF <?php \$dbname = 'example_database'; //MySQL 数据库名 \$dbuser = 'example_user'; //MySQL 用户名 \$dbpass = '您的强大的没人可以猜出来的密码'; \$dbhost = 'localhost'; //安装在本地就用 localhost \$link = mysqli_connect(\$dbhost, \$dbuser, \$dbpass) or die("Unable to Connect to '\$dbhost'"); mysqli_select_db(\$link, \$dbname) or die("Could not open the db '\$dbname'"); \$test_query = "SHOW TABLES FROM \$dbname"; \$result = mysqli_query(\$link, \$test_query); \$tblCnt = 0; while(\$tbl = mysqli_fetch_array(\$result)) { \$tblCnt++; #echo \$tbl[0]."<br />\n"; } if (!\$tblCnt) { echo "MySQL is working fine. There are no tables."; } else { echo "MySQL is working fine. There are \$tblCnt tables."; } ?> EOF创建完毕后访问 http://example.org/mysql-test.php 如果出现 MySQL is working fine. There are no tables. 则说明 MySQL 工作正常。[](#5、安装-mysql-8-0-可选)5、安装 MySQL 8.0 (可选)如果您必须使用某些 MySQL 8.0 才有的功能,那么可以按照 MySQL 官网的教程安装 MySQL 8.0*注意:*除非您知道您在做什么,否则不要同时安装 MySQL 和 MariaDB[](#5-1-添加-apt-源)5.1 添加 apt 源wget https://repo.mysql.com/mysql-apt-config_0.8.29-1_all.deb dpkg -i mysql-apt-config_0.8.29-1_all.deb国内的机器可以在添加完成后修改为清华 TUNA 源,您可以修改 /etc/apt/sources.list.d/mysql-community.list 文件,替换成如下内容deb https://mirrors.tuna.tsinghua.edu.cn/mysql/apt/debian $(lsb_release -sc) mysql-5.6 mysql-5.7 mysql-8.0 mysql-tools[](#5-2-安装-mysql-8-0)5.2 安装 MySQL 8.0apt update apt install mysql-server -y默认 MySQL 会安装最新的 8.0 版本,如果您需要更低的版本,比如 5.6 或 5.7,可以使用如下命令:dpkg-reconfigure mysql-apt-config您可能需要设置一个强大的 root 密码,接下来的步骤和 MariaDB 基本相同,把 mariadb 命令换成 mysql 命令即可,本文不再赘述。好了,以上就是基本的 Debian 11.x “Bullseye” 安装最新版 LAMP 的教程,如有问题可以随时发评论留言讨论。
2024年04月28日
2 阅读
0 评论
0 点赞
2024-04-28
Debian12 跟换软件源
设置网络代理export https_proxy=http://userName:password@127.0.0.1:1080export http_proxy=http://userName:password@127.0.0.1:1080安装vimapt install vim更换源vim /etc/apt/sources.list中科大源deb https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb-src https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware deb-src https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware阿里源deb https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib deb https://mirrors.aliyun.com/debian-security/ bookworm-security main deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib更新apt update跟新依赖apt upgrade
2024年04月28日
1 阅读
0 评论
0 点赞
2024-04-26
戴尔R630
网络配置服务器开机按F2进入System Setup并选择iDRAC Settings。然后选择Network。确认Enable NIC为Enable状态, NIC Selection下 选择Dedicated(专用网口) 或者LOM1~LOM4(共享服务器1-4号网口)并正确连接网线。IDRAC Enterprise版本推荐使用Dedicated的方式进行连接。下拉右侧的滚动条,找到IPV4 SETTINGS的选项,启用IPV4并设置IP地址、网关和子网掩码。(例如:192.168.100.50、192.168.100.1、255.255.255.0)。注:如果iDrac密码忘记,可以使用以下步骤。服务器开机按提示,我们按F10进入到IDRAC设置项:(或者开机启动后按F2、进入BIOS页面)选择iDRAC Settings。3、找到User Configuration、进入。4、选择Change Password、回车重置密码。5、再输入一遍确认:RAID阵列1、启动物理服务器F2进入BIOS2、选择 Device settings3、选择带有RAID标识的项4、选择Configuration Management注:如果是之前做过RAID,那么你最好是clean清理下硬盘中的内容再来做RAID,免得因为残存数据影响使用。5、接着Create Virtual Disk6、选择你要做的RAID的级别 + Select Physical Disks选择硬盘,接着选择Apply Changes
2024年04月26日
3 阅读
0 评论
0 点赞
2024-04-17
workers
将Cloudflare的免费节点固定IP,防止IP不稳定,解锁GPT、NETFLIX,把节点挂在APPLE TV上,享受4K的流媒体,享受workers反代CDN的vless节点的乐趣!获得CF的CDN IP工具:1、https://github.com/badafans/better-cloudflare-ip2、https://github.com/XIU2/CloudflareSpeedTest一、如果获取CF中转IP(即反代IP)1、zip.baipiao.eu.org2、电报机器人:@cf\_push3、合并多个txt文档技巧:新建txt文件,输入type *.txt>>all.txt,重命名格式为.bat后,运行。自动合并生成。4、文本排重工具:https://www.toolhelper.cn/Char/TextFilter5、在线批量IP地理位置查找工具:https://reallyfreegeoip.org/bulk6、利用“CloudflareSpeedTest”工具来测速:7、在该软件当时文件栏上输出:cmd,回车键8.1、直接软件测:CloudflareST.exe -tll 40 -tl 200 -f 文件名.txt(下载速度测不了)8.2、有测速地址:CloudflareST.exe -url https://down.heleguo.top/download/300MB.zip -tl 200 -sl 5 -tlr 0.2 -f 文件名.txt*表示启动cloudflare工具,利用https://down.heleguo.top/download/300MB.zip测速地址测速。tll延迟下限是40,tl延迟上限是200,sl最低速度5M,tlr丢包率小于0.2,-f表示针对文件名.txt文件内IP测速。*参数设置请看这里:https://github.com/XIU2/CloudflareSpeedTest#-cmd-%E5%B8%A6%E5%8F%82%E6%95%B0%E8%BF%90%E8%A1%8C-cloudflarest*查找更多测速地址:https://github.com/XIU2/CloudflareSpeedTest/issues/168二、如何获取CF的CDN IP1、https://stock.hostmonit.com/CloudFlareYes2、http://ip.flares.cloud/3、https://github.com/hello-earth/cloudflare-better-ip/tree/main/cloudflare4、better-cloudflare-ip(本地优选)5、CloudflareSpeedTest(本地优选)6、https://fofa.info/*打开fofa网站搜索:server="cloudflare" && country="US" && city="Chicago" && port="443"*意思是筛选CF的CDN IP,国家是美国,地区是芝加哥,端口4437、利用“CloudflareSpeedTest”工具来测速:三、查当前IP地址及测速1、查IP:https://ip.gs/2、查IP纯净度:https://scamalytics.com/3、测速度:https://www.speedtest.net/-----------------------------C:\>CloudflareST.exe -hCloudflareSpeedTest vX.X.X测试 Cloudflare CDN 所有 IP 的延迟和速度,获取最快 IP (IPv4+IPv6)!https://github.com/XIU2/CloudflareSpeedTest参数: -n 200 延迟测速线程;越多延迟测速越快,性能弱的设备 (如路由器) 请勿太高;(默认 200 最多 1000) -t 4 延迟测速次数;单个 IP 延迟测速的次数;(默认 4 次) -dn 10 下载测速数量;延迟测速并排序后,从最低延迟起下载测速的数量;(默认 10 个) -dt 10 下载测速时间;单个 IP 下载测速最长时间,不能太短;(默认 10 秒) -tp 443 指定测速端口;延迟测速/下载测速时使用的端口;(默认 443 端口) -url https://cf.xiu2.xyz/url 指定测速地址;延迟测速(HTTPing)/下载测速时使用的地址,默认地址不保证可用性,建议自建; -httping 切换测速模式;延迟测速模式改为 HTTP 协议,所用测试地址为 [-url] 参数;(默认 TCPing) 注意:HTTPing 本质上也算一种 网络扫描 行为,因此如果你在服务器上面运行,需要降低并发(-n),否则可能会被一些严格的商家暂停服务。 如果你遇到 HTTPing 首次测速可用 IP 数量正常,后续测速越来越少甚至直接为 0,但停一段时间后又恢复了的情况,那么也可能是被 运营商、Cloudflare CDN 认为你在网络扫描而 触发临时限制机制,因此才会过一会儿就恢复了,建议降低并发(-n)减少这种情况的发生。 -httping-code 200 有效状态代码;HTTPing 延迟测速时网页返回的有效 HTTP 状态码,仅限一个;(默认 200 301 302) -cfcolo HKG,KHH,NRT,LAX,SEA,SJC,FRA,MAD 匹配指定地区;地区名为当地机场三字码,英文逗号分隔,支持小写,支持 Cloudflare、AWS CloudFront,仅 HTTPing 模式可用;(默认 所有地区) -tl 200 平均延迟上限;只输出低于指定平均延迟的 IP,各上下限条件可搭配使用;(默认 9999 ms) -tll 40 平均延迟下限;只输出高于指定平均延迟的 IP;(默认 0 ms) -tlr 0.2 丢包几率上限;只输出低于/等于指定丢包率的 IP,范围 0.00~1.00,0 过滤掉任何丢包的 IP;(默认 1.00) -sl 5 下载速度下限;只输出高于指定下载速度的 IP,凑够指定数量 [-dn] 才会停止测速;(默认 0.00 MB/s) -p 10 显示结果数量;测速后直接显示指定数量的结果,为 0 时不显示结果直接退出;(默认 10 个) -f ip.txt IP段数据文件;如路径含有空格请加上引号;支持其他 CDN IP段;(默认 ip.txt) -ip 1.1.1.1,2.2.2.2/24,2606:4700::/32 指定IP段数据;直接通过参数指定要测速的 IP 段数据,英文逗号分隔;(默认 空) -o result.csv 写入结果文件;如路径含有空格请加上引号;值为空时不写入文件 [-o ""];(默认 result.csv) -dd 禁用下载测速;禁用后测速结果会按延迟排序 (默认按下载速度排序);(默认 启用) -allip 测速全部的IP;对 IP 段中的每个 IP (仅支持 IPv4) 进行测速;(默认 每个 /24 段随机测速一个 IP) -v 打印程序版本 + 检查版本更新 -h 打印帮助说明-----------------------------
2024年04月17日
4 阅读
0 评论
0 点赞
2023-09-01
ssh 代理转发
在外部网络上的机器上安装 SSH 客户端(例如 OpenSSH)。在内网服务器上安装 SSH 服务器。在外部网络上的机器上运行以下 SSH 命令,创建一个隧道将外部端口转发到内网服务器的端口。假设内网服务器的 IP 是 internal-ip,内网服务器上的需要代理的端口是 internal-port,外部网络上的机器的 IP 是 external-ip,需要将外部端口 external-port 代理到内网服务器上:ssh -N -L external-ip:external-port:internal-ip:internal-port user@internal-ip 其中,user 是内网服务器上的用户名,internal-ip 是内网服务器的 IP 地址,internal-port 是内网服务器上需要代理的端口,external-ip 是外部网络上的机器的 IP 地址,external-port 是外部网络上的机器上用于访问代理的端口。
2023年09月01日
3 阅读
0 评论
1 点赞
2023-08-03
服务器reid配置
服务器开机后,根据屏幕提示,按Ctrl+R 进入阵列卡配置界面用键盘的上下左右键,选择到“Controller 0“,然后按键盘上的F2键,选择Create New VD, 回车在RAID Level项上按回车, 选择RAID级别选中要做RAID x的硬盘(按空格键和上下键,就可以选中硬盘了),硬盘选择好后,按TAB键,VD Size(默认即可),VD Name (随便写,不写也行),然后选择OK,VD已创建新服务器,需要初始化。选择Virtual Disk 0按F2键,选择InitializationàFast Init.(备注:快速初始化是给新服务器使用,如果是旧服务器,怀疑硬盘有故障,可以选择Start Init,但是需要几个小时才能完成初始化)提示将删除数据:可以看到初始化的进度,大概几分钟,初始化完成,就可以开始安装系统了.(备注:需要查看阵列状态,在Virtual Disk 0上按F2键, 选择Properties可以看到VD1的具体配置信息,还可以更改条带大小,读写策略等参考
2023年08月03日
2 阅读
0 评论
0 点赞
2023-06-08
jenkins根据分支、文件夹打包
Generic Webhook Trigger配置变量Post content parameters -> Name of variable = changed_filesExpression = $.commits-1[*]JSONPathPost content parameters -> Name of variable = branchExpression = $.refJSONPathToken (配置token "地址/generic-webhook-trigger/invoke?token=token")Optional filterExpression = master(.*"(BawangChaji-UI/)1+?"){1,}Text = $branch$changed_files" ↩
2023年06月08日
5 阅读
0 评论
0 点赞
2023-03-26
jenkens安装
安装教程:https://pkg.jenkins.io/redhat-stable/ sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key yum install fontconfig java-11-openjdk yum install jenkinscentos7默认安装jdk8:需要卸载。配置镜像:vim /var/lib/jenkins/hudson.model.UpdateCenter.xml <?xml version='1.1' encoding='UTF-8'?> <sites> <site> <id>default</id> <url>https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json</url> </site> </sites>
2023年03月26日
2 阅读
0 评论
0 点赞
2023-03-21
ContOS安装Nginx
1. 从EPEL存储库安装软件包sudo yum install epel-release sudo yum install nginx2. 打开HTTP协议的80端口和HTTPS协议443端口,允许来自这两个端口的连接。使用以下命令永久打开80和443和的端口:sudo firewall-cmd --permanent --zone=public --add-service=http sudo firewall-cmd --permanent --zone=public --add-service=https sudo firewall-cmd --reload3. SELINUX阻止NGINX服务访问开启 HTTP 访问 cd /var/log/audit/ setsebool -P httpd_can_network_connect 1 ausearch -c 'nginx' --raw | audit2allow -M my-nginx semodule -i my-nginx.pp4. Nginx配置文件的结构建议为每个域创建单独的配置文件。Nginx的虚拟主机配置文件必须以.conf结尾,并存储在/etc/nginx/conf.d目录中。您可以根据需要拥有任意数量的虚拟主机配置文件。遵循标准命名约定是一种好的做法。例如,如果域名为mydomain.com,则配置文件应命名为mydomain.com.conf。如果您在虚拟主机配置文件中使用可重复的配置片段,则最好将这些片段存放在单独的文件中,然后使用include指令包含它。
2023年03月21日
2 阅读
0 评论
0 点赞
2023-03-21
ContOS安装jdk
1. 下载JDK下载地址:https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html下载:使用wget "下载链接"下载到宿主机上 jdk-8u161-linux-x64.tar.gz解压:tar -zxvf jdk-8u161-linux-x64.tar.gz2. 配置环境变量vi /etc/profileexport JAVA_HOME=/usr/java/jdk1.8.0_161 export PATH=$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar3. 重新加载环境变量source /etc/profile是否安装成功java -version
2023年03月21日
2 阅读
0 评论
0 点赞
1
2