首页 文章 精选 留言 我的

精选列表

搜索[一键部署],共10005篇文章
优秀的个人博客,低调大师

Centos yum一键安装NMP默认版本

首先,更新yum:yum update 然后,查看准备yum安装的php版本,命令如下:yum list php* 确保版本合适之后,安装NMP及相关组件,命令如下:yum -y install php nginx mysql mysql-server php-cli php-pdo php-tidy php-pecl-memcache php-eaccelerator php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt libmcrypt-devel php-fpm 以上配置和组件能基本满足国内外常用CMS的需要!

优秀的个人博客,低调大师

Pipenv一键搭建python虚拟环境

由于python2和python3在部分语法上不兼容, 导致有人打趣道:"Python2和Python3是两门语言" 对于初学者而言, 如果同时安装了python2和python3, 那运行python程序就可能会遇到2和3混用的尴尬 为解决python不同版本混用的尴尬,避免污染系统python的依赖包环境, 我们需要创建虚拟环境, 将python2和python3隔离使用 pipenv的优势: 以前我们搭建虚拟环境需要学习使用virtualenv和virtualenvwrapper,在虚拟环境内管理软件依赖包需要学习使用pip, 而有了pipenv, 前面几个就可以不用学了... 以前我们需要将虚拟环境依赖包的导出为requirements.txt, 一旦依赖包变动,就要重新导出,而pipenv会自动帮我们生成Pipfile和Pipfile.lock, Pipfile会随着项目,当我们安装时只需在Pipfile和Pipfile.lock所在的目录下运行pipenv install 安装pipenv 方法一: ubuntu用apt安装 sudo apt install software-properties-common python-software-properties sudo add-apt-repository ppa:pypa/ppa sudo apt update sudo apt install pipenv 方法二: windows用pip安装 pip install pipenv 方法三: MacOS直接使用brew安装 brew install pipenv 快速创建并进入虚拟环境 前提条件: 系统已安装python2和python3 # 创建python3环境 pipenv --three # 创建python2环境 pipenv --two # 在上一步新建环境的目录下,运行此命令才有效 pipenv shell 小技巧: 如果子级目录的父级目录已经创建过虚拟环境, 则子级目录无法创建虚拟目录(子级目录无法生成Pipfile, 子级默认会使用父级的虚拟环境), 如果确实需要在子级目录创建独立的虚拟环境,可以运行pipenv --where 获取父级虚拟环境的名字, 根据虚拟环境的前半部分名字, 确定父级目录的位置, 然后删除父级目录下的Pipfile, Pipfile.lock, 运行exit退出父级虚拟环境,然后回到子目录,运行pipenv --three创建子目录的虚拟环境即可 在虚拟环境管理依赖包 安装依赖包 yagmail requests pipenv install yagmail requests 查看已安装软件 pipenv graph 删除依赖包yagmail pipenv uninstall yagmail 退出虚拟环境 exit 扩展命令(不看也没关系) 查看虚拟环境python解释器所在位置 pipenv --py 查看虚拟环境所在位置 pipenv --venv 使用更底层的命令pip freeze pipenv run pip freeze 只在安装开发阶段使用的软件包(和npm类似) pipenv install pytest --dev 安装Pipfile.lock的所有包(完整移植开发环境) pipenv sync 小结: pipenv借鉴了npm管理包的方式, 与virtualenv和virtualenvwrapper相比, pipenv对新手要更友好一些,推荐学习~

优秀的个人博客,低调大师

一键打造你的Doker矿机

