Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
php
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansible
Roles
php
Commits
31e1486c
Commit
31e1486c
authored
5 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Installl oci8 for PHP 7.2
parent
b731e265
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tasks/oci-7.0.yml
+1
-1
1 addition, 1 deletion
tasks/oci-7.0.yml
tasks/oci-7.2.yml
+97
-0
97 additions, 0 deletions
tasks/oci-7.2.yml
templates/etc-ld-oracle
+1
-0
1 addition, 0 deletions
templates/etc-ld-oracle
with
99 additions
and
1 deletion
tasks/oci-7.0.yml
+
1
−
1
View file @
31e1486c
---
# file: roles/php/tasks/oci-7.yml
# file: roles/php/tasks/oci-7.
0.
yml
-
name
:
Check OCI Requirement
stat
:
...
...
This diff is collapsed.
Click to expand it.
tasks/oci-7.2.yml
0 → 100644
+
97
−
0
View file @
31e1486c
---
# file: roles/php/tasks/oci-7.2.yml
#
# https://gist.github.com/Yukibashiri/cebaeaccbe531665a5704b1b34a3498e
-
name
:
Check OCI Requirement
stat
:
path
:
/usr/lib/php/20170718/oci8.so
register
:
oci_file
-
block
:
-
name
:
Enable OCI for PHP
copy
:
content
:
extension={{ item }}.so
dest
:
/etc/{{ php_base_dir }}/{{ php_conf_dir }}/{{ item }}.ini
owner
:
root
group
:
root
mode
:
0644
with_items
:
-
oci8
-
name
:
Remove possible components in /tmp
file
:
path
:
/tmp/{{ item }}
state
:
absent
with_items
:
-
instantclient_18_5
-
oracle_x64_18_5_0_0_0_oci8_so_php_7
-
name
:
Make available Oracle InstantClient
command
:
scp -r {{ repository }}{{ item }} /tmp/
become
:
no
with_items
:
-
instantclient_18_5
-
oracle_x64_18_5_0_0_0_oci8_so_php_7
-
name
:
Remove /opt/oracle/instantclient_18_5
file
:
path
:
/opt/oracle/instantclient_18_5
state
:
absent
-
name
:
Move Oracle InstantClient to /opt/oracle
command
:
mv /tmp/instantclient_18_5 /opt/oracle
-
name
:
Move oci8 to /usr/lib/php
command
:
mv /tmp/oracle_x64_18_5_0_0_0_oci8_so_php_7 /usr/lib/php/20170718/oci8.so
-
name
:
Change ownership for Oracle InstantClient
file
:
path
:
'
{{
item
}}'
owner
:
root
group
:
root
recurse
:
yes
follow
:
no
with_items
:
-
/opt/oracle/instantclient_18_5
-
name
:
Ensure log directories
file
:
path
:
/opt/oracle/instantclient_18_5/log/diag/clients
owner
:
www-data
group
:
root
state
:
directory
mode
:
0775
follow
:
no
-
name
:
Set permissions in log directories
file
:
path
:
/opt/oracle/instantclient_18_5/log
owner
:
www-data
group
:
root
mode
:
0775
recurse
:
yes
follow
:
no
-
name
:
Create symlinks
file
:
src
:
/opt/oracle/instantclient_18_5/{{ item }}.so.18.1
dest
:
/opt/oracle/instantclient_18_5/{{ item }}.so
state
:
link
with_items
:
-
libclntsh
-
libocci
-
name
:
Configure libraries
template
:
src
:
etc-ld-oracle
dest
:
/etc/ld.so.conf.d/oracle-instantclient.conf
owner
:
root
group
:
root
mode
:
0644
-
name
:
Update libraries
command
:
ldconfig
when
:
not oci_file.stat.exists
This diff is collapsed.
Click to expand it.
templates/etc-ld-oracle
0 → 100644
+
1
−
0
View file @
31e1486c
/opt/oracle/instantclient_18_5
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment