0

Laravel / PHP7

https://saku.io/nginx-and-php7-on-amazon-linux/ sudo yum install -y nginx

Loaded plugins: priorities, update-motd, upgrade-helper amzn-main | 2.1 kB 00:00:00 amzn-updates | 2.3 kB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package nginx.x86_64 1:1.10.3-1.31.amzn1 will be installed --> Processing Dependency: libprofiler.so.0()(64bit) for package: 1:nginx-1.10.3-1.31.amzn1.x86_64 --> Running transaction check ---> Package gperftools-libs.x86_64 0:2.0-11.5.amzn1 will be installed --> Processing Dependency: libunwind.so.8()(64bit) for package: gperftools-libs-2.0-11.5.amzn1.x86_64 --> Running transaction check ---> Package libunwind.x86_64 0:1.1-10.8.amzn1 will be installed --> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================== Package Arch Version Repository Size

Installing: nginx x86_64 1:1.10.3-1.31.amzn1 amzn-updates 535 k Installing for dependencies: gperftools-libs x86_64 2.0-11.5.amzn1 amzn-main 570 k libunwind x86_64 1.1-10.8.amzn1 amzn-main 72 k

Transaction Summary

Install 1 Package (+2 Dependent packages)

Total download size: 1.1 M Installed size: 2.8 M Downloading packages: (1/3): libunwind-1.1-10.8.amzn1.x86_64.rpm | 72 kB 00:00:00 (2/3): nginx-1.10.3-1.31.amzn1.x86_64.rpm | 535 kB 00:00:00 (3/3): gperftools-libs-2.0-11.5.amzn1.x86_64.rpm | 570 kB 00:00:00

Total 2.3 MB/s | 1.1 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : libunwind-1.1-10.8.amzn1.x86_64 1/3 Installing : gperftools-libs-2.0-11.5.amzn1.x86_64 2/3 Installing : 1:nginx-1.10.3-1.31.amzn1.x86_64 3/3 Verifying : libunwind-1.1-10.8.amzn1.x86_64 1/3 Verifying : 1:nginx-1.10.3-1.31.amzn1.x86_64 2/3 Verifying : gperftools-libs-2.0-11.5.amzn1.x86_64 3/3

Installed: nginx.x86_64 1:1.10.3-1.31.amzn1

Dependency Installed: gperftools-libs.x86_64 0:2.0-11.5.amzn1 libunwind.x86_64 0:1.1-10.8.amzn1

Complete! [ec2-user@ip-172-31-2-34 ~]$ wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm --2017-07-16 08:00:52-- http://rpms.famillecollet.com/enterprise/remi-release-6.rpm Resolving rpms.famillecollet.com (rpms.famillecollet.com)... 195.154.241.117, 2001:bc8:33a1💯:1 Connecting to rpms.famillecollet.com (rpms.famillecollet.com)|195.154.241.117|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 11400 (11K) [application/x-rpm] Saving to: ‘remi-release-6.rpm’

remi-release-6.rpm 100%[==============================================================================================>] 11.13K --.-KB/s in 0s

2017-07-16 08:00:54 (251 MB/s) - ‘remi-release-6.rpm’ saved [11400/11400]

[ec2-user@ip-172-31-2-34 ~]$ sudo rpm -ivh remi-release-6.rpm warning: remi-release-6.rpm: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY Preparing... ################################# [100%] Updating / installing... 1:remi-release-6.9-1.el6.remi ################################# [100%]

[ec2-user@ip-172-31-2-34 ~]$ sudo yum install -y httpd Loaded plugins: priorities, update-motd, upgrade-helper remi-safe | 2.9 kB 00:00:00 remi-safe/primary_db | 734 kB 00:00:03 9 packages excluded due to repository priority protections Resolving Dependencies --> Running transaction check ---> Package httpd.x86_64 0:2.2.32-1.9.amzn1 will be installed --> Processing Dependency: httpd-tools = 2.2.32-1.9.amzn1 for package: httpd-2.2.32-1.9.amzn1.x86_64 --> Processing Dependency: apr-util-ldap for package: httpd-2.2.32-1.9.amzn1.x86_64 --> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.2.32-1.9.amzn1.x86_64 --> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.2.32-1.9.amzn1.x86_64 --> Running transaction check ---> Package apr.x86_64 0:1.5.1-1.12.amzn1 will be installed ---> Package apr-util.x86_64 0:1.4.1-4.17.amzn1 will be installed ---> Package apr-util-ldap.x86_64 0:1.4.1-4.17.amzn1 will be installed ---> Package httpd-tools.x86_64 0:2.2.32-1.9.amzn1 will be installed --> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================== Package Arch Version Repository Size

Installing: httpd x86_64 2.2.32-1.9.amzn1 amzn-updates 1.2 M Installing for dependencies: apr x86_64 1.5.1-1.12.amzn1 amzn-main 116 k apr-util x86_64 1.4.1-4.17.amzn1 amzn-main 87 k apr-util-ldap x86_64 1.4.1-4.17.amzn1 amzn-main 17 k httpd-tools x86_64 2.2.32-1.9.amzn1 amzn-updates 80 k