从什么时候开始流行CPU挖矿了?记得以前不都是用GPU吗?原来现在虚拟币的种类已经这么多了!大概研究了一下,目前CPU算力有优势的有这么几种虚拟币,貌似还都是匿名币 ZEC(零币)算法 Equihash 目前市场价格4000+ XMR(门罗币) 算法CryptoNight 目前价格4000+ BCN(字节币?) 算法CryptNote 目前价格 几分... 近期公司有几台机器被种了挖矿***,清除之余研究了一下有关CPU挖矿的工具,发现了 xmr-stak-cpu 这个东西 上网搜了搜,找到了GITHUB上的主页,好像刚升级不久 https://github.com/fireice-uk/xmr-stak 还有个早先点的版本地址为:https://github.com/fireice-uk/xmr-stak-cpu 找了一台测试机安装一下试试: #gitclonehttps://github.com/fireice-uk/xmr-stak #cdxmr-stak/ #ls CICMakeLists.txtCONTRIBUTING.mddocDockerfileLICENSEREADME.mdscriptsTHIRD-PARTY-LICENSESxmrstak 好像没有可以执行的文件,不过我发现了Dockerfile,然后又在scripts文件夹里找到了build_xmr-stak_docker.sh难道是自动创建一个docker来挖矿?打开来看看 #vimscripts/build_xmr-stak_docker/build_xmr-stak_docker.sh #!/bin/bash-uex if[[$EUID-ne0]];then echo"Thisscriptmustberunasroot" exit1 fi if[-dxmr-stak];then git-Cxmr-stakclean-fd else gitclonehttps://github.com/fireice-uk/xmr-stak.git fi wget-chttps://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run chmoda+xcuda_*_linux-run ######################## #Fedora27 ######################## #CUDAisnotgoingtoworkonFedora27beacuseit'sonlysupportthesedistributions:http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html dockerrun--rm-it-v$PWD:/mntfedora:27/bin/bash-c" set-x; dnfinstall-y-qcmakegcc-c++hwloc-devellibmicrohttpd-devellibstdc++-staticmakeopenssl-devel; cd/mnt/xmr-stak; cmake-DCUDA_ENABLE=OFF-DOpenCL_ENABLE=OFF.; make; " test-dfedora_27||mkdirfedora_27 mvxmr-stak/bin/*fedora_27 git-Cxmr-stakclean-fd ######################## #Ubuntu(17.04) ######################## dockerrun--rm-it-v$PWD:/mntubuntu:17.04/bin/bash-c" set-x; aptupdate-qq; aptinstall-y-qqlibmicrohttpd-devlibssl-devcmakebuild-essentiallibhwloc-dev; cd/mnt/xmr-stak; /mnt/cuda_*_linux-run--silent--toolkit; cmake-DCUDA_ENABLE=OFF-DOpenCL_ENABLE=OFF.; ... 呵呵,果然不出所料,这个脚本针对CentOS和Ubuntu系列linux系统自动创建建立一个Docker镜像然后安装xmr-stak 编辑一下这个脚本,只留下一个操作系统,我这里只留下了Ubuntu17部分 原来的脚本是跑完了docker安装完成就吧容器删掉,而我现在想把这个容器留下于是就改了改,最后变成下面这个样子 #!/bin/bash-uex if[[$EUID-ne0]];then echo"Thisscriptmustberunasroot" exit1 fi if[-dxmr-stak];then git-Cxmr-stakclean-fd else gitclonehttps://github.com/fireice-uk/xmr-stak.git fi ######################## #Ubuntu(17.04) ######################## dockerrun-itd--name"xmr"-v$PWD:/mntubuntu:17.04/bin/bash dockerexec-it"xmr"/bin/bash-c" set-x; aptupdate-qq aptinstall-y-qqlibmicrohttpd-devlibssl-devcmakebuild-essentiallibhwloc-dev; cd/mnt/xmr-stak; cmake-DCUDA_ENABLE=OFF-DOpenCL_ENABLE=OFF.; makeinstall; " 我的linux 不需要CUDA 删掉 CUDA部分的代码 直接执行(运行前请确定是否已经安装Docker) #./build_xmr-stak_docker.sh +[[0-ne0]] +'['-dxmr-stak']' +gitclonehttps://github.com/fireice-uk/xmr-stak.git Cloninginto'xmr-stak'... git-remote-https:/usr/local/lib/libldap_r-2.4.so.2:noversioninformationavailable(requiredby/usr/lib/x86_64-linux-gnu/lib git-remote-https:/usr/local/lib/liblber-2.4.so.2:noversioninformationavailable(requiredby/usr/lib/x86_64-linux-gnu/libcu remote:Countingobjects:3441,done. remote:Compressingobjects:100%(29/29),done. remote:Total3441(delta16),reused16(delta3),pack-reused3409 Receivingobjects:100%(3441/3441),1.01MiB|24.00KiB/s,done. Resolvingdeltas:100%(2403/2403),done. Checkingconnectivity...done. +dockerrun-itd--namexmr-v/data1/soft:/mntupdate-ubuntu/bin/bash f88a7614bd41821be42b584f76a1892184cd06155058c25c6bbdfb8c245cb571 +dockerexec-itxmr/bin/bash-c' ..... #脚本里包含了apt-getupdate时间会比较久,如果你觉得不需要也可以去掉。如果上面这些步骤一切正常,那么就可以进入刚健的容器去试试挖矿了 #dockerexec-itxmr/bin/bash #cd/mnt/xmr-stak/bin/ #ls libxmr-stak-backend.alibxmr-stak-c.axmr-stak #./xmr-stak Pleaseenter: -Currency:'monero'or'aeon' ... 上面是选择你想挖的币种类、矿池地址、钱包地址等等设置完之后会自动执行,如果出现下面这个就说明连接成功了,我测试用的是国内的一个门罗币矿池mine.ppxxmr.com:3333 [2018-01-1211:07:21]:Fast-connectingtomine.ppxxmr.com:3333pool... [2018-01-1211:07:21]:Poolmine.ppxxmr.com:3333connected.Loggingin... [2018-01-1211:07:21]:Difficultychanged.Now:15000. [2018-01-1211:07:21]:Poolloggedin. [2018-01-1211:07:29]:Difficultychanged.Now:15000. [2018-01-1211:07:29]:Newblockdetected. [2018-01-1211:07:37]:Resultacceptedbythepool. [2018-01-1211:07:47]:Resultacceptedbythepool. [2018-01-1211:08:04]:Difficultychanged.Now:10465. [2018-01-1211:08:04]:Newblockdetected. [2018-01-1211:08:11]:Resultacceptedbythepool. [2018-01-1211:08:17]:Resultacceptedbythepool. 网站上也出现了你挖矿的进度,如下图 终止进程后发现,bin下面多了两个文件 cpu.txt 和 config.txt #ls config.txtcpu.txtlibxmr-stak-backend.alibxmr-stak-c.axmr-stak 打开来看看 #vimconfig.txt /* *pool_address-Pooladdressshouldbeintheform"pool.supportxmr.com:3333".Onlystratumpoolsaresupported. *wallet_address-Yourwallet,orpoollogin. *pool_password-Canbeemptyinmostcasesor"x". *use_nicehash-Limitthenonceto3bytesasrequiredbynicehash. *use_tls-ThisoptionwillmakeusconnectusingTransportLayerSecurity. *tls_fingerprint-Server'sSHA256fingerprint.Ifthisstringisnon-emptythenwewillchecktheserver'scertagainstit. *pool_weight-Poolweightisanumbertellingtheminerhowimportantthepoolis.Minerwillminemostlyatthepool *withthehighestweight,unlessthepoolfails.Weightmustbeanintegerlargerthan0. * *Wefeaturepoolsupto1MH/s.ForamorecompletelistseeM5M400'spoollistatwww.moneropools.com */ "pool_list": [ {"pool_address":"mine.ppxxmr.com:3333","wallet_address":"xxxxxxxxxqC4PTWdaAZ3V15d83kCEEGRiXVXeQwsS1PGd7s7wDjigA2grkxcsDfxEDtuDomBzpFiGtNyPMy+$NUMBER","pool_password":"","use_nicehash":false,"use_tls":false,"tls_fingerprint":"","pool_weight":1}, ], /* *currencytomine *allowedvalues:'monero'or'aeon' */ "currency":"monero", /* ... 刚才的设置应该都存在这里了, #vimcpu.txt ... "cpu_threads_conf": [ {"low_power_mode":false,"no_prefetch":true,"affine_to_cpu":0}, {"low_power_mode":false,"no_prefetch":true,"affine_to_cpu":2}, {"low_power_mode":false,"no_prefetch":true,"affine_to_cpu":4}, {"low_power_mode":false,"no_prefetch":true,"affine_to_cpu":6}, {"low_power_mode":false,"no_prefetch":true,"affine_to_cpu":8}, {"low_power_mode":false,"no_prefetch":true,"affine_to_cpu":10}, {"low_power_mode":false,"no_prefetch":true,"affine_to_cpu":1}, {"low_power_mode":false,"no_prefetch":true,"affine_to_cpu":3}, {"low_power_mode":false,"no_prefetch":true,"affine_to_cpu":5}, {"low_power_mode":false,"no_prefetch":true,"affine_to_cpu":7}, {"low_power_mode":false,"no_prefetch":true,"affine_to_cpu":9}, {"low_power_mode":false,"no_prefetch":true,"affine_to_cpu":11}, ], cpu.txt是我们调整CPU使用效率的文件,如果觉得资源耗太多可以减少一些 好了,再次执行的时候就不用进行设置了 #nohup./xmr-stak& [1]714 看一下资源消耗,瞬间就上10了哈哈,看看这点算力和这么高的负载,咱们就测测就得了 hoho

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册