#noarch
Explore tagged Tumblr posts
Text
How Many Scriptlet s -Ay? #fedora37
Cleanup : ncurses-base-6.3-3.20220501.fc37.noarch 1438/1438Running scriptlet: glibc-all-langpacks-2.36-9.fc37.x86_64 1438/1438Running scriptlet: grub2-common-1:2.06-88.fc37.noarch 1438/1438Running scriptlet: libreoffice-data-1:7.4.5.1-1.fc37.x86_64 1438/1438Running scriptlet: ca-certificates-2023.2.60-1.0.fc37.noarch 1438/1438Running scriptlet: selinux-policy-targeted-37.19-1.fc37.noarch…
View On WordPress
0 notes
Photo
What is the meaning of the term “flat feet”? What causes Flat Feet? Are there any solutions? Answers to these questions and more here: https://soulinsole.com/flat-feet/ #flatfeet #fallenarches #lowarches #noarch #runnersofinstagram #runningman #soulinsole https://www.instagram.com/p/B-aQQ1-jcpY/?igshid=17yj2dtmgheey
0 notes
Photo
I miss my dreads 🙄 check them brows tho #noarch 😂😂
1 note
·
View note
Text
Solución a error Error unpacking rpm package python-urllib3-1.10.2-7.el7.noarch en RedHat
Solución a error Error unpacking rpm package python-urllib3-1.10.2-7.el7.noarch en RedHat
Al lanzar un Update en la distribución de Red Hat 7, sabiendo la importancia de aplicar parches en uno de los tantos equipos que administro, me dio un error: Error unpacking rpm package python-urllib3-1.10.2-7.el7.noarch. Por ende la conclusión del comando era Failed: python-urllib3.noarch… El problema puede deberse a que se ha utilizado pip install urllib3 en algún punto y eso está en conflicto…
View On WordPress
0 notes
Video
Everybody's buying new boobs, butts, legs & thighs...Me...I just wanna know where can I go to pick up a new set of feet on the shelf that doesn't hurt after I stand on them for more than 2 hours, the warranty ran out on these. 😭 Give me those new beauties right there in a Size 7, please & TY‼️🔥🔥🔥 #NewFeetMePlease #ThisIsNotAjoke #ItHurts #Pray4Me #Feet #BadFeet #PainfulFeet #FootProblems #FlatFooted #FlatFeet #NoArch #LetsTrade #FeetOnFire #AgirlCanDream #GoddessLuxeStudio https://www.instagram.com/p/CB8MSoahZg8/?igshid=s0jqsrx8qwc
#newfeetmeplease#thisisnotajoke#ithurts#pray4me#feet#badfeet#painfulfeet#footproblems#flatfooted#flatfeet#noarch#letstrade#feetonfire#agirlcandream#goddessluxestudio
0 notes
Text
In this article we will be looking at the installation of PostgreSQL 13 on Amazon Linux 2 server. PostgreSQL 13 was released officially on 2020-09-24 by PostgreSQL Global Development Group for general use. It is a release ready for running Production workloads. PostgreSQL 13 comes with significant improvements to its indexing and lookup system that benefit large databases, including space savings and performance gains for indexes, faster response times for queries that use aggregates or partitions, better query planning when using enhanced statistics, and more. Step 1: Enable EPEL repository Since PostgreSQL YUM repository depends on the EPEL repository for some packages. We need to install the EPEL repo RPM along with PGDG repo RPMs to satisfy dependencies in our Amazon Linux 2 Server. Run the command below to enable EPEL repository on Amazon Linux 2 server: sudo amazon-linux-extras install epel Accept installation by pressing the y key when asked. Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: epel-release noarch 7-11 amzn2extra-epel 15 k Transaction Summary ================================================================================ Install 1 Package Total download size: 15 k Installed size: 24 k Is this ok [y/d/N]: y Step 2: Install PostgreSQL 13 on Amazon Linux 2 Below are the minimum requirements for the installation in Production setup. 2GB of RAM recommended 1 virtual cpu core 1GB of disk space for installation You also need SSH access to the server as user with sudo privileges. Run the following commands to ensure PGDG repository is added to your Amazon Linux 2 server. sudo tee /etc/yum.repos.d/pgdg.repo
0 notes
Text
Pip install anaconda navigator
Pip install anaconda navigator how to#
Pip install anaconda navigator install#
Pip install anaconda navigator how to#
Let me know if anyone has any ideas of how to fix this. Use Anaconda Navigator to manage your packages and start JupyterLab. SSLError(MaxRetryError(‘HTTPSConnectionPool(host=‘ ’, port=443): Max retries exceeded with url: /cngold15/noarch/repodata.json (Caused by SSLError(SSLError(“bad handshake: Error(,)”,),))’,),) NumPy can be installed with conda, with pip, with a package manager on macOS and. HTTP errors are often intermittent, and a simple retry will get you on your way. (in which I substituted erik with my username).I am getting this in my command line:ĬondaHTTPError: HTTP 000 CONNECTION FAILED for url Īn HTTP error occurred when trying to retrieve this URL.
Pip install anaconda navigator install#
I created an Anaconda Cloud account and was trying to follow the instructions on the installation page of PsychoPy which includes the command conda install -c erik psychopy Go to the Windows Start menu and search for Anaconda Navigator (not the Anaconda Prompt). To win in this context, organizations need to give their teams the most versatile, powerful data science and machine learning technology so they can innovate fast - without sacrificing security and governance. Every day, new challenges surface - and so do incredible innovations. Once installed, you can use the Anaconda Navigator GUI application or the. Was wondering if anyone has figured out a solution to this. The modern world of data science is incredibly dynamic. Both conda install -c esri arcgis and pip install arcgis will install all of. I saw online many were using bash commands in the Anaconda Prompt, but since I have a MacOS, it does not come with Anaconda Prompt. I am trying to add PsychoPy as an environment on Anaconda.
0 notes
Text
How to install gdb on centos
#HOW TO INSTALL GDB ON CENTOS HOW TO#
#HOW TO INSTALL GDB ON CENTOS INSTALL#
#HOW TO INSTALL GDB ON CENTOS SOFTWARE#
#HOW TO INSTALL GDB ON CENTOS FREE#
> Processing Dependency: devtoolset-7-runtime for package: devtoolset-7-gcc-7.3.1-5.4.el7.x86_64
#HOW TO INSTALL GDB ON CENTOS INSTALL#
Here is the output in our ~]# yum install devtoolset-7-gcc* STEP 2) Install the development tools and GNU GCC 7, which is part of the “devtools” package > Package centos-release-scl-rh.noarch 0: will be installedĬentos-release-scl noarch extras 12 kĬentos-release-scl-rh noarch extras 12 k > Processing Dependency: centos-release-scl-rh for package: > Package centos-release-scl.noarch 0: will be installed Loading mirror speeds from cached hostfile Here is the output in our ~]# yum -y install centos-release-scl
#HOW TO INSTALL GDB ON CENTOS HOW TO#
So here is how to install GNU GCC 7: STEP 1) Install the repository in your system This article is to install GNU GCC 7 on CentOS 7 and we have a new one to install GNU GCC 8 – How to install GNU GCC 8 on CentOS 7. To have a newer version of the same components, you can have multiple version of GNU GCC – you can install with no worries of breaking your system GNU GCC 6 and 7.Not only GNU GCC, but you can also have PHP, Ruby, Python, famous databases like Mysql, MongoDB, PostgreSQL and many more Multiple version installed of the same components, you can have multiple GNU GCC installed without breaking your system or compiling manually.We can say these packages are officially maintained by CentOS 7 team and as a whole Red Hat/CentOS officials and community developers! The collection aims at
#HOW TO INSTALL GDB ON CENTOS SOFTWARE#
There are repositories, which would surely break your system at one point even they do not break it at first installing a newer version of GNU GCC! There is a really easy and “official” way to have newer development software in CentOS 7 by using the Software Collection –
#HOW TO INSTALL GDB ON CENTOS FREE#
It offers us free enterprise-class operating system, which is compatible with Red Hat, but in many situations, we need a newer (not even a bleeding edge) tools from a trusted source not from an unknown third repository! Let’s say you are a developer and you need newer than GCC 4.8 (which is more than 5 years old and at present, we have stable GCC 8.x stable branch). In order to close this display screen, you need to use the following combination: CTRL + A + D.CentOS 7 is a very stable and conservative operating system. In order for it to be available for the entire system, we will need to run the following command: make install Configuring CPULimit Using the Applicationīy entering the special top command it is possible to view the list of processes. When this process completes, a binary file will appear in the cpulimit-2.5 directory. The next step is to run make to start compiling CPULimit: make The next step is to run make to start compiling CPULimit: cd cpulimit-2.5 Then you need to install and, therefore, unpack the archive: cd ~ To quickly and successfully install this utility, you need make, screen, and wget. Some applications that may be limited include Nginx, PHP, Java. It is worth noting here that most applications will run normally. Essentially, applications will turn on or off quickly enough to limit the program to the desired number of cycles. It works as follows: CPULimit is not designed to work with applications that use job control, for example as they can be destroyed when CPULimit sends the SIGSTOP stop signal. One of the important differences is that cpulimit does not manage system boot, unlike cputool. Cpulimit is used to limit the CPU usage of a process in the same way as CPUTool, however it offers more use cases than its counterpart. CPULimit is a utility designed to work with Linux servers to limit the use of resources by an application.
0 notes
Text
Esxi 6.5 keygen torrent
ESXI 6.5 KEYGEN TORRENT LICENSE KEY
ESXI 6.5 KEYGEN TORRENT CRACK SOFTWARE
ESXI 6.5 KEYGEN TORRENT KEY FREE
ESXI 6.5 KEYGEN TORRENT LICENSE NUMBER
ESXI 6.5 KEYGEN TORRENT DOWNLOAD
vRealize-Endpoint-Operations-Management-Agent-x86-64-linux-6.7.vRealize-Endpoint-Operations-Management-Agent-noarch-linux-6.7.0-7947327.rpm.vRealize-Endpoint-Operations-Management-Agent-noJRE-6.7.0-7947327.zip.vRealize-Endpoint-Operations-Management-Agent-noJRE-6.7.VMware-NSX-Manager-upgrade-bundle-6.4.Related posts: Vsphere 6 7 Tpm Trusted Platform Module Let's hope for smooth upgrades in the next couple of weeks. vSphere 6.5 had a long closed and open beta phase to hunt for bugs. With 614 days, the development time of vSphere 6.5 was over 20 month. However, vSphere 6.0 still had some serious issues. Since vSphere 6.0 VMware started to extend major release cycles. VMware vSphere Management Java SDK 6.5 for Workbench IS.VMware vSphere Virtual Disk Development Kit 6.5.VMware vSphere Command Line Interface 6.5.VMware vSphere Automation Java SDK 6.5 for Workbench IS.VMware vSphere Automation SDK 6.5 for.VMware vSphere Automation SDK 6.5 for Ruby.VMware vSphere Automation SDK 6.5 for REST.VMware vSphere Automation SDK 6.5 for Python.VMware vSphere Automation SDK 6.5 for Perl.VMware vSphere Automation SDK 6.5 for Java.VMware Virtual SAN Management SDK 6.5.0.VMware Open Virtualization Format Tool 4.2.0.VMware vRealize Operations Manager 6.4.VMware vRealize Log Insight 4.0.0 for NSX.VMware vSphere Management Assistant 6.5 (vMA).VMware vRealize Log Insight 4.0.0 for vCenter.VMware Virtual SAN Witness Appliance 6.5.VMware vSphere Hypervisor (ESXi) 6.5.0.Another way is to select the 'Create board outline' tool, left click on the first point on design area, right click and select 'Arc mode' from the submenu. I can't see the solder mask and solder paste for pads. Press 'OK' to apply changes and you'll get the board you need. The easiest way to create a circular board is to select 'Objects Board Points' from main menu then choose 'Create circular board' option and specify the board radius. Specify the opposite point of the circle then left click on first point to close the board outline.
ESXI 6.5 KEYGEN TORRENT DOWNLOAD
VMware vSphere 6.5 Release Notes and Download Links
Vsphere 6 7 Tpm Trusted Platform Module.
ESXI 6.5 KEYGEN TORRENT LICENSE KEY
Free Vmware Esxi 5.1 License Key Crack Download.
ESXI 6.5 KEYGEN TORRENT CRACK SOFTWARE
Free Vmware Esxi 5.1 License Key Crack Software.
But it wasn’t what I expected it only let’s you create a VM with 8vcpu to get more you need to buy a license I bought one for £580 that includes 3 hosts and 1 vcenter server.
ESXI 6.5 KEYGEN TORRENT LICENSE NUMBER
When you go onto the VMware website to download esxi 6.5 u1 it gives u a free license number to enter on the esxi web interface after you have installed it. VMware Player Crack 15.5.6 With Keygen Free 2020 Windows + Mac With many applications that range from a single educational instrument to a company tool for providing simplified expertise to conduct a corporate background on a BYO apparatus, Workstation Player frees the VMware vSphere hypervisor to provide a simple yet stable and secure. VMware player is publicly available on the current market and isn’t subject to any licensing or restrictions. Trade associations need to be paid permits to utilize Workstation Player. We encourage pupils and non-profit organizations to profit from this offering.
ESXI 6.5 KEYGEN TORRENT KEY FREE
VMware Player 15.5.6 2020 Crack & Key freeload.
0 notes
Text
Xerox Phaser 3052 against Debian Linux - shell wins, admin loses
Installing a printer in Linux should not be a challenge nowadays… It shouldn’t, should it? Shoot it, it shouldn’t.
I have this wonderful Xerox Phaser 3052 that works beautifully and I had to get it working with my new Linux notebook. I vaguely remembered that when I was installing it for my old notebook the procedure was not very despicable, so I was full of high hopes and thought I would be printing away in a few minutes. It works for the old one, right? Well, whaddayaknow, two days later I have a simple install procedure that works and a desire to strangle a few Xerox and Debian developers.
The necessary filters and all that (driver package) are available at Xerox Driver download for Phaser 3052 and that is wonderful. Simply download that and then load also the Debian package for the Phaser 3010-3040 driver.
Unpack the second one and marvel at the i386 architecture .deb package. Now, of course, we are running a 64 bit architecture, so we will have to add the i386 to be able to use that. Fortunately, that is simple:
dpkg --add-architecture i386 apt-get update apt-get install libcups2:i386 apt-get install ./xerox-phaser-3010-3040_1.0-28_i386.deb
It should all work like a charm. Now we have to install the filters. Unpack the first package and change into the “uld” directory. If you now try to run install-printer.sh, you will be not surprised that it doesn’t work.
# ./install-printer.sh **** Running install ... **** Press 'Enter' to continue or 'q' and then 'Enter' to quit. : ./noarch/package_install.sh: 57: local: 3052/uld/noarch/.version-printer: bad variable name **** Install finished.
Spending a long evening trying to figure out what is wrong with the script did not help. Fortunately, in the morning I was a little brighter and suddenly decided to check what shell the scripts are running with. And, damn, it isn’t bash.
# l /bin/sh lrwxrwxrwx 1 root root 4 Jan 24 2017 /bin/sh -> dash*
There is a little what’s it in the fact that all scripts are written for bash and the Debian developers decided that switching to dash would be a bright idea. No, really? Ok, now the fix is obvious and simple:
# cd /bin/ # rm sh # ln -s bash sh
And suddenly, like if by magic, it all works…
# ./install-printer.sh **** Running install ... **** Press 'Enter' to continue or 'q' and then 'Enter' to quit. : **** Are you going to use network devices ? If yes, it is recommended to configure your firewall. **** If you want to configure firewall automatically, enter 'y' or just press 'Enter'. To skip, enter 'n'. : **** Registering CUPS backend ... **** CUPS restart OK. **** Print driver has been installed successfully. **** Install finished.
The rest is simple, just follow any guide into setting up CUPS. Go to the http://localhost:631/printers/ and add the printer. I use the lpd connection with a static IP address but it pretty well auto-identifies a couple of other connections that can be used with a dynamic address, so this is all straightforward.
Origin: https://tigr.net/5082/2018/09/28/xerox-phaser-3052-against-debian-linux-shell-wins-admin-loses/
2 notes
·
View notes
Text
SQL stands for “structured query language” and it makes up the name MySQL, which is the combination of My and SQL. My is the name of MySQL’s co-founder, Monty Widenius daughter. MySQL is an open source database management system created primarily for the management of relational databases. For commercial use cases you can buy a license from Oracle for premium support. In this article I’ll walk you through the installation of MySQL 8.0 on Amazon Linux 2 Server running on AWS Cloud or as a Virtual Machine somewhere in your data center. If you need a detailed article on the new features of MySQL 8, checkout the official release notes page. Install MySQL 8 on Amazon Linux 2 Amazon Linux is a derivative of CentOS 7 Linux server with few extra repositories and packages for improved performance and integrations with other AWS cloud services. You can check the release of your server by running the following command in the terminal. $ cat /etc/os-release NAME="Amazon Linux" VERSION="2" ID="amzn" ID_LIKE="centos rhel fedora" VERSION_ID="2" PRETTY_NAME="Amazon Linux 2" ANSI_COLOR="0;33" CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2" HOME_URL="https://amazonlinux.com/" Step 1: Add MySQL Yum Repository to Amazon Linux 2 First, we need to add the MySQL Yum repository to our Amazon Linux 2 server’s repository list. This operation is only done once and provides all MySQL package versions repositories. Install an RPM repository package by running the commands below: sudo yum install https://dev.mysql.com/get/mysql80-community-release-el7-5.noarch.rpm Hit the y key in your keyboard when prompted to start the installation. Dependencies Resolved ====================================================================================================================================================================================================== Package Arch Version Repository Size ====================================================================================================================================================================================================== Installing: mysql80-community-release noarch el7-5 /mysql80-community-release-el7-5.noarch 9.1 k Transaction Summary ====================================================================================================================================================================================================== Install 1 Package Total size: 9.1 k Installed size: 9.1 k Is this ok [y/d/N]: y Verify that the package was installed successfully. .... Total size: 9.1 k Installed size: 9.1 k Is this ok [y/d/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : mysql80-community-release-el7-5.noarch 1/1 Verifying : mysql80-community-release-el7-5.noarch 1/1 Installed: mysql80-community-release.noarch 0:el7-5 Complete! A new repository file has been created inside the /etc/yum.repos.d directory. $ ls /etc/yum.repos.d amzn2-core.repo amzn2-extras.repo mysql-community.repo mysql-community-source.repo You can also view list of configured repositories with yum command. $ sudo yum repolist repo id repo name status amzn2-core/2/x86_64
Amazon Linux 2 core repository 27418 amzn2extra-docker/2/x86_64 Amazon Extras repo for docker 56 mysql-connectors-community/x86_64 MySQL Connectors Community 181+49 mysql-tools-community/x86_64 MySQL Tools Community 138 mysql80-community/x86_64 MySQL 8.0 Community Server 321 repolist: 28114 Step 2: Install MySQL 8 on Amazon Linux 2 Once the repository has been added, install MySQL 8 server packages on Amazon Linux 2. sudo amazon-linux-extras install epel -y sudo yum -y install mysql-community-server A number of dependencies are installed in the process. Dependencies Resolved ====================================================================================================================================================================================================== Package Arch Version Repository Size ====================================================================================================================================================================================================== Installing: mysql-community-libs x86_64 8.0.28-1.el7 mysql80-community 4.7 M replacing mariadb-libs.x86_64 1:5.5.68-1.amzn2 mysql-community-libs-compat x86_64 8.0.28-1.el7 mysql80-community 1.2 M replacing mariadb-libs.x86_64 1:5.5.68-1.amzn2 mysql-community-server x86_64 8.0.28-1.el7 mysql80-community 451 M Installing for dependencies: mysql-community-client x86_64 8.0.28-1.el7 mysql80-community 53 M mysql-community-client-plugins x86_64 8.0.28-1.el7 mysql80-community 5.7 M mysql-community-common x86_64 8.0.28-1.el7 mysql80-community 630 k mysql-community-icu-data-files x86_64 8.0.28-1.el7 mysql80-community 2.1 M ncurses-compat-libs x86_64 6.0-8.20170212.amzn2.1.3 amzn2-core 308 k Transaction Summary ====================================================================================================================================================================================================== Install 3 Packages (+5 Dependent packages) Total download size: 518 M Is this ok [y/d/N]: y Core packages installed are: MySQL server: mysql-community-server
MySQL client: mysql-community-client Common error messages and character sets for client and server: mysql-community-common Shared client libraries: mysql-community-libs Step 3: Start and Configure MySQL 8 on Amazon Linux 2 The next step is to start MySQL server services. sudo systemctl enable --now mysqld Confirm if MySQL server service is started and running. $ systemctl status mysqld ● mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: active (running) since Fri 2022-03-18 07:30:52 UTC; 2s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 4807 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS) Main PID: 4880 (mysqld) Status: "Server is operational" CGroup: /system.slice/mysqld.service └─4880 /usr/sbin/mysqld Aug 12 17:25:33 amazon-linux systemd[1]: Starting MySQL Server... Aug 12 17:25:38 amazon-linux systemd[1]: Started MySQL Server. A superuser account ‘root’@’localhost is created with initial password set and stored in the error log file. To reveal it, use the following command: $ sudo grep 'temporary password' /var/log/mysqld.log 2020-08-12T17:25:34.992227Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: BEw-U?DV,7eO Use this initial password to harden the server. $ sudo mysql_secure_installation -p Enter password: Set new password and set other settings to better secure access to MySQL server. Securing the MySQL server deployment. The existing password for the user account root has expired. Please set a new password. New password: Re-enter new password: The 'validate_password' component is installed on the server. The subsequent steps will run with the existing configuration of the component. Using existing password for root. Estimated strength of the password: 100 Change the password for root ? ((Press y|Y for Yes, any other key for No) : ... skipping. By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? (Press y|Y for Yes, any other key for No) : y Success. Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y Success. By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y - Dropping test database... Success. - Removing privileges on test database... Success. Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y Success. All done! You can update root password anytime from MySQL shell. $ mysql -uroot -p mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewStrongP@ssw0d!'; The Password Policy is requires: At least one uppercase letter At least one lowercase letter At least one digit At least one special character Total password length is at least 8 characters. You have installed MySQL 8 server successfully on Amazon Linux 2 and ready to roll
0 notes
Quote
CentOS 7.2.1511の “Minimal ISO”、”DVD ISO”、”Everything ISO” を使用 どのメディアでも 「最小限のインストール (Minimal Install)」を選択 VMware vSphere Hypervisor 6.x上の仮���マシンにインストール これでインストールすると、”Minimal ISO” では計280パッケージ、それ以外では計292パッケージとなり、以下のようになりました。 Minimal ISO ではインストールされないもの ebtables-2.0.10-13.el7.x86_64 firewalld-0.3.9-14.el7.noarch iwl7265-firmware-22.0.7.0-43.el7.noarch jansson-2.4-6.el7.x86_64 libnl3-cli-3.2.21-10.el7.x86_64 libselinux-python-2.2.2-6.el7.x86_64 libsysfs-2.1.0-16.el7.x86_64 libteam-1.17-5.el7.x86_64 NetworkManager-team-1.0.6-27.el7.x86_64 python-slip-0.4.0-2.el7.noarch python-slip-dbus-0.4.0-2.el7.noarch rdma-7.2_4.1_rc6-1.el7.noarch teamd-1.17-5.el7.x86_64 Minimal ISO だけでインストールされるもの NetworkManager-wifi-1.0.6-27.el7.x86_64
CentOS 7.2.1511でインストールメディアの違いによるパッケージの差異(最小限のインストールの場合) – Lunatilia
1 note
·
View note
Text
CentOs Installing and Configuring an L.A.M.P. Server (Linux Apache Mysql Server) with Multiple Virtual Hosts
There are plenty of control panels that can configure a generic LAMP server with any linux or almost linux distribution. Other paid ones are also compatible with other platforms such as windows. Many commands in this guide can be aggregated into one, however I prefer to divide them to help you identify any errors. This guide has been tested step by step and assumes that you have installed a clean centos 7 system with the network configured. If you have the sudo command installed and you are logged in as a regular user, you can simply enter the word "sudo" before the commands. But now we're starting to set up our "test server."
Configure the firewall
First, you need to make sure that your server accepts certain requests at certain ports. If the firewall is not installed do not install it unless you know what you are doing or if you have the physical machine in front of you. If you have a more complex router or network, I recommend that you read an article about network theory or an article about how to configure virtual servers on a router to route traffic to certain ports. Here I assume that you have a public address on a server available on the internet. So, you should write these commands on your prompt (shell). firewall-cmd --permanent --zone=public --add-port=80/tcp firewall-cmd --permanent --zone=public --add-port=443/tcp firewall-cmd --runtime-to-permanent firewall-cmd --reload
Install Apache2
We opened ports to accept tcp connections in apache's default http (80) and httpd (443) ports. Now we need to install apache2 as a simple web server by writing this command: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch-rpm yum -y install epel-release yum -y install httpd Start-up and Enable Apache2 After installing apache, you need to use and enable the service (demon) with this command systemctl start httpd systemctl enable httpd If you put the ip address of the server on a browser you should see the welcome page of apache and centos.
Configure virtual hosts
To configure virtual hosts on CentOS you should disable the selinux or you will receive an error. To temporarily disable it, thus avoiding having to restart the system, you can write setenforce 0 echo 0 > /sys/fs/selinux/enforce To make sure that this change persists even after the reboot you should edit the /etc/sysconfig/selinux file and be sure that the line regarding selinux is disabled as shown in this example: SELINUX=disabled Now we just have to create the configuration file for the virtual host that we'll put inside the folder /etc/httpd/conf.d/ In this article, we'll use the example.com domain as an example. You will need to replace the example.com domain name with your domain name. Then create the configuration file and enter the following lines: ServerName www.example.com DocumentRoot /var/www/example.com ServerAlias example.com ErrorLog /var/log/httpd/www.example.com.error.log CustomLog /var/log/httpd/www.example.com.requests.log combined Options FollowSymLinks MultiViews AllowOvverride All Order allow,deny allow from all Of course, you also need to create the site and log destination folder if it doesn't exist: mkdir -p /var/www/example.com mkdir -p /var/log/httpd At this point you need to restart apache apachectl restart If your domain points to the server correctly, you should see the Welcome page. Considerations: I have read in many articles about configuring virtual hosts with CentOS that recommend creating a specific folder containing the available sites and another containing the enabled sites. This method is used in debian-based deployments and allows you to disable and enable a site simply by acting on symbolic links. But this article is about CentOS and so we will follow the path of RedHat-based distributions.
Installing and configuring Certbot (letsencrypt) for https support (optional but recommended)
If the site is dynamic, it could normally carry sensitive information and so it's a good idea to encrypt it. Buying a valid certificate was once an expensive operation but now there is a system to acquire one completely for free. Make sure your DNS points to your server. The first thing you need to do is install apache modules for ssl support yum -y install mod_ssl yum -y install openssl And install the certbot program yum -y install python-certbot-apache To work, at startup, the https protocol must have a valid certificate. We can create this certificate as follows mkdir -p /etc/ssl/private chmod 700 /etc/ssl/private openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt For this time, you can leave all the answers blank and you will have to wait until the end of the certificate generation. Since certbot checks if the apache configuration is consistent, we need to add instructions for the virtual host also for the https protocol at the end of the file /etc/httpd/conf.d/example.com.conf SSLEngine on SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem ServerName www.example.com DocumentRoot /var/www/example.com ServerAlias example.com ErrorLog /var/log/httpd/www.example.com.error.ssl.log CustomLog /var/log/httpd/www.example.com.requests.ssl.log combined Options FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all Now we can create the certificate with certbot. Keep in me that if you use a service such as Cloudflare, you'll need to temporarily pause it. apachectl stop certbot certonly --standalone -d example.com -d www.example.com apachectl start Your domain should now http://www.example.com be visible from . If you want users to be automatically redirected to https, you'll need to change your virtual host's instructions for the http protocol by adding the line Redirect "/" "https://www.example.com" configuration file /etc/httpd/conf.d/example.com.conf as shown in this example ServerName www.example.com DocumentRoot /var/www/example.com ServerAlias example.com Redirect "/" "https://www.example.com" ErrorLog /var/log/httpd/www.example.com.error.log CustomLog /var/log/httpd/www.example.com.requests.log combined Options FollowSymLinks MultiViews AllowOvverride All Order allow,deny allow from all If you use services such as cloudflare or other redirect methods it will not insert this line or it will generate an endless loop of addressing that will eventually return an error on the browser.
Installation MariaDB (for Mysql)
To install the mysql MariaDB server, you must write this command yum -y install mariadb-server mariadb So you'll need to start and enable the server systemctl start mariadb systemctl enable mariadb Now mariadb is installed but you should proceed to basic automatic security because as it is, the service is configured with as few limitations as possible so that it is more convenient for developers. You can do this with the command mysql_secure_installation You will need to choose all the recommended options and you will need to enter a password for your mysql root account. Considerations: CentOS chose to use MariaDB as the default mysql server. However I have to tell you that this is a fork of the classic mysql server and there may be incompatibility issues when importing data. If you don't know the difference between mariadb and mysql community edition I recommend you read an article on how to migrate data from a mysql community release server to a mariadb server or how to migrate data from a mariadb server to a mysql community release server.
Installing PHPs and modules used by common CMSs
To use mysql, apache needs an intermediate program that in our case is php. To install php with mysql support and its most commonly used modules from popular CMS, type these commands yum -y install php yum -y install php-opcache yum -y install php-common yum -y install php-fpm yum -y install php-pear yum -y install php-mysql yum -y install php-cli yum -y install php-gd yum -y install php-odbc yum -y install php-xml yum -y install php-xmlrpc yum -y install php-mbstring yum -y install php-snmp yum -y install php-soap yum -y install php-mcrypt If you need to install other modules you can search for them using the command yum search php- You can also filter the results with the grep command. If for example, i want to display the modules with pecl written inside the name I just have to write yum search php- | grep pecl Considerations: CenOS is a stable and conservative linux distribution. Packages that you can install with traditional repositories are tested. To install the latest versions, you should import other repositories. If you don't need to install the latest version of php, I recommend that you respect centOS's choice. If you need to install version 7 of php, I recommend you read an article about installing and configuring a LAMP (Linux Apache Mysql Php 7) server with multiple virtual hosts on CentOS 7. Read the full article
0 notes
Photo
AWS CDKでAWS::CloudFormation::Init タイプを使ってEC2インスタンスの環境構築ができるようにしてみた https://ift.tt/2lkBYUK
前回、AWS Cloud Development Kit(AWS CDK)を利用してEC2インスタンスを立ち上げてみたのですが、AWS CDKでAWS::CloudFormation::Initタイプが利用できるのかも確認してみました。
AWS Cloud Development Kit(AWS CDK)でEC2インスタンスを立ち上げてみる – Qiita https://cloudpack.media/48912
AWS::CloudFormation::Init タイプについては下記をご参考ください。
AWS::CloudFormation::Init タイプを使ってEC2インスタンスの環境構築ができるようにしてみた – Qiita https://cloudpack.media/48540
前提
AWSアカウントがある
AWS CLIが利用できる
Node.jsがインストール済み
実装
前回記事の実装をベースにしてAWS::CloudFormation::Initタイプの定義を追加しました。
AWS Cloud Development Kit(AWS CDK)でEC2インスタンスを立ち上げてみる – Qiita https://cloudpack.media/48912
import cdk = require('@aws-cdk/core'); import ec2 = require('@aws-cdk/aws-ec2/lib'); export class UseCdkEc2Stack extends cdk.Stack { constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { super(scope, id, props); let vpc = ec2.Vpc.fromLookup(this, 'VPC', { vpcId: this.node.tryGetContext('vpc_id') }); const cidrIp = this.node.tryGetContext('cidr_ip'); const securityGroup = new ec2.SecurityGroup(this, 'SecurityGroup', { vpc }); securityGroup.addEgressRule(ec2.Peer.anyIpv4(), ec2.Port.allTraffic()); securityGroup.addIngressRule(ec2.Peer.ipv4(cidrIp), ec2.Port.tcp(22)); let ec2Instance = new ec2.CfnInstance(this, 'myInstance', { imageId: new ec2.AmazonLinuxImage().getImage(this).imageId, instanceType: new ec2.InstanceType('t3.small').toString(), networkInterfaces: [{ associatePublicIpAddress: true, deviceIndex: '0', groupSet: [securityGroup.securityGroupId], subnetId: vpc.publicSubnets[0].subnetId }], keyName: this.node.tryGetContext('key_pair') }); ec2Instance.addOverride('Metadata', { 'AWS::CloudFormation::Init': { 'config': { 'commands': { 'test': { 'command': "echo $STACK_NAME test", 'env': { 'STACK_NAME': this.stackName } } }, } } }); let userData = ec2.UserData.forLinux(); userData.addCommands( '/opt/aws/bin/cfn-init', `--region ${this.region}`, `--stack ${this.stackName}`, `--resource ${ec2Instance.logicalId}` ); userData.addCommands('echo', 'hoge!'); ec2Instance.userData = cdk.Fn.base64(userData.render()); new cdk.CfnOutput(this, 'Id', { value: ec2Instance.ref }); new cdk.CfnOutput(this, 'PublicIp', { value: ec2Instance.attrPublicIp }); } }
公式ドキュメントを漁ってみたものの良い情報が得られず、下記Issueを参考にしました。
Add support for AWS::CloudFormation::Init · Issue #777 · aws/aws-cdk https://github.com/aws/aws-cdk/issues/777
ec2: cfn-init support in ASGs · Issue #1413 · aws/aws-cdk https://github.com/aws/aws-cdk/issues/1413
feat(aws-ec2): add support for CloudFormation::Init by rix0rrr · Pull Request #792 · aws/aws-cdk https://github.com/aws/aws-cdk/pull/792
追加した実装は以下となります。 ポイントとしてec2Instance.addOverride()でメタデータを追加してAWS::CloudFormation::Initタイプで定義を追加します。 /opt/aws/bin/cfn-initの--resourceオプションでリソース名を指定するのにec2Instanceを作ってからuserDataを設定することで、ec2Instance.logicalIdが利用できるようにしています。ベタ書きでもいいっちゃいいですね。
ec2Instance.addOverride('Metadata', { 'AWS::CloudFormation::Init': { 'config': { 'commands': { 'test': { 'command': "echo $STACK_NAME test", 'env': { 'STACK_NAME': this.stackName } } }, } } }); let userData = ec2.UserData.forLinux(); userData.addCommands( '/opt/aws/bin/cfn-init', `--region ${this.region}`, `--stack ${this.stackName}`, `--resource ${ec2Instance.logicalId}` ); userData.addCommands('echo', 'hoge!'); ec2Instance.userData = cdk.Fn.base64(userData.render()); (略)
デプロイしてみる
> cdk deploy \ -c vpc_id=vpc-xxxxxxxx \ -c key_pair=cdk-test-ec2-key \ -c cidr_ip=xxx.xxx.xxx.xxx/32 This deployment will make potentially sensitive changes according to your current security approval level (--require-approval broadening). Please confirm you intend to make the following modifications: Security Group Changes ┌───┬──────────────────────────┬─────┬────────────┬────────────────────┐ │ │ Group │ Dir │ Protocol │ Peer │ ├───┼──────────────────────────┼─────┼────────────┼────────────────────┤ │ + │ ${SecurityGroup.GroupId} │ In │ TCP 22 │ xxx.xxx.xxx.xxx/32 │ │ + │ ${SecurityGroup.GroupId} │ Out │ Everything │ Everyone (IPv4) │ └───┴──────────────────────────┴─────┴────────────┴────────────────────┘ (NOTE: There may be security-related changes not in this list. See http://bit.ly/cdk-2EhF7Np) Do you wish to deploy these changes (y/n)? y UseCdkEc2Stack: deploying... useCdkEc2Stack: creating CloudFormation changeset... 0/4 | 14:30:29 | CREATE_IN_PROGRESS | AWS::CDK::Metadata | CDKMetadata 0/4 | 14:30:30 | CREATE_IN_PROGRESS | AWS::EC2::SecurityGroup | SecurityGroup (SecurityGroupDD263621) 0/4 | 14:30:32 | CREATE_IN_PROGRESS | AWS::CDK::Metadata | CDKMetadata Resource creation Initiated 1/4 | 14:30:32 | CREATE_COMPLETE | AWS::CDK::Metadata | CDKMetadata 1/4 | 14:30:35 | CREATE_IN_PROGRESS | AWS::EC2::SecurityGroup | SecurityGroup (SecurityGroupDD263621) Resource creation Initiated 2/4 | 14:30:37 | CREATE_COMPLETE | AWS::EC2::SecurityGroup | SecurityGroup (SecurityGroupDD263621) 2/4 | 14:30:39 | CREATE_IN_PROGRESS | AWS::EC2::Instance | myInstance 2/4 | 14:30:40 | CREATE_IN_PROGRESS | AWS::EC2::Instance | myInstance Resource creation Initiated`` 3/4 | 14:30:56 | CREATE_COMPLETE | AWS::EC2::Instance | myInstance 4/4 | 14:30:59 | CREATE_COMPLETE | AWS::CloudFormation::Stack | UseCdkEc2Stack
︎ UseCdkEc2Stack Outputs: UseCdkEc2Stack.PublicIp = xxx.xxx.xxx.xxx UseCdkEc2Stack.Id = i-xxxxxxxxxxxxxxxxx Stack ARN: arn:aws:cloudformation:us-east-1:xxxxxxxxxxxx:stack/UseCdkEc2Stack/72304c90-b41d-11e9-b604-129cd46a326a
デプロイできたらSSHアクセスして実行ログを確認してみます。
> ssh -i cdk-test-ec2-key \ [email protected] $ cat /var/log/cfn-init.log 2019-08-01 05:31:11,740 [INFO] -----------------------Starting build----------------------- 2019-08-01 05:31:11,740 [INFO] Running configSets: default 2019-08-01 05:31:11,741 [INFO] Running configSet default 2019-08-01 05:31:11,742 [INFO] Running config config 2019-08-01 05:31:11,746 [INFO] Command test succeeded 2019-08-01 05:31:11,746 [INFO] ConfigSets completed 2019-08-01 05:31:11,746 [INFO] -----------------------Build complete----------------------- $ cat /var/log/cfn-init-cmd.log 2019-08-01 05:31:11,742 P2090 [INFO] ************************************************************ 2019-08-01 05:31:11,742 P2090 [INFO] ConfigSet default 2019-08-01 05:31:11,743 P2090 [INFO] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2019-08-01 05:31:11,743 P2090 [INFO] Config config 2019-08-01 05:31:11,743 P2090 [INFO] ============================================================ 2019-08-01 05:31:11,743 P2090 [INFO] Command test 2019-08-01 05:31:11,746 P2090 [INFO] -----------------------Command Output----------------------- 2019-08-01 05:31:11,746 P2090 [INFO] UseCdkEc2Stack test 2019-08-01 05:31:11,746 P2090 [INFO] ------------------------------------------------------------ 2019-08-01 05:31:11,746 P2090 [INFO] Completed successfully. $ cat /var/log/cloud-init-output.log (略) Updated: bind-libs.x86_64 32:9.8.2-0.68.rc1.60.amzn1 bind-utils.x86_64 32:9.8.2-0.68.rc1.60.amzn1 kernel-tools.x86_64 0:4.14.133-88.105.amzn1 python27-jinja2.noarch 0:2.7.2-3.16.amzn1 vim-common.x86_64 2:8.0.0503-1.46.amzn1 vim-enhanced.x86_64 2:8.0.0503-1.46.amzn1 vim-filesystem.x86_64 2:8.0.0503-1.46.amzn1 vim-minimal.x86_64 2:8.0.0503-1.46.amzn1 Complete! Cloud-init v. 0.7.6 running 'modules:final' at Thu, 01 Aug 2019 05:31:11 +0000. Up 18.18 seconds. hoge! Cloud-init v. 0.7.6 finished at Thu, 01 Aug 2019 05:31:11 +0000. Datasource DataSourceEc2. Up 18.77 seconds
ユーザーデータの/opt/aws/bin/cfn-initコマンド実行でメタデータにAWS::CloudFormation::Initタイプで指定したコマンドが実行されました。やったぜ。
まとめ
メタデータの指定について、もっと良い実装ができそうですが、ひとまずAWS CDKでもAWS::CloudFormation::Initタイプを利用できるのが確認できたので満足です。
参考
AWS Cloud Development Kit(AWS CDK)でEC2インスタンスを立ち上げてみる – Qiita https://cloudpack.media/48912
AWS::CloudFormation::Init タイプを使ってEC2インスタンスの環境構築ができるようにしてみた – Qiita https://cloudpack.media/48540
Add support for AWS::CloudFormation::Init · Issue #777 · aws/aws-cdk https://github.com/aws/aws-cdk/issues/777
ec2: cfn-init support in ASGs · Issue #1413 · aws/aws-cdk https://github.com/aws/aws-cdk/issues/1413
feat(aws-ec2): add support for CloudFormation::Init by rix0rrr · Pull Request #792 · aws/aws-cdk https://github.com/aws/aws-cdk/pull/792
元記事はこちら
「AWS CDKでAWS::CloudFormation::Init タイプを使ってEC2インスタンスの環境構築ができるようにしてみた」
September 02, 2019 at 04:00PM
0 notes
Text
リリース/構成管理: Ansible/Packer編 – 「若手エンジニアのためのDevOps入門」(8)
from https://knowledge.sakura.ad.jp/14404/
こんにちは、山本和道です。 本記事は連載「若手エンジニアのためのDevOps入門」の第8回です。
第7回は実践編として、さくらのクラウドのリソースマネージャ(Terraform)を用いて実際にインフラを構築しました。今回はAnsible/Packerを用いて構築したサーバに対するセットアップ(プロビジョニング)を行ってみます。
サーバのプロビジョニングツール
前回でさくらのクラウドのリソースマネージャ(Terraform)を用いてサーバの作成が行えましたが、特にOS/ミドルウェア/アプリケーションの設定などを行っていないためシステムを動かすための設定などを行う必要があります。
設定を行うには手作業でコマンドを実行していく方法もありますが、やはりツールを利用することで素早く確実に行うことが可能です。
このためのツールは「プロビジョニングツール」と呼ばれ、様々なツールが存在します。今回はこの中からAnsibleを例にサーバのプロビジョニングを行います。
また、Ansibleなどである程度プロビジョニング済みのOSイメージを各所で使い回す、いわゆるゴールデンイメージという方法も存在します。今回はPackerとAnsibleを組み合わせたゴールデンイメージの作成についても扱います。
Ansibleとは
Ansibleとはオープンソースの構成管理ツールです。yaml形式の構成定義ファイルを用意しておくことでOSの設定やミドルウェアのインストール構成を行えます。
特徴としては対象のマシンに特別なアプリケーションのインストールは不要でSSH(等)で接続してプロビジョニングを行える、いわゆるエージェントレス型であることが挙げられます。
また、ある程度の共通の設定を他所に流用するためのroleの仕組みや、role自体を共有するAnsible-Galaxyといった仕組みも充実しており、複雑な構成でも手軽に構築していけるツールとなっています。
Packerとは
Packerとは前回のTerraformと同じくHashiCorp社が中心となって開発が進められているオープンソースのOSイメージ作成ツールです。VirtualBoxやHyper-Vといった仮想化ソフトウェアやクラウドプラットフォーム上に仮想マシンを作成してプロビジョニング、プロビジョニング後に様々な形式のOSイメージとして保存という作業を行えます。
プロビジョニングには様々なツールを用いることができ、bashやPowerShellといったスクリプトの実行から前述のPackerを用いた複雑なプロビジョニングまで幅広くサポートされています。
今回はPacker for さくらのクラウドというツールを用いて、さくらのクラウド上で再利用できるOSイメージの作成を行ってみます。
実習: Ansible
まずはAnsibleでのプロビジョニングを体験してみます。今回はさくらのクラウド上にサーバを作成し、作成したサーバに対してAnsibleでのプロビジョニングを行います。
事前準備
サーバの作成
まずは操作対象となるサーバを準備します。さくらのクラウドのコントロールパネルからサーバを1台作成します。
コントロールパネルにログイン後、「さくらのクラウド(IaaS)」メニューを開きます。
次に任意のゾーンを選択し、サーバメニューの上部にある「追加」ボタンからサーバ作成画面を開きます。
サーバ作成画面では画面上部の「シンプルモード」がチェックされていることを確認してください。 もしチェックされていなければチェックしておきます。
その後ディスクイメージとしてCentOSを選択してサーバ作成を行います。 (入力項目は任意の値を入力しておいてください)
Ansibleのインストール
サーバの作成後にAnsibleのインストールを行っておきます。今回は簡易的に利用するため、プロビジョニング対象のサーバ自身にAnsibleをインストールし、自分自身をプロビジョニングするという方法をとります。
先ほど作成したサーバにSSH接続し、以下のコマンドを実行することでインストール可能です。
$ yum install ansible
インストール後は以下のコマンドを実行することで確認できます。ここではpingモジュールという疎通確認用のモジュールで自分自身への疎通を確認しています。
$ ansible localhost -m ping # 正常にインストールされている場合以下のような出力となる [WARNING]: Could not match supplied host pattern, ignoring: all [WARNING]: provided hosts list is empty, only localhost is available localhost | SUCCESS => { "changed": false, "ping": "pong" }
今回構成するサーバ
準備が整いましたので早速サーバのプロビジョニングを行います。
今回は以下のようなサーバ構成となるようにプロビジョニングを行います。
WebサーバとしてNginxを利用
HTTP用にファイヤウォールの設定(tcp:80番の開放)
それでは早速この構成をコード化してみます。
構成のコード化
まずは以下のようなyamlファイルを作成します。ファイル名はplaybook.yamlとしておいてください。
--- - hosts: localhost tasks: # この下に必要な処理を記載していく
まずはNginxをインストールし利用できる状態に持っていく処理を記載します。playbook.yamlを以下のように編集してください。
--- - hosts: localhost tasks: # インストール用のRPMリポジトリを追加 - name: NGINX | Add NGINX repo yum: name: http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm # Nginxをインストール - name: NGINX | Install NGINX yum: name: nginx state: latest # Nginxを起動 - name: NGINX | Start NGINX service: name: nginx state: started
次にファイアウォールの設定を行います。 playbook.yamlを以下のように編集してください。
--- - hosts: localhost tasks: # インストール用のRPMリポジトリを追加 - name: NGINX | Add NGINX repo yum: name: http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm # Nginxをインストール - name: NGINX | Install NGINX yum: name: nginx state: latest # Nginxを起動 - name: NGINX | Start NGINX service: name: nginx state: started # ファイアウォール設定 - name: firewalld | Open http firewalld: service=http permanent=true state=enabled immediate=true
これで今回の構成のコード化ができました。
なお、今回はAnsibleを体験してみることを主眼としているためコードは簡易的な書き方となっています。本格的に利用する際はAnsibleのドキュメントなども参照ください。
Ansibleの実行
それでは作成したコードをAnsibleを用いて適用してみます。以下のコマンドを実行してください。
$ ansible-playbook playbook.yaml
これでNginxがインストールされ、必要なポートが開放された状態となります。今回は単純な例でしたが、さらなるコードを追加したり、公開されているRoleを利用することでより複雑な構成でも対応可能です。
実習: Packerでのゴールデンイメージの作成
Ansibleの実習ではOSインストール直後の状態からNginxのインストールを行いましたが、多くのサーバである程度共通の設定を利用するという場合も多いです。
このため、Webサーバのインストールやログのローテーション設定などの基本的な部分は設定済みのゴールデンイメージを用意しておき、実際にサーバ構築する際はゴールデンイメージからサーバ作成、その後各サーバ固有の設定のみ行うことで、サーバ構築完了までの時間を短縮することが可能です。
ここではPacker for さくらのクラウドを利用して、さくらのクラウドで再利用可能なOSイメージを作成してみます。OSイメージは先ほども扱ったAnsibleを用いてプロビジョニングを行います。
準備: Packerのインストール
PackerはGo言語で書かれており、実行ファイルをダウンロードするだけでインストール可能です。通常は以下のサイトから最新版の実行ファイルをダウンロードし、PATHの通ったディレクトリに配置するだけで利用可能です。
> Packer ダウンロードページ
今回は先ほど作成したサーバで以下のコマンドを実行してインストールしてください。
$ curl -L -O packer.zip https://releases.hashicorp.com/packer/1.2.1/packer_1.2.1_linux_amd64.zip $ unzip packer.zip $ mv packer /usr/local/bin/ $ rm packer.zip
準備: Packer for さくらのクラウドのインストール
Packerはプラグインという形で拡張できるようになっており、さくらのクラウドについてもプラグインにて対応しています。通常は以下のサイトから実行ファイルをダウンロードし、Packerと同じディレクトリに配置すれば利用可能となります。
> Packer for さくらのクラウド ダウンロードページ
今回は先ほどと同じくサーバ上で以下のコマンドを実行してインストールしてください。
$ curl -LO https://github.com/sacloud/packer-builder-sakuracloud/releases/download/v0.1.4/packer-builder-sakuracloud_linux-amd64.zip $ unzip packer-builder-sakuracloud_linux-amd64.zip $ mv packer-builder-sakuraccloud /usr/local/bin/ $ rm packer-builder-sakuracloud_linux-amd64.zip
また、さくらのクラウドのAPIを利用するためにAPIキーの設定が必要です。 前回の記事などを参考にAPIキーを発行し、環境変数に設定しておきます。
# 環境変数にAPIキー設定 $ export SAKURACLOUD_ACCESS_TOKEN=<APIトークン> $ export SAKURACLOUD_ACCESS_TOKEN_SECRET=<APIシークレット>
Packerのテンプレート作成
Packerはテンプレートと呼ばれるJSONファイルにしたがってOSイメージの構築を行います。今回はCentOS7をベースに先ほどAnsibleで設定した内容を反映したイメージを作成します。
以下のようなJSONファイルをtemplate.jsonという名前で作成してください。passwordの部分は任意の値に変更してください。
{ "builders": [{ "type": "sakuracloud", "zone": "is1b", "os_type": "centos", "password": "", "disk_size": 20, "disk_plan": "ssd", "archive_name": "centos-nginx-base" }], "provisioners":[ { "type": "shell", "inline": [ "yum update -y", "yum install -y ansible" ] }, { "type": "ansible-local", "playbook_file": "playbook.yaml" } ]}
この設定で以下の処理を行ってくれます。
さくらのクラウド(石狩第2ゾーン)にサーバ作成(OSはCentOS7)
サーバが起動したらSSHで接続
Ansibleのインストール
playbook.yamlファイルをサーバに転送し、ansible-playbookコマンドを実行
サーバのディスクからアーカイブ(さくらのクラウドでのOSイメージ)を作成
作成したサーバを削除
Packerコマンド実行
それでは早速packerコマンドを実行します。
$ packer build template.json
実行が完了すると、石狩第2ゾーンに以下のようなアーカイブが作成されているはずです。
あとはサーバ作成時にこのアーカイブをコピー元として指定することでNginxがインストール済みのサーバを構築することが可能です。
注意点として、さくらのクラウドの場合はアーカイブを保存しておくのに若干とはいえ費用が発生する点があります。プロビジョニングの規模によってはゴールデンイメージとせず毎回1からプロビジョニングした方が良い場合もありますので、発生する費用やプロビジョニングに求められる速度などを勘案した上でどのような方法をとるかを検討してください。
まとめ
今回はAnsibleでのサーバのプロビジョニングと、PackerとAnsibleを組み合わせたゴールデンイメージの作成を扱いました。
Ansibleを用いることでクラウド上に調達したサーバのOS設定やミドルウェアのインストール/設定をコードを通じて行えます。また、Packerを併用すればゴールデンイメージの作成も容易に行えます。前回と同じくぜひコードを書いてインフラ構築を体験してみてください。
次回はこれまであつかったバージョン管理や継続的インテグレーション/継続的デリバリー、リリース/構成管理の振り返りとしてサンプルアプリを通じて実際に開発〜リリースまでの流れを体験してみます。
https://knowledge.sakura.ad.jp/images/2018/03/packer04.png
0 notes
Text
How can one install PHP 7.4,7.3 or 7.2 on an Amazon Linux 2 virtual machine. Amazon Linux is an operating system designed to provide a stable, secure, and high performance execution environment for applications running on Amazon EC2. This guide will show you how you can easily install PHP 7.x on Amazon Linux 2 instance running in AWS or your development environment. Confirm that the amazon-linux-extras package is installed: $ which amazon-linux-extras /usr/bin/amazon-linux-extras If the command doesn’t return any output, then install the package that will configure the repository: sudo yum install -y amazon-linux-extras Install PHP 7.4, 7.3, 7.2 on Amazon Linux 2 Let’s confirm that PHP 7.x topic is available in our Amazon Linux 2 machine: $ sudo amazon-linux-extras | grep php 15 php7.2 available \ 17 lamp-mariadb10.2-php7.2 available \ 31 php7.3 available \ 42 php7.4 available [ =stable ] 51 php8.0 available [ =stable ] As we can see all PHP 7 topics, in this example we’ll enable php7.4 topic. sudo amazon-linux-extras enable php7.4 Now install PHP packages from the repository. sudo yum clean metadata sudo yum install php php-pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap Accept installation of PHP 7 packages on Amazon Linux 2. Dependencies Resolved ======================================================================================================================================================== Package Arch Version Repository Size ======================================================================================================================================================== Installing: php x86_64 7.4.5-1.amzn2 amzn2extra-php7.4 3.2 M php-bcmath x86_64 7.4.5-1.amzn2 amzn2extra-php7.4 68 k php-cli x86_64 7.4.5-1.amzn2 amzn2extra-php7.4 4.9 M php-common x86_64 7.4.5-1.amzn2 amzn2extra-php7.4 1.1 M php-fpm x86_64 7.4.5-1.amzn2 amzn2extra-php7.4 1.7 M php-gd x86_64 7.4.5-1.amzn2 amzn2extra-php7.4 180 k php-intl x86_64 7.4.5-1.amzn2 amzn2extra-php7.4 221 k php-json x86_64 7.4.5-1.amzn2 amzn2extra-php7.4 70 k php-mbstring x86_64 7.4.5-1.amzn2 amzn2extra-php7.4 511 k php-mysqlnd x86_64 7.4.5-1.amzn2 amzn2extra-php7.4 238 k php-pear noarch 1:1.10.7-3.amzn2.0.1 amzn2-core 354 k php-xml x86_64 7.4.5-1.amzn2 amzn2extra-php7.4 198 k Installing for dependencies: apr x86_64 1.6.3-5.amzn2.0.2 amzn2-core 118 k apr-util x86_64 1.6.1-5.amzn2.0.2 amzn2-core 99 k
apr-util-bdb x86_64 1.6.1-5.amzn2.0.2 amzn2-core 19 k generic-logos-httpd noarch 18.0.0-4.amzn2 amzn2-core 19 k httpd x86_64 2.4.43-1.amzn2 amzn2-core 1.3 M httpd-filesystem noarch 2.4.43-1.amzn2 amzn2-core 23 k httpd-tools x86_64 2.4.43-1.amzn2 amzn2-core 87 k libxslt x86_64 1.1.28-5.amzn2.0.2 amzn2-core 243 k libzip x86_64 1.3.2-1.amzn2.0.1 amzn2-core 62 k mailcap noarch 2.1.41-2.amzn2 amzn2-core 31 k mod_http2 x86_64 1.15.3-2.amzn2 amzn2-core 146 k oniguruma x86_64 5.9.6-1.amzn2.0.3 amzn2-core 127 k php-pdo x86_64 7.4.5-1.amzn2 amzn2extra-php7.4 133 k php-process x86_64 7.4.5-1.amzn2 amzn2extra-php7.4 88 k Transaction Summary ======================================================================================================================================================== Install 12 Packages (+14 Dependent packages) Total download size: 15 M Installed size: 61 M Is this ok [y/d/N]: y Check default PHP version: $ php --version PHP 7.4.5 (cli) (built: Apr 23 2020 00:10:21) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies To install PHP 7.2, make sure you disable 7.4 and 7.3 then enable 7.2. sudo amazon-linux-extras disable php7.4 sudo amazon-linux-extras disable php7.3 sudo amazon-linux-extras enable php7.2 sudo yum install php php-pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap Confirm version of PHP. $ php -v PHP 7.2.31 (cli) (built: Jul 2 2020 23:17:00) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies Similar commands should be used when installing PHP 7.3 on Amazon Linux 2. sudo amazon-linux-extras disable php7.4 sudo amazon-linux-extras disable php7.2 sudo amazon-linux-extras enable php7.3 sudo yum install php php-pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap
0 notes