Debian / Ubuntu

Install PHP 5.3 on Ubuntu 17.10

I know, I know, I know, I know! I need to update my code! If I haven’t said it already, I know! But… I don’t have time to updated hundreds upon hundreds of lines of code, so I’m taking the easy way out.

I found the steps to do it here: http://sandeep-bisht.blogspot.com/2017/08/phpbrew-install-php-53-in-ubuntu-1604.html

The system I’m installing from is a fresh install of Ubuntu 17.10, so I’m assuming NOTHING has been pre-installed with these instructions.

Install PHP

sudo apt install php -y

Download and configure phpbrew

sudo apt install -y curl
curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   130  100   130    0     0     43      0  0:00:03  0:00:03 --:--:--    42
100 1792k  100 1792k    0     0   224k      0  0:00:08  0:00:08 --:--:--  460k
chmod +x phpbrew
sudo mv phpbrew /usr/bin/phpbrew
sudo nano /root/.bashrc
# Added this line to install PHP 5.3 per instructions found here:
# http://sandeep-bisht.blogspot.com/2017/08/phpbrew-install-php-53-in-ubuntu-1604.html
[[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc

Initialize phpbrew

phpbrew init
Using root: /home/thomasr/.phpbrew
Initialization successfully finished!
<=====================================================>
Phpbrew environment is initialized, required directories are created under

    /home/thomasr/.phpbrew

Paste the following line(s) to the end of your ~/.bashrc and start a
new shell, phpbrew should be up and fully functional from there:

    source /home/thomasr/.phpbrew/bashrc

To enable PHP version info in your shell prompt, please set PHPBREW_SET_PROMPT=1
in your `~/.bashrc` before you source `~/.phpbrew/bashrc`

    export PHPBREW_SET_PROMPT=1

To enable .phpbrewrc file searching, please export the following variable:

    export PHPBREW_RC_ENABLE=1


For further instructions, simply run `phpbrew` to see the help message.

Enjoy phpbrew at $HOME!!

<=====================================================>

Update for old versions and display

phpbrew update --old
===> Fetching release list...
Downloading https://secure.php.net/releases/index.php?json&version=7&max=1000 via php stream
Downloading https://secure.php.net/releases/index.php?json&version=5&max=1000 via php stream
7.2: 4 releases
7.1: 16 releases
7.0: 29 releases
5.6: 35 releases
5.5: 39 releases
5.4: 46 releases
5.3: 30 releases
5.2: 17 releases
5.1: 7 releases
5.0: 6 releases
===> Done

phpbrew known

By admin on March 2, 2018 | Debian / Ubuntu, Linux, PHP

How to add an additional IP in Debian or Ubuntu

View Current Network Settings

Before we start, lets take a look at the current settings.

cat /etc/network/interfaces
auto eth0
iface eth0 inet static
address 123.34.45.56
netmask 255.255.255.0
gateway 123.34.45.1
hwaddress 00:12:34:56:78:9A
dns-nameservers 69.64.66.11 69.64.66.10

auto lo
iface lo inet loopback

 

Configure Updated Settings

Before proceeding, a couple of variables need to be defined.

EthX:1 = The interface your IP is connected to. If your current IP is set with auto eth0, you will use eth0:1. If your current IP is set with auto eth1, you will need to use eth1:1.
IpAddress = The IP address you are adding to your server.
GatewayIP = The IP address you are adding to your server, but replace the last octet with 1. Example: if your IP address is 123.45.67.89, then gatewayIP = 123.45.67.1

 
Using the variable defined above, you are ready to configure the network adaptor to use your new IP and gateway. Use the nano editor which comes installed by default with Ubuntu and add the following lines underneath dns-nameservers.

sudo nano /etc/network/interfaces
auto EthX:1
iface EthX:1 inet static 
address IpAddress
netmask 255.255.255.0 
gateway GatewayIP

Once you have entered the values correctly, press Ctrl+Enter to save it with the current filename, then press Ctrl+X to exit the editor.

Provided you entered your values correctly, verify the new settings by retyping the cat command:

cat /etc/network/interfaces
auto eth0
iface eth0 inet static 
address 123.34.45.56
netmask 255.255.255.0 
gateway 123.34.45.1 
dns-nameservers 69.64.66.11 69.64.66.10

auto eth0:1
iface eth0:1 inet static 
address 123.45.67.89
netmask 255.255.255.0 
gateway 123.45.67.1

auto lo
iface lo inet loopback

 

Apply setting to Interface

After you have determined the values entered are correct, restart networking with the following command:

sudo service networking restart
stop: Unknown instance: 
networking stop/waiting
administrator@ubuntu:~#

 

Finish

Your IP should now be working correctly.

By admin on March 6, 2014 | Debian / Ubuntu, Linux | A comment?
Tags: