php centos yum安装lamp 编译安装oci8

在centos上使用phpstudy配置完环境之后,httpd出现了重复安装的情况,

1.查看是否安装httpd:

find / -name httpd
2.更新

yum -y update

3.安装apache

yum install httpd httpd-devel 
chkconfig mysqld on  设为开启启动


/etc/init.d/httpd start 启动apache 
chkconfig httpd on 设为开机启动
4.安装mysql

yum install mysql mysql-server mysql-devel 
/etc/init.d/mysqld start 启动mysql
5.登录mysql修改密码

mysql>; USE mysql; 
mysql>; UPDATE user SET Password=PASSWORD('newpassword') WHERE user='root'; 
mysql>; FLUSH PRIVILEGES;
6.允许远程登录
mysql -u root -p 
Enter Password: <your new password> 
mysql>GRANT ALL PRIVILEGES ON *.* TO '用户名'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION; 
chkconfig mysqld on  设为开机启动项

7.安装PHP
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml 
/etc/init.d/httpd restart

8.测试

在/var/www/html/新建个test.php文件,将以下内容写入,然后保存。 

<? 
phpinfo(); 
?> 
9. 在客户端浏览器里打开http://serverip/test.php,若能成功显示,则表示安装成功。 

10.ls cd 进入rpm存放目录,执行rmp安装oracle

rpm -ivh oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm 
rpm -ivh oracle-instantclient12.1-jdbc-12.1.0.2.0-1.x86_64.rpm
rpm -ivh oracle-instantclient12.1-odbc-12.1.0.2.0-1.x86_64.rpm
rpm -ivh oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm 
rpm -ivh oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm 
rpm -ivh oracle-instantclient12.1-tools-12.1.0.2.0-1.x86_64.rpm


11.查找存在oracle名字的路径,判断oracle客户端是否安装成功

find / -name oracle

如果出现三条记录就是安装成功

/usr/include/oracle
/usr/share/oracle
/usr/lib/oracle

12.安装C和C++的编译环境

安装gcc:

yum install gcc 
安装g++:
yum install gcc-c++


13.解压php-oci 扩展

tar  -zxvf oci8-2.0.12.tgz 

14,解压结束后,cd 进入oci8-2.0.12目录

cd oci8-2.0.12

15.编译安装oci8扩展

phpize
./configure
make
make install

16.在/etc/php.d里面编辑oci8.ini,直接粘贴复制下面的代码,保存即可

; Enable oci8 extension module
extension=/usr/lib64/php/modules/oci8.so

17.安装完成后,重启httpd

service httpd restart
18.查看test.php中是否有oci8,如果有表示安装oci8成功











评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值