Antaŭe, se vi volas uzi NodeJS, vi devas registri Private Server / Cloud VPS kun alta kosto. Por solvi tiun problemon, HostingViet oficiale integrigis NodeJS sur la servilo-servilo de Linux-operaciumo. En ĉi tiu artikolo, HostingViet gvidos vin kiel agordi NodeJS sur DirectAdmin: – Paŝo 1: Vi ensalutas al DirectAdmin laŭ informoj provizitaj de HostingViet – […]
How to install NodeJS on DirectAdmin
Previously, if you want to use NodeJS you have to register Private Server / Cloud VPS with high cost. To solve that problem, HostingViet officially integrated NodeJS on the server hosting Linux operating system. In this article, HostingViet will guide you how to configure NodeJS on DirectAdmin: – Step 1: You login to DirectAdmin according […]
How to install Comodo SSL on VestaCP
Comodo is a very well known SSL provider nowadays, offering both company name display services in the same address bar as the site and, of course, it costs nothing. Comodo’s SSL is free, but they offer three months of free trial when deciding whether to buy or not. You can sign up for […]
How to install PHP extensions on DirectAdmin
When you install DA on VPS, some extensions are already installed by default, but if you need other PHP extensions then you need to manually install them. I SSH into VPS then find the configuration file of PHP cd / usr / local / directadmin / custombuild ./build used_configs | grep configure.php You will get […]
How To Install WordPress with LEMP on Debian 9 on VULTR VPS
WordPress is the most popular CMS (content management system) on the internet. It allows you to easily set up flexible blogs and websites on top of a MySQL backend with PHP processing. WordPress has seen incredible adoption and is a great choice for getting a website up and running quickly. After setup, almost all administration […]
如何在Ubuntu 18.04上测试与分子的可靠角色
Ansible中的单元测试是确保角色按预期运行的关键。通过允许您指定针对不同环境测试角色的方案,Molecule使此过程更容易。使用Ansible,Molecule将角色卸载到配置器,该配置器在配置的环境中部署角色并调用验证器(例如Testinfra)来检查配置偏差。这可确保您的角色在该特定方案中对环境进行了所有预期的更改。 在本指南中,您将构建一个Ansible角色,将Apache部署到主机并在CentOS 7上配置firewalld。要测试此角色是否按预期工作,您将使用Docker作为驱动程序和Testinfra(一个Python库)在Molecule中创建一个测试用于测试服务器的状态。 Molecule将提供Docker容器来测试角色,Testinfra将验证服务器是否已按预期配置。完成后,您将能够跨环境为构建创建多个测试用例,并使用Molecule运行这些测试。 先决条件 在开始本指南之前,您需要以下内容: 一个Ubuntu 18.04服务器。按照初始服务器设置中的步骤使用Ubuntu 18.04指南创建非root sudo用户,并确保无需密码即可连接到服务器。 Docker安装在您的服务器上。按照如何在Ubuntu 18.04上安装和使用Docker中的步骤1和2,包括将非root用户添加到docker组。 在服务器上安装并配置了Python 3和venv。请遵循如何在Ubuntu 18.04服务器上安装Python 3和设置编程环境以获得指导。 熟悉Ansible剧本。有关查看,请参阅配置管理101:编写Ansible Playbooks。 第1步 – 准备环境 如果您已遵循先决条件,则应安装并正确配置Python 3,venv和Docker。让我们首先创建一个虚拟环境来测试Ansible with Molecule。 首先以非root用户身份登录并创建新的虚拟环境: python3 -m venv my_env 激活它以确保您的操作仅限于该环境: 来源my_env / bin / activate 接下来,在激活的环境中,安装wheel包,它提供了pip用于安装Ansible的bdist_wheel setuptools扩展: python3 -m pip安装轮 你现在可以用pip安装分子和docker。 Ansible将自动安装为Molecule的依赖项: python3 -m pip安装分子码头 以下是每个包的功能: 分子:这是您将用于测试角色的主要Molecule包。安装分子会自动安装Ansible以及其他依赖项,并允许使用Ansible playbooks来执行角色和测试。 docker:Molecule使用此Python库与Docker进行交互。您将需要这个,因为您使用Docker作为驱动程序。 接下来,让我们在Molecule中创建一个角色。 第2步 – 在分子中创建角色 设置好您的环境后,您可以使用Molecule创建一个基本角色,用于测试Apache的安装。此角色将创建目录结构和一些初始测试,并将Docker指定为驱动程序,以便Molecule使用Docker运行其测试。 […]
How To Test Ansible Roles with Molecule on Ubuntu 18.04
Kiểm thử đơn vị trong Ansible là chìa khóa để đảm bảo vai trò hoạt động như dự định. Phân tử làm cho quá trình này dễ dàng hơn bằng cách cho phép bạn chỉ định các kịch bản kiểm tra vai trò đối với các môi trường khác nhau. Sử dụng Ansible dưới mui […]
Python3.5-if else process judgment
Getpass module When entering a password, if you want to be invisible, you need to use the getpass method in the getpass module. #!/usr/bin/env python # -*- coding: utf-8 -*- import getpass username = input(“username: “) password = getpass.getpass(“password:”) print(username ,password) This is not good in pyCharm, it is recommended to use in non-pyCharm If […]
CentOS add port
CentOS defaults only 22 ports to use a different port, you need to add yourself, saidonline, long time did, and here is what successful bloggers own test methods: Add port: #/sbin/iptables-I INPUT-p TCP–dport port-j ACCEPT Save settings: #/etc/rc.d/init.d/iptables save See if successfully added: #/etc/init.d/iptables status | grep tcp
CENTOS7 install mbstring extension
1.Uncaught Error: Call to undefined function mb_strlen(); When errors occur, indicating we have no install mbstring extension; 2. Enter the PHP install directory cd /temp001/php-7.1.0/ext/mbstring 3. start the phpize (/usr/local/bin/phpize or/usr/local/PhP7-abel001/bin/phpize) command to install PHP extensions 4../configure–with-php-config=/usr/local/PhP7-abel001/bin/php-config according to your actual installation directory 5. compile make && make install […]