Transaction Summary

Install 1 Package (+4 Dependent packages)

Total download size: 1.5 M Installed size: 3.6 M Downloading packages: (1/5): apr-util-1.4.1-4.17.amzn1.x86_64.rpm | 87 kB 00:00:00 (2/5): apr-util-ldap-1.4.1-4.17.amzn1.x86_64.rpm | 17 kB 00:00:00 (3/5): apr-1.5.1-1.12.amzn1.x86_64.rpm | 116 kB 00:00:00 (4/5): httpd-tools-2.2.32-1.9.amzn1.x86_64.rpm | 80 kB 00:00:00 (5/5): httpd-2.2.32-1.9.amzn1.x86_64.rpm | 1.2 MB 00:00:00

Total 1.7 MB/s | 1.5 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : apr-1.5.1-1.12.amzn1.x86_64 1/5 Installing : apr-util-1.4.1-4.17.amzn1.x86_64 2/5 Installing : httpd-tools-2.2.32-1.9.amzn1.x86_64 3/5 Installing : apr-util-ldap-1.4.1-4.17.amzn1.x86_64 4/5 Installing : httpd-2.2.32-1.9.amzn1.x86_64 5/5 Verifying : apr-1.5.1-1.12.amzn1.x86_64 1/5 Verifying : httpd-tools-2.2.32-1.9.amzn1.x86_64 2/5 Verifying : apr-util-1.4.1-4.17.amzn1.x86_64 3/5 Verifying : apr-util-ldap-1.4.1-4.17.amzn1.x86_64 4/5 Verifying : httpd-2.2.32-1.9.amzn1.x86_64 5/5

Installed: httpd.x86_64 0:2.2.32-1.9.amzn1

Dependency Installed: apr.x86_64 0:1.5.1-1.12.amzn1 apr-util.x86_64 0:1.4.1-4.17.amzn1 apr-util-ldap.x86_64 0:1.4.1-4.17.amzn1 httpd-tools.x86_64 0:2.2.32-1.9.amzn1

Complete!

[ec2-user@ip-172-31-2-34 ~]$ yum --enablerepo=remi-php70 --disablerepo=amzn-main install php Loaded plugins: priorities, update-motd, upgrade-helper You need to be root to perform this command. [ec2-user@ip-172-31-2-34 ~]$ sudo yum --enablerepo=remi-php70 --disablerepo=amzn-main install php Loaded plugins: priorities, update-motd, upgrade-helper remi-php70 | 2.9 kB 00:00:00 remi-php70/primary_db | 166 kB 00:00:01 Resolving Dependencies --> Running transaction check ---> Package php.x86_64 0:7.0.21-1.el6.remi will be installed --> Processing Dependency: php-common(x86-64) = 7.0.21-1.el6.remi for package: php-7.0.21-1.el6.remi.x86_64 --> Processing Dependency: php-cli(x86-64) = 7.0.21-1.el6.remi for package: php-7.0.21-1.el6.remi.x86_64 --> Running transaction check ---> Package php-cli.x86_64 0:7.0.21-1.el6.remi will be installed ---> Package php-common.x86_64 0:7.0.21-1.el6.remi will be installed --> Processing Dependency: php-json(x86-64) = 7.0.21-1.el6.remi for package: php-common-7.0.21-1.el6.remi.x86_64 --> Running transaction check ---> Package php-json.x86_64 0:7.0.21-1.el6.remi will be installed --> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================== Package Arch Version Repository Size

Installing: php x86_64 7.0.21-1.el6.remi remi-php70 2.7 M Installing for dependencies: php-cli x86_64 7.0.21-1.el6.remi remi-php70 4.0 M php-common x86_64 7.0.21-1.el6.remi remi-php70 988 k php-json x86_64 7.0.21-1.el6.remi remi-php70 54 k

Transaction Summary

Install 1 Package (+3 Dependent packages)

Total download size: 7.7 M Installed size: 28 M Is this ok [y/d/N]: y Downloading packages: warning: /var/cache/yum/x86_64/latest/remi-php70/packages/php-common-7.0.21-1.el6.remi.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY0 kB/s | 992 kB 00:00:15 ETA Public key for php-common-7.0.21-1.el6.remi.x86_64.rpm is not installed (1/4): php-common-7.0.21-1.el6.remi.x86_64.rpm | 988 kB 00:00:01 (2/4): php-json-7.0.21-1.el6.remi.x86_64.rpm | 54 kB 00:00:02 (3/4): php-7.0.21-1.el6.remi.x86_64.rpm | 2.7 MB 00:00:08 (4/4): php-cli-7.0.21-1.el6.remi.x86_64.rpm | 4.0 MB 00:03:22

