- 确定网卡名称
ip addr
通常会返回至少两个设备,固定的 lo
和 不固定的设备名,假设为 eth0
。
- 编辑文件
/etc/network/interfaces
,常见配置如下:
auto eth0
iface eth0 inet static
address 192.168.0.5
netmask 24
gateway 192.168.0.1
dns-nameservers 114.114.114.114
ip addr
通常会返回至少两个设备,固定的 lo
和 不固定的设备名,假设为 eth0
。
/etc/network/interfaces
,常见配置如下:auto eth0
iface eth0 inet static
address 192.168.0.5
netmask 24
gateway 192.168.0.1
dns-nameservers 114.114.114.114
sudo apt-get install php-dev php-pear build-essential libaio1
sudo pecl install oci8 # 出现提示直接回车
sudo echo "extension=oci8.so" >> /etc/php/7.x/mods-available/oci8.ini # 注意修改目录(php版本号),文件权限应为 `644`
sudo phpenmod oci8
sudo service apache2 restart
或直接下载对应编译版本,解压后放到 /usr/lib/php/编译日期/
目录下(文件权限 644): php/20151012,php/20160303,php/20170718