How to install openvpn from sources?

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
Deabuggy
OpenVpn Newbie
Posts: 8
Joined: Thu Feb 18, 2016 9:36 am

How to install openvpn from sources?

Post by Deabuggy » Thu Feb 18, 2016 9:43 am

Hello!

Please, help me.
I want to get the the last version, which is not in the official repositories yet.
How can i install openvpn server from sources?
I donwloaded openvpn-2.3.10.zip.
when i do:

Code: Select all

./configue
make
make install
i dont see /etc/openvpn directory as a result, and there is no openvpn in the /etc/init.d/
OS Debian 8.
thanks.

TiTex
OpenVPN Super User
Posts: 310
Joined: Tue Apr 12, 2011 6:22 am

Re: How to install openvpn from sources?

Post by TiTex » Thu Feb 18, 2016 1:22 pm

if you managed to compile it from source without errors , check the in /usr/local/bin , /usr/local/etc/

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: How to install openvpn from sources?

Post by Traffic » Fri Feb 19, 2016 2:24 am

Upgrade to systemd.

:mrgreen:

Deabuggy
OpenVpn Newbie
Posts: 8
Joined: Thu Feb 18, 2016 9:36 am

Re: How to install openvpn from sources?

Post by Deabuggy » Fri Feb 19, 2016 9:00 am

TiTex wrote:if you managed to compile it from source without errors , check the in /usr/local/bin , /usr/local/etc/
No, there is no openvpn.

I see openvpn compiled in the subfolder op openvpn sources
/Software/openvpn-2.3.10.b/src/openvpn/openvpn
Traffic wrote:Upgrade to systemd.

:mrgreen:
Good idea, but i have a some problems with it.
I tested openvpn service:
/Software/openvpn-2.3.10.b/src/openvpn/openvpn --cd /etc/openvpn --daemon --config /etc/openvpn/server.conf
works good.

My systemd profile:
etc/systemd/system/myopenvpn.service

Code: Select all

[Unit]
Description=myopenvpn
After=syslog.target
After=network.target
Requires=network.target

[Service]
Type=forking
PIDFile=/run/myopenvpn.pid
WorkingDirectory=/etc/openvpn/

User=root
Group=root

Environment=RACK_ENV=production

OOMScoreAdjust=-1000

ExecStart = /Software/openvpn-2.3.10.b/src/openvpn/openvpn --cd /etc/openvpn --daemon --config /etc/openvpn/server.conf
TimeoutSec=10

[Install]
WantedBy=multi-user.target
systemctl start myopenvpn.service
gives:

Code: Select all

Job for myopenvpn.service failed. See 'systemctl status myopenvpn.service' and 'journalctl -xn' for details.
systemctl status myopenvpn.service

Code: Select all

● myopenvpn.service - myopenvpn
   Loaded: loaded (/etc/systemd/system/myopenvpn.service; enabled)
   Active: failed (Result: timeout) since Fri 2016-02-19 09:57:10 CET; 42s ago
  Process: 1134 ExecStart=/Software/openvpn-2.3.10.b/src/openvpn/openvpn --cd /etc/openvpn --daemon --config /etc/openvpn/server.conf (code=exited, status=0/SUCCESS)

Feb 19 09:57:10 myserver systemd[1]: myopenvpn.service start operation timed out. Terminating.
Feb 19 09:57:10 myserver systemd[1]: Failed to start myopenvpn.
Feb 19 09:57:10 myserver systemd[1]: Unit myopenvpn.service entered failed state.
journalctl -xn

Code: Select all

Feb 19 09:59:17 myserver systemd[1]: myopenvpn.service start operation timed out. Terminating.
Feb 19 09:59:17 myserver systemd[1]: Failed to start myopenvpn.
-- Subject: Unit myopenvpn.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit myopenvpn.service has failed.
-- 
-- The result is failed.

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: How to install openvpn from sources?

Post by Traffic » Fri Feb 19, 2016 11:44 am

Deabuggy wrote:I tested openvpn service:
/Software/openvpn-2.3.10.b/src/openvpn/openvpn --cd /etc/openvpn --daemon --config /etc/openvpn/server.conf
works good.
Please post /etc/openvpn/server.conf

Post Reply