Total 39 kB/s | 7.7 MB 00:03:22 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi Importing GPG key 0x00F97F56: Userid : "Remi Collet RPMS@FamilleCollet.com" Fingerprint: 1ee0 4cce 88a4 ae4a a29a 5df5 004e 6f47 00f9 7f56 Package : remi-release-6.9-1.el6.remi.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi Is this ok [y/N]: y Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : php-json-7.0.21-1.el6.remi.x86_64 1/4 Installing : php-common-7.0.21-1.el6.remi.x86_64 2/4 Installing : php-cli-7.0.21-1.el6.remi.x86_64 3/4 Installing : php-7.0.21-1.el6.remi.x86_64 4/4 Verifying : php-7.0.21-1.el6.remi.x86_64 1/4 Verifying : php-common-7.0.21-1.el6.remi.x86_64 2/4 Verifying : php-cli-7.0.21-1.el6.remi.x86_64 3/4 Verifying : php-json-7.0.21-1.el6.remi.x86_64 4/4

Installed: php.x86_64 0:7.0.21-1.el6.remi

Dependency Installed: php-cli.x86_64 0:7.0.21-1.el6.remi php-common.x86_64 0:7.0.21-1.el6.remi php-json.x86_64 0:7.0.21-1.el6.remi

Complete!

sudo yum --enablerepo=remi-php70 --disablerepo=amzn-main install php-pdo php-mbstring php-pecl-zip php-fpm

[ec2-user@ip-172-31-2-34 ~]$ yum --disablerepo=amzn-main --enablerepo=epel install libwebp Loaded plugins: priorities, update-motd, upgrade-helper You need to be root to perform this command. [ec2-user@ip-172-31-2-34 ~]$ sudo yum --disablerepo=amzn-main --enablerepo=epel install libwebp Loaded plugins: priorities, update-motd, upgrade-helper amzn-updates | 2.3 kB 00:00:00 epel/x86_64/metalink | 4.2 kB 00:00:00 epel | 4.3 kB 00:00:00 (1/3): epel/x86_64/group_gz | 150 kB 00:00:00 (2/3): epel/x86_64/updateinfo | 745 kB 00:00:00 (3/3): epel/x86_64/primary_db | 5.9 MB 00:00:00 68 packages excluded due to repository priority protections Resolving Dependencies --> Running transaction check ---> Package libwebp.x86_64 0:0.4.3-3.el6 will be installed --> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================== Package Arch Version Repository Size

Installing: libwebp x86_64 0.4.3-3.el6 epel 210 k

Transaction Summary

Install 1 Package

Total download size: 210 k Installed size: 659 k Is this ok [y/d/N]: y Is this ok [y/d/N]: y Downloading packages: warning: /var/cache/yum/x86_64/latest/epel/packages/libwebp-0.4.3-3.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Public key for libwebp-0.4.3-3.el6.x86_64.rpm is not installed libwebp-0.4.3-3.el6.x86_64.rpm | 210 kB 00:00:00 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 Importing GPG key 0x0608B895: Userid : "EPEL (6) epel@fedoraproject.org" Fingerprint: 8c3b e96a f230 9184 da5c 0dae 3b49 df2a 0608 b895 Package : epel-release-6-8.9.amzn1.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 Is this ok [y/N]: y Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : libwebp-0.4.3-3.el6.x86_64 1/1 Verifying : libwebp-0.4.3-3.el6.x86_64 1/1

Installed: libwebp.x86_64 0:0.4.3-3.el6

Complete! [ec2-user@ip-172-31-2-34 ~]$ sudo yum install libmcrypt Loaded plugins: priorities, update-motd, upgrade-helper 9 packages excluded due to repository priority protections Resolving Dependencies --> Running transaction check ---> Package libmcrypt.x86_64 0:2.5.8-9.1.2.amzn1 will be installed --> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================== Package Arch Version Repository Size

Installing: libmcrypt x86_64 2.5.8-9.1.2.amzn1 amzn-main 110 k

Transaction Summary

Install 1 Package

Total download size: 110 k Installed size: 281 k Is this ok [y/d/N]: y Downloading packages: libmcrypt-2.5.8-9.1.2.amzn1.x86_64.rpm | 110 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : libmcrypt-2.5.8-9.1.2.amzn1.x86_64 1/1 Verifying : libmcrypt-2.5.8-9.1.2.amzn1.x86_64 1/1

Installed: libmcrypt.x86_64 0:2.5.8-9.1.2.amzn1

Complete!

[ec2-user@ip-172-31-2-34 ~]$ sudo service nginx start Starting nginx: [ OK ] [ec2-user@ip-172-31-2-34 ~]$ chkconfig nginx on You do not have enough privileges to perform this operation. [ec2-user@ip-172-31-2-34 ~]$ sudo chkconfig nginx on [ec2-user@ip-172-31-2-34 ~]$ sudo ervice php-fpm start sudo: ervice: command not found [ec2-user@ip-172-31-2-34 ~]$ sudo service php-fpm start Starting php-fpm: [ OK ] [ec2-user@ip-172-31-2-34 ~]$ sudo chkconfig php-fpm on


All rights reserved

Viblo
Hãy đăng ký một tài khoản Viblo để nhận được nhiều bài viết thú vị hơn.
Đăng kí